generated-configure.sh revision 732:3cbcc2b6ba41
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: build-dev@openjdk.java.net about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$1; test $as_status -eq 0 && as_status=1
370  if test "$4"; then
371    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373  fi
374  $as_echo "$as_me: error: $2" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_JAVA
603JOBS
604MEMORY_SIZE
605NUM_CORES
606ENABLE_INTREE_EC
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611LLVM_LIBS
612LLVM_LDFLAGS
613LLVM_CFLAGS
614LLVM_CONFIG
615LIBFFI_LIBS
616LIBFFI_CFLAGS
617STATIC_CXX_SETTING
618LIBDL
619LIBM
620LIBZIP_CAN_USE_MMAP
621USE_EXTERNAL_LIBZ
622USE_EXTERNAL_LIBGIF
623USE_EXTERNAL_LIBJPEG
624ALSA_LIBS
625ALSA_CFLAGS
626FREETYPE2_LIB_PATH
627USING_SYSTEM_FT_LIB
628FREETYPE2_LIBS
629FREETYPE2_CFLAGS
630CUPS_CFLAGS
631OPENWIN_HOME
632X_EXTRA_LIBS
633X_LIBS
634X_PRE_LIBS
635X_CFLAGS
636XMKMF
637CXXFLAGS_DEBUG_SYMBOLS
638CFLAGS_DEBUG_SYMBOLS
639ZIP_DEBUGINFO_FILES
640ENABLE_DEBUG_SYMBOLS
641COMPILER_SUPPORTS_TARGET_BITS_FLAG
642ZERO_ARCHFLAG
643LDFLAGS_CXX_JDK
644LDFLAGS_JDKEXE_SUFFIX
645LDFLAGS_JDKLIB_SUFFIX
646LDFLAGS_JDKEXE
647LDFLAGS_JDKLIB
648CXXFLAGS_JDKEXE
649CXXFLAGS_JDKLIB
650CFLAGS_JDKEXE
651CFLAGS_JDKLIB
652MACOSX_VERSION_MIN
653PACKAGE_PATH
654LEGACY_EXTRA_LDFLAGS
655LEGACY_EXTRA_CXXFLAGS
656LEGACY_EXTRA_CFLAGS
657CXX_FLAG_DEPS
658C_FLAG_DEPS
659CXX_O_FLAG_NONE
660CXX_O_FLAG_NORM
661CXX_O_FLAG_HI
662CXX_O_FLAG_HIGHEST
663C_O_FLAG_NONE
664C_O_FLAG_NORM
665C_O_FLAG_HI
666C_O_FLAG_HIGHEST
667POST_MCS_CMD
668POST_STRIP_CMD
669SET_EXECUTABLE_ORIGIN
670SET_SHARED_LIBRARY_ORIGIN
671CXX_FLAG_REORDER
672C_FLAG_REORDER
673SET_SHARED_LIBRARY_MAPFILE
674SET_SHARED_LIBRARY_NAME
675SHARED_LIBRARY_FLAGS
676EXE_SUFFIX
677STATIC_LIBRARY_SUFFIX
678SHARED_LIBRARY_SUFFIX
679LIBRARY_PREFIX
680STATIC_LIBRARY
681SHARED_LIBRARY
682OBJ_SUFFIX
683COMPILER_NAME
684JT_HOME
685JTREGEXE
686LIPO
687ac_ct_OBJDUMP
688OBJDUMP
689ac_ct_OBJCOPY
690OBJCOPY
691MCS
692STRIP
693GNM
694NM
695AS
696CXXCPP
697CPP
698COMPILER_TYPE
699RC_FLAGS
700DUMPBIN
701WINAR
702HOTSPOT_RC
703HOTSPOT_MT
704RC
705MT
706WINLD
707HOTSPOT_LD
708HOTSPOT_CXX
709ARFLAGS
710AR
711LDEXECXX
712LDCXX
713LDEXE
714LD
715ac_ct_OBJC
716OBJCFLAGS
717OBJC
718ac_ct_CXX
719CXXFLAGS
720CXX
721ac_ct_PROPER_COMPILER_CXX
722PROPER_COMPILER_CXX
723POTENTIAL_CXX
724TOOLS_DIR_CXX
725OBJEXT
726EXEEXT
727ac_ct_CC
728CPPFLAGS
729LDFLAGS
730CFLAGS
731CC
732ac_ct_PROPER_COMPILER_CC
733PROPER_COMPILER_CC
734POTENTIAL_CC
735TOOLS_DIR_CC
736BUILD_LD
737BUILD_CXX
738BUILD_CC
739MSVCR_DLL
740DXSDK_INCLUDE_PATH
741DXSDK_LIB_PATH
742VS_PATH
743VS_LIB
744VS_INCLUDE
745CYGWIN_LINK
746AR_OUT_OPTION
747LD_OUT_OPTION
748EXE_OUT_OPTION
749CC_OUT_OPTION
750BUILD_HOTSPOT
751HOTSPOT_DIST
752BUILD_OUTPUT
753OVERRIDE_SRC_ROOT
754ADD_SRC_ROOT
755JDK_TOPDIR
756NASHORN_TOPDIR
757HOTSPOT_TOPDIR
758JAXWS_TOPDIR
759JAXP_TOPDIR
760CORBA_TOPDIR
761LANGTOOLS_TOPDIR
762BOOT_JDK_JVMARGS
763JAVAC_FLAGS
764BOOT_JDK_SOURCETARGET
765BOOT_JDK
766BOOT_TOOLSJAR
767BOOT_RTJAR
768JAVA_CHECK
769JAVAC_CHECK
770COOKED_BUILD_NUMBER
771JDK_VERSION
772COPYRIGHT_YEAR
773MACOSX_BUNDLE_ID_BASE
774MACOSX_BUNDLE_NAME_BASE
775COMPANY_NAME
776JDK_RC_PLATFORM_NAME
777PRODUCT_SUFFIX
778PRODUCT_NAME
779LAUNCHER_NAME
780MILESTONE
781JDK_BUILD_NUMBER
782JDK_UPDATE_VERSION
783JDK_MICRO_VERSION
784JDK_MINOR_VERSION
785JDK_MAJOR_VERSION
786USER_RELEASE_SUFFIX
787COMPRESS_JARS
788UNLIMITED_CRYPTO
789CACERTS_FILE
790TEST_IN_BUILD
791BUILD_HEADLESS
792SUPPORT_HEADFUL
793SUPPORT_HEADLESS
794BDEPS_FTP
795BDEPS_UNZIP
796OS_VERSION_MICRO
797OS_VERSION_MINOR
798OS_VERSION_MAJOR
799PKG_CONFIG
800CODESIGN
801XATTR
802TIME
803STAT
804HG
805READELF
806OTOOL
807LDD
808ZIP
809UNZIP
810FIND_DELETE
811MAKE
812CHECK_TOOLSDIR_MAKE
813CHECK_TOOLSDIR_GMAKE
814CHECK_MAKE
815CHECK_GMAKE
816PKGHANDLER
817OUTPUT_ROOT
818CONF_NAME
819SPEC
820BUILD_VARIANT_RELEASE
821DEBUG_CLASSFILES
822FASTDEBUG
823VARIANT
824DEBUG_LEVEL
825MACOSX_UNIVERSAL
826INCLUDE_SA
827JVM_VARIANT_ZEROSHARK
828JVM_VARIANT_ZERO
829JVM_VARIANT_KERNEL
830JVM_VARIANT_MINIMAL1
831JVM_VARIANT_CLIENT
832JVM_VARIANT_SERVER
833JVM_VARIANTS
834JDK_VARIANT
835SET_OPENJDK
836BUILD_LOG_WRAPPER
837BUILD_LOG_PREVIOUS
838BUILD_LOG
839SYS_ROOT
840PATH_SEP
841SRC_ROOT
842ZERO_ARCHDEF
843DEFINE_CROSS_COMPILE_ARCH
844LP64
845OPENJDK_TARGET_OS_API_DIR
846OPENJDK_TARGET_CPU_JLI_CFLAGS
847OPENJDK_TARGET_CPU_OSARCH
848OPENJDK_TARGET_CPU_ISADIR
849OPENJDK_TARGET_CPU_LIBDIR
850OPENJDK_TARGET_CPU_LEGACY_LIB
851OPENJDK_TARGET_CPU_LEGACY
852REQUIRED_OS_VERSION
853REQUIRED_OS_NAME
854COMPILE_TYPE
855OPENJDK_TARGET_CPU_ENDIAN
856OPENJDK_TARGET_CPU_BITS
857OPENJDK_TARGET_CPU_ARCH
858OPENJDK_TARGET_CPU
859OPENJDK_TARGET_OS_API
860OPENJDK_TARGET_OS
861OPENJDK_BUILD_CPU_ENDIAN
862OPENJDK_BUILD_CPU_BITS
863OPENJDK_BUILD_CPU_ARCH
864OPENJDK_BUILD_CPU
865OPENJDK_BUILD_OS_API
866OPENJDK_BUILD_OS
867OPENJDK_BUILD_AUTOCONF_NAME
868OPENJDK_TARGET_AUTOCONF_NAME
869target_os
870target_vendor
871target_cpu
872target
873host_os
874host_vendor
875host_cpu
876host
877build_os
878build_vendor
879build_cpu
880build
881SETFILE
882DF
883READLINK
884CYGPATH
885NAWK
886SED
887FGREP
888EGREP
889GREP
890AWK
891XARGS
892WHICH
893WC
894UNIQ
895UNAME
896TR
897TOUCH
898TEE
899TAR
900TAIL
901SORT
902SH
903RM
904PRINTF
905MV
906MKTEMP
907MKDIR
908LS
909LN
910HEAD
911FIND
912FILE
913EXPR
914ECHO
915DIRNAME
916DIFF
917DATE
918CUT
919CPIO
920CP
921COMM
922CMP
923CHMOD
924CAT
925BASH
926BASENAME
927DATE_WHEN_CONFIGURED
928CONFIGURE_COMMAND_LINE
929CUSTOM_MAKE_DIR
930target_alias
931host_alias
932build_alias
933LIBS
934ECHO_T
935ECHO_N
936ECHO_C
937DEFS
938mandir
939localedir
940libdir
941psdir
942pdfdir
943dvidir
944htmldir
945infodir
946docdir
947oldincludedir
948includedir
949localstatedir
950sharedstatedir
951sysconfdir
952datadir
953datarootdir
954libexecdir
955sbindir
956bindir
957program_transform_name
958prefix
959exec_prefix
960PACKAGE_URL
961PACKAGE_BUGREPORT
962PACKAGE_STRING
963PACKAGE_VERSION
964PACKAGE_TARNAME
965PACKAGE_NAME
966PATH_SEPARATOR
967SHELL'
968ac_subst_files=''
969ac_user_opts='
970enable_option_checking
971with_custom_make_dir
972with_target_bits
973with_sys_root
974with_tools_dir
975with_devkit
976enable_openjdk_only
977with_jdk_variant
978with_jvm_variants
979enable_debug
980with_debug_level
981with_conf_name
982with_builddeps_conf
983with_builddeps_server
984with_builddeps_dir
985with_builddeps_group
986enable_headful
987enable_hotspot_test_in_build
988with_cacerts_file
989enable_unlimited_crypto
990with_milestone
991with_update_version
992with_build_number
993with_user_release_suffix
994with_boot_jdk
995with_boot_jdk_jvmargs
996with_add_source_root
997with_override_source_root
998with_adds_and_overrides
999with_override_langtools
1000with_override_corba
1001with_override_jaxp
1002with_override_jaxws
1003with_override_hotspot
1004with_override_jdk
1005with_import_hotspot
1006with_msvcr_dll
1007with_dxsdk
1008with_dxsdk_lib
1009with_dxsdk_include
1010with_jtreg
1011with_extra_cflags
1012with_extra_cxxflags
1013with_extra_ldflags
1014enable_debug_symbols
1015enable_zip_debug_info
1016enable_macosx_runtime_support
1017with_x
1018with_cups
1019with_cups_include
1020with_freetype
1021with_alsa
1022with_alsa_include
1023with_alsa_lib
1024with_giflib
1025with_zlib
1026with_stdc__lib
1027with_num_cores
1028with_memory_size
1029with_jobs
1030with_sjavac_server_java
1031enable_sjavac
1032enable_precompiled_headers
1033enable_ccache
1034with_ccache_dir
1035'
1036      ac_precious_vars='build_alias
1037host_alias
1038target_alias
1039PKG_CONFIG
1040CC
1041CFLAGS
1042LDFLAGS
1043LIBS
1044CPPFLAGS
1045CXX
1046CXXFLAGS
1047CCC
1048OBJC
1049OBJCFLAGS
1050CPP
1051CXXCPP
1052XMKMF
1053FREETYPE2_CFLAGS
1054FREETYPE2_LIBS
1055ALSA_CFLAGS
1056ALSA_LIBS
1057LIBFFI_CFLAGS
1058LIBFFI_LIBS'
1059
1060
1061# Initialize some variables set by options.
1062ac_init_help=
1063ac_init_version=false
1064ac_unrecognized_opts=
1065ac_unrecognized_sep=
1066# The variables have the same names as the options, with
1067# dashes changed to underlines.
1068cache_file=/dev/null
1069exec_prefix=NONE
1070no_create=
1071no_recursion=
1072prefix=NONE
1073program_prefix=NONE
1074program_suffix=NONE
1075program_transform_name=s,x,x,
1076silent=
1077site=
1078srcdir=
1079verbose=
1080x_includes=NONE
1081x_libraries=NONE
1082
1083# Installation directory options.
1084# These are left unexpanded so users can "make install exec_prefix=/foo"
1085# and all the variables that are supposed to be based on exec_prefix
1086# by default will actually change.
1087# Use braces instead of parens because sh, perl, etc. also accept them.
1088# (The list follows the same order as the GNU Coding Standards.)
1089bindir='${exec_prefix}/bin'
1090sbindir='${exec_prefix}/sbin'
1091libexecdir='${exec_prefix}/libexec'
1092datarootdir='${prefix}/share'
1093datadir='${datarootdir}'
1094sysconfdir='${prefix}/etc'
1095sharedstatedir='${prefix}/com'
1096localstatedir='${prefix}/var'
1097includedir='${prefix}/include'
1098oldincludedir='/usr/include'
1099docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1100infodir='${datarootdir}/info'
1101htmldir='${docdir}'
1102dvidir='${docdir}'
1103pdfdir='${docdir}'
1104psdir='${docdir}'
1105libdir='${exec_prefix}/lib'
1106localedir='${datarootdir}/locale'
1107mandir='${datarootdir}/man'
1108
1109ac_prev=
1110ac_dashdash=
1111for ac_option
1112do
1113  # If the previous option needs an argument, assign it.
1114  if test -n "$ac_prev"; then
1115    eval $ac_prev=\$ac_option
1116    ac_prev=
1117    continue
1118  fi
1119
1120  case $ac_option in
1121  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1122  *=)   ac_optarg= ;;
1123  *)    ac_optarg=yes ;;
1124  esac
1125
1126  # Accept the important Cygnus configure options, so we can diagnose typos.
1127
1128  case $ac_dashdash$ac_option in
1129  --)
1130    ac_dashdash=yes ;;
1131
1132  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1133    ac_prev=bindir ;;
1134  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1135    bindir=$ac_optarg ;;
1136
1137  -build | --build | --buil | --bui | --bu)
1138    ac_prev=build_alias ;;
1139  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1140    build_alias=$ac_optarg ;;
1141
1142  -cache-file | --cache-file | --cache-fil | --cache-fi \
1143  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1144    ac_prev=cache_file ;;
1145  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1146  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1147    cache_file=$ac_optarg ;;
1148
1149  --config-cache | -C)
1150    cache_file=config.cache ;;
1151
1152  -datadir | --datadir | --datadi | --datad)
1153    ac_prev=datadir ;;
1154  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1155    datadir=$ac_optarg ;;
1156
1157  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1158  | --dataroo | --dataro | --datar)
1159    ac_prev=datarootdir ;;
1160  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1161  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1162    datarootdir=$ac_optarg ;;
1163
1164  -disable-* | --disable-*)
1165    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1166    # Reject names that are not valid shell variable names.
1167    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1168      as_fn_error $? "invalid feature name: $ac_useropt"
1169    ac_useropt_orig=$ac_useropt
1170    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1171    case $ac_user_opts in
1172      *"
1173"enable_$ac_useropt"
1174"*) ;;
1175      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1176	 ac_unrecognized_sep=', ';;
1177    esac
1178    eval enable_$ac_useropt=no ;;
1179
1180  -docdir | --docdir | --docdi | --doc | --do)
1181    ac_prev=docdir ;;
1182  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1183    docdir=$ac_optarg ;;
1184
1185  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1186    ac_prev=dvidir ;;
1187  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1188    dvidir=$ac_optarg ;;
1189
1190  -enable-* | --enable-*)
1191    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1192    # Reject names that are not valid shell variable names.
1193    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1194      as_fn_error $? "invalid feature name: $ac_useropt"
1195    ac_useropt_orig=$ac_useropt
1196    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1197    case $ac_user_opts in
1198      *"
1199"enable_$ac_useropt"
1200"*) ;;
1201      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1202	 ac_unrecognized_sep=', ';;
1203    esac
1204    eval enable_$ac_useropt=\$ac_optarg ;;
1205
1206  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1207  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1208  | --exec | --exe | --ex)
1209    ac_prev=exec_prefix ;;
1210  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1211  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1212  | --exec=* | --exe=* | --ex=*)
1213    exec_prefix=$ac_optarg ;;
1214
1215  -gas | --gas | --ga | --g)
1216    # Obsolete; use --with-gas.
1217    with_gas=yes ;;
1218
1219  -help | --help | --hel | --he | -h)
1220    ac_init_help=long ;;
1221  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1222    ac_init_help=recursive ;;
1223  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1224    ac_init_help=short ;;
1225
1226  -host | --host | --hos | --ho)
1227    ac_prev=host_alias ;;
1228  -host=* | --host=* | --hos=* | --ho=*)
1229    host_alias=$ac_optarg ;;
1230
1231  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1232    ac_prev=htmldir ;;
1233  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1234  | --ht=*)
1235    htmldir=$ac_optarg ;;
1236
1237  -includedir | --includedir | --includedi | --included | --include \
1238  | --includ | --inclu | --incl | --inc)
1239    ac_prev=includedir ;;
1240  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1241  | --includ=* | --inclu=* | --incl=* | --inc=*)
1242    includedir=$ac_optarg ;;
1243
1244  -infodir | --infodir | --infodi | --infod | --info | --inf)
1245    ac_prev=infodir ;;
1246  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1247    infodir=$ac_optarg ;;
1248
1249  -libdir | --libdir | --libdi | --libd)
1250    ac_prev=libdir ;;
1251  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1252    libdir=$ac_optarg ;;
1253
1254  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1255  | --libexe | --libex | --libe)
1256    ac_prev=libexecdir ;;
1257  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1258  | --libexe=* | --libex=* | --libe=*)
1259    libexecdir=$ac_optarg ;;
1260
1261  -localedir | --localedir | --localedi | --localed | --locale)
1262    ac_prev=localedir ;;
1263  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1264    localedir=$ac_optarg ;;
1265
1266  -localstatedir | --localstatedir | --localstatedi | --localstated \
1267  | --localstate | --localstat | --localsta | --localst | --locals)
1268    ac_prev=localstatedir ;;
1269  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1270  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1271    localstatedir=$ac_optarg ;;
1272
1273  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1274    ac_prev=mandir ;;
1275  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1276    mandir=$ac_optarg ;;
1277
1278  -nfp | --nfp | --nf)
1279    # Obsolete; use --without-fp.
1280    with_fp=no ;;
1281
1282  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1283  | --no-cr | --no-c | -n)
1284    no_create=yes ;;
1285
1286  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1287  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1288    no_recursion=yes ;;
1289
1290  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1291  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1292  | --oldin | --oldi | --old | --ol | --o)
1293    ac_prev=oldincludedir ;;
1294  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1295  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1296  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1297    oldincludedir=$ac_optarg ;;
1298
1299  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1300    ac_prev=prefix ;;
1301  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1302    prefix=$ac_optarg ;;
1303
1304  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1305  | --program-pre | --program-pr | --program-p)
1306    ac_prev=program_prefix ;;
1307  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1308  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1309    program_prefix=$ac_optarg ;;
1310
1311  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1312  | --program-suf | --program-su | --program-s)
1313    ac_prev=program_suffix ;;
1314  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1315  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1316    program_suffix=$ac_optarg ;;
1317
1318  -program-transform-name | --program-transform-name \
1319  | --program-transform-nam | --program-transform-na \
1320  | --program-transform-n | --program-transform- \
1321  | --program-transform | --program-transfor \
1322  | --program-transfo | --program-transf \
1323  | --program-trans | --program-tran \
1324  | --progr-tra | --program-tr | --program-t)
1325    ac_prev=program_transform_name ;;
1326  -program-transform-name=* | --program-transform-name=* \
1327  | --program-transform-nam=* | --program-transform-na=* \
1328  | --program-transform-n=* | --program-transform-=* \
1329  | --program-transform=* | --program-transfor=* \
1330  | --program-transfo=* | --program-transf=* \
1331  | --program-trans=* | --program-tran=* \
1332  | --progr-tra=* | --program-tr=* | --program-t=*)
1333    program_transform_name=$ac_optarg ;;
1334
1335  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1336    ac_prev=pdfdir ;;
1337  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1338    pdfdir=$ac_optarg ;;
1339
1340  -psdir | --psdir | --psdi | --psd | --ps)
1341    ac_prev=psdir ;;
1342  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1343    psdir=$ac_optarg ;;
1344
1345  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1346  | -silent | --silent | --silen | --sile | --sil)
1347    silent=yes ;;
1348
1349  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1350    ac_prev=sbindir ;;
1351  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1352  | --sbi=* | --sb=*)
1353    sbindir=$ac_optarg ;;
1354
1355  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1356  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1357  | --sharedst | --shareds | --shared | --share | --shar \
1358  | --sha | --sh)
1359    ac_prev=sharedstatedir ;;
1360  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1361  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1362  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1363  | --sha=* | --sh=*)
1364    sharedstatedir=$ac_optarg ;;
1365
1366  -site | --site | --sit)
1367    ac_prev=site ;;
1368  -site=* | --site=* | --sit=*)
1369    site=$ac_optarg ;;
1370
1371  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1372    ac_prev=srcdir ;;
1373  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1374    srcdir=$ac_optarg ;;
1375
1376  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1377  | --syscon | --sysco | --sysc | --sys | --sy)
1378    ac_prev=sysconfdir ;;
1379  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1380  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1381    sysconfdir=$ac_optarg ;;
1382
1383  -target | --target | --targe | --targ | --tar | --ta | --t)
1384    ac_prev=target_alias ;;
1385  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1386    target_alias=$ac_optarg ;;
1387
1388  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1389    verbose=yes ;;
1390
1391  -version | --version | --versio | --versi | --vers | -V)
1392    ac_init_version=: ;;
1393
1394  -with-* | --with-*)
1395    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1396    # Reject names that are not valid shell variable names.
1397    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1398      as_fn_error $? "invalid package name: $ac_useropt"
1399    ac_useropt_orig=$ac_useropt
1400    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1401    case $ac_user_opts in
1402      *"
1403"with_$ac_useropt"
1404"*) ;;
1405      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1406	 ac_unrecognized_sep=', ';;
1407    esac
1408    eval with_$ac_useropt=\$ac_optarg ;;
1409
1410  -without-* | --without-*)
1411    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1412    # Reject names that are not valid shell variable names.
1413    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1414      as_fn_error $? "invalid package name: $ac_useropt"
1415    ac_useropt_orig=$ac_useropt
1416    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1417    case $ac_user_opts in
1418      *"
1419"with_$ac_useropt"
1420"*) ;;
1421      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1422	 ac_unrecognized_sep=', ';;
1423    esac
1424    eval with_$ac_useropt=no ;;
1425
1426  --x)
1427    # Obsolete; use --with-x.
1428    with_x=yes ;;
1429
1430  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1431  | --x-incl | --x-inc | --x-in | --x-i)
1432    ac_prev=x_includes ;;
1433  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1434  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1435    x_includes=$ac_optarg ;;
1436
1437  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1438  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1439    ac_prev=x_libraries ;;
1440  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1441  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1442    x_libraries=$ac_optarg ;;
1443
1444  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1445Try \`$0 --help' for more information"
1446    ;;
1447
1448  *=*)
1449    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1450    # Reject names that are not valid shell variable names.
1451    case $ac_envvar in #(
1452      '' | [0-9]* | *[!_$as_cr_alnum]* )
1453      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1454    esac
1455    eval $ac_envvar=\$ac_optarg
1456    export $ac_envvar ;;
1457
1458  *)
1459    # FIXME: should be removed in autoconf 3.0.
1460    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1461    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1462      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1463    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1464    ;;
1465
1466  esac
1467done
1468
1469if test -n "$ac_prev"; then
1470  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1471  as_fn_error $? "missing argument to $ac_option"
1472fi
1473
1474if test -n "$ac_unrecognized_opts"; then
1475  case $enable_option_checking in
1476    no) ;;
1477    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1478    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1479  esac
1480fi
1481
1482# Check all directory arguments for consistency.
1483for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1484		datadir sysconfdir sharedstatedir localstatedir includedir \
1485		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1486		libdir localedir mandir
1487do
1488  eval ac_val=\$$ac_var
1489  # Remove trailing slashes.
1490  case $ac_val in
1491    */ )
1492      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1493      eval $ac_var=\$ac_val;;
1494  esac
1495  # Be sure to have absolute directory names.
1496  case $ac_val in
1497    [\\/$]* | ?:[\\/]* )  continue;;
1498    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1499  esac
1500  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1501done
1502
1503# There might be people who depend on the old broken behavior: `$host'
1504# used to hold the argument of --host etc.
1505# FIXME: To remove some day.
1506build=$build_alias
1507host=$host_alias
1508target=$target_alias
1509
1510# FIXME: To remove some day.
1511if test "x$host_alias" != x; then
1512  if test "x$build_alias" = x; then
1513    cross_compiling=maybe
1514    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1515    If a cross compiler is detected then cross compile mode will be used" >&2
1516  elif test "x$build_alias" != "x$host_alias"; then
1517    cross_compiling=yes
1518  fi
1519fi
1520
1521ac_tool_prefix=
1522test -n "$host_alias" && ac_tool_prefix=$host_alias-
1523
1524test "$silent" = yes && exec 6>/dev/null
1525
1526
1527ac_pwd=`pwd` && test -n "$ac_pwd" &&
1528ac_ls_di=`ls -di .` &&
1529ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1530  as_fn_error $? "working directory cannot be determined"
1531test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1532  as_fn_error $? "pwd does not report name of working directory"
1533
1534
1535# Find the source files, if location was not specified.
1536if test -z "$srcdir"; then
1537  ac_srcdir_defaulted=yes
1538  # Try the directory containing this script, then the parent directory.
1539  ac_confdir=`$as_dirname -- "$as_myself" ||
1540$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1541	 X"$as_myself" : 'X\(//\)[^/]' \| \
1542	 X"$as_myself" : 'X\(//\)$' \| \
1543	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1544$as_echo X"$as_myself" |
1545    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1546	    s//\1/
1547	    q
1548	  }
1549	  /^X\(\/\/\)[^/].*/{
1550	    s//\1/
1551	    q
1552	  }
1553	  /^X\(\/\/\)$/{
1554	    s//\1/
1555	    q
1556	  }
1557	  /^X\(\/\).*/{
1558	    s//\1/
1559	    q
1560	  }
1561	  s/.*/./; q'`
1562  srcdir=$ac_confdir
1563  if test ! -r "$srcdir/$ac_unique_file"; then
1564    srcdir=..
1565  fi
1566else
1567  ac_srcdir_defaulted=no
1568fi
1569if test ! -r "$srcdir/$ac_unique_file"; then
1570  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1571  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1572fi
1573ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1574ac_abs_confdir=`(
1575	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1576	pwd)`
1577# When building in place, set srcdir=.
1578if test "$ac_abs_confdir" = "$ac_pwd"; then
1579  srcdir=.
1580fi
1581# Remove unnecessary trailing slashes from srcdir.
1582# Double slashes in file names in object file debugging info
1583# mess up M-x gdb in Emacs.
1584case $srcdir in
1585*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1586esac
1587for ac_var in $ac_precious_vars; do
1588  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1589  eval ac_env_${ac_var}_value=\$${ac_var}
1590  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1591  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1592done
1593
1594#
1595# Report the --help message.
1596#
1597if test "$ac_init_help" = "long"; then
1598  # Omit some internal or obsolete options to make the list less imposing.
1599  # This message is too long to be a string in the A/UX 3.1 sh.
1600  cat <<_ACEOF
1601\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1602
1603Usage: $0 [OPTION]... [VAR=VALUE]...
1604
1605To assign environment variables (e.g., CC, CFLAGS...), specify them as
1606VAR=VALUE.  See below for descriptions of some of the useful variables.
1607
1608Defaults for the options are specified in brackets.
1609
1610Configuration:
1611  -h, --help              display this help and exit
1612      --help=short        display options specific to this package
1613      --help=recursive    display the short help of all the included packages
1614  -V, --version           display version information and exit
1615  -q, --quiet, --silent   do not print \`checking ...' messages
1616      --cache-file=FILE   cache test results in FILE [disabled]
1617  -C, --config-cache      alias for \`--cache-file=config.cache'
1618  -n, --no-create         do not create output files
1619      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1620
1621Installation directories:
1622  --prefix=PREFIX         install architecture-independent files in PREFIX
1623                          [$ac_default_prefix]
1624  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1625                          [PREFIX]
1626
1627By default, \`make install' will install all the files in
1628\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1629an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1630for instance \`--prefix=\$HOME'.
1631
1632For better control, use the options below.
1633
1634Fine tuning of the installation directories:
1635  --bindir=DIR            user executables [EPREFIX/bin]
1636  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1637  --libexecdir=DIR        program executables [EPREFIX/libexec]
1638  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1639  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1640  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1641  --libdir=DIR            object code libraries [EPREFIX/lib]
1642  --includedir=DIR        C header files [PREFIX/include]
1643  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1644  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1645  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1646  --infodir=DIR           info documentation [DATAROOTDIR/info]
1647  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1648  --mandir=DIR            man documentation [DATAROOTDIR/man]
1649  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1650  --htmldir=DIR           html documentation [DOCDIR]
1651  --dvidir=DIR            dvi documentation [DOCDIR]
1652  --pdfdir=DIR            pdf documentation [DOCDIR]
1653  --psdir=DIR             ps documentation [DOCDIR]
1654_ACEOF
1655
1656  cat <<\_ACEOF
1657
1658X features:
1659  --x-includes=DIR    X include files are in DIR
1660  --x-libraries=DIR   X library files are in DIR
1661
1662System types:
1663  --build=BUILD     configure for building on BUILD [guessed]
1664  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1665  --target=TARGET   configure for building compilers for TARGET [HOST]
1666_ACEOF
1667fi
1668
1669if test -n "$ac_init_help"; then
1670  case $ac_init_help in
1671     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1672   esac
1673  cat <<\_ACEOF
1674
1675Optional Features:
1676  --disable-option-checking  ignore unrecognized --enable/--with options
1677  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1678  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1679  --enable-openjdk-only   suppress building custom source even if present
1680                          [disabled]
1681  --enable-debug          set the debug level to fastdebug (shorthand for
1682                          --with-debug-level=fastdebug) [disabled]
1683  --disable-headful       disable building headful support (graphical UI
1684                          support) [enabled]
1685  --enable-hotspot-test-in-build
1686                          run the Queens test after Hotspot build [disabled]
1687  --enable-unlimited-crypto
1688                          Enable unlimited crypto policy [disabled]
1689  --disable-debug-symbols disable generation of debug symbols [enabled]
1690  --disable-zip-debug-info
1691                          disable zipping of debug-info files [enabled]
1692  --disable-macosx-runtime-support
1693                          disable the use of MacOSX Java runtime support
1694                          framework [enabled]
1695  --enable-sjavac         use sjavac to do fast incremental compiles
1696                          [disabled]
1697  --disable-precompiled-headers
1698                          disable using precompiled headers when compiling C++
1699                          [enabled]
1700  --disable-ccache        disable using ccache to speed up recompilations
1701                          [enabled]
1702
1703Optional Packages:
1704  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1705  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1706  --with-custom-make-dir  use this directory for custom build/make files
1707  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1708                          support it), e.g. --with-target-bits=32 [guessed]
1709  --with-sys-root         pass this sys-root to the compilers and tools (for
1710                          cross-compiling)
1711  --with-tools-dir        search this directory for compilers and tools (for
1712                          cross-compiling)
1713  --with-devkit           use this directory as base for tools-dir and
1714                          sys-root (for cross-compiling)
1715  --with-jdk-variant      JDK variant to build (normal) [normal]
1716  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1717                          client, minimal1, kernel, zero, zeroshark) [server]
1718  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1719                          [release]
1720  --with-conf-name        use this as the name of the configuration [generated
1721                          from important configuration options]
1722  --with-builddeps-conf   use this configuration file for the builddeps
1723  --with-builddeps-server download and use build dependencies from this server
1724                          url
1725  --with-builddeps-dir    store downloaded build dependencies here
1726                          [/localhome/builddeps]
1727  --with-builddeps-group  chgrp the downloaded build dependencies to this
1728                          group
1729  --with-cacerts-file     specify alternative cacerts file
1730  --with-milestone        Set milestone value for build [internal]
1731  --with-update-version   Set update version value for build [b00]
1732  --with-build-number     Set build number value for build [b00]
1733  --with-user-release-suffix
1734                          Add a custom string to the version string if build
1735                          number isn't set.[username_builddateb00]
1736  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1737  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1738                          invocations of the Boot JDK, overriding the default
1739                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1740                          -enableassertions"
1741  --with-add-source-root  for each and every source directory, look in this
1742                          additional source root for the same directory; if it
1743                          exists and have files in it, include it in the build
1744  --with-override-source-root
1745                          for each and every source directory, look in this
1746                          override source root for the same directory; if it
1747                          exists, use that directory instead and ignore the
1748                          directory in the original source root
1749  --with-adds-and-overrides
1750                          use the subdirs 'adds' and 'overrides' in the
1751                          specified directory as add-source-root and
1752                          override-source-root
1753  --with-override-langtools
1754                          use this langtools dir for the build
1755  --with-override-corba   use this corba dir for the build
1756  --with-override-jaxp    use this jaxp dir for the build
1757  --with-override-jaxws   use this jaxws dir for the build
1758  --with-override-hotspot use this hotspot dir for the build
1759  --with-override-jdk     use this jdk dir for the build
1760  --with-import-hotspot   import hotspot binaries from this jdk image or
1761                          hotspot build dist dir instead of building from
1762                          source
1763  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1764                          only) [probed]
1765  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1766  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1767                          [probed]
1768  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1769                          [probed]
1770  --with-jtreg            Regression Test Harness [probed]
1771  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1772  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1773  --with-extra-ldflags    extra flags to be used when linking jdk
1774  --with-x                use the X Window System
1775  --with-cups             specify prefix directory for the cups package
1776                          (expecting the headers under PATH/include)
1777  --with-cups-include     specify directory for the cups include files
1778  --with-freetype         specify prefix directory for the freetype2 package
1779                          (expecting the libraries under PATH/lib and the
1780                          headers under PATH/include)
1781  --with-alsa             specify prefix directory for the alsa package
1782                          (expecting the libraries under PATH/lib and the
1783                          headers under PATH/include)
1784  --with-alsa-include     specify directory for the alsa include files
1785  --with-alsa-lib         specify directory for the alsa library
1786  --with-giflib           use giflib from build system or OpenJDK source
1787                          (system, bundled) [bundled]
1788  --with-zlib             use zlib from build system or OpenJDK source
1789                          (system, bundled) [bundled]
1790  --with-stdc++lib=<static>,<dynamic>,<default>
1791                          force linking of the C++ runtime on Linux to either
1792                          static or dynamic, default is static with dynamic as
1793                          fallback
1794  --with-num-cores        number of cores in the build system, e.g.
1795                          --with-num-cores=8 [probed]
1796  --with-memory-size      memory (in MB) available in the build system, e.g.
1797                          --with-memory-size=1024 [probed]
1798  --with-jobs             number of parallel jobs to let make run [calculated
1799                          based on cores and memory]
1800  --with-sjavac-server-java
1801                          use this java binary for running the sjavac
1802                          background server [Boot JDK java]
1803  --with-ccache-dir       where to store ccache files [~/.ccache]
1804
1805Some influential environment variables:
1806  PKG_CONFIG  path to pkg-config utility
1807  CC          C compiler command
1808  CFLAGS      C compiler flags
1809  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1810              nonstandard directory <lib dir>
1811  LIBS        libraries to pass to the linker, e.g. -l<library>
1812  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1813              you have headers in a nonstandard directory <include dir>
1814  CXX         C++ compiler command
1815  CXXFLAGS    C++ compiler flags
1816  OBJC        Objective C compiler command
1817  OBJCFLAGS   Objective C compiler flags
1818  CPP         C preprocessor
1819  CXXCPP      C++ preprocessor
1820  XMKMF       Path to xmkmf, Makefile generator for X Window System
1821  FREETYPE2_CFLAGS
1822              C compiler flags for FREETYPE2, overriding pkg-config
1823  FREETYPE2_LIBS
1824              linker flags for FREETYPE2, overriding pkg-config
1825  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1826  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1827  LIBFFI_CFLAGS
1828              C compiler flags for LIBFFI, overriding pkg-config
1829  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1830
1831Use these variables to override the choices made by `configure' or to help
1832it to find libraries and programs with nonstandard names/locations.
1833
1834Report bugs to <build-dev@openjdk.java.net>.
1835OpenJDK home page: <http://openjdk.java.net>.
1836_ACEOF
1837ac_status=$?
1838fi
1839
1840if test "$ac_init_help" = "recursive"; then
1841  # If there are subdirs, report their specific --help.
1842  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1843    test -d "$ac_dir" ||
1844      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1845      continue
1846    ac_builddir=.
1847
1848case "$ac_dir" in
1849.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1850*)
1851  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1852  # A ".." for each directory in $ac_dir_suffix.
1853  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1854  case $ac_top_builddir_sub in
1855  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1856  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1857  esac ;;
1858esac
1859ac_abs_top_builddir=$ac_pwd
1860ac_abs_builddir=$ac_pwd$ac_dir_suffix
1861# for backward compatibility:
1862ac_top_builddir=$ac_top_build_prefix
1863
1864case $srcdir in
1865  .)  # We are building in place.
1866    ac_srcdir=.
1867    ac_top_srcdir=$ac_top_builddir_sub
1868    ac_abs_top_srcdir=$ac_pwd ;;
1869  [\\/]* | ?:[\\/]* )  # Absolute name.
1870    ac_srcdir=$srcdir$ac_dir_suffix;
1871    ac_top_srcdir=$srcdir
1872    ac_abs_top_srcdir=$srcdir ;;
1873  *) # Relative name.
1874    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1875    ac_top_srcdir=$ac_top_build_prefix$srcdir
1876    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1877esac
1878ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1879
1880    cd "$ac_dir" || { ac_status=$?; continue; }
1881    # Check for guested configure.
1882    if test -f "$ac_srcdir/configure.gnu"; then
1883      echo &&
1884      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1885    elif test -f "$ac_srcdir/configure"; then
1886      echo &&
1887      $SHELL "$ac_srcdir/configure" --help=recursive
1888    else
1889      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1890    fi || ac_status=$?
1891    cd "$ac_pwd" || { ac_status=$?; break; }
1892  done
1893fi
1894
1895test -n "$ac_init_help" && exit $ac_status
1896if $ac_init_version; then
1897  cat <<\_ACEOF
1898OpenJDK configure jdk8
1899generated by GNU Autoconf 2.67
1900
1901Copyright (C) 2010 Free Software Foundation, Inc.
1902This configure script is free software; the Free Software Foundation
1903gives unlimited permission to copy, distribute and modify it.
1904_ACEOF
1905  exit
1906fi
1907
1908## ------------------------ ##
1909## Autoconf initialization. ##
1910## ------------------------ ##
1911
1912# ac_fn_c_try_compile LINENO
1913# --------------------------
1914# Try to compile conftest.$ac_ext, and return whether this succeeded.
1915ac_fn_c_try_compile ()
1916{
1917  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918  rm -f conftest.$ac_objext
1919  if { { ac_try="$ac_compile"
1920case "(($ac_try" in
1921  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1922  *) ac_try_echo=$ac_try;;
1923esac
1924eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1925$as_echo "$ac_try_echo"; } >&5
1926  (eval "$ac_compile") 2>conftest.err
1927  ac_status=$?
1928  if test -s conftest.err; then
1929    grep -v '^ *+' conftest.err >conftest.er1
1930    cat conftest.er1 >&5
1931    mv -f conftest.er1 conftest.err
1932  fi
1933  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1934  test $ac_status = 0; } && {
1935	 test -z "$ac_c_werror_flag" ||
1936	 test ! -s conftest.err
1937       } && test -s conftest.$ac_objext; then :
1938  ac_retval=0
1939else
1940  $as_echo "$as_me: failed program was:" >&5
1941sed 's/^/| /' conftest.$ac_ext >&5
1942
1943	ac_retval=1
1944fi
1945  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1946  as_fn_set_status $ac_retval
1947
1948} # ac_fn_c_try_compile
1949
1950# ac_fn_cxx_try_compile LINENO
1951# ----------------------------
1952# Try to compile conftest.$ac_ext, and return whether this succeeded.
1953ac_fn_cxx_try_compile ()
1954{
1955  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956  rm -f conftest.$ac_objext
1957  if { { ac_try="$ac_compile"
1958case "(($ac_try" in
1959  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1960  *) ac_try_echo=$ac_try;;
1961esac
1962eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1963$as_echo "$ac_try_echo"; } >&5
1964  (eval "$ac_compile") 2>conftest.err
1965  ac_status=$?
1966  if test -s conftest.err; then
1967    grep -v '^ *+' conftest.err >conftest.er1
1968    cat conftest.er1 >&5
1969    mv -f conftest.er1 conftest.err
1970  fi
1971  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1972  test $ac_status = 0; } && {
1973	 test -z "$ac_cxx_werror_flag" ||
1974	 test ! -s conftest.err
1975       } && test -s conftest.$ac_objext; then :
1976  ac_retval=0
1977else
1978  $as_echo "$as_me: failed program was:" >&5
1979sed 's/^/| /' conftest.$ac_ext >&5
1980
1981	ac_retval=1
1982fi
1983  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1984  as_fn_set_status $ac_retval
1985
1986} # ac_fn_cxx_try_compile
1987
1988# ac_fn_objc_try_compile LINENO
1989# -----------------------------
1990# Try to compile conftest.$ac_ext, and return whether this succeeded.
1991ac_fn_objc_try_compile ()
1992{
1993  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994  rm -f conftest.$ac_objext
1995  if { { ac_try="$ac_compile"
1996case "(($ac_try" in
1997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1998  *) ac_try_echo=$ac_try;;
1999esac
2000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2001$as_echo "$ac_try_echo"; } >&5
2002  (eval "$ac_compile") 2>conftest.err
2003  ac_status=$?
2004  if test -s conftest.err; then
2005    grep -v '^ *+' conftest.err >conftest.er1
2006    cat conftest.er1 >&5
2007    mv -f conftest.er1 conftest.err
2008  fi
2009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010  test $ac_status = 0; } && {
2011	 test -z "$ac_objc_werror_flag" ||
2012	 test ! -s conftest.err
2013       } && test -s conftest.$ac_objext; then :
2014  ac_retval=0
2015else
2016  $as_echo "$as_me: failed program was:" >&5
2017sed 's/^/| /' conftest.$ac_ext >&5
2018
2019	ac_retval=1
2020fi
2021  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2022  as_fn_set_status $ac_retval
2023
2024} # ac_fn_objc_try_compile
2025
2026# ac_fn_c_try_cpp LINENO
2027# ----------------------
2028# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2029ac_fn_c_try_cpp ()
2030{
2031  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032  if { { ac_try="$ac_cpp conftest.$ac_ext"
2033case "(($ac_try" in
2034  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2035  *) ac_try_echo=$ac_try;;
2036esac
2037eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2038$as_echo "$ac_try_echo"; } >&5
2039  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2040  ac_status=$?
2041  if test -s conftest.err; then
2042    grep -v '^ *+' conftest.err >conftest.er1
2043    cat conftest.er1 >&5
2044    mv -f conftest.er1 conftest.err
2045  fi
2046  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2047  test $ac_status = 0; } > conftest.i && {
2048	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2049	 test ! -s conftest.err
2050       }; then :
2051  ac_retval=0
2052else
2053  $as_echo "$as_me: failed program was:" >&5
2054sed 's/^/| /' conftest.$ac_ext >&5
2055
2056    ac_retval=1
2057fi
2058  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2059  as_fn_set_status $ac_retval
2060
2061} # ac_fn_c_try_cpp
2062
2063# ac_fn_cxx_try_cpp LINENO
2064# ------------------------
2065# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2066ac_fn_cxx_try_cpp ()
2067{
2068  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2069  if { { ac_try="$ac_cpp conftest.$ac_ext"
2070case "(($ac_try" in
2071  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2072  *) ac_try_echo=$ac_try;;
2073esac
2074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2075$as_echo "$ac_try_echo"; } >&5
2076  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2077  ac_status=$?
2078  if test -s conftest.err; then
2079    grep -v '^ *+' conftest.err >conftest.er1
2080    cat conftest.er1 >&5
2081    mv -f conftest.er1 conftest.err
2082  fi
2083  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2084  test $ac_status = 0; } > conftest.i && {
2085	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2086	 test ! -s conftest.err
2087       }; then :
2088  ac_retval=0
2089else
2090  $as_echo "$as_me: failed program was:" >&5
2091sed 's/^/| /' conftest.$ac_ext >&5
2092
2093    ac_retval=1
2094fi
2095  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2096  as_fn_set_status $ac_retval
2097
2098} # ac_fn_cxx_try_cpp
2099
2100# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2101# ---------------------------------------------------------
2102# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2103# the include files in INCLUDES and setting the cache variable VAR
2104# accordingly.
2105ac_fn_cxx_check_header_mongrel ()
2106{
2107  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2108  if eval "test \"\${$3+set}\"" = set; then :
2109  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2110$as_echo_n "checking for $2... " >&6; }
2111if eval "test \"\${$3+set}\"" = set; then :
2112  $as_echo_n "(cached) " >&6
2113fi
2114eval ac_res=\$$3
2115	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2116$as_echo "$ac_res" >&6; }
2117else
2118  # Is the header compilable?
2119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2120$as_echo_n "checking $2 usability... " >&6; }
2121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h.  */
2123$4
2124#include <$2>
2125_ACEOF
2126if ac_fn_cxx_try_compile "$LINENO"; then :
2127  ac_header_compiler=yes
2128else
2129  ac_header_compiler=no
2130fi
2131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2133$as_echo "$ac_header_compiler" >&6; }
2134
2135# Is the header present?
2136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2137$as_echo_n "checking $2 presence... " >&6; }
2138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139/* end confdefs.h.  */
2140#include <$2>
2141_ACEOF
2142if ac_fn_cxx_try_cpp "$LINENO"; then :
2143  ac_header_preproc=yes
2144else
2145  ac_header_preproc=no
2146fi
2147rm -f conftest.err conftest.i conftest.$ac_ext
2148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2149$as_echo "$ac_header_preproc" >&6; }
2150
2151# So?  What about this header?
2152case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2153  yes:no: )
2154    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2155$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2156    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2157$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2158    ;;
2159  no:yes:* )
2160    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2161$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2162    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2163$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2164    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2165$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2166    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2167$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2168    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2169$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2170( $as_echo "## ----------------------------------------- ##
2171## Report this to build-dev@openjdk.java.net ##
2172## ----------------------------------------- ##"
2173     ) | sed "s/^/$as_me: WARNING:     /" >&2
2174    ;;
2175esac
2176  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177$as_echo_n "checking for $2... " >&6; }
2178if eval "test \"\${$3+set}\"" = set; then :
2179  $as_echo_n "(cached) " >&6
2180else
2181  eval "$3=\$ac_header_compiler"
2182fi
2183eval ac_res=\$$3
2184	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2185$as_echo "$ac_res" >&6; }
2186fi
2187  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2188
2189} # ac_fn_cxx_check_header_mongrel
2190
2191# ac_fn_cxx_try_run LINENO
2192# ------------------------
2193# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2194# that executables *can* be run.
2195ac_fn_cxx_try_run ()
2196{
2197  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2198  if { { ac_try="$ac_link"
2199case "(($ac_try" in
2200  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2201  *) ac_try_echo=$ac_try;;
2202esac
2203eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2204$as_echo "$ac_try_echo"; } >&5
2205  (eval "$ac_link") 2>&5
2206  ac_status=$?
2207  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2208  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2209  { { case "(($ac_try" in
2210  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2211  *) ac_try_echo=$ac_try;;
2212esac
2213eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2214$as_echo "$ac_try_echo"; } >&5
2215  (eval "$ac_try") 2>&5
2216  ac_status=$?
2217  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2218  test $ac_status = 0; }; }; then :
2219  ac_retval=0
2220else
2221  $as_echo "$as_me: program exited with status $ac_status" >&5
2222       $as_echo "$as_me: failed program was:" >&5
2223sed 's/^/| /' conftest.$ac_ext >&5
2224
2225       ac_retval=$ac_status
2226fi
2227  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2228  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2229  as_fn_set_status $ac_retval
2230
2231} # ac_fn_cxx_try_run
2232
2233# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2234# ---------------------------------------------------------
2235# Tests whether HEADER exists and can be compiled using the include files in
2236# INCLUDES, setting the cache variable VAR accordingly.
2237ac_fn_cxx_check_header_compile ()
2238{
2239  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2241$as_echo_n "checking for $2... " >&6; }
2242if eval "test \"\${$3+set}\"" = set; then :
2243  $as_echo_n "(cached) " >&6
2244else
2245  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246/* end confdefs.h.  */
2247$4
2248#include <$2>
2249_ACEOF
2250if ac_fn_cxx_try_compile "$LINENO"; then :
2251  eval "$3=yes"
2252else
2253  eval "$3=no"
2254fi
2255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2256fi
2257eval ac_res=\$$3
2258	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2259$as_echo "$ac_res" >&6; }
2260  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2261
2262} # ac_fn_cxx_check_header_compile
2263
2264# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2265# ----------------------------------------------
2266# Tries to find the compile-time value of EXPR in a program that includes
2267# INCLUDES, setting VAR accordingly. Returns whether the value could be
2268# computed
2269ac_fn_cxx_compute_int ()
2270{
2271  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272  if test "$cross_compiling" = yes; then
2273    # Depending upon the size, compute the lo and hi bounds.
2274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h.  */
2276$4
2277int
2278main ()
2279{
2280static int test_array [1 - 2 * !(($2) >= 0)];
2281test_array [0] = 0
2282
2283  ;
2284  return 0;
2285}
2286_ACEOF
2287if ac_fn_cxx_try_compile "$LINENO"; then :
2288  ac_lo=0 ac_mid=0
2289  while :; do
2290    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h.  */
2292$4
2293int
2294main ()
2295{
2296static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2297test_array [0] = 0
2298
2299  ;
2300  return 0;
2301}
2302_ACEOF
2303if ac_fn_cxx_try_compile "$LINENO"; then :
2304  ac_hi=$ac_mid; break
2305else
2306  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2307			if test $ac_lo -le $ac_mid; then
2308			  ac_lo= ac_hi=
2309			  break
2310			fi
2311			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2312fi
2313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314  done
2315else
2316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317/* end confdefs.h.  */
2318$4
2319int
2320main ()
2321{
2322static int test_array [1 - 2 * !(($2) < 0)];
2323test_array [0] = 0
2324
2325  ;
2326  return 0;
2327}
2328_ACEOF
2329if ac_fn_cxx_try_compile "$LINENO"; then :
2330  ac_hi=-1 ac_mid=-1
2331  while :; do
2332    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333/* end confdefs.h.  */
2334$4
2335int
2336main ()
2337{
2338static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2339test_array [0] = 0
2340
2341  ;
2342  return 0;
2343}
2344_ACEOF
2345if ac_fn_cxx_try_compile "$LINENO"; then :
2346  ac_lo=$ac_mid; break
2347else
2348  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2349			if test $ac_mid -le $ac_hi; then
2350			  ac_lo= ac_hi=
2351			  break
2352			fi
2353			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2354fi
2355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2356  done
2357else
2358  ac_lo= ac_hi=
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361fi
2362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363# Binary search between lo and hi bounds.
2364while test "x$ac_lo" != "x$ac_hi"; do
2365  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2366  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2367/* end confdefs.h.  */
2368$4
2369int
2370main ()
2371{
2372static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2373test_array [0] = 0
2374
2375  ;
2376  return 0;
2377}
2378_ACEOF
2379if ac_fn_cxx_try_compile "$LINENO"; then :
2380  ac_hi=$ac_mid
2381else
2382  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2383fi
2384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2385done
2386case $ac_lo in #((
2387?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2388'') ac_retval=1 ;;
2389esac
2390  else
2391    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392/* end confdefs.h.  */
2393$4
2394static long int longval () { return $2; }
2395static unsigned long int ulongval () { return $2; }
2396#include <stdio.h>
2397#include <stdlib.h>
2398int
2399main ()
2400{
2401
2402  FILE *f = fopen ("conftest.val", "w");
2403  if (! f)
2404    return 1;
2405  if (($2) < 0)
2406    {
2407      long int i = longval ();
2408      if (i != ($2))
2409	return 1;
2410      fprintf (f, "%ld", i);
2411    }
2412  else
2413    {
2414      unsigned long int i = ulongval ();
2415      if (i != ($2))
2416	return 1;
2417      fprintf (f, "%lu", i);
2418    }
2419  /* Do not output a trailing newline, as this causes \r\n confusion
2420     on some platforms.  */
2421  return ferror (f) || fclose (f) != 0;
2422
2423  ;
2424  return 0;
2425}
2426_ACEOF
2427if ac_fn_cxx_try_run "$LINENO"; then :
2428  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2429else
2430  ac_retval=1
2431fi
2432rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2433  conftest.$ac_objext conftest.beam conftest.$ac_ext
2434rm -f conftest.val
2435
2436  fi
2437  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2438  as_fn_set_status $ac_retval
2439
2440} # ac_fn_cxx_compute_int
2441
2442# ac_fn_cxx_try_link LINENO
2443# -------------------------
2444# Try to link conftest.$ac_ext, and return whether this succeeded.
2445ac_fn_cxx_try_link ()
2446{
2447  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2448  rm -f conftest.$ac_objext conftest$ac_exeext
2449  if { { ac_try="$ac_link"
2450case "(($ac_try" in
2451  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2452  *) ac_try_echo=$ac_try;;
2453esac
2454eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2455$as_echo "$ac_try_echo"; } >&5
2456  (eval "$ac_link") 2>conftest.err
2457  ac_status=$?
2458  if test -s conftest.err; then
2459    grep -v '^ *+' conftest.err >conftest.er1
2460    cat conftest.er1 >&5
2461    mv -f conftest.er1 conftest.err
2462  fi
2463  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2464  test $ac_status = 0; } && {
2465	 test -z "$ac_cxx_werror_flag" ||
2466	 test ! -s conftest.err
2467       } && test -s conftest$ac_exeext && {
2468	 test "$cross_compiling" = yes ||
2469	 $as_test_x conftest$ac_exeext
2470       }; then :
2471  ac_retval=0
2472else
2473  $as_echo "$as_me: failed program was:" >&5
2474sed 's/^/| /' conftest.$ac_ext >&5
2475
2476	ac_retval=1
2477fi
2478  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2479  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2480  # interfere with the next link command; also delete a directory that is
2481  # left behind by Apple's compiler.  We do this before executing the actions.
2482  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2483  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2484  as_fn_set_status $ac_retval
2485
2486} # ac_fn_cxx_try_link
2487
2488# ac_fn_cxx_check_func LINENO FUNC VAR
2489# ------------------------------------
2490# Tests whether FUNC exists, setting the cache variable VAR accordingly
2491ac_fn_cxx_check_func ()
2492{
2493  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2495$as_echo_n "checking for $2... " >&6; }
2496if eval "test \"\${$3+set}\"" = set; then :
2497  $as_echo_n "(cached) " >&6
2498else
2499  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2500/* end confdefs.h.  */
2501/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2502   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2503#define $2 innocuous_$2
2504
2505/* System header to define __stub macros and hopefully few prototypes,
2506    which can conflict with char $2 (); below.
2507    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2508    <limits.h> exists even on freestanding compilers.  */
2509
2510#ifdef __STDC__
2511# include <limits.h>
2512#else
2513# include <assert.h>
2514#endif
2515
2516#undef $2
2517
2518/* Override any GCC internal prototype to avoid an error.
2519   Use char because int might match the return type of a GCC
2520   builtin and then its argument prototype would still apply.  */
2521#ifdef __cplusplus
2522extern "C"
2523#endif
2524char $2 ();
2525/* The GNU C library defines this for functions which it implements
2526    to always fail with ENOSYS.  Some functions are actually named
2527    something starting with __ and the normal name is an alias.  */
2528#if defined __stub_$2 || defined __stub___$2
2529choke me
2530#endif
2531
2532int
2533main ()
2534{
2535return $2 ();
2536  ;
2537  return 0;
2538}
2539_ACEOF
2540if ac_fn_cxx_try_link "$LINENO"; then :
2541  eval "$3=yes"
2542else
2543  eval "$3=no"
2544fi
2545rm -f core conftest.err conftest.$ac_objext \
2546    conftest$ac_exeext conftest.$ac_ext
2547fi
2548eval ac_res=\$$3
2549	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2550$as_echo "$ac_res" >&6; }
2551  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2552
2553} # ac_fn_cxx_check_func
2554
2555# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2556# -------------------------------------------------------
2557# Tests whether HEADER exists and can be compiled using the include files in
2558# INCLUDES, setting the cache variable VAR accordingly.
2559ac_fn_c_check_header_compile ()
2560{
2561  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2563$as_echo_n "checking for $2... " >&6; }
2564if eval "test \"\${$3+set}\"" = set; then :
2565  $as_echo_n "(cached) " >&6
2566else
2567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2568/* end confdefs.h.  */
2569$4
2570#include <$2>
2571_ACEOF
2572if ac_fn_c_try_compile "$LINENO"; then :
2573  eval "$3=yes"
2574else
2575  eval "$3=no"
2576fi
2577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2578fi
2579eval ac_res=\$$3
2580	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2581$as_echo "$ac_res" >&6; }
2582  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2583
2584} # ac_fn_c_check_header_compile
2585cat >config.log <<_ACEOF
2586This file contains any messages produced by compilers while
2587running configure, to aid debugging if configure makes a mistake.
2588
2589It was created by OpenJDK $as_me jdk8, which was
2590generated by GNU Autoconf 2.67.  Invocation command line was
2591
2592  $ $0 $@
2593
2594_ACEOF
2595exec 5>>config.log
2596{
2597cat <<_ASUNAME
2598## --------- ##
2599## Platform. ##
2600## --------- ##
2601
2602hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2603uname -m = `(uname -m) 2>/dev/null || echo unknown`
2604uname -r = `(uname -r) 2>/dev/null || echo unknown`
2605uname -s = `(uname -s) 2>/dev/null || echo unknown`
2606uname -v = `(uname -v) 2>/dev/null || echo unknown`
2607
2608/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2609/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2610
2611/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2612/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2613/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2614/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2615/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2616/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2617/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2618
2619_ASUNAME
2620
2621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2622for as_dir in $PATH
2623do
2624  IFS=$as_save_IFS
2625  test -z "$as_dir" && as_dir=.
2626    $as_echo "PATH: $as_dir"
2627  done
2628IFS=$as_save_IFS
2629
2630} >&5
2631
2632cat >&5 <<_ACEOF
2633
2634
2635## ----------- ##
2636## Core tests. ##
2637## ----------- ##
2638
2639_ACEOF
2640
2641
2642# Keep a trace of the command line.
2643# Strip out --no-create and --no-recursion so they do not pile up.
2644# Strip out --silent because we don't want to record it for future runs.
2645# Also quote any args containing shell meta-characters.
2646# Make two passes to allow for proper duplicate-argument suppression.
2647ac_configure_args=
2648ac_configure_args0=
2649ac_configure_args1=
2650ac_must_keep_next=false
2651for ac_pass in 1 2
2652do
2653  for ac_arg
2654  do
2655    case $ac_arg in
2656    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2657    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2658    | -silent | --silent | --silen | --sile | --sil)
2659      continue ;;
2660    *\'*)
2661      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2662    esac
2663    case $ac_pass in
2664    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2665    2)
2666      as_fn_append ac_configure_args1 " '$ac_arg'"
2667      if test $ac_must_keep_next = true; then
2668	ac_must_keep_next=false # Got value, back to normal.
2669      else
2670	case $ac_arg in
2671	  *=* | --config-cache | -C | -disable-* | --disable-* \
2672	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2673	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2674	  | -with-* | --with-* | -without-* | --without-* | --x)
2675	    case "$ac_configure_args0 " in
2676	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2677	    esac
2678	    ;;
2679	  -* ) ac_must_keep_next=true ;;
2680	esac
2681      fi
2682      as_fn_append ac_configure_args " '$ac_arg'"
2683      ;;
2684    esac
2685  done
2686done
2687{ ac_configure_args0=; unset ac_configure_args0;}
2688{ ac_configure_args1=; unset ac_configure_args1;}
2689
2690# When interrupted or exit'd, cleanup temporary files, and complete
2691# config.log.  We remove comments because anyway the quotes in there
2692# would cause problems or look ugly.
2693# WARNING: Use '\'' to represent an apostrophe within the trap.
2694# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2695trap 'exit_status=$?
2696  # Save into config.log some information that might help in debugging.
2697  {
2698    echo
2699
2700    $as_echo "## ---------------- ##
2701## Cache variables. ##
2702## ---------------- ##"
2703    echo
2704    # The following way of writing the cache mishandles newlines in values,
2705(
2706  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2707    eval ac_val=\$$ac_var
2708    case $ac_val in #(
2709    *${as_nl}*)
2710      case $ac_var in #(
2711      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2712$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2713      esac
2714      case $ac_var in #(
2715      _ | IFS | as_nl) ;; #(
2716      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2717      *) { eval $ac_var=; unset $ac_var;} ;;
2718      esac ;;
2719    esac
2720  done
2721  (set) 2>&1 |
2722    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2723    *${as_nl}ac_space=\ *)
2724      sed -n \
2725	"s/'\''/'\''\\\\'\'''\''/g;
2726	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2727      ;; #(
2728    *)
2729      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2730      ;;
2731    esac |
2732    sort
2733)
2734    echo
2735
2736    $as_echo "## ----------------- ##
2737## Output variables. ##
2738## ----------------- ##"
2739    echo
2740    for ac_var in $ac_subst_vars
2741    do
2742      eval ac_val=\$$ac_var
2743      case $ac_val in
2744      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2745      esac
2746      $as_echo "$ac_var='\''$ac_val'\''"
2747    done | sort
2748    echo
2749
2750    if test -n "$ac_subst_files"; then
2751      $as_echo "## ------------------- ##
2752## File substitutions. ##
2753## ------------------- ##"
2754      echo
2755      for ac_var in $ac_subst_files
2756      do
2757	eval ac_val=\$$ac_var
2758	case $ac_val in
2759	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2760	esac
2761	$as_echo "$ac_var='\''$ac_val'\''"
2762      done | sort
2763      echo
2764    fi
2765
2766    if test -s confdefs.h; then
2767      $as_echo "## ----------- ##
2768## confdefs.h. ##
2769## ----------- ##"
2770      echo
2771      cat confdefs.h
2772      echo
2773    fi
2774    test "$ac_signal" != 0 &&
2775      $as_echo "$as_me: caught signal $ac_signal"
2776    $as_echo "$as_me: exit $exit_status"
2777  } >&5
2778  rm -f core *.core core.conftest.* &&
2779    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2780    exit $exit_status
2781' 0
2782for ac_signal in 1 2 13 15; do
2783  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2784done
2785ac_signal=0
2786
2787# confdefs.h avoids OS command line length limits that DEFS can exceed.
2788rm -f -r conftest* confdefs.h
2789
2790$as_echo "/* confdefs.h */" > confdefs.h
2791
2792# Predefined preprocessor variables.
2793
2794cat >>confdefs.h <<_ACEOF
2795#define PACKAGE_NAME "$PACKAGE_NAME"
2796_ACEOF
2797
2798cat >>confdefs.h <<_ACEOF
2799#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2800_ACEOF
2801
2802cat >>confdefs.h <<_ACEOF
2803#define PACKAGE_VERSION "$PACKAGE_VERSION"
2804_ACEOF
2805
2806cat >>confdefs.h <<_ACEOF
2807#define PACKAGE_STRING "$PACKAGE_STRING"
2808_ACEOF
2809
2810cat >>confdefs.h <<_ACEOF
2811#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2812_ACEOF
2813
2814cat >>confdefs.h <<_ACEOF
2815#define PACKAGE_URL "$PACKAGE_URL"
2816_ACEOF
2817
2818
2819# Let the site file select an alternate cache file if it wants to.
2820# Prefer an explicitly selected file to automatically selected ones.
2821ac_site_file1=NONE
2822ac_site_file2=NONE
2823if test -n "$CONFIG_SITE"; then
2824  # We do not want a PATH search for config.site.
2825  case $CONFIG_SITE in #((
2826    -*)  ac_site_file1=./$CONFIG_SITE;;
2827    */*) ac_site_file1=$CONFIG_SITE;;
2828    *)   ac_site_file1=./$CONFIG_SITE;;
2829  esac
2830elif test "x$prefix" != xNONE; then
2831  ac_site_file1=$prefix/share/config.site
2832  ac_site_file2=$prefix/etc/config.site
2833else
2834  ac_site_file1=$ac_default_prefix/share/config.site
2835  ac_site_file2=$ac_default_prefix/etc/config.site
2836fi
2837for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2838do
2839  test "x$ac_site_file" = xNONE && continue
2840  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2841    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2842$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2843    sed 's/^/| /' "$ac_site_file" >&5
2844    . "$ac_site_file" \
2845      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2846$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2847as_fn_error $? "failed to load site script $ac_site_file
2848See \`config.log' for more details" "$LINENO" 5 ; }
2849  fi
2850done
2851
2852if test -r "$cache_file"; then
2853  # Some versions of bash will fail to source /dev/null (special files
2854  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2855  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2856    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2857$as_echo "$as_me: loading cache $cache_file" >&6;}
2858    case $cache_file in
2859      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2860      *)                      . "./$cache_file";;
2861    esac
2862  fi
2863else
2864  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2865$as_echo "$as_me: creating cache $cache_file" >&6;}
2866  >$cache_file
2867fi
2868
2869# Check that the precious variables saved in the cache have kept the same
2870# value.
2871ac_cache_corrupted=false
2872for ac_var in $ac_precious_vars; do
2873  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2874  eval ac_new_set=\$ac_env_${ac_var}_set
2875  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2876  eval ac_new_val=\$ac_env_${ac_var}_value
2877  case $ac_old_set,$ac_new_set in
2878    set,)
2879      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2880$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2881      ac_cache_corrupted=: ;;
2882    ,set)
2883      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2884$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2885      ac_cache_corrupted=: ;;
2886    ,);;
2887    *)
2888      if test "x$ac_old_val" != "x$ac_new_val"; then
2889	# differences in whitespace do not lead to failure.
2890	ac_old_val_w=`echo x $ac_old_val`
2891	ac_new_val_w=`echo x $ac_new_val`
2892	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2893	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2894$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2895	  ac_cache_corrupted=:
2896	else
2897	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2898$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2899	  eval $ac_var=\$ac_old_val
2900	fi
2901	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2902$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2903	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2904$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2905      fi;;
2906  esac
2907  # Pass precious variables to config.status.
2908  if test "$ac_new_set" = set; then
2909    case $ac_new_val in
2910    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2911    *) ac_arg=$ac_var=$ac_new_val ;;
2912    esac
2913    case " $ac_configure_args " in
2914      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2915      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2916    esac
2917  fi
2918done
2919if $ac_cache_corrupted; then
2920  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2921$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2922  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2923$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2924  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2925fi
2926## -------------------- ##
2927## Main body of script. ##
2928## -------------------- ##
2929
2930ac_ext=c
2931ac_cpp='$CPP $CPPFLAGS'
2932ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2933ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2934ac_compiler_gnu=$ac_cv_c_compiler_gnu
2935
2936
2937
2938ac_aux_dir=
2939for ac_dir in build-aux "$srcdir"/build-aux; do
2940  if test -f "$ac_dir/install-sh"; then
2941    ac_aux_dir=$ac_dir
2942    ac_install_sh="$ac_aux_dir/install-sh -c"
2943    break
2944  elif test -f "$ac_dir/install.sh"; then
2945    ac_aux_dir=$ac_dir
2946    ac_install_sh="$ac_aux_dir/install.sh -c"
2947    break
2948  elif test -f "$ac_dir/shtool"; then
2949    ac_aux_dir=$ac_dir
2950    ac_install_sh="$ac_aux_dir/shtool install -c"
2951    break
2952  fi
2953done
2954if test -z "$ac_aux_dir"; then
2955  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2956fi
2957
2958# These three variables are undocumented and unsupported,
2959# and are intended to be withdrawn in a future Autoconf release.
2960# They can cause serious problems if a builder's source tree is in a directory
2961# whose full name contains unusual characters.
2962ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2963ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2964ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2965
2966
2967# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2968
2969#
2970# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2971# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2972#
2973# This code is free software; you can redistribute it and/or modify it
2974# under the terms of the GNU General Public License version 2 only, as
2975# published by the Free Software Foundation.  Oracle designates this
2976# particular file as subject to the "Classpath" exception as provided
2977# by Oracle in the LICENSE file that accompanied this code.
2978#
2979# This code is distributed in the hope that it will be useful, but WITHOUT
2980# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2981# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2982# version 2 for more details (a copy is included in the LICENSE file that
2983# accompanied this code).
2984#
2985# You should have received a copy of the GNU General Public License version
2986# 2 along with this work; if not, write to the Free Software Foundation,
2987# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2988#
2989# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2990# or visit www.oracle.com if you need additional information or have any
2991# questions.
2992#
2993
2994#
2995# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2996#
2997# This program is free software; you can redistribute it and/or modify
2998# it under the terms of the GNU General Public License as published by
2999# the Free Software Foundation; either version 2 of the License, or
3000# (at your option) any later version.
3001#
3002# This program is distributed in the hope that it will be useful, but
3003# WITHOUT ANY WARRANTY; without even the implied warranty of
3004# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3005# General Public License for more details.
3006#
3007# You should have received a copy of the GNU General Public License
3008# along with this program; if not, write to the Free Software
3009# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3010#
3011# As a special exception to the GNU General Public License, if you
3012# distribute this file as part of a program that contains a
3013# configuration script generated by Autoconf, you may include it under
3014# the same distribution terms that you use for the rest of that program.
3015
3016# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3017# ----------------------------------
3018# PKG_PROG_PKG_CONFIG
3019
3020# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3021#
3022# Check to see whether a particular set of modules exists.  Similar
3023# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3024#
3025#
3026# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3027# this or PKG_CHECK_MODULES is called, or make sure to call
3028# PKG_CHECK_EXISTS manually
3029# --------------------------------------------------------------
3030
3031
3032
3033# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3034# ---------------------------------------------
3035# _PKG_CONFIG
3036
3037# _PKG_SHORT_ERRORS_SUPPORTED
3038# -----------------------------
3039# _PKG_SHORT_ERRORS_SUPPORTED
3040
3041
3042# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3043# [ACTION-IF-NOT-FOUND])
3044#
3045#
3046# Note that if there is a possibility the first call to
3047# PKG_CHECK_MODULES might not happen, you should be sure to include an
3048# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3049#
3050#
3051# --------------------------------------------------------------
3052# PKG_CHECK_MODULES
3053
3054
3055# Include these first...
3056#
3057# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3058# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3059#
3060# This code is free software; you can redistribute it and/or modify it
3061# under the terms of the GNU General Public License version 2 only, as
3062# published by the Free Software Foundation.  Oracle designates this
3063# particular file as subject to the "Classpath" exception as provided
3064# by Oracle in the LICENSE file that accompanied this code.
3065#
3066# This code is distributed in the hope that it will be useful, but WITHOUT
3067# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3068# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3069# version 2 for more details (a copy is included in the LICENSE file that
3070# accompanied this code).
3071#
3072# You should have received a copy of the GNU General Public License version
3073# 2 along with this work; if not, write to the Free Software Foundation,
3074# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3075#
3076# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3077# or visit www.oracle.com if you need additional information or have any
3078# questions.
3079#
3080
3081# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3082# If so, then append $1 to $2\
3083# Also set JVM_ARG_OK to true/false depending on outcome.
3084
3085
3086# This will make sure the given variable points to a full and proper
3087# path. This means:
3088# 1) There will be no spaces in the path. On posix platforms,
3089#    spaces in the path will result in an error. On Windows,
3090#    the path will be rewritten using short-style to be space-free.
3091# 2) The path will be absolute, and it will be in unix-style (on
3092#     cygwin).
3093# $1: The name of the variable to fix
3094
3095
3096# This will make sure the given variable points to a executable
3097# with a full and proper path. This means:
3098# 1) There will be no spaces in the path. On posix platforms,
3099#    spaces in the path will result in an error. On Windows,
3100#    the path will be rewritten using short-style to be space-free.
3101# 2) The path will be absolute, and it will be in unix-style (on
3102#     cygwin).
3103# Any arguments given to the executable is preserved.
3104# If the input variable does not have a directory specification, then
3105# it need to be in the PATH.
3106# $1: The name of the variable to fix
3107
3108
3109
3110
3111
3112
3113# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3114# $1: variable to check
3115# $2: executable name to print in warning (optional)
3116
3117
3118# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3119# Arguments as AC_PATH_PROG:
3120# $1: variable to set
3121# $2: executable name to look for
3122
3123
3124# Setup the most fundamental tools that relies on not much else to set up,
3125# but is used by much of the early bootstrap code.
3126
3127
3128# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3129
3130
3131
3132
3133
3134
3135
3136#%%% Simple tools %%%
3137
3138# Check if we have found a usable version of make
3139# $1: the path to a potential make binary (or empty)
3140# $2: the description on how we found this
3141
3142
3143# Goes looking for a usable version of GNU make.
3144
3145
3146
3147
3148
3149
3150# Check if build directory is on local disk. If not possible to determine,
3151# we prefer to claim it's local.
3152# Argument 1: directory to test
3153# Argument 2: what to do if it is on local disk
3154# Argument 3: what to do otherwise (remote disk or failure)
3155
3156
3157# Check that source files have basic read permissions set. This might
3158# not be the case in cygwin in certain conditions.
3159
3160
3161
3162
3163#
3164# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3165# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3166#
3167# This code is free software; you can redistribute it and/or modify it
3168# under the terms of the GNU General Public License version 2 only, as
3169# published by the Free Software Foundation.  Oracle designates this
3170# particular file as subject to the "Classpath" exception as provided
3171# by Oracle in the LICENSE file that accompanied this code.
3172#
3173# This code is distributed in the hope that it will be useful, but WITHOUT
3174# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3175# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3176# version 2 for more details (a copy is included in the LICENSE file that
3177# accompanied this code).
3178#
3179# You should have received a copy of the GNU General Public License version
3180# 2 along with this work; if not, write to the Free Software Foundation,
3181# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3182#
3183# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3184# or visit www.oracle.com if you need additional information or have any
3185# questions.
3186#
3187
3188
3189
3190
3191
3192# Helper function which possibly converts a path using DOS-style short mode.
3193# If so, the updated path is stored in $new_path.
3194# $1: The path to check
3195
3196
3197# Helper function which possibly converts a path using DOS-style short mode.
3198# If so, the updated path is stored in $new_path.
3199# $1: The path to check
3200
3201
3202# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3203# and could probably be heavily simplified. However, all changes in this
3204# area tend to need lot of testing in different scenarios, and in lack of
3205# proper unit testing, cleaning this up has not been deemed worth the effort
3206# at the moment.
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3217
3218
3219
3220
3221#
3222# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3223# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3224#
3225# This code is free software; you can redistribute it and/or modify it
3226# under the terms of the GNU General Public License version 2 only, as
3227# published by the Free Software Foundation.  Oracle designates this
3228# particular file as subject to the "Classpath" exception as provided
3229# by Oracle in the LICENSE file that accompanied this code.
3230#
3231# This code is distributed in the hope that it will be useful, but WITHOUT
3232# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3233# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3234# version 2 for more details (a copy is included in the LICENSE file that
3235# accompanied this code).
3236#
3237# You should have received a copy of the GNU General Public License version
3238# 2 along with this work; if not, write to the Free Software Foundation,
3239# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3240#
3241# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3242# or visit www.oracle.com if you need additional information or have any
3243# questions.
3244#
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256# ... then the rest
3257#
3258# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3259# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3260#
3261# This code is free software; you can redistribute it and/or modify it
3262# under the terms of the GNU General Public License version 2 only, as
3263# published by the Free Software Foundation.  Oracle designates this
3264# particular file as subject to the "Classpath" exception as provided
3265# by Oracle in the LICENSE file that accompanied this code.
3266#
3267# This code is distributed in the hope that it will be useful, but WITHOUT
3268# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3269# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3270# version 2 for more details (a copy is included in the LICENSE file that
3271# accompanied this code).
3272#
3273# You should have received a copy of the GNU General Public License version
3274# 2 along with this work; if not, write to the Free Software Foundation,
3275# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3276#
3277# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3278# or visit www.oracle.com if you need additional information or have any
3279# questions.
3280#
3281
3282# Execute the check given as argument, and verify the result
3283# If the Boot JDK was previously found, do nothing
3284# $1 A command line (typically autoconf macro) to execute
3285
3286
3287# Test: Is bootjdk explicitely set by command line arguments?
3288
3289
3290# Test: Is bootjdk available from builddeps?
3291
3292
3293# Test: Is $JAVA_HOME set?
3294
3295
3296# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3297
3298
3299# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3300
3301
3302# Look for a jdk in the given path. If there are multiple, try to select the newest.
3303# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3304# $1 = Path to directory containing jdk installations.
3305# $2 = String to append to the found JDK directory to get the proper JDK home
3306
3307
3308# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3309# environmental variable as base for where to look.
3310# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3311
3312
3313# Test: Is there a JDK installed in default, well-known locations?
3314
3315
3316# Check that a command-line tool in the Boot JDK is correct
3317# $1 = name of variable to assign
3318# $2 = name of binary
3319
3320
3321###############################################################################
3322#
3323# We need a Boot JDK to bootstrap the build.
3324#
3325
3326
3327
3328
3329
3330#
3331# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3332# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3333#
3334# This code is free software; you can redistribute it and/or modify it
3335# under the terms of the GNU General Public License version 2 only, as
3336# published by the Free Software Foundation.  Oracle designates this
3337# particular file as subject to the "Classpath" exception as provided
3338# by Oracle in the LICENSE file that accompanied this code.
3339#
3340# This code is distributed in the hope that it will be useful, but WITHOUT
3341# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3342# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3343# version 2 for more details (a copy is included in the LICENSE file that
3344# accompanied this code).
3345#
3346# You should have received a copy of the GNU General Public License version
3347# 2 along with this work; if not, write to the Free Software Foundation,
3348# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3349#
3350# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3351# or visit www.oracle.com if you need additional information or have any
3352# questions.
3353#
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374#
3375# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3376# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3377#
3378# This code is free software; you can redistribute it and/or modify it
3379# under the terms of the GNU General Public License version 2 only, as
3380# published by the Free Software Foundation.  Oracle designates this
3381# particular file as subject to the "Classpath" exception as provided
3382# by Oracle in the LICENSE file that accompanied this code.
3383#
3384# This code is distributed in the hope that it will be useful, but WITHOUT
3385# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3386# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3387# version 2 for more details (a copy is included in the LICENSE file that
3388# accompanied this code).
3389#
3390# You should have received a copy of the GNU General Public License version
3391# 2 along with this work; if not, write to the Free Software Foundation,
3392# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3393#
3394# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3395# or visit www.oracle.com if you need additional information or have any
3396# questions.
3397#
3398
3399
3400
3401
3402
3403cygwin_help() {
3404    case $1 in
3405    unzip)
3406        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3407    zip)
3408        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3409    make)
3410        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3411    * )
3412       break ;;
3413    esac
3414}
3415
3416apt_help() {
3417    case $1 in
3418    devkit)
3419        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3420    openjdk)
3421        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3422    alsa)
3423        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3424    cups)
3425        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3426    freetype2)
3427        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3428    pulse)
3429        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3430    x11)
3431        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3432    ccache)
3433        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3434    * )
3435       break ;;
3436    esac
3437}
3438
3439yum_help() {
3440    case $1 in
3441    devkit)
3442        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3443    openjdk)
3444        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3445    alsa)
3446        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3447    cups)
3448        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3449    freetype2)
3450        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3451    pulse)
3452        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3453    x11)
3454        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3455    ccache)
3456        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3457    * )
3458       break ;;
3459    esac
3460}
3461
3462port_help() {
3463    PKGHANDLER_COMMAND=""
3464}
3465
3466pkgutil_help() {
3467    PKGHANDLER_COMMAND=""
3468}
3469
3470pkgadd_help() {
3471    PKGHANDLER_COMMAND=""
3472}
3473
3474
3475
3476#
3477# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3478# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3479#
3480# This code is free software; you can redistribute it and/or modify it
3481# under the terms of the GNU General Public License version 2 only, as
3482# published by the Free Software Foundation.  Oracle designates this
3483# particular file as subject to the "Classpath" exception as provided
3484# by Oracle in the LICENSE file that accompanied this code.
3485#
3486# This code is distributed in the hope that it will be useful, but WITHOUT
3487# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3488# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3489# version 2 for more details (a copy is included in the LICENSE file that
3490# accompanied this code).
3491#
3492# You should have received a copy of the GNU General Public License version
3493# 2 along with this work; if not, write to the Free Software Foundation,
3494# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3495#
3496# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3497# or visit www.oracle.com if you need additional information or have any
3498# questions.
3499#
3500
3501
3502
3503
3504
3505
3506
3507
3508###############################################################################
3509#
3510# Should we build only OpenJDK even if closed sources are present?
3511#
3512
3513
3514
3515
3516###############################################################################
3517#
3518# Setup version numbers
3519#
3520
3521
3522
3523
3524
3525
3526# Support for customization of the build process. Some build files
3527# will include counterparts from this location, if they exist. This allows
3528# for a degree of customization of the build targets and the rules/recipes
3529# to create them
3530
3531# Check whether --with-custom-make-dir was given.
3532if test "${with_custom_make_dir+set}" = set; then :
3533  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3534fi
3535
3536
3537
3538#
3539# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3540# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3541#
3542# This code is free software; you can redistribute it and/or modify it
3543# under the terms of the GNU General Public License version 2 only, as
3544# published by the Free Software Foundation.  Oracle designates this
3545# particular file as subject to the "Classpath" exception as provided
3546# by Oracle in the LICENSE file that accompanied this code.
3547#
3548# This code is distributed in the hope that it will be useful, but WITHOUT
3549# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3550# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3551# version 2 for more details (a copy is included in the LICENSE file that
3552# accompanied this code).
3553#
3554# You should have received a copy of the GNU General Public License version
3555# 2 along with this work; if not, write to the Free Software Foundation,
3556# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3557#
3558# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3559# or visit www.oracle.com if you need additional information or have any
3560# questions.
3561#
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577#
3578# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3579# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3580#
3581# This code is free software; you can redistribute it and/or modify it
3582# under the terms of the GNU General Public License version 2 only, as
3583# published by the Free Software Foundation.  Oracle designates this
3584# particular file as subject to the "Classpath" exception as provided
3585# by Oracle in the LICENSE file that accompanied this code.
3586#
3587# This code is distributed in the hope that it will be useful, but WITHOUT
3588# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3589# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3590# version 2 for more details (a copy is included in the LICENSE file that
3591# accompanied this code).
3592#
3593# You should have received a copy of the GNU General Public License version
3594# 2 along with this work; if not, write to the Free Software Foundation,
3595# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3596#
3597# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3598# or visit www.oracle.com if you need additional information or have any
3599# questions.
3600#
3601
3602# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3603# Converts autoconf style CPU name to OpenJDK style, into
3604# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3605
3606
3607# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3608# Converts autoconf style OS name to OpenJDK style, into
3609# VAR_OS and VAR_OS_API.
3610
3611
3612# Expects $host_os $host_cpu $build_os and $build_cpu
3613# and $with_target_bits to have been setup!
3614#
3615# Translate the standard triplet(quadruplet) definition
3616# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3617# OPENJDK_BUILD_OS, etc.
3618
3619
3620# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3621# accordingly. Must be done after setting up build and target system, but before
3622# doing anything else with these values.
3623
3624
3625    # Setup the legacy variables, for controlling the old makefiles.
3626    #
3627
3628
3629
3630
3631#%%% Build and target systems %%%
3632
3633
3634
3635
3636# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3637# Add -mX to various FLAGS variables.
3638
3639
3640
3641
3642
3643
3644#
3645# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3646# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3647#
3648# This code is free software; you can redistribute it and/or modify it
3649# under the terms of the GNU General Public License version 2 only, as
3650# published by the Free Software Foundation.  Oracle designates this
3651# particular file as subject to the "Classpath" exception as provided
3652# by Oracle in the LICENSE file that accompanied this code.
3653#
3654# This code is distributed in the hope that it will be useful, but WITHOUT
3655# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3656# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3657# version 2 for more details (a copy is included in the LICENSE file that
3658# accompanied this code).
3659#
3660# You should have received a copy of the GNU General Public License version
3661# 2 along with this work; if not, write to the Free Software Foundation,
3662# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3663#
3664# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3665# or visit www.oracle.com if you need additional information or have any
3666# questions.
3667#
3668
3669
3670
3671
3672
3673
3674
3675
3676#
3677# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3678# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3679#
3680# This code is free software; you can redistribute it and/or modify it
3681# under the terms of the GNU General Public License version 2 only, as
3682# published by the Free Software Foundation.  Oracle designates this
3683# particular file as subject to the "Classpath" exception as provided
3684# by Oracle in the LICENSE file that accompanied this code.
3685#
3686# This code is distributed in the hope that it will be useful, but WITHOUT
3687# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3688# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3689# version 2 for more details (a copy is included in the LICENSE file that
3690# accompanied this code).
3691#
3692# You should have received a copy of the GNU General Public License version
3693# 2 along with this work; if not, write to the Free Software Foundation,
3694# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3695#
3696# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3697# or visit www.oracle.com if you need additional information or have any
3698# questions.
3699#
3700
3701# $1 = compiler to test (CC or CXX)
3702# $2 = human readable name of compiler (C or C++)
3703
3704
3705
3706
3707
3708# $1 = compiler to test (CC or CXX)
3709# $2 = human readable name of compiler (C or C++)
3710# $3 = list of compiler names to search for
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3725#                                   [RUN-IF-FALSE])
3726# ------------------------------------------------------------
3727# Check that the c and c++ compilers support an argument
3728
3729
3730
3731
3732# Setup the JTREG paths
3733
3734
3735#
3736# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3737# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3738#
3739# This code is free software; you can redistribute it and/or modify it
3740# under the terms of the GNU General Public License version 2 only, as
3741# published by the Free Software Foundation.  Oracle designates this
3742# particular file as subject to the "Classpath" exception as provided
3743# by Oracle in the LICENSE file that accompanied this code.
3744#
3745# This code is distributed in the hope that it will be useful, but WITHOUT
3746# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3747# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3748# version 2 for more details (a copy is included in the LICENSE file that
3749# accompanied this code).
3750#
3751# You should have received a copy of the GNU General Public License version
3752# 2 along with this work; if not, write to the Free Software Foundation,
3753# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3754#
3755# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3756# or visit www.oracle.com if you need additional information or have any
3757# questions.
3758#
3759
3760
3761
3762
3763
3764
3765
3766# Check if the VS env variables were setup prior to running configure.
3767# If not, then find vcvarsall.bat and run it automatically, and integrate
3768# the set env variables into the spec file.
3769
3770
3771
3772# Setup the DXSDK paths
3773
3774
3775
3776
3777
3778
3779# This line needs to be here, verbatim, after all includes and the dummy hook
3780# definitions. It is replaced with custom functionality when building
3781# custom sources.
3782#CUSTOM_AUTOCONF_INCLUDE
3783
3784# Do not change or remove the following line, it is needed for consistency checks:
3785DATE_WHEN_GENERATED=1370949244
3786
3787###############################################################################
3788#
3789# Initialization / Boot-strapping
3790#
3791# The bootstrapping process needs to solve the "chicken or the egg" problem,
3792# thus it jumps back and forth, each time gaining something needed later on.
3793#
3794###############################################################################
3795
3796# Basic initialization that must happen first of all
3797
3798# Save the original command line. This is passed to us by the wrapper configure script.
3799
3800DATE_WHEN_CONFIGURED=`LANG=C date`
3801
3802{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3803$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3804{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3805$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3806
3807
3808
3809# Start with tools that do not need have cross compilation support
3810# and can be expected to be found in the default PATH. These tools are
3811# used by configure. Nor are these tools expected to be found in the
3812# devkit from the builddeps server either, since they are
3813# needed to download the devkit.
3814
3815# First are all the simple required tools.
3816
3817    for ac_prog in basename
3818do
3819  # Extract the first word of "$ac_prog", so it can be a program name with args.
3820set dummy $ac_prog; ac_word=$2
3821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822$as_echo_n "checking for $ac_word... " >&6; }
3823if test "${ac_cv_path_BASENAME+set}" = set; then :
3824  $as_echo_n "(cached) " >&6
3825else
3826  case $BASENAME in
3827  [\\/]* | ?:[\\/]*)
3828  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3829  ;;
3830  *)
3831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3832for as_dir in $PATH
3833do
3834  IFS=$as_save_IFS
3835  test -z "$as_dir" && as_dir=.
3836    for ac_exec_ext in '' $ac_executable_extensions; do
3837  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3838    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3840    break 2
3841  fi
3842done
3843  done
3844IFS=$as_save_IFS
3845
3846  ;;
3847esac
3848fi
3849BASENAME=$ac_cv_path_BASENAME
3850if test -n "$BASENAME"; then
3851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3852$as_echo "$BASENAME" >&6; }
3853else
3854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3855$as_echo "no" >&6; }
3856fi
3857
3858
3859  test -n "$BASENAME" && break
3860done
3861
3862
3863    if test "x$BASENAME" = x; then
3864        if test "xbasename" = x; then
3865          PROG_NAME=basename
3866        else
3867          PROG_NAME=basename
3868        fi
3869        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3870$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3871        as_fn_error $? "Cannot continue" "$LINENO" 5
3872    fi
3873
3874
3875
3876    for ac_prog in bash
3877do
3878  # Extract the first word of "$ac_prog", so it can be a program name with args.
3879set dummy $ac_prog; ac_word=$2
3880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3881$as_echo_n "checking for $ac_word... " >&6; }
3882if test "${ac_cv_path_BASH+set}" = set; then :
3883  $as_echo_n "(cached) " >&6
3884else
3885  case $BASH in
3886  [\\/]* | ?:[\\/]*)
3887  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3888  ;;
3889  *)
3890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3891for as_dir in $PATH
3892do
3893  IFS=$as_save_IFS
3894  test -z "$as_dir" && as_dir=.
3895    for ac_exec_ext in '' $ac_executable_extensions; do
3896  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3897    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3899    break 2
3900  fi
3901done
3902  done
3903IFS=$as_save_IFS
3904
3905  ;;
3906esac
3907fi
3908BASH=$ac_cv_path_BASH
3909if test -n "$BASH"; then
3910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3911$as_echo "$BASH" >&6; }
3912else
3913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3914$as_echo "no" >&6; }
3915fi
3916
3917
3918  test -n "$BASH" && break
3919done
3920
3921
3922    if test "x$BASH" = x; then
3923        if test "xbash" = x; then
3924          PROG_NAME=bash
3925        else
3926          PROG_NAME=bash
3927        fi
3928        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3929$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3930        as_fn_error $? "Cannot continue" "$LINENO" 5
3931    fi
3932
3933
3934
3935    for ac_prog in cat
3936do
3937  # Extract the first word of "$ac_prog", so it can be a program name with args.
3938set dummy $ac_prog; ac_word=$2
3939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3940$as_echo_n "checking for $ac_word... " >&6; }
3941if test "${ac_cv_path_CAT+set}" = set; then :
3942  $as_echo_n "(cached) " >&6
3943else
3944  case $CAT in
3945  [\\/]* | ?:[\\/]*)
3946  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3947  ;;
3948  *)
3949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3950for as_dir in $PATH
3951do
3952  IFS=$as_save_IFS
3953  test -z "$as_dir" && as_dir=.
3954    for ac_exec_ext in '' $ac_executable_extensions; do
3955  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3956    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3958    break 2
3959  fi
3960done
3961  done
3962IFS=$as_save_IFS
3963
3964  ;;
3965esac
3966fi
3967CAT=$ac_cv_path_CAT
3968if test -n "$CAT"; then
3969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3970$as_echo "$CAT" >&6; }
3971else
3972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3973$as_echo "no" >&6; }
3974fi
3975
3976
3977  test -n "$CAT" && break
3978done
3979
3980
3981    if test "x$CAT" = x; then
3982        if test "xcat" = x; then
3983          PROG_NAME=cat
3984        else
3985          PROG_NAME=cat
3986        fi
3987        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3988$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3989        as_fn_error $? "Cannot continue" "$LINENO" 5
3990    fi
3991
3992
3993
3994    for ac_prog in chmod
3995do
3996  # Extract the first word of "$ac_prog", so it can be a program name with args.
3997set dummy $ac_prog; ac_word=$2
3998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3999$as_echo_n "checking for $ac_word... " >&6; }
4000if test "${ac_cv_path_CHMOD+set}" = set; then :
4001  $as_echo_n "(cached) " >&6
4002else
4003  case $CHMOD in
4004  [\\/]* | ?:[\\/]*)
4005  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4006  ;;
4007  *)
4008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4009for as_dir in $PATH
4010do
4011  IFS=$as_save_IFS
4012  test -z "$as_dir" && as_dir=.
4013    for ac_exec_ext in '' $ac_executable_extensions; do
4014  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4015    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4017    break 2
4018  fi
4019done
4020  done
4021IFS=$as_save_IFS
4022
4023  ;;
4024esac
4025fi
4026CHMOD=$ac_cv_path_CHMOD
4027if test -n "$CHMOD"; then
4028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4029$as_echo "$CHMOD" >&6; }
4030else
4031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4032$as_echo "no" >&6; }
4033fi
4034
4035
4036  test -n "$CHMOD" && break
4037done
4038
4039
4040    if test "x$CHMOD" = x; then
4041        if test "xchmod" = x; then
4042          PROG_NAME=chmod
4043        else
4044          PROG_NAME=chmod
4045        fi
4046        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4047$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4048        as_fn_error $? "Cannot continue" "$LINENO" 5
4049    fi
4050
4051
4052
4053    for ac_prog in cmp
4054do
4055  # Extract the first word of "$ac_prog", so it can be a program name with args.
4056set dummy $ac_prog; ac_word=$2
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4058$as_echo_n "checking for $ac_word... " >&6; }
4059if test "${ac_cv_path_CMP+set}" = set; then :
4060  $as_echo_n "(cached) " >&6
4061else
4062  case $CMP in
4063  [\\/]* | ?:[\\/]*)
4064  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4065  ;;
4066  *)
4067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4068for as_dir in $PATH
4069do
4070  IFS=$as_save_IFS
4071  test -z "$as_dir" && as_dir=.
4072    for ac_exec_ext in '' $ac_executable_extensions; do
4073  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4074    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4076    break 2
4077  fi
4078done
4079  done
4080IFS=$as_save_IFS
4081
4082  ;;
4083esac
4084fi
4085CMP=$ac_cv_path_CMP
4086if test -n "$CMP"; then
4087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4088$as_echo "$CMP" >&6; }
4089else
4090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4091$as_echo "no" >&6; }
4092fi
4093
4094
4095  test -n "$CMP" && break
4096done
4097
4098
4099    if test "x$CMP" = x; then
4100        if test "xcmp" = x; then
4101          PROG_NAME=cmp
4102        else
4103          PROG_NAME=cmp
4104        fi
4105        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4106$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4107        as_fn_error $? "Cannot continue" "$LINENO" 5
4108    fi
4109
4110
4111
4112    for ac_prog in comm
4113do
4114  # Extract the first word of "$ac_prog", so it can be a program name with args.
4115set dummy $ac_prog; ac_word=$2
4116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4117$as_echo_n "checking for $ac_word... " >&6; }
4118if test "${ac_cv_path_COMM+set}" = set; then :
4119  $as_echo_n "(cached) " >&6
4120else
4121  case $COMM in
4122  [\\/]* | ?:[\\/]*)
4123  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4124  ;;
4125  *)
4126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4127for as_dir in $PATH
4128do
4129  IFS=$as_save_IFS
4130  test -z "$as_dir" && as_dir=.
4131    for ac_exec_ext in '' $ac_executable_extensions; do
4132  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4133    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4135    break 2
4136  fi
4137done
4138  done
4139IFS=$as_save_IFS
4140
4141  ;;
4142esac
4143fi
4144COMM=$ac_cv_path_COMM
4145if test -n "$COMM"; then
4146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4147$as_echo "$COMM" >&6; }
4148else
4149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4150$as_echo "no" >&6; }
4151fi
4152
4153
4154  test -n "$COMM" && break
4155done
4156
4157
4158    if test "x$COMM" = x; then
4159        if test "xcomm" = x; then
4160          PROG_NAME=comm
4161        else
4162          PROG_NAME=comm
4163        fi
4164        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4165$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4166        as_fn_error $? "Cannot continue" "$LINENO" 5
4167    fi
4168
4169
4170
4171    for ac_prog in cp
4172do
4173  # Extract the first word of "$ac_prog", so it can be a program name with args.
4174set dummy $ac_prog; ac_word=$2
4175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4176$as_echo_n "checking for $ac_word... " >&6; }
4177if test "${ac_cv_path_CP+set}" = set; then :
4178  $as_echo_n "(cached) " >&6
4179else
4180  case $CP in
4181  [\\/]* | ?:[\\/]*)
4182  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4183  ;;
4184  *)
4185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4186for as_dir in $PATH
4187do
4188  IFS=$as_save_IFS
4189  test -z "$as_dir" && as_dir=.
4190    for ac_exec_ext in '' $ac_executable_extensions; do
4191  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4192    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4194    break 2
4195  fi
4196done
4197  done
4198IFS=$as_save_IFS
4199
4200  ;;
4201esac
4202fi
4203CP=$ac_cv_path_CP
4204if test -n "$CP"; then
4205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4206$as_echo "$CP" >&6; }
4207else
4208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4209$as_echo "no" >&6; }
4210fi
4211
4212
4213  test -n "$CP" && break
4214done
4215
4216
4217    if test "x$CP" = x; then
4218        if test "xcp" = x; then
4219          PROG_NAME=cp
4220        else
4221          PROG_NAME=cp
4222        fi
4223        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4224$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4225        as_fn_error $? "Cannot continue" "$LINENO" 5
4226    fi
4227
4228
4229
4230    for ac_prog in cpio
4231do
4232  # Extract the first word of "$ac_prog", so it can be a program name with args.
4233set dummy $ac_prog; ac_word=$2
4234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4235$as_echo_n "checking for $ac_word... " >&6; }
4236if test "${ac_cv_path_CPIO+set}" = set; then :
4237  $as_echo_n "(cached) " >&6
4238else
4239  case $CPIO in
4240  [\\/]* | ?:[\\/]*)
4241  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4242  ;;
4243  *)
4244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245for as_dir in $PATH
4246do
4247  IFS=$as_save_IFS
4248  test -z "$as_dir" && as_dir=.
4249    for ac_exec_ext in '' $ac_executable_extensions; do
4250  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4251    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4253    break 2
4254  fi
4255done
4256  done
4257IFS=$as_save_IFS
4258
4259  ;;
4260esac
4261fi
4262CPIO=$ac_cv_path_CPIO
4263if test -n "$CPIO"; then
4264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4265$as_echo "$CPIO" >&6; }
4266else
4267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4268$as_echo "no" >&6; }
4269fi
4270
4271
4272  test -n "$CPIO" && break
4273done
4274
4275
4276    if test "x$CPIO" = x; then
4277        if test "xcpio" = x; then
4278          PROG_NAME=cpio
4279        else
4280          PROG_NAME=cpio
4281        fi
4282        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4283$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4284        as_fn_error $? "Cannot continue" "$LINENO" 5
4285    fi
4286
4287
4288
4289    for ac_prog in cut
4290do
4291  # Extract the first word of "$ac_prog", so it can be a program name with args.
4292set dummy $ac_prog; ac_word=$2
4293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4294$as_echo_n "checking for $ac_word... " >&6; }
4295if test "${ac_cv_path_CUT+set}" = set; then :
4296  $as_echo_n "(cached) " >&6
4297else
4298  case $CUT in
4299  [\\/]* | ?:[\\/]*)
4300  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4301  ;;
4302  *)
4303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4304for as_dir in $PATH
4305do
4306  IFS=$as_save_IFS
4307  test -z "$as_dir" && as_dir=.
4308    for ac_exec_ext in '' $ac_executable_extensions; do
4309  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4310    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4312    break 2
4313  fi
4314done
4315  done
4316IFS=$as_save_IFS
4317
4318  ;;
4319esac
4320fi
4321CUT=$ac_cv_path_CUT
4322if test -n "$CUT"; then
4323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4324$as_echo "$CUT" >&6; }
4325else
4326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4327$as_echo "no" >&6; }
4328fi
4329
4330
4331  test -n "$CUT" && break
4332done
4333
4334
4335    if test "x$CUT" = x; then
4336        if test "xcut" = x; then
4337          PROG_NAME=cut
4338        else
4339          PROG_NAME=cut
4340        fi
4341        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4342$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4343        as_fn_error $? "Cannot continue" "$LINENO" 5
4344    fi
4345
4346
4347
4348    for ac_prog in date
4349do
4350  # Extract the first word of "$ac_prog", so it can be a program name with args.
4351set dummy $ac_prog; ac_word=$2
4352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4353$as_echo_n "checking for $ac_word... " >&6; }
4354if test "${ac_cv_path_DATE+set}" = set; then :
4355  $as_echo_n "(cached) " >&6
4356else
4357  case $DATE in
4358  [\\/]* | ?:[\\/]*)
4359  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4360  ;;
4361  *)
4362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4363for as_dir in $PATH
4364do
4365  IFS=$as_save_IFS
4366  test -z "$as_dir" && as_dir=.
4367    for ac_exec_ext in '' $ac_executable_extensions; do
4368  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4369    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4371    break 2
4372  fi
4373done
4374  done
4375IFS=$as_save_IFS
4376
4377  ;;
4378esac
4379fi
4380DATE=$ac_cv_path_DATE
4381if test -n "$DATE"; then
4382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4383$as_echo "$DATE" >&6; }
4384else
4385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4386$as_echo "no" >&6; }
4387fi
4388
4389
4390  test -n "$DATE" && break
4391done
4392
4393
4394    if test "x$DATE" = x; then
4395        if test "xdate" = x; then
4396          PROG_NAME=date
4397        else
4398          PROG_NAME=date
4399        fi
4400        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4401$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4402        as_fn_error $? "Cannot continue" "$LINENO" 5
4403    fi
4404
4405
4406
4407    for ac_prog in gdiff diff
4408do
4409  # Extract the first word of "$ac_prog", so it can be a program name with args.
4410set dummy $ac_prog; ac_word=$2
4411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4412$as_echo_n "checking for $ac_word... " >&6; }
4413if test "${ac_cv_path_DIFF+set}" = set; then :
4414  $as_echo_n "(cached) " >&6
4415else
4416  case $DIFF in
4417  [\\/]* | ?:[\\/]*)
4418  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4419  ;;
4420  *)
4421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4422for as_dir in $PATH
4423do
4424  IFS=$as_save_IFS
4425  test -z "$as_dir" && as_dir=.
4426    for ac_exec_ext in '' $ac_executable_extensions; do
4427  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4428    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4430    break 2
4431  fi
4432done
4433  done
4434IFS=$as_save_IFS
4435
4436  ;;
4437esac
4438fi
4439DIFF=$ac_cv_path_DIFF
4440if test -n "$DIFF"; then
4441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4442$as_echo "$DIFF" >&6; }
4443else
4444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4445$as_echo "no" >&6; }
4446fi
4447
4448
4449  test -n "$DIFF" && break
4450done
4451
4452
4453    if test "x$DIFF" = x; then
4454        if test "xgdiff diff" = x; then
4455          PROG_NAME=diff
4456        else
4457          PROG_NAME=gdiff diff
4458        fi
4459        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4460$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4461        as_fn_error $? "Cannot continue" "$LINENO" 5
4462    fi
4463
4464
4465
4466    for ac_prog in dirname
4467do
4468  # Extract the first word of "$ac_prog", so it can be a program name with args.
4469set dummy $ac_prog; ac_word=$2
4470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4471$as_echo_n "checking for $ac_word... " >&6; }
4472if test "${ac_cv_path_DIRNAME+set}" = set; then :
4473  $as_echo_n "(cached) " >&6
4474else
4475  case $DIRNAME in
4476  [\\/]* | ?:[\\/]*)
4477  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4478  ;;
4479  *)
4480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4481for as_dir in $PATH
4482do
4483  IFS=$as_save_IFS
4484  test -z "$as_dir" && as_dir=.
4485    for ac_exec_ext in '' $ac_executable_extensions; do
4486  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4487    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4489    break 2
4490  fi
4491done
4492  done
4493IFS=$as_save_IFS
4494
4495  ;;
4496esac
4497fi
4498DIRNAME=$ac_cv_path_DIRNAME
4499if test -n "$DIRNAME"; then
4500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4501$as_echo "$DIRNAME" >&6; }
4502else
4503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4504$as_echo "no" >&6; }
4505fi
4506
4507
4508  test -n "$DIRNAME" && break
4509done
4510
4511
4512    if test "x$DIRNAME" = x; then
4513        if test "xdirname" = x; then
4514          PROG_NAME=dirname
4515        else
4516          PROG_NAME=dirname
4517        fi
4518        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4519$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4520        as_fn_error $? "Cannot continue" "$LINENO" 5
4521    fi
4522
4523
4524
4525    for ac_prog in echo
4526do
4527  # Extract the first word of "$ac_prog", so it can be a program name with args.
4528set dummy $ac_prog; ac_word=$2
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4530$as_echo_n "checking for $ac_word... " >&6; }
4531if test "${ac_cv_path_ECHO+set}" = set; then :
4532  $as_echo_n "(cached) " >&6
4533else
4534  case $ECHO in
4535  [\\/]* | ?:[\\/]*)
4536  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4537  ;;
4538  *)
4539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540for as_dir in $PATH
4541do
4542  IFS=$as_save_IFS
4543  test -z "$as_dir" && as_dir=.
4544    for ac_exec_ext in '' $ac_executable_extensions; do
4545  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4546    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4548    break 2
4549  fi
4550done
4551  done
4552IFS=$as_save_IFS
4553
4554  ;;
4555esac
4556fi
4557ECHO=$ac_cv_path_ECHO
4558if test -n "$ECHO"; then
4559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4560$as_echo "$ECHO" >&6; }
4561else
4562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563$as_echo "no" >&6; }
4564fi
4565
4566
4567  test -n "$ECHO" && break
4568done
4569
4570
4571    if test "x$ECHO" = x; then
4572        if test "xecho" = x; then
4573          PROG_NAME=echo
4574        else
4575          PROG_NAME=echo
4576        fi
4577        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4578$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4579        as_fn_error $? "Cannot continue" "$LINENO" 5
4580    fi
4581
4582
4583
4584    for ac_prog in expr
4585do
4586  # Extract the first word of "$ac_prog", so it can be a program name with args.
4587set dummy $ac_prog; ac_word=$2
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4589$as_echo_n "checking for $ac_word... " >&6; }
4590if test "${ac_cv_path_EXPR+set}" = set; then :
4591  $as_echo_n "(cached) " >&6
4592else
4593  case $EXPR in
4594  [\\/]* | ?:[\\/]*)
4595  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4596  ;;
4597  *)
4598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4599for as_dir in $PATH
4600do
4601  IFS=$as_save_IFS
4602  test -z "$as_dir" && as_dir=.
4603    for ac_exec_ext in '' $ac_executable_extensions; do
4604  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4605    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4607    break 2
4608  fi
4609done
4610  done
4611IFS=$as_save_IFS
4612
4613  ;;
4614esac
4615fi
4616EXPR=$ac_cv_path_EXPR
4617if test -n "$EXPR"; then
4618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4619$as_echo "$EXPR" >&6; }
4620else
4621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4622$as_echo "no" >&6; }
4623fi
4624
4625
4626  test -n "$EXPR" && break
4627done
4628
4629
4630    if test "x$EXPR" = x; then
4631        if test "xexpr" = x; then
4632          PROG_NAME=expr
4633        else
4634          PROG_NAME=expr
4635        fi
4636        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4637$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4638        as_fn_error $? "Cannot continue" "$LINENO" 5
4639    fi
4640
4641
4642
4643    for ac_prog in file
4644do
4645  # Extract the first word of "$ac_prog", so it can be a program name with args.
4646set dummy $ac_prog; ac_word=$2
4647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648$as_echo_n "checking for $ac_word... " >&6; }
4649if test "${ac_cv_path_FILE+set}" = set; then :
4650  $as_echo_n "(cached) " >&6
4651else
4652  case $FILE in
4653  [\\/]* | ?:[\\/]*)
4654  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4655  ;;
4656  *)
4657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658for as_dir in $PATH
4659do
4660  IFS=$as_save_IFS
4661  test -z "$as_dir" && as_dir=.
4662    for ac_exec_ext in '' $ac_executable_extensions; do
4663  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4664    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666    break 2
4667  fi
4668done
4669  done
4670IFS=$as_save_IFS
4671
4672  ;;
4673esac
4674fi
4675FILE=$ac_cv_path_FILE
4676if test -n "$FILE"; then
4677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4678$as_echo "$FILE" >&6; }
4679else
4680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681$as_echo "no" >&6; }
4682fi
4683
4684
4685  test -n "$FILE" && break
4686done
4687
4688
4689    if test "x$FILE" = x; then
4690        if test "xfile" = x; then
4691          PROG_NAME=file
4692        else
4693          PROG_NAME=file
4694        fi
4695        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4696$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4697        as_fn_error $? "Cannot continue" "$LINENO" 5
4698    fi
4699
4700
4701
4702    for ac_prog in find
4703do
4704  # Extract the first word of "$ac_prog", so it can be a program name with args.
4705set dummy $ac_prog; ac_word=$2
4706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4707$as_echo_n "checking for $ac_word... " >&6; }
4708if test "${ac_cv_path_FIND+set}" = set; then :
4709  $as_echo_n "(cached) " >&6
4710else
4711  case $FIND in
4712  [\\/]* | ?:[\\/]*)
4713  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4714  ;;
4715  *)
4716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4717for as_dir in $PATH
4718do
4719  IFS=$as_save_IFS
4720  test -z "$as_dir" && as_dir=.
4721    for ac_exec_ext in '' $ac_executable_extensions; do
4722  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4723    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4725    break 2
4726  fi
4727done
4728  done
4729IFS=$as_save_IFS
4730
4731  ;;
4732esac
4733fi
4734FIND=$ac_cv_path_FIND
4735if test -n "$FIND"; then
4736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4737$as_echo "$FIND" >&6; }
4738else
4739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4740$as_echo "no" >&6; }
4741fi
4742
4743
4744  test -n "$FIND" && break
4745done
4746
4747
4748    if test "x$FIND" = x; then
4749        if test "xfind" = x; then
4750          PROG_NAME=find
4751        else
4752          PROG_NAME=find
4753        fi
4754        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4755$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4756        as_fn_error $? "Cannot continue" "$LINENO" 5
4757    fi
4758
4759
4760
4761    for ac_prog in head
4762do
4763  # Extract the first word of "$ac_prog", so it can be a program name with args.
4764set dummy $ac_prog; ac_word=$2
4765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4766$as_echo_n "checking for $ac_word... " >&6; }
4767if test "${ac_cv_path_HEAD+set}" = set; then :
4768  $as_echo_n "(cached) " >&6
4769else
4770  case $HEAD in
4771  [\\/]* | ?:[\\/]*)
4772  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4773  ;;
4774  *)
4775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4776for as_dir in $PATH
4777do
4778  IFS=$as_save_IFS
4779  test -z "$as_dir" && as_dir=.
4780    for ac_exec_ext in '' $ac_executable_extensions; do
4781  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4782    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4784    break 2
4785  fi
4786done
4787  done
4788IFS=$as_save_IFS
4789
4790  ;;
4791esac
4792fi
4793HEAD=$ac_cv_path_HEAD
4794if test -n "$HEAD"; then
4795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4796$as_echo "$HEAD" >&6; }
4797else
4798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4799$as_echo "no" >&6; }
4800fi
4801
4802
4803  test -n "$HEAD" && break
4804done
4805
4806
4807    if test "x$HEAD" = x; then
4808        if test "xhead" = x; then
4809          PROG_NAME=head
4810        else
4811          PROG_NAME=head
4812        fi
4813        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4814$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4815        as_fn_error $? "Cannot continue" "$LINENO" 5
4816    fi
4817
4818
4819
4820    for ac_prog in ln
4821do
4822  # Extract the first word of "$ac_prog", so it can be a program name with args.
4823set dummy $ac_prog; ac_word=$2
4824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4825$as_echo_n "checking for $ac_word... " >&6; }
4826if test "${ac_cv_path_LN+set}" = set; then :
4827  $as_echo_n "(cached) " >&6
4828else
4829  case $LN in
4830  [\\/]* | ?:[\\/]*)
4831  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4832  ;;
4833  *)
4834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4835for as_dir in $PATH
4836do
4837  IFS=$as_save_IFS
4838  test -z "$as_dir" && as_dir=.
4839    for ac_exec_ext in '' $ac_executable_extensions; do
4840  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4841    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4843    break 2
4844  fi
4845done
4846  done
4847IFS=$as_save_IFS
4848
4849  ;;
4850esac
4851fi
4852LN=$ac_cv_path_LN
4853if test -n "$LN"; then
4854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4855$as_echo "$LN" >&6; }
4856else
4857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4858$as_echo "no" >&6; }
4859fi
4860
4861
4862  test -n "$LN" && break
4863done
4864
4865
4866    if test "x$LN" = x; then
4867        if test "xln" = x; then
4868          PROG_NAME=ln
4869        else
4870          PROG_NAME=ln
4871        fi
4872        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4873$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4874        as_fn_error $? "Cannot continue" "$LINENO" 5
4875    fi
4876
4877
4878
4879    for ac_prog in ls
4880do
4881  # Extract the first word of "$ac_prog", so it can be a program name with args.
4882set dummy $ac_prog; ac_word=$2
4883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4884$as_echo_n "checking for $ac_word... " >&6; }
4885if test "${ac_cv_path_LS+set}" = set; then :
4886  $as_echo_n "(cached) " >&6
4887else
4888  case $LS in
4889  [\\/]* | ?:[\\/]*)
4890  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4891  ;;
4892  *)
4893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4894for as_dir in $PATH
4895do
4896  IFS=$as_save_IFS
4897  test -z "$as_dir" && as_dir=.
4898    for ac_exec_ext in '' $ac_executable_extensions; do
4899  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4900    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4902    break 2
4903  fi
4904done
4905  done
4906IFS=$as_save_IFS
4907
4908  ;;
4909esac
4910fi
4911LS=$ac_cv_path_LS
4912if test -n "$LS"; then
4913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4914$as_echo "$LS" >&6; }
4915else
4916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4917$as_echo "no" >&6; }
4918fi
4919
4920
4921  test -n "$LS" && break
4922done
4923
4924
4925    if test "x$LS" = x; then
4926        if test "xls" = x; then
4927          PROG_NAME=ls
4928        else
4929          PROG_NAME=ls
4930        fi
4931        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4932$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4933        as_fn_error $? "Cannot continue" "$LINENO" 5
4934    fi
4935
4936
4937
4938    for ac_prog in mkdir
4939do
4940  # Extract the first word of "$ac_prog", so it can be a program name with args.
4941set dummy $ac_prog; ac_word=$2
4942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4943$as_echo_n "checking for $ac_word... " >&6; }
4944if test "${ac_cv_path_MKDIR+set}" = set; then :
4945  $as_echo_n "(cached) " >&6
4946else
4947  case $MKDIR in
4948  [\\/]* | ?:[\\/]*)
4949  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4950  ;;
4951  *)
4952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4953for as_dir in $PATH
4954do
4955  IFS=$as_save_IFS
4956  test -z "$as_dir" && as_dir=.
4957    for ac_exec_ext in '' $ac_executable_extensions; do
4958  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4959    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4961    break 2
4962  fi
4963done
4964  done
4965IFS=$as_save_IFS
4966
4967  ;;
4968esac
4969fi
4970MKDIR=$ac_cv_path_MKDIR
4971if test -n "$MKDIR"; then
4972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4973$as_echo "$MKDIR" >&6; }
4974else
4975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4976$as_echo "no" >&6; }
4977fi
4978
4979
4980  test -n "$MKDIR" && break
4981done
4982
4983
4984    if test "x$MKDIR" = x; then
4985        if test "xmkdir" = x; then
4986          PROG_NAME=mkdir
4987        else
4988          PROG_NAME=mkdir
4989        fi
4990        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4991$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4992        as_fn_error $? "Cannot continue" "$LINENO" 5
4993    fi
4994
4995
4996
4997    for ac_prog in mktemp
4998do
4999  # Extract the first word of "$ac_prog", so it can be a program name with args.
5000set dummy $ac_prog; ac_word=$2
5001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
5003if test "${ac_cv_path_MKTEMP+set}" = set; then :
5004  $as_echo_n "(cached) " >&6
5005else
5006  case $MKTEMP in
5007  [\\/]* | ?:[\\/]*)
5008  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5009  ;;
5010  *)
5011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012for as_dir in $PATH
5013do
5014  IFS=$as_save_IFS
5015  test -z "$as_dir" && as_dir=.
5016    for ac_exec_ext in '' $ac_executable_extensions; do
5017  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5018    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020    break 2
5021  fi
5022done
5023  done
5024IFS=$as_save_IFS
5025
5026  ;;
5027esac
5028fi
5029MKTEMP=$ac_cv_path_MKTEMP
5030if test -n "$MKTEMP"; then
5031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5032$as_echo "$MKTEMP" >&6; }
5033else
5034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
5036fi
5037
5038
5039  test -n "$MKTEMP" && break
5040done
5041
5042
5043    if test "x$MKTEMP" = x; then
5044        if test "xmktemp" = x; then
5045          PROG_NAME=mktemp
5046        else
5047          PROG_NAME=mktemp
5048        fi
5049        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5050$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5051        as_fn_error $? "Cannot continue" "$LINENO" 5
5052    fi
5053
5054
5055
5056    for ac_prog in mv
5057do
5058  # Extract the first word of "$ac_prog", so it can be a program name with args.
5059set dummy $ac_prog; ac_word=$2
5060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061$as_echo_n "checking for $ac_word... " >&6; }
5062if test "${ac_cv_path_MV+set}" = set; then :
5063  $as_echo_n "(cached) " >&6
5064else
5065  case $MV in
5066  [\\/]* | ?:[\\/]*)
5067  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5068  ;;
5069  *)
5070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5071for as_dir in $PATH
5072do
5073  IFS=$as_save_IFS
5074  test -z "$as_dir" && as_dir=.
5075    for ac_exec_ext in '' $ac_executable_extensions; do
5076  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5077    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5079    break 2
5080  fi
5081done
5082  done
5083IFS=$as_save_IFS
5084
5085  ;;
5086esac
5087fi
5088MV=$ac_cv_path_MV
5089if test -n "$MV"; then
5090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5091$as_echo "$MV" >&6; }
5092else
5093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094$as_echo "no" >&6; }
5095fi
5096
5097
5098  test -n "$MV" && break
5099done
5100
5101
5102    if test "x$MV" = x; then
5103        if test "xmv" = x; then
5104          PROG_NAME=mv
5105        else
5106          PROG_NAME=mv
5107        fi
5108        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5109$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5110        as_fn_error $? "Cannot continue" "$LINENO" 5
5111    fi
5112
5113
5114
5115    for ac_prog in printf
5116do
5117  # Extract the first word of "$ac_prog", so it can be a program name with args.
5118set dummy $ac_prog; ac_word=$2
5119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5120$as_echo_n "checking for $ac_word... " >&6; }
5121if test "${ac_cv_path_PRINTF+set}" = set; then :
5122  $as_echo_n "(cached) " >&6
5123else
5124  case $PRINTF in
5125  [\\/]* | ?:[\\/]*)
5126  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5127  ;;
5128  *)
5129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5130for as_dir in $PATH
5131do
5132  IFS=$as_save_IFS
5133  test -z "$as_dir" && as_dir=.
5134    for ac_exec_ext in '' $ac_executable_extensions; do
5135  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5136    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5138    break 2
5139  fi
5140done
5141  done
5142IFS=$as_save_IFS
5143
5144  ;;
5145esac
5146fi
5147PRINTF=$ac_cv_path_PRINTF
5148if test -n "$PRINTF"; then
5149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5150$as_echo "$PRINTF" >&6; }
5151else
5152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5153$as_echo "no" >&6; }
5154fi
5155
5156
5157  test -n "$PRINTF" && break
5158done
5159
5160
5161    if test "x$PRINTF" = x; then
5162        if test "xprintf" = x; then
5163          PROG_NAME=printf
5164        else
5165          PROG_NAME=printf
5166        fi
5167        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5168$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5169        as_fn_error $? "Cannot continue" "$LINENO" 5
5170    fi
5171
5172
5173
5174    for ac_prog in rm
5175do
5176  # Extract the first word of "$ac_prog", so it can be a program name with args.
5177set dummy $ac_prog; ac_word=$2
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5179$as_echo_n "checking for $ac_word... " >&6; }
5180if test "${ac_cv_path_RM+set}" = set; then :
5181  $as_echo_n "(cached) " >&6
5182else
5183  case $RM in
5184  [\\/]* | ?:[\\/]*)
5185  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5186  ;;
5187  *)
5188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5189for as_dir in $PATH
5190do
5191  IFS=$as_save_IFS
5192  test -z "$as_dir" && as_dir=.
5193    for ac_exec_ext in '' $ac_executable_extensions; do
5194  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5195    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5197    break 2
5198  fi
5199done
5200  done
5201IFS=$as_save_IFS
5202
5203  ;;
5204esac
5205fi
5206RM=$ac_cv_path_RM
5207if test -n "$RM"; then
5208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5209$as_echo "$RM" >&6; }
5210else
5211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5212$as_echo "no" >&6; }
5213fi
5214
5215
5216  test -n "$RM" && break
5217done
5218
5219
5220    if test "x$RM" = x; then
5221        if test "xrm" = x; then
5222          PROG_NAME=rm
5223        else
5224          PROG_NAME=rm
5225        fi
5226        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5227$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5228        as_fn_error $? "Cannot continue" "$LINENO" 5
5229    fi
5230
5231
5232
5233    for ac_prog in sh
5234do
5235  # Extract the first word of "$ac_prog", so it can be a program name with args.
5236set dummy $ac_prog; ac_word=$2
5237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5238$as_echo_n "checking for $ac_word... " >&6; }
5239if test "${ac_cv_path_SH+set}" = set; then :
5240  $as_echo_n "(cached) " >&6
5241else
5242  case $SH in
5243  [\\/]* | ?:[\\/]*)
5244  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5245  ;;
5246  *)
5247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5248for as_dir in $PATH
5249do
5250  IFS=$as_save_IFS
5251  test -z "$as_dir" && as_dir=.
5252    for ac_exec_ext in '' $ac_executable_extensions; do
5253  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5254    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5256    break 2
5257  fi
5258done
5259  done
5260IFS=$as_save_IFS
5261
5262  ;;
5263esac
5264fi
5265SH=$ac_cv_path_SH
5266if test -n "$SH"; then
5267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5268$as_echo "$SH" >&6; }
5269else
5270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5271$as_echo "no" >&6; }
5272fi
5273
5274
5275  test -n "$SH" && break
5276done
5277
5278
5279    if test "x$SH" = x; then
5280        if test "xsh" = x; then
5281          PROG_NAME=sh
5282        else
5283          PROG_NAME=sh
5284        fi
5285        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5286$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5287        as_fn_error $? "Cannot continue" "$LINENO" 5
5288    fi
5289
5290
5291
5292    for ac_prog in sort
5293do
5294  # Extract the first word of "$ac_prog", so it can be a program name with args.
5295set dummy $ac_prog; ac_word=$2
5296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5297$as_echo_n "checking for $ac_word... " >&6; }
5298if test "${ac_cv_path_SORT+set}" = set; then :
5299  $as_echo_n "(cached) " >&6
5300else
5301  case $SORT in
5302  [\\/]* | ?:[\\/]*)
5303  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5304  ;;
5305  *)
5306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5307for as_dir in $PATH
5308do
5309  IFS=$as_save_IFS
5310  test -z "$as_dir" && as_dir=.
5311    for ac_exec_ext in '' $ac_executable_extensions; do
5312  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5313    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5315    break 2
5316  fi
5317done
5318  done
5319IFS=$as_save_IFS
5320
5321  ;;
5322esac
5323fi
5324SORT=$ac_cv_path_SORT
5325if test -n "$SORT"; then
5326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5327$as_echo "$SORT" >&6; }
5328else
5329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5330$as_echo "no" >&6; }
5331fi
5332
5333
5334  test -n "$SORT" && break
5335done
5336
5337
5338    if test "x$SORT" = x; then
5339        if test "xsort" = x; then
5340          PROG_NAME=sort
5341        else
5342          PROG_NAME=sort
5343        fi
5344        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5345$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5346        as_fn_error $? "Cannot continue" "$LINENO" 5
5347    fi
5348
5349
5350
5351    for ac_prog in tail
5352do
5353  # Extract the first word of "$ac_prog", so it can be a program name with args.
5354set dummy $ac_prog; ac_word=$2
5355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5356$as_echo_n "checking for $ac_word... " >&6; }
5357if test "${ac_cv_path_TAIL+set}" = set; then :
5358  $as_echo_n "(cached) " >&6
5359else
5360  case $TAIL in
5361  [\\/]* | ?:[\\/]*)
5362  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5363  ;;
5364  *)
5365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5366for as_dir in $PATH
5367do
5368  IFS=$as_save_IFS
5369  test -z "$as_dir" && as_dir=.
5370    for ac_exec_ext in '' $ac_executable_extensions; do
5371  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5372    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5374    break 2
5375  fi
5376done
5377  done
5378IFS=$as_save_IFS
5379
5380  ;;
5381esac
5382fi
5383TAIL=$ac_cv_path_TAIL
5384if test -n "$TAIL"; then
5385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5386$as_echo "$TAIL" >&6; }
5387else
5388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5389$as_echo "no" >&6; }
5390fi
5391
5392
5393  test -n "$TAIL" && break
5394done
5395
5396
5397    if test "x$TAIL" = x; then
5398        if test "xtail" = x; then
5399          PROG_NAME=tail
5400        else
5401          PROG_NAME=tail
5402        fi
5403        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5404$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5405        as_fn_error $? "Cannot continue" "$LINENO" 5
5406    fi
5407
5408
5409
5410    for ac_prog in tar
5411do
5412  # Extract the first word of "$ac_prog", so it can be a program name with args.
5413set dummy $ac_prog; ac_word=$2
5414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5415$as_echo_n "checking for $ac_word... " >&6; }
5416if test "${ac_cv_path_TAR+set}" = set; then :
5417  $as_echo_n "(cached) " >&6
5418else
5419  case $TAR in
5420  [\\/]* | ?:[\\/]*)
5421  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5422  ;;
5423  *)
5424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5425for as_dir in $PATH
5426do
5427  IFS=$as_save_IFS
5428  test -z "$as_dir" && as_dir=.
5429    for ac_exec_ext in '' $ac_executable_extensions; do
5430  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5431    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5433    break 2
5434  fi
5435done
5436  done
5437IFS=$as_save_IFS
5438
5439  ;;
5440esac
5441fi
5442TAR=$ac_cv_path_TAR
5443if test -n "$TAR"; then
5444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5445$as_echo "$TAR" >&6; }
5446else
5447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5448$as_echo "no" >&6; }
5449fi
5450
5451
5452  test -n "$TAR" && break
5453done
5454
5455
5456    if test "x$TAR" = x; then
5457        if test "xtar" = x; then
5458          PROG_NAME=tar
5459        else
5460          PROG_NAME=tar
5461        fi
5462        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5463$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5464        as_fn_error $? "Cannot continue" "$LINENO" 5
5465    fi
5466
5467
5468
5469    for ac_prog in tee
5470do
5471  # Extract the first word of "$ac_prog", so it can be a program name with args.
5472set dummy $ac_prog; ac_word=$2
5473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5474$as_echo_n "checking for $ac_word... " >&6; }
5475if test "${ac_cv_path_TEE+set}" = set; then :
5476  $as_echo_n "(cached) " >&6
5477else
5478  case $TEE in
5479  [\\/]* | ?:[\\/]*)
5480  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5481  ;;
5482  *)
5483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484for as_dir in $PATH
5485do
5486  IFS=$as_save_IFS
5487  test -z "$as_dir" && as_dir=.
5488    for ac_exec_ext in '' $ac_executable_extensions; do
5489  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5490    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5492    break 2
5493  fi
5494done
5495  done
5496IFS=$as_save_IFS
5497
5498  ;;
5499esac
5500fi
5501TEE=$ac_cv_path_TEE
5502if test -n "$TEE"; then
5503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5504$as_echo "$TEE" >&6; }
5505else
5506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507$as_echo "no" >&6; }
5508fi
5509
5510
5511  test -n "$TEE" && break
5512done
5513
5514
5515    if test "x$TEE" = x; then
5516        if test "xtee" = x; then
5517          PROG_NAME=tee
5518        else
5519          PROG_NAME=tee
5520        fi
5521        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5522$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5523        as_fn_error $? "Cannot continue" "$LINENO" 5
5524    fi
5525
5526
5527
5528    for ac_prog in touch
5529do
5530  # Extract the first word of "$ac_prog", so it can be a program name with args.
5531set dummy $ac_prog; ac_word=$2
5532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5533$as_echo_n "checking for $ac_word... " >&6; }
5534if test "${ac_cv_path_TOUCH+set}" = set; then :
5535  $as_echo_n "(cached) " >&6
5536else
5537  case $TOUCH in
5538  [\\/]* | ?:[\\/]*)
5539  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5540  ;;
5541  *)
5542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5543for as_dir in $PATH
5544do
5545  IFS=$as_save_IFS
5546  test -z "$as_dir" && as_dir=.
5547    for ac_exec_ext in '' $ac_executable_extensions; do
5548  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5549    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5551    break 2
5552  fi
5553done
5554  done
5555IFS=$as_save_IFS
5556
5557  ;;
5558esac
5559fi
5560TOUCH=$ac_cv_path_TOUCH
5561if test -n "$TOUCH"; then
5562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5563$as_echo "$TOUCH" >&6; }
5564else
5565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5566$as_echo "no" >&6; }
5567fi
5568
5569
5570  test -n "$TOUCH" && break
5571done
5572
5573
5574    if test "x$TOUCH" = x; then
5575        if test "xtouch" = x; then
5576          PROG_NAME=touch
5577        else
5578          PROG_NAME=touch
5579        fi
5580        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5581$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5582        as_fn_error $? "Cannot continue" "$LINENO" 5
5583    fi
5584
5585
5586
5587    for ac_prog in tr
5588do
5589  # Extract the first word of "$ac_prog", so it can be a program name with args.
5590set dummy $ac_prog; ac_word=$2
5591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5592$as_echo_n "checking for $ac_word... " >&6; }
5593if test "${ac_cv_path_TR+set}" = set; then :
5594  $as_echo_n "(cached) " >&6
5595else
5596  case $TR in
5597  [\\/]* | ?:[\\/]*)
5598  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5599  ;;
5600  *)
5601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5602for as_dir in $PATH
5603do
5604  IFS=$as_save_IFS
5605  test -z "$as_dir" && as_dir=.
5606    for ac_exec_ext in '' $ac_executable_extensions; do
5607  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5608    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5610    break 2
5611  fi
5612done
5613  done
5614IFS=$as_save_IFS
5615
5616  ;;
5617esac
5618fi
5619TR=$ac_cv_path_TR
5620if test -n "$TR"; then
5621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5622$as_echo "$TR" >&6; }
5623else
5624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5625$as_echo "no" >&6; }
5626fi
5627
5628
5629  test -n "$TR" && break
5630done
5631
5632
5633    if test "x$TR" = x; then
5634        if test "xtr" = x; then
5635          PROG_NAME=tr
5636        else
5637          PROG_NAME=tr
5638        fi
5639        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5640$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5641        as_fn_error $? "Cannot continue" "$LINENO" 5
5642    fi
5643
5644
5645
5646    for ac_prog in uname
5647do
5648  # Extract the first word of "$ac_prog", so it can be a program name with args.
5649set dummy $ac_prog; ac_word=$2
5650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5651$as_echo_n "checking for $ac_word... " >&6; }
5652if test "${ac_cv_path_UNAME+set}" = set; then :
5653  $as_echo_n "(cached) " >&6
5654else
5655  case $UNAME in
5656  [\\/]* | ?:[\\/]*)
5657  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5658  ;;
5659  *)
5660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5661for as_dir in $PATH
5662do
5663  IFS=$as_save_IFS
5664  test -z "$as_dir" && as_dir=.
5665    for ac_exec_ext in '' $ac_executable_extensions; do
5666  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5667    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5669    break 2
5670  fi
5671done
5672  done
5673IFS=$as_save_IFS
5674
5675  ;;
5676esac
5677fi
5678UNAME=$ac_cv_path_UNAME
5679if test -n "$UNAME"; then
5680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5681$as_echo "$UNAME" >&6; }
5682else
5683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5684$as_echo "no" >&6; }
5685fi
5686
5687
5688  test -n "$UNAME" && break
5689done
5690
5691
5692    if test "x$UNAME" = x; then
5693        if test "xuname" = x; then
5694          PROG_NAME=uname
5695        else
5696          PROG_NAME=uname
5697        fi
5698        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5699$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5700        as_fn_error $? "Cannot continue" "$LINENO" 5
5701    fi
5702
5703
5704
5705    for ac_prog in uniq
5706do
5707  # Extract the first word of "$ac_prog", so it can be a program name with args.
5708set dummy $ac_prog; ac_word=$2
5709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710$as_echo_n "checking for $ac_word... " >&6; }
5711if test "${ac_cv_path_UNIQ+set}" = set; then :
5712  $as_echo_n "(cached) " >&6
5713else
5714  case $UNIQ in
5715  [\\/]* | ?:[\\/]*)
5716  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5717  ;;
5718  *)
5719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720for as_dir in $PATH
5721do
5722  IFS=$as_save_IFS
5723  test -z "$as_dir" && as_dir=.
5724    for ac_exec_ext in '' $ac_executable_extensions; do
5725  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5726    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5728    break 2
5729  fi
5730done
5731  done
5732IFS=$as_save_IFS
5733
5734  ;;
5735esac
5736fi
5737UNIQ=$ac_cv_path_UNIQ
5738if test -n "$UNIQ"; then
5739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5740$as_echo "$UNIQ" >&6; }
5741else
5742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743$as_echo "no" >&6; }
5744fi
5745
5746
5747  test -n "$UNIQ" && break
5748done
5749
5750
5751    if test "x$UNIQ" = x; then
5752        if test "xuniq" = x; then
5753          PROG_NAME=uniq
5754        else
5755          PROG_NAME=uniq
5756        fi
5757        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5758$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5759        as_fn_error $? "Cannot continue" "$LINENO" 5
5760    fi
5761
5762
5763
5764    for ac_prog in wc
5765do
5766  # Extract the first word of "$ac_prog", so it can be a program name with args.
5767set dummy $ac_prog; ac_word=$2
5768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5769$as_echo_n "checking for $ac_word... " >&6; }
5770if test "${ac_cv_path_WC+set}" = set; then :
5771  $as_echo_n "(cached) " >&6
5772else
5773  case $WC in
5774  [\\/]* | ?:[\\/]*)
5775  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5776  ;;
5777  *)
5778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5779for as_dir in $PATH
5780do
5781  IFS=$as_save_IFS
5782  test -z "$as_dir" && as_dir=.
5783    for ac_exec_ext in '' $ac_executable_extensions; do
5784  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5785    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5787    break 2
5788  fi
5789done
5790  done
5791IFS=$as_save_IFS
5792
5793  ;;
5794esac
5795fi
5796WC=$ac_cv_path_WC
5797if test -n "$WC"; then
5798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5799$as_echo "$WC" >&6; }
5800else
5801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5802$as_echo "no" >&6; }
5803fi
5804
5805
5806  test -n "$WC" && break
5807done
5808
5809
5810    if test "x$WC" = x; then
5811        if test "xwc" = x; then
5812          PROG_NAME=wc
5813        else
5814          PROG_NAME=wc
5815        fi
5816        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5817$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5818        as_fn_error $? "Cannot continue" "$LINENO" 5
5819    fi
5820
5821
5822
5823    for ac_prog in which
5824do
5825  # Extract the first word of "$ac_prog", so it can be a program name with args.
5826set dummy $ac_prog; ac_word=$2
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5828$as_echo_n "checking for $ac_word... " >&6; }
5829if test "${ac_cv_path_WHICH+set}" = set; then :
5830  $as_echo_n "(cached) " >&6
5831else
5832  case $WHICH in
5833  [\\/]* | ?:[\\/]*)
5834  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5835  ;;
5836  *)
5837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5838for as_dir in $PATH
5839do
5840  IFS=$as_save_IFS
5841  test -z "$as_dir" && as_dir=.
5842    for ac_exec_ext in '' $ac_executable_extensions; do
5843  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5844    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5846    break 2
5847  fi
5848done
5849  done
5850IFS=$as_save_IFS
5851
5852  ;;
5853esac
5854fi
5855WHICH=$ac_cv_path_WHICH
5856if test -n "$WHICH"; then
5857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5858$as_echo "$WHICH" >&6; }
5859else
5860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5861$as_echo "no" >&6; }
5862fi
5863
5864
5865  test -n "$WHICH" && break
5866done
5867
5868
5869    if test "x$WHICH" = x; then
5870        if test "xwhich" = x; then
5871          PROG_NAME=which
5872        else
5873          PROG_NAME=which
5874        fi
5875        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5876$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5877        as_fn_error $? "Cannot continue" "$LINENO" 5
5878    fi
5879
5880
5881
5882    for ac_prog in xargs
5883do
5884  # Extract the first word of "$ac_prog", so it can be a program name with args.
5885set dummy $ac_prog; ac_word=$2
5886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5887$as_echo_n "checking for $ac_word... " >&6; }
5888if test "${ac_cv_path_XARGS+set}" = set; then :
5889  $as_echo_n "(cached) " >&6
5890else
5891  case $XARGS in
5892  [\\/]* | ?:[\\/]*)
5893  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5894  ;;
5895  *)
5896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897for as_dir in $PATH
5898do
5899  IFS=$as_save_IFS
5900  test -z "$as_dir" && as_dir=.
5901    for ac_exec_ext in '' $ac_executable_extensions; do
5902  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5903    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5905    break 2
5906  fi
5907done
5908  done
5909IFS=$as_save_IFS
5910
5911  ;;
5912esac
5913fi
5914XARGS=$ac_cv_path_XARGS
5915if test -n "$XARGS"; then
5916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5917$as_echo "$XARGS" >&6; }
5918else
5919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920$as_echo "no" >&6; }
5921fi
5922
5923
5924  test -n "$XARGS" && break
5925done
5926
5927
5928    if test "x$XARGS" = x; then
5929        if test "xxargs" = x; then
5930          PROG_NAME=xargs
5931        else
5932          PROG_NAME=xargs
5933        fi
5934        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5935$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5936        as_fn_error $? "Cannot continue" "$LINENO" 5
5937    fi
5938
5939
5940
5941# Then required tools that require some special treatment.
5942for ac_prog in gawk mawk nawk awk
5943do
5944  # Extract the first word of "$ac_prog", so it can be a program name with args.
5945set dummy $ac_prog; ac_word=$2
5946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5947$as_echo_n "checking for $ac_word... " >&6; }
5948if test "${ac_cv_prog_AWK+set}" = set; then :
5949  $as_echo_n "(cached) " >&6
5950else
5951  if test -n "$AWK"; then
5952  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5953else
5954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955for as_dir in $PATH
5956do
5957  IFS=$as_save_IFS
5958  test -z "$as_dir" && as_dir=.
5959    for ac_exec_ext in '' $ac_executable_extensions; do
5960  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5961    ac_cv_prog_AWK="$ac_prog"
5962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5963    break 2
5964  fi
5965done
5966  done
5967IFS=$as_save_IFS
5968
5969fi
5970fi
5971AWK=$ac_cv_prog_AWK
5972if test -n "$AWK"; then
5973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5974$as_echo "$AWK" >&6; }
5975else
5976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977$as_echo "no" >&6; }
5978fi
5979
5980
5981  test -n "$AWK" && break
5982done
5983
5984
5985    if test "x$AWK" = x; then
5986        if test "x" = x; then
5987          PROG_NAME=awk
5988        else
5989          PROG_NAME=
5990        fi
5991        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5992$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5993        as_fn_error $? "Cannot continue" "$LINENO" 5
5994    fi
5995
5996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5997$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5998if test "${ac_cv_path_GREP+set}" = set; then :
5999  $as_echo_n "(cached) " >&6
6000else
6001  if test -z "$GREP"; then
6002  ac_path_GREP_found=false
6003  # Loop through the user's path and test for each of PROGNAME-LIST
6004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6006do
6007  IFS=$as_save_IFS
6008  test -z "$as_dir" && as_dir=.
6009    for ac_prog in grep ggrep; do
6010    for ac_exec_ext in '' $ac_executable_extensions; do
6011      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6012      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6013# Check for GNU ac_path_GREP and select it if it is found.
6014  # Check for GNU $ac_path_GREP
6015case `"$ac_path_GREP" --version 2>&1` in
6016*GNU*)
6017  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6018*)
6019  ac_count=0
6020  $as_echo_n 0123456789 >"conftest.in"
6021  while :
6022  do
6023    cat "conftest.in" "conftest.in" >"conftest.tmp"
6024    mv "conftest.tmp" "conftest.in"
6025    cp "conftest.in" "conftest.nl"
6026    $as_echo 'GREP' >> "conftest.nl"
6027    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6028    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6029    as_fn_arith $ac_count + 1 && ac_count=$as_val
6030    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6031      # Best one so far, save it but keep looking for a better one
6032      ac_cv_path_GREP="$ac_path_GREP"
6033      ac_path_GREP_max=$ac_count
6034    fi
6035    # 10*(2^10) chars as input seems more than enough
6036    test $ac_count -gt 10 && break
6037  done
6038  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6039esac
6040
6041      $ac_path_GREP_found && break 3
6042    done
6043  done
6044  done
6045IFS=$as_save_IFS
6046  if test -z "$ac_cv_path_GREP"; then
6047    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6048  fi
6049else
6050  ac_cv_path_GREP=$GREP
6051fi
6052
6053fi
6054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6055$as_echo "$ac_cv_path_GREP" >&6; }
6056 GREP="$ac_cv_path_GREP"
6057
6058
6059
6060    if test "x$GREP" = x; then
6061        if test "x" = x; then
6062          PROG_NAME=grep
6063        else
6064          PROG_NAME=
6065        fi
6066        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6067$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6068        as_fn_error $? "Cannot continue" "$LINENO" 5
6069    fi
6070
6071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6072$as_echo_n "checking for egrep... " >&6; }
6073if test "${ac_cv_path_EGREP+set}" = set; then :
6074  $as_echo_n "(cached) " >&6
6075else
6076  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6077   then ac_cv_path_EGREP="$GREP -E"
6078   else
6079     if test -z "$EGREP"; then
6080  ac_path_EGREP_found=false
6081  # Loop through the user's path and test for each of PROGNAME-LIST
6082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6083for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6084do
6085  IFS=$as_save_IFS
6086  test -z "$as_dir" && as_dir=.
6087    for ac_prog in egrep; do
6088    for ac_exec_ext in '' $ac_executable_extensions; do
6089      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6090      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6091# Check for GNU ac_path_EGREP and select it if it is found.
6092  # Check for GNU $ac_path_EGREP
6093case `"$ac_path_EGREP" --version 2>&1` in
6094*GNU*)
6095  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6096*)
6097  ac_count=0
6098  $as_echo_n 0123456789 >"conftest.in"
6099  while :
6100  do
6101    cat "conftest.in" "conftest.in" >"conftest.tmp"
6102    mv "conftest.tmp" "conftest.in"
6103    cp "conftest.in" "conftest.nl"
6104    $as_echo 'EGREP' >> "conftest.nl"
6105    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6106    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6107    as_fn_arith $ac_count + 1 && ac_count=$as_val
6108    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6109      # Best one so far, save it but keep looking for a better one
6110      ac_cv_path_EGREP="$ac_path_EGREP"
6111      ac_path_EGREP_max=$ac_count
6112    fi
6113    # 10*(2^10) chars as input seems more than enough
6114    test $ac_count -gt 10 && break
6115  done
6116  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6117esac
6118
6119      $ac_path_EGREP_found && break 3
6120    done
6121  done
6122  done
6123IFS=$as_save_IFS
6124  if test -z "$ac_cv_path_EGREP"; then
6125    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6126  fi
6127else
6128  ac_cv_path_EGREP=$EGREP
6129fi
6130
6131   fi
6132fi
6133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6134$as_echo "$ac_cv_path_EGREP" >&6; }
6135 EGREP="$ac_cv_path_EGREP"
6136
6137
6138
6139    if test "x$EGREP" = x; then
6140        if test "x" = x; then
6141          PROG_NAME=egrep
6142        else
6143          PROG_NAME=
6144        fi
6145        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6146$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6147        as_fn_error $? "Cannot continue" "$LINENO" 5
6148    fi
6149
6150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6151$as_echo_n "checking for fgrep... " >&6; }
6152if test "${ac_cv_path_FGREP+set}" = set; then :
6153  $as_echo_n "(cached) " >&6
6154else
6155  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6156   then ac_cv_path_FGREP="$GREP -F"
6157   else
6158     if test -z "$FGREP"; then
6159  ac_path_FGREP_found=false
6160  # Loop through the user's path and test for each of PROGNAME-LIST
6161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6162for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6163do
6164  IFS=$as_save_IFS
6165  test -z "$as_dir" && as_dir=.
6166    for ac_prog in fgrep; do
6167    for ac_exec_ext in '' $ac_executable_extensions; do
6168      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6169      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6170# Check for GNU ac_path_FGREP and select it if it is found.
6171  # Check for GNU $ac_path_FGREP
6172case `"$ac_path_FGREP" --version 2>&1` in
6173*GNU*)
6174  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6175*)
6176  ac_count=0
6177  $as_echo_n 0123456789 >"conftest.in"
6178  while :
6179  do
6180    cat "conftest.in" "conftest.in" >"conftest.tmp"
6181    mv "conftest.tmp" "conftest.in"
6182    cp "conftest.in" "conftest.nl"
6183    $as_echo 'FGREP' >> "conftest.nl"
6184    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6185    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6186    as_fn_arith $ac_count + 1 && ac_count=$as_val
6187    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6188      # Best one so far, save it but keep looking for a better one
6189      ac_cv_path_FGREP="$ac_path_FGREP"
6190      ac_path_FGREP_max=$ac_count
6191    fi
6192    # 10*(2^10) chars as input seems more than enough
6193    test $ac_count -gt 10 && break
6194  done
6195  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6196esac
6197
6198      $ac_path_FGREP_found && break 3
6199    done
6200  done
6201  done
6202IFS=$as_save_IFS
6203  if test -z "$ac_cv_path_FGREP"; then
6204    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6205  fi
6206else
6207  ac_cv_path_FGREP=$FGREP
6208fi
6209
6210   fi
6211fi
6212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6213$as_echo "$ac_cv_path_FGREP" >&6; }
6214 FGREP="$ac_cv_path_FGREP"
6215
6216
6217
6218    if test "x$FGREP" = x; then
6219        if test "x" = x; then
6220          PROG_NAME=fgrep
6221        else
6222          PROG_NAME=
6223        fi
6224        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6225$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6226        as_fn_error $? "Cannot continue" "$LINENO" 5
6227    fi
6228
6229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6230$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6231if test "${ac_cv_path_SED+set}" = set; then :
6232  $as_echo_n "(cached) " >&6
6233else
6234            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6235     for ac_i in 1 2 3 4 5 6 7; do
6236       ac_script="$ac_script$as_nl$ac_script"
6237     done
6238     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6239     { ac_script=; unset ac_script;}
6240     if test -z "$SED"; then
6241  ac_path_SED_found=false
6242  # Loop through the user's path and test for each of PROGNAME-LIST
6243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6244for as_dir in $PATH
6245do
6246  IFS=$as_save_IFS
6247  test -z "$as_dir" && as_dir=.
6248    for ac_prog in sed gsed; do
6249    for ac_exec_ext in '' $ac_executable_extensions; do
6250      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6251      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6252# Check for GNU ac_path_SED and select it if it is found.
6253  # Check for GNU $ac_path_SED
6254case `"$ac_path_SED" --version 2>&1` in
6255*GNU*)
6256  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6257*)
6258  ac_count=0
6259  $as_echo_n 0123456789 >"conftest.in"
6260  while :
6261  do
6262    cat "conftest.in" "conftest.in" >"conftest.tmp"
6263    mv "conftest.tmp" "conftest.in"
6264    cp "conftest.in" "conftest.nl"
6265    $as_echo '' >> "conftest.nl"
6266    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6267    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6268    as_fn_arith $ac_count + 1 && ac_count=$as_val
6269    if test $ac_count -gt ${ac_path_SED_max-0}; then
6270      # Best one so far, save it but keep looking for a better one
6271      ac_cv_path_SED="$ac_path_SED"
6272      ac_path_SED_max=$ac_count
6273    fi
6274    # 10*(2^10) chars as input seems more than enough
6275    test $ac_count -gt 10 && break
6276  done
6277  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6278esac
6279
6280      $ac_path_SED_found && break 3
6281    done
6282  done
6283  done
6284IFS=$as_save_IFS
6285  if test -z "$ac_cv_path_SED"; then
6286    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6287  fi
6288else
6289  ac_cv_path_SED=$SED
6290fi
6291
6292fi
6293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6294$as_echo "$ac_cv_path_SED" >&6; }
6295 SED="$ac_cv_path_SED"
6296  rm -f conftest.sed
6297
6298
6299    if test "x$SED" = x; then
6300        if test "x" = x; then
6301          PROG_NAME=sed
6302        else
6303          PROG_NAME=
6304        fi
6305        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6306$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6307        as_fn_error $? "Cannot continue" "$LINENO" 5
6308    fi
6309
6310
6311for ac_prog in nawk gawk awk
6312do
6313  # Extract the first word of "$ac_prog", so it can be a program name with args.
6314set dummy $ac_prog; ac_word=$2
6315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6316$as_echo_n "checking for $ac_word... " >&6; }
6317if test "${ac_cv_path_NAWK+set}" = set; then :
6318  $as_echo_n "(cached) " >&6
6319else
6320  case $NAWK in
6321  [\\/]* | ?:[\\/]*)
6322  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6323  ;;
6324  *)
6325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6326for as_dir in $PATH
6327do
6328  IFS=$as_save_IFS
6329  test -z "$as_dir" && as_dir=.
6330    for ac_exec_ext in '' $ac_executable_extensions; do
6331  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6332    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6334    break 2
6335  fi
6336done
6337  done
6338IFS=$as_save_IFS
6339
6340  ;;
6341esac
6342fi
6343NAWK=$ac_cv_path_NAWK
6344if test -n "$NAWK"; then
6345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6346$as_echo "$NAWK" >&6; }
6347else
6348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6349$as_echo "no" >&6; }
6350fi
6351
6352
6353  test -n "$NAWK" && break
6354done
6355
6356
6357    if test "x$NAWK" = x; then
6358        if test "x" = x; then
6359          PROG_NAME=nawk
6360        else
6361          PROG_NAME=
6362        fi
6363        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6364$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6365        as_fn_error $? "Cannot continue" "$LINENO" 5
6366    fi
6367
6368
6369# Always force rm.
6370RM="$RM -f"
6371
6372# pwd behaves differently on various platforms and some don't support the -L flag.
6373# Always use the bash builtin pwd to get uniform behavior.
6374THEPWDCMD=pwd
6375
6376# These are not required on all platforms
6377# Extract the first word of "cygpath", so it can be a program name with args.
6378set dummy cygpath; ac_word=$2
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6380$as_echo_n "checking for $ac_word... " >&6; }
6381if test "${ac_cv_path_CYGPATH+set}" = set; then :
6382  $as_echo_n "(cached) " >&6
6383else
6384  case $CYGPATH in
6385  [\\/]* | ?:[\\/]*)
6386  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6387  ;;
6388  *)
6389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6390for as_dir in $PATH
6391do
6392  IFS=$as_save_IFS
6393  test -z "$as_dir" && as_dir=.
6394    for ac_exec_ext in '' $ac_executable_extensions; do
6395  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6396    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6398    break 2
6399  fi
6400done
6401  done
6402IFS=$as_save_IFS
6403
6404  ;;
6405esac
6406fi
6407CYGPATH=$ac_cv_path_CYGPATH
6408if test -n "$CYGPATH"; then
6409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6410$as_echo "$CYGPATH" >&6; }
6411else
6412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6413$as_echo "no" >&6; }
6414fi
6415
6416
6417# Extract the first word of "readlink", so it can be a program name with args.
6418set dummy readlink; ac_word=$2
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6420$as_echo_n "checking for $ac_word... " >&6; }
6421if test "${ac_cv_path_READLINK+set}" = set; then :
6422  $as_echo_n "(cached) " >&6
6423else
6424  case $READLINK in
6425  [\\/]* | ?:[\\/]*)
6426  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6427  ;;
6428  *)
6429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6430for as_dir in $PATH
6431do
6432  IFS=$as_save_IFS
6433  test -z "$as_dir" && as_dir=.
6434    for ac_exec_ext in '' $ac_executable_extensions; do
6435  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6436    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6438    break 2
6439  fi
6440done
6441  done
6442IFS=$as_save_IFS
6443
6444  ;;
6445esac
6446fi
6447READLINK=$ac_cv_path_READLINK
6448if test -n "$READLINK"; then
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6450$as_echo "$READLINK" >&6; }
6451else
6452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453$as_echo "no" >&6; }
6454fi
6455
6456
6457# Extract the first word of "df", so it can be a program name with args.
6458set dummy df; ac_word=$2
6459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6460$as_echo_n "checking for $ac_word... " >&6; }
6461if test "${ac_cv_path_DF+set}" = set; then :
6462  $as_echo_n "(cached) " >&6
6463else
6464  case $DF in
6465  [\\/]* | ?:[\\/]*)
6466  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6467  ;;
6468  *)
6469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6470for as_dir in $PATH
6471do
6472  IFS=$as_save_IFS
6473  test -z "$as_dir" && as_dir=.
6474    for ac_exec_ext in '' $ac_executable_extensions; do
6475  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6476    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6478    break 2
6479  fi
6480done
6481  done
6482IFS=$as_save_IFS
6483
6484  ;;
6485esac
6486fi
6487DF=$ac_cv_path_DF
6488if test -n "$DF"; then
6489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6490$as_echo "$DF" >&6; }
6491else
6492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6493$as_echo "no" >&6; }
6494fi
6495
6496
6497# Extract the first word of "SetFile", so it can be a program name with args.
6498set dummy SetFile; ac_word=$2
6499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6500$as_echo_n "checking for $ac_word... " >&6; }
6501if test "${ac_cv_path_SETFILE+set}" = set; then :
6502  $as_echo_n "(cached) " >&6
6503else
6504  case $SETFILE in
6505  [\\/]* | ?:[\\/]*)
6506  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6507  ;;
6508  *)
6509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6510for as_dir in $PATH
6511do
6512  IFS=$as_save_IFS
6513  test -z "$as_dir" && as_dir=.
6514    for ac_exec_ext in '' $ac_executable_extensions; do
6515  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6516    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6518    break 2
6519  fi
6520done
6521  done
6522IFS=$as_save_IFS
6523
6524  ;;
6525esac
6526fi
6527SETFILE=$ac_cv_path_SETFILE
6528if test -n "$SETFILE"; then
6529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6530$as_echo "$SETFILE" >&6; }
6531else
6532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6533$as_echo "no" >&6; }
6534fi
6535
6536
6537
6538
6539# Now we can determine OpenJDK build and target platforms. This is required to
6540# have early on.
6541# Make sure we can run config.sub.
6542$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6543  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6544
6545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6546$as_echo_n "checking build system type... " >&6; }
6547if test "${ac_cv_build+set}" = set; then :
6548  $as_echo_n "(cached) " >&6
6549else
6550  ac_build_alias=$build_alias
6551test "x$ac_build_alias" = x &&
6552  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6553test "x$ac_build_alias" = x &&
6554  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6555ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6556  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6557
6558fi
6559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6560$as_echo "$ac_cv_build" >&6; }
6561case $ac_cv_build in
6562*-*-*) ;;
6563*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6564esac
6565build=$ac_cv_build
6566ac_save_IFS=$IFS; IFS='-'
6567set x $ac_cv_build
6568shift
6569build_cpu=$1
6570build_vendor=$2
6571shift; shift
6572# Remember, the first character of IFS is used to create $*,
6573# except with old shells:
6574build_os=$*
6575IFS=$ac_save_IFS
6576case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6577
6578
6579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6580$as_echo_n "checking host system type... " >&6; }
6581if test "${ac_cv_host+set}" = set; then :
6582  $as_echo_n "(cached) " >&6
6583else
6584  if test "x$host_alias" = x; then
6585  ac_cv_host=$ac_cv_build
6586else
6587  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6588    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6589fi
6590
6591fi
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6593$as_echo "$ac_cv_host" >&6; }
6594case $ac_cv_host in
6595*-*-*) ;;
6596*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6597esac
6598host=$ac_cv_host
6599ac_save_IFS=$IFS; IFS='-'
6600set x $ac_cv_host
6601shift
6602host_cpu=$1
6603host_vendor=$2
6604shift; shift
6605# Remember, the first character of IFS is used to create $*,
6606# except with old shells:
6607host_os=$*
6608IFS=$ac_save_IFS
6609case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6610
6611
6612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6613$as_echo_n "checking target system type... " >&6; }
6614if test "${ac_cv_target+set}" = set; then :
6615  $as_echo_n "(cached) " >&6
6616else
6617  if test "x$target_alias" = x; then
6618  ac_cv_target=$ac_cv_host
6619else
6620  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6621    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6622fi
6623
6624fi
6625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6626$as_echo "$ac_cv_target" >&6; }
6627case $ac_cv_target in
6628*-*-*) ;;
6629*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6630esac
6631target=$ac_cv_target
6632ac_save_IFS=$IFS; IFS='-'
6633set x $ac_cv_target
6634shift
6635target_cpu=$1
6636target_vendor=$2
6637shift; shift
6638# Remember, the first character of IFS is used to create $*,
6639# except with old shells:
6640target_os=$*
6641IFS=$ac_save_IFS
6642case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6643
6644
6645# The aliases save the names the user supplied, while $host etc.
6646# will get canonicalized.
6647test -n "$target_alias" &&
6648  test "$program_prefix$program_suffix$program_transform_name" = \
6649    NONENONEs,x,x, &&
6650  program_prefix=${target_alias}-
6651
6652# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6653# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6654# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6655# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6656# to use the configure naming style.
6657
6658
6659
6660
6661
6662    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6663    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6664    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6665    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6666    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6667    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6668
6669
6670
6671    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6672
6673  case "$build_os" in
6674    *linux*)
6675      VAR_OS=linux
6676      VAR_OS_API=posix
6677      VAR_OS_ENV=linux
6678      ;;
6679    *solaris*)
6680      VAR_OS=solaris
6681      VAR_OS_API=posix
6682      VAR_OS_ENV=solaris
6683      ;;
6684    *darwin*)
6685      VAR_OS=macosx
6686      VAR_OS_API=posix
6687      VAR_OS_ENV=macosx
6688      ;;
6689    *bsd*)
6690      VAR_OS=bsd
6691      VAR_OS_API=posix
6692      VAR_OS_ENV=bsd
6693      ;;
6694    *cygwin*)
6695      VAR_OS=windows
6696      VAR_OS_API=winapi
6697      VAR_OS_ENV=windows.cygwin
6698      ;;
6699    *mingw*)
6700      VAR_OS=windows
6701      VAR_OS_API=winapi
6702      VAR_OS_ENV=windows.msys
6703      ;;
6704    *)
6705      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6706      ;;
6707  esac
6708
6709
6710  # First argument is the cpu name from the trip/quad
6711  case "$build_cpu" in
6712    x86_64)
6713      VAR_CPU=x86_64
6714      VAR_CPU_ARCH=x86
6715      VAR_CPU_BITS=64
6716      VAR_CPU_ENDIAN=little
6717      ;;
6718    i?86)
6719      VAR_CPU=x86
6720      VAR_CPU_ARCH=x86
6721      VAR_CPU_BITS=32
6722      VAR_CPU_ENDIAN=little
6723      ;;
6724    arm*)
6725      VAR_CPU=arm
6726      VAR_CPU_ARCH=arm
6727      VAR_CPU_BITS=32
6728      VAR_CPU_ENDIAN=little
6729      ;;
6730    powerpc)
6731      VAR_CPU=ppc
6732      VAR_CPU_ARCH=ppc
6733      VAR_CPU_BITS=32
6734      VAR_CPU_ENDIAN=big
6735       ;;
6736    powerpc64)
6737      VAR_CPU=ppc64
6738      VAR_CPU_ARCH=ppc
6739      VAR_CPU_BITS=64
6740      VAR_CPU_ENDIAN=big
6741       ;;
6742    sparc)
6743      VAR_CPU=sparc
6744      VAR_CPU_ARCH=sparc
6745      VAR_CPU_BITS=32
6746      VAR_CPU_ENDIAN=big
6747       ;;
6748    sparcv9)
6749      VAR_CPU=sparcv9
6750      VAR_CPU_ARCH=sparc
6751      VAR_CPU_BITS=64
6752      VAR_CPU_ENDIAN=big
6753       ;;
6754    *)
6755      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6756      ;;
6757  esac
6758
6759    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6760    OPENJDK_BUILD_OS="$VAR_OS"
6761    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6762    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6763    OPENJDK_BUILD_CPU="$VAR_CPU"
6764    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6765    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6766    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6767
6768
6769
6770
6771
6772
6773
6774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6775$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6777$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6778
6779    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6780
6781  case "$host_os" in
6782    *linux*)
6783      VAR_OS=linux
6784      VAR_OS_API=posix
6785      VAR_OS_ENV=linux
6786      ;;
6787    *solaris*)
6788      VAR_OS=solaris
6789      VAR_OS_API=posix
6790      VAR_OS_ENV=solaris
6791      ;;
6792    *darwin*)
6793      VAR_OS=macosx
6794      VAR_OS_API=posix
6795      VAR_OS_ENV=macosx
6796      ;;
6797    *bsd*)
6798      VAR_OS=bsd
6799      VAR_OS_API=posix
6800      VAR_OS_ENV=bsd
6801      ;;
6802    *cygwin*)
6803      VAR_OS=windows
6804      VAR_OS_API=winapi
6805      VAR_OS_ENV=windows.cygwin
6806      ;;
6807    *mingw*)
6808      VAR_OS=windows
6809      VAR_OS_API=winapi
6810      VAR_OS_ENV=windows.msys
6811      ;;
6812    *)
6813      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6814      ;;
6815  esac
6816
6817
6818  # First argument is the cpu name from the trip/quad
6819  case "$host_cpu" in
6820    x86_64)
6821      VAR_CPU=x86_64
6822      VAR_CPU_ARCH=x86
6823      VAR_CPU_BITS=64
6824      VAR_CPU_ENDIAN=little
6825      ;;
6826    i?86)
6827      VAR_CPU=x86
6828      VAR_CPU_ARCH=x86
6829      VAR_CPU_BITS=32
6830      VAR_CPU_ENDIAN=little
6831      ;;
6832    arm*)
6833      VAR_CPU=arm
6834      VAR_CPU_ARCH=arm
6835      VAR_CPU_BITS=32
6836      VAR_CPU_ENDIAN=little
6837      ;;
6838    powerpc)
6839      VAR_CPU=ppc
6840      VAR_CPU_ARCH=ppc
6841      VAR_CPU_BITS=32
6842      VAR_CPU_ENDIAN=big
6843       ;;
6844    powerpc64)
6845      VAR_CPU=ppc64
6846      VAR_CPU_ARCH=ppc
6847      VAR_CPU_BITS=64
6848      VAR_CPU_ENDIAN=big
6849       ;;
6850    sparc)
6851      VAR_CPU=sparc
6852      VAR_CPU_ARCH=sparc
6853      VAR_CPU_BITS=32
6854      VAR_CPU_ENDIAN=big
6855       ;;
6856    sparcv9)
6857      VAR_CPU=sparcv9
6858      VAR_CPU_ARCH=sparc
6859      VAR_CPU_BITS=64
6860      VAR_CPU_ENDIAN=big
6861       ;;
6862    *)
6863      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6864      ;;
6865  esac
6866
6867    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6868    OPENJDK_TARGET_OS="$VAR_OS"
6869    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6870    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6871    OPENJDK_TARGET_CPU="$VAR_CPU"
6872    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6873    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6874    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6875
6876
6877
6878
6879
6880
6881
6882    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6883$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6885$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6886
6887
6888
6889# Check whether --with-target-bits was given.
6890if test "${with_target_bits+set}" = set; then :
6891  withval=$with_target_bits;
6892fi
6893
6894
6895  # We have three types of compiles:
6896  # native  == normal compilation, target system == build system
6897  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6898  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6899  #
6900  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6901    # We're doing a proper cross-compilation
6902    COMPILE_TYPE="cross"
6903  else
6904    COMPILE_TYPE="native"
6905  fi
6906
6907  if test "x$with_target_bits" != x; then
6908    if test "x$COMPILE_TYPE" = "xcross"; then
6909      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6910    fi
6911
6912    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6913      # A reduced build is requested
6914      COMPILE_TYPE="reduced"
6915      OPENJDK_TARGET_CPU_BITS=32
6916      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6917        OPENJDK_TARGET_CPU=x86
6918      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6919        OPENJDK_TARGET_CPU=sparc
6920      else
6921        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6922      fi
6923    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6924      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
6925    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6926      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6927$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6928    else
6929      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6930    fi
6931  fi
6932
6933
6934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6935$as_echo_n "checking compilation type... " >&6; }
6936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6937$as_echo "$COMPILE_TYPE" >&6; }
6938
6939
6940    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6941       REQUIRED_OS_NAME=SunOS
6942       REQUIRED_OS_VERSION=5.10
6943    fi
6944    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6945       REQUIRED_OS_NAME=Linux
6946       REQUIRED_OS_VERSION=2.6
6947    fi
6948    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6949        REQUIRED_OS_NAME=Windows
6950        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6951            REQUIRED_OS_VERSION=5.2
6952        else
6953            REQUIRED_OS_VERSION=5.1
6954        fi
6955    fi
6956    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6957        REQUIRED_OS_NAME=Darwin
6958        REQUIRED_OS_VERSION=11.2
6959    fi
6960
6961
6962
6963
6964
6965    # Also store the legacy naming of the cpu.
6966    # Ie i586 and amd64 instead of x86 and x86_64
6967    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6968    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6969      OPENJDK_TARGET_CPU_LEGACY="i586"
6970    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6971      # On all platforms except MacOSX replace x86_64 with amd64.
6972      OPENJDK_TARGET_CPU_LEGACY="amd64"
6973    fi
6974
6975
6976    # And the second legacy naming of the cpu.
6977    # Ie i386 and amd64 instead of x86 and x86_64.
6978    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6979    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6980      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6981    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6982      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6983    fi
6984
6985
6986    # This is the name of the cpu (but using i386 and amd64 instead of
6987    # x86 and x86_64, respectively), preceeded by a /, to be used when
6988    # locating libraries. On macosx, it's empty, though.
6989    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6990    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6991        OPENJDK_TARGET_CPU_LIBDIR=""
6992    fi
6993
6994
6995    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6996    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6997    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6998    OPENJDK_TARGET_CPU_ISADIR=""
6999    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7000      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7001          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7002      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7003          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7004      fi
7005    fi
7006
7007
7008    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7009    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7010    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7011      # On linux only, we replace x86 with i386.
7012      OPENJDK_TARGET_CPU_OSARCH="i386"
7013    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7014      # On all platforms except macosx, we replace x86_64 with amd64.
7015      OPENJDK_TARGET_CPU_OSARCH="amd64"
7016    fi
7017
7018
7019    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7020    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7021      OPENJDK_TARGET_CPU_JLI="i386"
7022    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7023      # On all platforms except macosx, we replace x86_64 with amd64.
7024      OPENJDK_TARGET_CPU_JLI="amd64"
7025    fi
7026    # Now setup the -D flags for building libjli.
7027    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7028    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7029      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7030        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7031      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7032        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7033      fi
7034    fi
7035
7036
7037    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7038    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7039        OPENJDK_TARGET_OS_API_DIR="solaris"
7040    fi
7041    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7042        OPENJDK_TARGET_OS_API_DIR="windows"
7043    fi
7044
7045
7046    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7047        A_LP64="LP64:="
7048        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7049        # unpack200.exe
7050        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7051            ADD_LP64="-D_LP64=1"
7052        fi
7053    fi
7054    LP64=$A_LP64
7055
7056
7057    if test "x$COMPILE_TYPE" = "xcross"; then
7058      # FIXME: ... or should this include reduced builds..?
7059      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7060    else
7061      DEFINE_CROSS_COMPILE_ARCH=""
7062    fi
7063
7064
7065    # ZERO_ARCHDEF is used to enable architecture-specific code
7066    case "${OPENJDK_TARGET_CPU}" in
7067      ppc*)    ZERO_ARCHDEF=PPC   ;;
7068      s390*)   ZERO_ARCHDEF=S390  ;;
7069      sparc*)  ZERO_ARCHDEF=SPARC ;;
7070      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7071      x86)     ZERO_ARCHDEF=IA32  ;;
7072      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7073    esac
7074
7075
7076
7077
7078
7079# Continue setting up basic stuff. Most remaining code require fundamental tools.
7080
7081# Locate the directory of this script.
7082SCRIPT="$0"
7083AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7084
7085# Where is the source? It is located two levels above the configure script.
7086CURDIR="$PWD"
7087cd "$AUTOCONF_DIR/../.."
7088SRC_ROOT="`$THEPWDCMD -L`"
7089
7090if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7091  PATH_SEP=";"
7092
7093  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7094  if test $SRC_ROOT_LENGTH -gt 100; then
7095      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7096  fi
7097
7098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7100$as_echo_n "checking cygwin release... " >&6; }
7101    CYGWIN_VERSION=`$UNAME -r`
7102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7103$as_echo "$CYGWIN_VERSION" >&6; }
7104    WINDOWS_ENV_VENDOR='cygwin'
7105    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7106
7107    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7108    if test "x$CYGWIN_VERSION_OK" = x; then
7109      { $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
7110$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;}
7111      as_fn_error $? "Cannot continue" "$LINENO" 5
7112    fi
7113    if test "x$CYGPATH" = x; then
7114        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7115    fi
7116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7117$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7118    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7119    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7120    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7121    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7122    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7123$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7124    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7125    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7126    if test "x$test_cygdrive_prefix" = x; then
7127        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7128    fi
7129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7131$as_echo_n "checking msys release... " >&6; }
7132    MSYS_VERSION=`$UNAME -r`
7133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7134$as_echo "$MSYS_VERSION" >&6; }
7135
7136    WINDOWS_ENV_VENDOR='msys'
7137    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7138
7139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7140$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7141    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7142    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7143
7144  windows_path="$MSYS_ROOT_PATH"
7145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7146    unix_path=`$CYGPATH -u "$windows_path"`
7147    MSYS_ROOT_PATH="$unix_path"
7148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7150    MSYS_ROOT_PATH="$unix_path"
7151  fi
7152
7153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7154$as_echo "$MSYS_ROOT_PATH" >&6; }
7155    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7156  else
7157    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7158  fi
7159
7160  # Test if windows or unix (cygwin/msys) find is first in path.
7161  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7162$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7163  FIND_BINARY_OUTPUT=`find --version 2>&1`
7164  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7166$as_echo "unix style" >&6; }
7167  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7169$as_echo "Windows" >&6; }
7170    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7171$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7172    { $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
7173$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7174    as_fn_error $? "Cannot continue" "$LINENO" 5
7175  else
7176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7177$as_echo "unknown" >&6; }
7178    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7179$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7180  fi
7181
7182else
7183  PATH_SEP=":"
7184fi
7185
7186
7187
7188cd "$CURDIR"
7189
7190
7191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7192
7193  # Input might be given as Windows format, start by converting to
7194  # unix format.
7195  path="$SRC_ROOT"
7196  new_path=`$CYGPATH -u "$path"`
7197
7198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7201  # "foo.exe" is OK but "foo" is an error.
7202  #
7203  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7204  # It is also a way to make sure we got the proper file name for the real test later on.
7205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7206  if test "x$test_shortpath" = x; then
7207    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7208$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7209    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7210  fi
7211
7212  # Call helper function which possibly converts this using DOS-style short mode.
7213  # If so, the updated path is stored in $new_path.
7214
7215  input_path="$new_path"
7216  # Check if we need to convert this using DOS-style short mode. If the path
7217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7218  # take no chances and rewrite it.
7219  # Note: m4 eats our [], so we need to use [ and ] instead.
7220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7221  if test "x$has_forbidden_chars" != x; then
7222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7223    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7224    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7225    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7226      # Going to short mode and back again did indeed matter. Since short mode is
7227      # case insensitive, let's make it lowercase to improve readability.
7228      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7229      # Now convert it back to Unix-stile (cygpath)
7230      input_path=`$CYGPATH -u "$shortmode_path"`
7231      new_path="$input_path"
7232    fi
7233  fi
7234
7235  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7236  if test "x$test_cygdrive_prefix" = x; then
7237    # As a simple fix, exclude /usr/bin since it's not a real path.
7238    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7239      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7240      # a path prefixed by /cygdrive for fixpath to work.
7241      new_path="$CYGWIN_ROOT_PATH$input_path"
7242    fi
7243  fi
7244
7245
7246  if test "x$path" != "x$new_path"; then
7247    SRC_ROOT="$new_path"
7248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7249$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7250  fi
7251
7252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7253
7254  path="$SRC_ROOT"
7255  has_colon=`$ECHO $path | $GREP ^.:`
7256  new_path="$path"
7257  if test "x$has_colon" = x; then
7258    # Not in mixed or Windows style, start by that.
7259    new_path=`cmd //c echo $path`
7260  fi
7261
7262
7263  input_path="$new_path"
7264  # Check if we need to convert this using DOS-style short mode. If the path
7265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7266  # take no chances and rewrite it.
7267  # Note: m4 eats our [], so we need to use [ and ] instead.
7268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7269  if test "x$has_forbidden_chars" != x; then
7270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7272  fi
7273
7274
7275  windows_path="$new_path"
7276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7277    unix_path=`$CYGPATH -u "$windows_path"`
7278    new_path="$unix_path"
7279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7281    new_path="$unix_path"
7282  fi
7283
7284  if test "x$path" != "x$new_path"; then
7285    SRC_ROOT="$new_path"
7286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7287$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7288  fi
7289
7290  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7291  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7292
7293  else
7294    # We're on a posix platform. Hooray! :)
7295    path="$SRC_ROOT"
7296    has_space=`$ECHO "$path" | $GREP " "`
7297    if test "x$has_space" != x; then
7298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7299$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7300      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7301    fi
7302
7303    # Use eval to expand a potential ~
7304    eval path="$path"
7305    if test ! -f "$path" && test ! -d "$path"; then
7306      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7307    fi
7308
7309    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7310  fi
7311
7312
7313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7314
7315  # Input might be given as Windows format, start by converting to
7316  # unix format.
7317  path="$CURDIR"
7318  new_path=`$CYGPATH -u "$path"`
7319
7320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7323  # "foo.exe" is OK but "foo" is an error.
7324  #
7325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7326  # It is also a way to make sure we got the proper file name for the real test later on.
7327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7328  if test "x$test_shortpath" = x; then
7329    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7330$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7331    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7332  fi
7333
7334  # Call helper function which possibly converts this using DOS-style short mode.
7335  # If so, the updated path is stored in $new_path.
7336
7337  input_path="$new_path"
7338  # Check if we need to convert this using DOS-style short mode. If the path
7339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7340  # take no chances and rewrite it.
7341  # Note: m4 eats our [], so we need to use [ and ] instead.
7342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7343  if test "x$has_forbidden_chars" != x; then
7344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7348      # Going to short mode and back again did indeed matter. Since short mode is
7349      # case insensitive, let's make it lowercase to improve readability.
7350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7351      # Now convert it back to Unix-stile (cygpath)
7352      input_path=`$CYGPATH -u "$shortmode_path"`
7353      new_path="$input_path"
7354    fi
7355  fi
7356
7357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7358  if test "x$test_cygdrive_prefix" = x; then
7359    # As a simple fix, exclude /usr/bin since it's not a real path.
7360    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7362      # a path prefixed by /cygdrive for fixpath to work.
7363      new_path="$CYGWIN_ROOT_PATH$input_path"
7364    fi
7365  fi
7366
7367
7368  if test "x$path" != "x$new_path"; then
7369    CURDIR="$new_path"
7370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7371$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7372  fi
7373
7374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7375
7376  path="$CURDIR"
7377  has_colon=`$ECHO $path | $GREP ^.:`
7378  new_path="$path"
7379  if test "x$has_colon" = x; then
7380    # Not in mixed or Windows style, start by that.
7381    new_path=`cmd //c echo $path`
7382  fi
7383
7384
7385  input_path="$new_path"
7386  # Check if we need to convert this using DOS-style short mode. If the path
7387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7388  # take no chances and rewrite it.
7389  # Note: m4 eats our [], so we need to use [ and ] instead.
7390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7391  if test "x$has_forbidden_chars" != x; then
7392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7394  fi
7395
7396
7397  windows_path="$new_path"
7398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7399    unix_path=`$CYGPATH -u "$windows_path"`
7400    new_path="$unix_path"
7401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7403    new_path="$unix_path"
7404  fi
7405
7406  if test "x$path" != "x$new_path"; then
7407    CURDIR="$new_path"
7408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7409$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7410  fi
7411
7412  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7413  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7414
7415  else
7416    # We're on a posix platform. Hooray! :)
7417    path="$CURDIR"
7418    has_space=`$ECHO "$path" | $GREP " "`
7419    if test "x$has_space" != x; then
7420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7421$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7422      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7423    fi
7424
7425    # Use eval to expand a potential ~
7426    eval path="$path"
7427    if test ! -f "$path" && test ! -d "$path"; then
7428      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7429    fi
7430
7431    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7432  fi
7433
7434
7435if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7436    # Add extra search paths on solaris for utilities like ar and as etc...
7437    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7438fi
7439
7440# You can force the sys-root if the sys-root encoded into the cross compiler tools
7441# is not correct.
7442
7443# Check whether --with-sys-root was given.
7444if test "${with_sys_root+set}" = set; then :
7445  withval=$with_sys_root;
7446fi
7447
7448
7449if test "x$with_sys_root" != x; then
7450  SYS_ROOT=$with_sys_root
7451else
7452  SYS_ROOT=/
7453fi
7454
7455
7456
7457# Check whether --with-tools-dir was given.
7458if test "${with_tools_dir+set}" = set; then :
7459  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7460fi
7461
7462
7463
7464# Check whether --with-devkit was given.
7465if test "${with_devkit+set}" = set; then :
7466  withval=$with_devkit;
7467    if test "x$with_sys_root" != x; then
7468      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7469    fi
7470    if test "x$with_tools_dir" != x; then
7471      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7472    fi
7473    TOOLS_DIR=$with_devkit/bin
7474    SYS_ROOT=$with_devkit/$host_alias/libc
7475
7476fi
7477
7478
7479
7480
7481# Setup default logging of stdout and stderr to build.log in the output root.
7482BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7483BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7484BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7485
7486
7487
7488
7489
7490# Check if it's a pure open build or if custom sources are to be used.
7491
7492  # Check whether --enable-openjdk-only was given.
7493if test "${enable_openjdk_only+set}" = set; then :
7494  enableval=$enable_openjdk_only;
7495else
7496  enable_openjdk_only="no"
7497fi
7498
7499
7500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7501$as_echo_n "checking for presence of closed sources... " >&6; }
7502  if test -d "$SRC_ROOT/jdk/src/closed"; then
7503    CLOSED_SOURCE_PRESENT=yes
7504  else
7505    CLOSED_SOURCE_PRESENT=no
7506  fi
7507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7508$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7509
7510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7511$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7512  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7514$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7515
7516  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7517    OPENJDK=true
7518    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7519      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7520$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7521    fi
7522  else
7523    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7524      OPENJDK=true
7525    else
7526      OPENJDK=false
7527    fi
7528  fi
7529
7530  if test "x$OPENJDK" = "xtrue"; then
7531    SET_OPENJDK="OPENJDK=true"
7532  fi
7533
7534
7535
7536
7537# These are needed to be able to create a configuration name (and thus the output directory)
7538
7539###############################################################################
7540#
7541# Check which variant of the JDK that we want to build.
7542# Currently we have:
7543#    normal:   standard edition
7544# but the custom make system may add other variants
7545#
7546# Effectively the JDK variant gives a name to a specific set of
7547# modules to compile into the JDK. In the future, these modules
7548# might even be Jigsaw modules.
7549#
7550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7551$as_echo_n "checking which variant of the JDK to build... " >&6; }
7552
7553# Check whether --with-jdk-variant was given.
7554if test "${with_jdk_variant+set}" = set; then :
7555  withval=$with_jdk_variant;
7556fi
7557
7558
7559if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7560    JDK_VARIANT="normal"
7561else
7562    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7563fi
7564
7565
7566
7567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7568$as_echo "$JDK_VARIANT" >&6; }
7569
7570
7571
7572###############################################################################
7573#
7574# Check which variants of the JVM that we want to build.
7575# Currently we have:
7576#    server: normal interpreter and a tiered C1/C2 compiler
7577#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7578#    minimal1: reduced form of client with optional VM services and features stripped out
7579#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7580#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7581#    zero: no machine code interpreter, no compiler
7582#    zeroshark: zero interpreter and shark/llvm compiler backend
7583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7584$as_echo_n "checking which variants of the JVM to build... " >&6; }
7585
7586# Check whether --with-jvm-variants was given.
7587if test "${with_jvm_variants+set}" = set; then :
7588  withval=$with_jvm_variants;
7589fi
7590
7591
7592if test "x$with_jvm_variants" = x; then
7593     with_jvm_variants="server"
7594fi
7595
7596JVM_VARIANTS=",$with_jvm_variants,"
7597TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7598
7599if test "x$TEST_VARIANTS" != "x,"; then
7600   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7601fi
7602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7603$as_echo "$with_jvm_variants" >&6; }
7604
7605JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7606JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7607JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7608JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7609JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7610JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7611
7612if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7613    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7614        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7615    fi
7616fi
7617if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7618    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7619        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7620    fi
7621fi
7622if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7623    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7624        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7625    fi
7626fi
7627
7628# Replace the commas with AND for use in the build directory name.
7629ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7630COUNT_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/'`
7631if test "x$COUNT_VARIANTS" != "x,1"; then
7632    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7633else
7634    BUILDING_MULTIPLE_JVM_VARIANTS=no
7635fi
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645INCLUDE_SA=true
7646if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7647    INCLUDE_SA=false
7648fi
7649if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7650    INCLUDE_SA=false
7651fi
7652
7653
7654if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7655   MACOSX_UNIVERSAL="true"
7656fi
7657
7658
7659
7660
7661
7662###############################################################################
7663#
7664# Set the debug level
7665#    release: no debug information, all optimizations, no asserts.
7666#    fastdebug: debug information (-g), all optimizations, all asserts
7667#    slowdebug: debug information (-g), no optimizations, all asserts
7668#
7669DEBUG_LEVEL="release"
7670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7671$as_echo_n "checking which debug level to use... " >&6; }
7672# Check whether --enable-debug was given.
7673if test "${enable_debug+set}" = set; then :
7674  enableval=$enable_debug;
7675        ENABLE_DEBUG="${enableval}"
7676        DEBUG_LEVEL="fastdebug"
7677
7678else
7679  ENABLE_DEBUG="no"
7680fi
7681
7682
7683
7684# Check whether --with-debug-level was given.
7685if test "${with_debug_level+set}" = set; then :
7686  withval=$with_debug_level;
7687        DEBUG_LEVEL="${withval}"
7688        if test "x$ENABLE_DEBUG" = xyes; then
7689			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7690        fi
7691
7692fi
7693
7694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7695$as_echo "$DEBUG_LEVEL" >&6; }
7696
7697if test "x$DEBUG_LEVEL" != xrelease && \
7698   test "x$DEBUG_LEVEL" != xfastdebug && \
7699   test "x$DEBUG_LEVEL" != xslowdebug; then
7700   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7701fi
7702
7703
7704###############################################################################
7705#
7706# Setup legacy vars/targets and new vars to deal with different debug levels.
7707#
7708
7709case $DEBUG_LEVEL in
7710      release )
7711          VARIANT="OPT"
7712          FASTDEBUG="false"
7713          DEBUG_CLASSFILES="false"
7714          BUILD_VARIANT_RELEASE=""
7715          HOTSPOT_DEBUG_LEVEL="product"
7716          HOTSPOT_EXPORT="product"
7717           ;;
7718      fastdebug )
7719          VARIANT="DBG"
7720          FASTDEBUG="true"
7721          DEBUG_CLASSFILES="true"
7722          BUILD_VARIANT_RELEASE="-fastdebug"
7723          HOTSPOT_DEBUG_LEVEL="fastdebug"
7724          HOTSPOT_EXPORT="fastdebug"
7725           ;;
7726      slowdebug )
7727          VARIANT="DBG"
7728          FASTDEBUG="false"
7729          DEBUG_CLASSFILES="true"
7730          BUILD_VARIANT_RELEASE="-debug"
7731          HOTSPOT_DEBUG_LEVEL="jvmg"
7732          HOTSPOT_EXPORT="debug"
7733           ;;
7734esac
7735
7736#####
7737# Generate the legacy makefile targets for hotspot.
7738# The hotspot api for selecting the build artifacts, really, needs to be improved.
7739# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7740# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7741# But until then ...
7742HOTSPOT_TARGET=""
7743
7744if test "x$JVM_VARIANT_SERVER" = xtrue; then
7745    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7746fi
7747
7748if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7749    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7750fi
7751
7752if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7753    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7754fi
7755
7756if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7757    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7758fi
7759
7760if test "x$JVM_VARIANT_ZERO" = xtrue; then
7761    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7762fi
7763
7764if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7765    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7766fi
7767
7768HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7769
7770# On Macosx universal binaries are produced, but they only contain
7771# 64 bit intel. This invalidates control of which jvms are built
7772# from configure, but only server is valid anyway. Fix this
7773# when hotspot makefiles are rewritten.
7774if test "x$MACOSX_UNIVERSAL" = xtrue; then
7775    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7776fi
7777
7778#####
7779
7780
7781
7782
7783
7784
7785
7786
7787# With basic setup done, call the custom early hook.
7788
7789
7790# To properly create a configuration name, we need to have the OpenJDK target
7791# and options (variants and debug level) parsed.
7792
7793
7794
7795# Check whether --with-conf-name was given.
7796if test "${with_conf_name+set}" = set; then :
7797  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7798fi
7799
7800
7801# Test from where we are running configure, in or outside of src root.
7802if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7803        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7804        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7805    # We are running configure from the src root.
7806    # Create a default ./build/target-variant-debuglevel output root.
7807    if test "x${CONF_NAME}" = x; then
7808        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7809    fi
7810    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7811    $MKDIR -p "$OUTPUT_ROOT"
7812    if test ! -d "$OUTPUT_ROOT"; then
7813        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7814    fi
7815else
7816    # We are running configure from outside of the src dir.
7817    # Then use the current directory as output dir!
7818    # If configuration is situated in normal build directory, just use the build
7819    # directory name as configuration name, otherwise use the complete path.
7820    if test "x${CONF_NAME}" = x; then
7821        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7822    fi
7823    OUTPUT_ROOT="$CURDIR"
7824
7825    # WARNING: This might be a bad thing to do. You need to be sure you want to
7826    # have a configuration in this directory. Do some sanity checks!
7827
7828    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7829      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7830      # other files
7831      files_present=`$LS $OUTPUT_ROOT`
7832      # Configure has already touched config.log and confdefs.h in the current dir when this check
7833      # is performed.
7834      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7835                                             | $TR -d '\n'`
7836      if test "x$filtered_files" != x; then
7837        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7838$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7839        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7840$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7841        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7842$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7843        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7844$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7845        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7846$as_echo "$as_me: seriously mess up just about everything." >&6;}
7847        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7848$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7849        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7850$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7851        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7852      fi
7853    fi
7854fi
7855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7856$as_echo_n "checking what configuration name to use... " >&6; }
7857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7858$as_echo "$CONF_NAME" >&6; }
7859
7860
7861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7862
7863  # Input might be given as Windows format, start by converting to
7864  # unix format.
7865  path="$OUTPUT_ROOT"
7866  new_path=`$CYGPATH -u "$path"`
7867
7868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7871  # "foo.exe" is OK but "foo" is an error.
7872  #
7873  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7874  # It is also a way to make sure we got the proper file name for the real test later on.
7875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7876  if test "x$test_shortpath" = x; then
7877    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7878$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7879    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7880  fi
7881
7882  # Call helper function which possibly converts this using DOS-style short mode.
7883  # If so, the updated path is stored in $new_path.
7884
7885  input_path="$new_path"
7886  # Check if we need to convert this using DOS-style short mode. If the path
7887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7888  # take no chances and rewrite it.
7889  # Note: m4 eats our [], so we need to use [ and ] instead.
7890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7891  if test "x$has_forbidden_chars" != x; then
7892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7896      # Going to short mode and back again did indeed matter. Since short mode is
7897      # case insensitive, let's make it lowercase to improve readability.
7898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7899      # Now convert it back to Unix-stile (cygpath)
7900      input_path=`$CYGPATH -u "$shortmode_path"`
7901      new_path="$input_path"
7902    fi
7903  fi
7904
7905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7906  if test "x$test_cygdrive_prefix" = x; then
7907    # As a simple fix, exclude /usr/bin since it's not a real path.
7908    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7910      # a path prefixed by /cygdrive for fixpath to work.
7911      new_path="$CYGWIN_ROOT_PATH$input_path"
7912    fi
7913  fi
7914
7915
7916  if test "x$path" != "x$new_path"; then
7917    OUTPUT_ROOT="$new_path"
7918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7919$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7920  fi
7921
7922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7923
7924  path="$OUTPUT_ROOT"
7925  has_colon=`$ECHO $path | $GREP ^.:`
7926  new_path="$path"
7927  if test "x$has_colon" = x; then
7928    # Not in mixed or Windows style, start by that.
7929    new_path=`cmd //c echo $path`
7930  fi
7931
7932
7933  input_path="$new_path"
7934  # Check if we need to convert this using DOS-style short mode. If the path
7935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7936  # take no chances and rewrite it.
7937  # Note: m4 eats our [], so we need to use [ and ] instead.
7938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7939  if test "x$has_forbidden_chars" != x; then
7940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7942  fi
7943
7944
7945  windows_path="$new_path"
7946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7947    unix_path=`$CYGPATH -u "$windows_path"`
7948    new_path="$unix_path"
7949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7951    new_path="$unix_path"
7952  fi
7953
7954  if test "x$path" != "x$new_path"; then
7955    OUTPUT_ROOT="$new_path"
7956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7957$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7958  fi
7959
7960  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7961  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7962
7963  else
7964    # We're on a posix platform. Hooray! :)
7965    path="$OUTPUT_ROOT"
7966    has_space=`$ECHO "$path" | $GREP " "`
7967    if test "x$has_space" != x; then
7968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7969$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7970      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7971    fi
7972
7973    # Use eval to expand a potential ~
7974    eval path="$path"
7975    if test ! -f "$path" && test ! -d "$path"; then
7976      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7977    fi
7978
7979    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
7980  fi
7981
7982
7983SPEC=$OUTPUT_ROOT/spec.gmk
7984
7985CONF_NAME=$CONF_NAME
7986
7987OUTPUT_ROOT=$OUTPUT_ROOT
7988
7989
7990# Most of the probed defines are put into config.h
7991ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7992
7993# The spec.gmk file contains all variables for the make system.
7994ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7995
7996# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7997ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7998
7999# The bootcycle-spec.gmk file contains support for boot cycle builds.
8000ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8001
8002# The compare.sh is used to compare the build output to other builds.
8003ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8004
8005# Spec.sh is currently used by compare-objects.sh
8006ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8007
8008# The generated Makefile knows where the spec.gmk is and where the source is.
8009# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8010# which will look for generated configurations
8011ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8012
8013
8014# Save the arguments given to us
8015echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8016
8017
8018# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8019
8020    for ac_prog in apt-get yum port pkgutil pkgadd
8021do
8022  # Extract the first word of "$ac_prog", so it can be a program name with args.
8023set dummy $ac_prog; ac_word=$2
8024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8025$as_echo_n "checking for $ac_word... " >&6; }
8026if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8027  $as_echo_n "(cached) " >&6
8028else
8029  if test -n "$PKGHANDLER"; then
8030  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8031else
8032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8033for as_dir in $PATH
8034do
8035  IFS=$as_save_IFS
8036  test -z "$as_dir" && as_dir=.
8037    for ac_exec_ext in '' $ac_executable_extensions; do
8038  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8039    ac_cv_prog_PKGHANDLER="$ac_prog"
8040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8041    break 2
8042  fi
8043done
8044  done
8045IFS=$as_save_IFS
8046
8047fi
8048fi
8049PKGHANDLER=$ac_cv_prog_PKGHANDLER
8050if test -n "$PKGHANDLER"; then
8051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8052$as_echo "$PKGHANDLER" >&6; }
8053else
8054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8055$as_echo "no" >&6; }
8056fi
8057
8058
8059  test -n "$PKGHANDLER" && break
8060done
8061
8062
8063
8064# Setup tools that requires more complex handling, or that is not needed by the configure script.
8065
8066
8067  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8068  if test "x$MAKE" != x; then
8069    # User has supplied a make, test it.
8070    if test ! -f "$MAKE"; then
8071      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8072    fi
8073
8074  MAKE_CANDIDATE=""$MAKE""
8075  DESCRIPTION="user supplied MAKE=$MAKE"
8076  if test "x$MAKE_CANDIDATE" != x; then
8077    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8078$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8079    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8080    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8081    if test "x$IS_GNU_MAKE" = x; then
8082      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8083$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8084    else
8085      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8086      if test "x$IS_MODERN_MAKE" = x; then
8087        { $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
8088$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;}
8089      else
8090        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8091          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8092            MAKE_EXPECTED_ENV='cygwin'
8093          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8094            MAKE_EXPECTED_ENV='msys'
8095          else
8096            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8097          fi
8098          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8099          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8100        else
8101          # Not relevant for non-Windows
8102          IS_MAKE_CORRECT_ENV=true
8103        fi
8104        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8105          { $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
8106$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;}
8107        else
8108          FOUND_MAKE=$MAKE_CANDIDATE
8109
8110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8111
8112  # First separate the path from the arguments. This will split at the first
8113  # space.
8114  complete="$FOUND_MAKE"
8115  path="${complete%% *}"
8116  tmp="$complete EOL"
8117  arguments="${tmp#* }"
8118
8119  # Input might be given as Windows format, start by converting to
8120  # unix format.
8121  new_path=`$CYGPATH -u "$path"`
8122
8123  # Now try to locate executable using which
8124  new_path=`$WHICH "$new_path" 2> /dev/null`
8125  # bat and cmd files are not always considered executable in cygwin causing which
8126  # to not find them
8127  if test "x$new_path" = x \
8128           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8129           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8130    new_path=`$CYGPATH -u "$path"`
8131  fi
8132  if test "x$new_path" = x; then
8133    # Oops. Which didn't find the executable.
8134    # The splitting of arguments from the executable at a space might have been incorrect,
8135    # since paths with space are more likely in Windows. Give it another try with the whole
8136    # argument.
8137    path="$complete"
8138    arguments="EOL"
8139    new_path=`$CYGPATH -u "$path"`
8140    new_path=`$WHICH "$new_path" 2> /dev/null`
8141    # bat and cmd files are not always considered executable in cygwin causing which
8142    # to not find them
8143    if test "x$new_path" = x \
8144             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8145             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8146      new_path=`$CYGPATH -u "$path"`
8147    fi
8148    if test "x$new_path" = x; then
8149      # It's still not found. Now this is an unrecoverable error.
8150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8151$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8152      has_space=`$ECHO "$complete" | $GREP " "`
8153      if test "x$has_space" != x; then
8154        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8155$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8156      fi
8157      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8158    fi
8159  fi
8160
8161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8164  # "foo.exe" is OK but "foo" is an error.
8165  #
8166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8167  # It is also a way to make sure we got the proper file name for the real test later on.
8168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8169  if test "x$test_shortpath" = x; then
8170    # Short path failed, file does not exist as specified.
8171    # Try adding .exe or .cmd
8172    if test -f "${new_path}.exe"; then
8173       input_to_shortpath="${new_path}.exe"
8174    elif test -f "${new_path}.cmd"; then
8175       input_to_shortpath="${new_path}.cmd"
8176    else
8177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8178$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8179      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8180$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8181      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8182    fi
8183  else
8184    input_to_shortpath="$new_path"
8185  fi
8186
8187  # Call helper function which possibly converts this using DOS-style short mode.
8188  # If so, the updated path is stored in $new_path.
8189  new_path="$input_to_shortpath"
8190
8191  input_path="$input_to_shortpath"
8192  # Check if we need to convert this using DOS-style short mode. If the path
8193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8194  # take no chances and rewrite it.
8195  # Note: m4 eats our [], so we need to use [ and ] instead.
8196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8197  if test "x$has_forbidden_chars" != x; then
8198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8199    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8200    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8201    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8202      # Going to short mode and back again did indeed matter. Since short mode is
8203      # case insensitive, let's make it lowercase to improve readability.
8204      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8205      # Now convert it back to Unix-stile (cygpath)
8206      input_path=`$CYGPATH -u "$shortmode_path"`
8207      new_path="$input_path"
8208    fi
8209  fi
8210
8211  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8212  if test "x$test_cygdrive_prefix" = x; then
8213    # As a simple fix, exclude /usr/bin since it's not a real path.
8214    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8215      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8216      # a path prefixed by /cygdrive for fixpath to work.
8217      new_path="$CYGWIN_ROOT_PATH$input_path"
8218    fi
8219  fi
8220
8221  # remove trailing .exe if any
8222  new_path="${new_path/%.exe/}"
8223
8224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8225
8226  # First separate the path from the arguments. This will split at the first
8227  # space.
8228  complete="$FOUND_MAKE"
8229  path="${complete%% *}"
8230  tmp="$complete EOL"
8231  arguments="${tmp#* }"
8232
8233  # Input might be given as Windows format, start by converting to
8234  # unix format.
8235  new_path="$path"
8236
8237  windows_path="$new_path"
8238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8239    unix_path=`$CYGPATH -u "$windows_path"`
8240    new_path="$unix_path"
8241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8243    new_path="$unix_path"
8244  fi
8245
8246
8247  # Now try to locate executable using which
8248  new_path=`$WHICH "$new_path" 2> /dev/null`
8249
8250  if test "x$new_path" = x; then
8251    # Oops. Which didn't find the executable.
8252    # The splitting of arguments from the executable at a space might have been incorrect,
8253    # since paths with space are more likely in Windows. Give it another try with the whole
8254    # argument.
8255    path="$complete"
8256    arguments="EOL"
8257    new_path="$path"
8258
8259  windows_path="$new_path"
8260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8261    unix_path=`$CYGPATH -u "$windows_path"`
8262    new_path="$unix_path"
8263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8265    new_path="$unix_path"
8266  fi
8267
8268
8269    new_path=`$WHICH "$new_path" 2> /dev/null`
8270
8271    if test "x$new_path" = x; then
8272      # It's still not found. Now this is an unrecoverable error.
8273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8274$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8275      has_space=`$ECHO "$complete" | $GREP " "`
8276      if test "x$has_space" != x; then
8277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8279      fi
8280      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8281    fi
8282  fi
8283
8284  # Now new_path has a complete unix path to the binary
8285  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8286    # Keep paths in /bin as-is, but remove trailing .exe if any
8287    new_path="${new_path/%.exe/}"
8288    # Do not save /bin paths to all_fixpath_prefixes!
8289  else
8290    # Not in mixed or Windows style, start by that.
8291    new_path=`cmd //c echo $new_path`
8292
8293  input_path="$new_path"
8294  # Check if we need to convert this using DOS-style short mode. If the path
8295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8296  # take no chances and rewrite it.
8297  # Note: m4 eats our [], so we need to use [ and ] instead.
8298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8299  if test "x$has_forbidden_chars" != x; then
8300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8302  fi
8303
8304    # Output is in $new_path
8305
8306  windows_path="$new_path"
8307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8308    unix_path=`$CYGPATH -u "$windows_path"`
8309    new_path="$unix_path"
8310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8312    new_path="$unix_path"
8313  fi
8314
8315    # remove trailing .exe if any
8316    new_path="${new_path/%.exe/}"
8317
8318    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8319    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8320  fi
8321
8322  else
8323    # We're on a posix platform. Hooray! :)
8324    # First separate the path from the arguments. This will split at the first
8325    # space.
8326    complete="$FOUND_MAKE"
8327    path="${complete%% *}"
8328    tmp="$complete EOL"
8329    arguments="${tmp#* }"
8330
8331    # Cannot rely on the command "which" here since it doesn't always work.
8332    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8333    if test -z "$is_absolute_path"; then
8334      # Path to executable is not absolute. Find it.
8335      IFS_save="$IFS"
8336      IFS=:
8337      for p in $PATH; do
8338        if test -f "$p/$path" && test -x "$p/$path"; then
8339          new_path="$p/$path"
8340          break
8341        fi
8342      done
8343      IFS="$IFS_save"
8344    else
8345      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8346$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8347      new_path="$path"
8348    fi
8349
8350    if test "x$new_path" = x; then
8351        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8352$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8353        has_space=`$ECHO "$complete" | $GREP " "`
8354        if test "x$has_space" != x; then
8355          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8356$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8357        fi
8358        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8359      fi
8360  fi
8361
8362      # Now join together the path and the arguments once again
8363      if test "x$arguments" != xEOL; then
8364        new_complete="$new_path ${arguments% *}"
8365      else
8366        new_complete="$new_path"
8367      fi
8368
8369  if test "x$complete" != "x$new_complete"; then
8370      FOUND_MAKE="$new_complete"
8371      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8372$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8373    fi
8374
8375        fi
8376      fi
8377    fi
8378  fi
8379
8380    if test "x$FOUND_MAKE" = x; then
8381      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8382    fi
8383  else
8384    # Try our hardest to locate a correct version of GNU make
8385    for ac_prog in gmake
8386do
8387  # Extract the first word of "$ac_prog", so it can be a program name with args.
8388set dummy $ac_prog; ac_word=$2
8389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8390$as_echo_n "checking for $ac_word... " >&6; }
8391if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8392  $as_echo_n "(cached) " >&6
8393else
8394  case $CHECK_GMAKE in
8395  [\\/]* | ?:[\\/]*)
8396  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8397  ;;
8398  *)
8399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8400for as_dir in $PATH
8401do
8402  IFS=$as_save_IFS
8403  test -z "$as_dir" && as_dir=.
8404    for ac_exec_ext in '' $ac_executable_extensions; do
8405  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8406    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8408    break 2
8409  fi
8410done
8411  done
8412IFS=$as_save_IFS
8413
8414  ;;
8415esac
8416fi
8417CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8418if test -n "$CHECK_GMAKE"; then
8419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8420$as_echo "$CHECK_GMAKE" >&6; }
8421else
8422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8423$as_echo "no" >&6; }
8424fi
8425
8426
8427  test -n "$CHECK_GMAKE" && break
8428done
8429
8430
8431  MAKE_CANDIDATE=""$CHECK_GMAKE""
8432  DESCRIPTION="gmake in PATH"
8433  if test "x$MAKE_CANDIDATE" != x; then
8434    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8435$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8436    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8437    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8438    if test "x$IS_GNU_MAKE" = x; then
8439      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8440$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8441    else
8442      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8443      if test "x$IS_MODERN_MAKE" = x; then
8444        { $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
8445$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;}
8446      else
8447        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8448          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8449            MAKE_EXPECTED_ENV='cygwin'
8450          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8451            MAKE_EXPECTED_ENV='msys'
8452          else
8453            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8454          fi
8455          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8456          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8457        else
8458          # Not relevant for non-Windows
8459          IS_MAKE_CORRECT_ENV=true
8460        fi
8461        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8462          { $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
8463$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;}
8464        else
8465          FOUND_MAKE=$MAKE_CANDIDATE
8466
8467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8468
8469  # First separate the path from the arguments. This will split at the first
8470  # space.
8471  complete="$FOUND_MAKE"
8472  path="${complete%% *}"
8473  tmp="$complete EOL"
8474  arguments="${tmp#* }"
8475
8476  # Input might be given as Windows format, start by converting to
8477  # unix format.
8478  new_path=`$CYGPATH -u "$path"`
8479
8480  # Now try to locate executable using which
8481  new_path=`$WHICH "$new_path" 2> /dev/null`
8482  # bat and cmd files are not always considered executable in cygwin causing which
8483  # to not find them
8484  if test "x$new_path" = x \
8485           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8486           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8487    new_path=`$CYGPATH -u "$path"`
8488  fi
8489  if test "x$new_path" = x; then
8490    # Oops. Which didn't find the executable.
8491    # The splitting of arguments from the executable at a space might have been incorrect,
8492    # since paths with space are more likely in Windows. Give it another try with the whole
8493    # argument.
8494    path="$complete"
8495    arguments="EOL"
8496    new_path=`$CYGPATH -u "$path"`
8497    new_path=`$WHICH "$new_path" 2> /dev/null`
8498    # bat and cmd files are not always considered executable in cygwin causing which
8499    # to not find them
8500    if test "x$new_path" = x \
8501             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8502             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8503      new_path=`$CYGPATH -u "$path"`
8504    fi
8505    if test "x$new_path" = x; then
8506      # It's still not found. Now this is an unrecoverable error.
8507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8508$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8509      has_space=`$ECHO "$complete" | $GREP " "`
8510      if test "x$has_space" != x; then
8511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8513      fi
8514      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8515    fi
8516  fi
8517
8518  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8519  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8520  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8521  # "foo.exe" is OK but "foo" is an error.
8522  #
8523  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8524  # It is also a way to make sure we got the proper file name for the real test later on.
8525  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8526  if test "x$test_shortpath" = x; then
8527    # Short path failed, file does not exist as specified.
8528    # Try adding .exe or .cmd
8529    if test -f "${new_path}.exe"; then
8530       input_to_shortpath="${new_path}.exe"
8531    elif test -f "${new_path}.cmd"; then
8532       input_to_shortpath="${new_path}.cmd"
8533    else
8534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8535$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8536      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8537$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8538      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8539    fi
8540  else
8541    input_to_shortpath="$new_path"
8542  fi
8543
8544  # Call helper function which possibly converts this using DOS-style short mode.
8545  # If so, the updated path is stored in $new_path.
8546  new_path="$input_to_shortpath"
8547
8548  input_path="$input_to_shortpath"
8549  # Check if we need to convert this using DOS-style short mode. If the path
8550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8551  # take no chances and rewrite it.
8552  # Note: m4 eats our [], so we need to use [ and ] instead.
8553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8554  if test "x$has_forbidden_chars" != x; then
8555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8559      # Going to short mode and back again did indeed matter. Since short mode is
8560      # case insensitive, let's make it lowercase to improve readability.
8561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8562      # Now convert it back to Unix-stile (cygpath)
8563      input_path=`$CYGPATH -u "$shortmode_path"`
8564      new_path="$input_path"
8565    fi
8566  fi
8567
8568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8569  if test "x$test_cygdrive_prefix" = x; then
8570    # As a simple fix, exclude /usr/bin since it's not a real path.
8571    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8573      # a path prefixed by /cygdrive for fixpath to work.
8574      new_path="$CYGWIN_ROOT_PATH$input_path"
8575    fi
8576  fi
8577
8578  # remove trailing .exe if any
8579  new_path="${new_path/%.exe/}"
8580
8581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8582
8583  # First separate the path from the arguments. This will split at the first
8584  # space.
8585  complete="$FOUND_MAKE"
8586  path="${complete%% *}"
8587  tmp="$complete EOL"
8588  arguments="${tmp#* }"
8589
8590  # Input might be given as Windows format, start by converting to
8591  # unix format.
8592  new_path="$path"
8593
8594  windows_path="$new_path"
8595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8596    unix_path=`$CYGPATH -u "$windows_path"`
8597    new_path="$unix_path"
8598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8600    new_path="$unix_path"
8601  fi
8602
8603
8604  # Now try to locate executable using which
8605  new_path=`$WHICH "$new_path" 2> /dev/null`
8606
8607  if test "x$new_path" = x; then
8608    # Oops. Which didn't find the executable.
8609    # The splitting of arguments from the executable at a space might have been incorrect,
8610    # since paths with space are more likely in Windows. Give it another try with the whole
8611    # argument.
8612    path="$complete"
8613    arguments="EOL"
8614    new_path="$path"
8615
8616  windows_path="$new_path"
8617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8618    unix_path=`$CYGPATH -u "$windows_path"`
8619    new_path="$unix_path"
8620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8622    new_path="$unix_path"
8623  fi
8624
8625
8626    new_path=`$WHICH "$new_path" 2> /dev/null`
8627
8628    if test "x$new_path" = x; then
8629      # It's still not found. Now this is an unrecoverable error.
8630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8631$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8632      has_space=`$ECHO "$complete" | $GREP " "`
8633      if test "x$has_space" != x; then
8634        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8635$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8636      fi
8637      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8638    fi
8639  fi
8640
8641  # Now new_path has a complete unix path to the binary
8642  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8643    # Keep paths in /bin as-is, but remove trailing .exe if any
8644    new_path="${new_path/%.exe/}"
8645    # Do not save /bin paths to all_fixpath_prefixes!
8646  else
8647    # Not in mixed or Windows style, start by that.
8648    new_path=`cmd //c echo $new_path`
8649
8650  input_path="$new_path"
8651  # Check if we need to convert this using DOS-style short mode. If the path
8652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8653  # take no chances and rewrite it.
8654  # Note: m4 eats our [], so we need to use [ and ] instead.
8655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8656  if test "x$has_forbidden_chars" != x; then
8657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8659  fi
8660
8661    # Output is in $new_path
8662
8663  windows_path="$new_path"
8664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8665    unix_path=`$CYGPATH -u "$windows_path"`
8666    new_path="$unix_path"
8667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8669    new_path="$unix_path"
8670  fi
8671
8672    # remove trailing .exe if any
8673    new_path="${new_path/%.exe/}"
8674
8675    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8676    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8677  fi
8678
8679  else
8680    # We're on a posix platform. Hooray! :)
8681    # First separate the path from the arguments. This will split at the first
8682    # space.
8683    complete="$FOUND_MAKE"
8684    path="${complete%% *}"
8685    tmp="$complete EOL"
8686    arguments="${tmp#* }"
8687
8688    # Cannot rely on the command "which" here since it doesn't always work.
8689    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8690    if test -z "$is_absolute_path"; then
8691      # Path to executable is not absolute. Find it.
8692      IFS_save="$IFS"
8693      IFS=:
8694      for p in $PATH; do
8695        if test -f "$p/$path" && test -x "$p/$path"; then
8696          new_path="$p/$path"
8697          break
8698        fi
8699      done
8700      IFS="$IFS_save"
8701    else
8702      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8703$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8704      new_path="$path"
8705    fi
8706
8707    if test "x$new_path" = x; then
8708        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8709$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8710        has_space=`$ECHO "$complete" | $GREP " "`
8711        if test "x$has_space" != x; then
8712          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8713$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8714        fi
8715        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8716      fi
8717  fi
8718
8719      # Now join together the path and the arguments once again
8720      if test "x$arguments" != xEOL; then
8721        new_complete="$new_path ${arguments% *}"
8722      else
8723        new_complete="$new_path"
8724      fi
8725
8726  if test "x$complete" != "x$new_complete"; then
8727      FOUND_MAKE="$new_complete"
8728      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8729$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8730    fi
8731
8732        fi
8733      fi
8734    fi
8735  fi
8736
8737
8738    if test "x$FOUND_MAKE" = x; then
8739      for ac_prog in make
8740do
8741  # Extract the first word of "$ac_prog", so it can be a program name with args.
8742set dummy $ac_prog; ac_word=$2
8743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8744$as_echo_n "checking for $ac_word... " >&6; }
8745if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8746  $as_echo_n "(cached) " >&6
8747else
8748  case $CHECK_MAKE in
8749  [\\/]* | ?:[\\/]*)
8750  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8751  ;;
8752  *)
8753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8754for as_dir in $PATH
8755do
8756  IFS=$as_save_IFS
8757  test -z "$as_dir" && as_dir=.
8758    for ac_exec_ext in '' $ac_executable_extensions; do
8759  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8760    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8762    break 2
8763  fi
8764done
8765  done
8766IFS=$as_save_IFS
8767
8768  ;;
8769esac
8770fi
8771CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8772if test -n "$CHECK_MAKE"; then
8773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8774$as_echo "$CHECK_MAKE" >&6; }
8775else
8776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8777$as_echo "no" >&6; }
8778fi
8779
8780
8781  test -n "$CHECK_MAKE" && break
8782done
8783
8784
8785  MAKE_CANDIDATE=""$CHECK_MAKE""
8786  DESCRIPTION="make in PATH"
8787  if test "x$MAKE_CANDIDATE" != x; then
8788    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8789$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8790    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8791    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8792    if test "x$IS_GNU_MAKE" = x; then
8793      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8794$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8795    else
8796      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8797      if test "x$IS_MODERN_MAKE" = x; then
8798        { $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
8799$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;}
8800      else
8801        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8802          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8803            MAKE_EXPECTED_ENV='cygwin'
8804          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8805            MAKE_EXPECTED_ENV='msys'
8806          else
8807            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8808          fi
8809          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8810          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8811        else
8812          # Not relevant for non-Windows
8813          IS_MAKE_CORRECT_ENV=true
8814        fi
8815        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8816          { $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
8817$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;}
8818        else
8819          FOUND_MAKE=$MAKE_CANDIDATE
8820
8821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8822
8823  # First separate the path from the arguments. This will split at the first
8824  # space.
8825  complete="$FOUND_MAKE"
8826  path="${complete%% *}"
8827  tmp="$complete EOL"
8828  arguments="${tmp#* }"
8829
8830  # Input might be given as Windows format, start by converting to
8831  # unix format.
8832  new_path=`$CYGPATH -u "$path"`
8833
8834  # Now try to locate executable using which
8835  new_path=`$WHICH "$new_path" 2> /dev/null`
8836  # bat and cmd files are not always considered executable in cygwin causing which
8837  # to not find them
8838  if test "x$new_path" = x \
8839           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8840           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8841    new_path=`$CYGPATH -u "$path"`
8842  fi
8843  if test "x$new_path" = x; then
8844    # Oops. Which didn't find the executable.
8845    # The splitting of arguments from the executable at a space might have been incorrect,
8846    # since paths with space are more likely in Windows. Give it another try with the whole
8847    # argument.
8848    path="$complete"
8849    arguments="EOL"
8850    new_path=`$CYGPATH -u "$path"`
8851    new_path=`$WHICH "$new_path" 2> /dev/null`
8852    # bat and cmd files are not always considered executable in cygwin causing which
8853    # to not find them
8854    if test "x$new_path" = x \
8855             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8856             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8857      new_path=`$CYGPATH -u "$path"`
8858    fi
8859    if test "x$new_path" = x; then
8860      # It's still not found. Now this is an unrecoverable error.
8861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8862$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8863      has_space=`$ECHO "$complete" | $GREP " "`
8864      if test "x$has_space" != x; then
8865        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8866$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8867      fi
8868      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8869    fi
8870  fi
8871
8872  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8873  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8874  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8875  # "foo.exe" is OK but "foo" is an error.
8876  #
8877  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8878  # It is also a way to make sure we got the proper file name for the real test later on.
8879  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8880  if test "x$test_shortpath" = x; then
8881    # Short path failed, file does not exist as specified.
8882    # Try adding .exe or .cmd
8883    if test -f "${new_path}.exe"; then
8884       input_to_shortpath="${new_path}.exe"
8885    elif test -f "${new_path}.cmd"; then
8886       input_to_shortpath="${new_path}.cmd"
8887    else
8888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8889$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8890      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8891$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8892      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8893    fi
8894  else
8895    input_to_shortpath="$new_path"
8896  fi
8897
8898  # Call helper function which possibly converts this using DOS-style short mode.
8899  # If so, the updated path is stored in $new_path.
8900  new_path="$input_to_shortpath"
8901
8902  input_path="$input_to_shortpath"
8903  # Check if we need to convert this using DOS-style short mode. If the path
8904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8905  # take no chances and rewrite it.
8906  # Note: m4 eats our [], so we need to use [ and ] instead.
8907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8908  if test "x$has_forbidden_chars" != x; then
8909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8910    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8911    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8912    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8913      # Going to short mode and back again did indeed matter. Since short mode is
8914      # case insensitive, let's make it lowercase to improve readability.
8915      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8916      # Now convert it back to Unix-stile (cygpath)
8917      input_path=`$CYGPATH -u "$shortmode_path"`
8918      new_path="$input_path"
8919    fi
8920  fi
8921
8922  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8923  if test "x$test_cygdrive_prefix" = x; then
8924    # As a simple fix, exclude /usr/bin since it's not a real path.
8925    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8926      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8927      # a path prefixed by /cygdrive for fixpath to work.
8928      new_path="$CYGWIN_ROOT_PATH$input_path"
8929    fi
8930  fi
8931
8932  # remove trailing .exe if any
8933  new_path="${new_path/%.exe/}"
8934
8935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8936
8937  # First separate the path from the arguments. This will split at the first
8938  # space.
8939  complete="$FOUND_MAKE"
8940  path="${complete%% *}"
8941  tmp="$complete EOL"
8942  arguments="${tmp#* }"
8943
8944  # Input might be given as Windows format, start by converting to
8945  # unix format.
8946  new_path="$path"
8947
8948  windows_path="$new_path"
8949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8950    unix_path=`$CYGPATH -u "$windows_path"`
8951    new_path="$unix_path"
8952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8954    new_path="$unix_path"
8955  fi
8956
8957
8958  # Now try to locate executable using which
8959  new_path=`$WHICH "$new_path" 2> /dev/null`
8960
8961  if test "x$new_path" = x; then
8962    # Oops. Which didn't find the executable.
8963    # The splitting of arguments from the executable at a space might have been incorrect,
8964    # since paths with space are more likely in Windows. Give it another try with the whole
8965    # argument.
8966    path="$complete"
8967    arguments="EOL"
8968    new_path="$path"
8969
8970  windows_path="$new_path"
8971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8972    unix_path=`$CYGPATH -u "$windows_path"`
8973    new_path="$unix_path"
8974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8976    new_path="$unix_path"
8977  fi
8978
8979
8980    new_path=`$WHICH "$new_path" 2> /dev/null`
8981
8982    if test "x$new_path" = x; then
8983      # It's still not found. Now this is an unrecoverable error.
8984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8985$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8986      has_space=`$ECHO "$complete" | $GREP " "`
8987      if test "x$has_space" != x; then
8988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8990      fi
8991      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8992    fi
8993  fi
8994
8995  # Now new_path has a complete unix path to the binary
8996  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8997    # Keep paths in /bin as-is, but remove trailing .exe if any
8998    new_path="${new_path/%.exe/}"
8999    # Do not save /bin paths to all_fixpath_prefixes!
9000  else
9001    # Not in mixed or Windows style, start by that.
9002    new_path=`cmd //c echo $new_path`
9003
9004  input_path="$new_path"
9005  # Check if we need to convert this using DOS-style short mode. If the path
9006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9007  # take no chances and rewrite it.
9008  # Note: m4 eats our [], so we need to use [ and ] instead.
9009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9010  if test "x$has_forbidden_chars" != x; then
9011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9013  fi
9014
9015    # Output is in $new_path
9016
9017  windows_path="$new_path"
9018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9019    unix_path=`$CYGPATH -u "$windows_path"`
9020    new_path="$unix_path"
9021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9023    new_path="$unix_path"
9024  fi
9025
9026    # remove trailing .exe if any
9027    new_path="${new_path/%.exe/}"
9028
9029    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9030    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9031  fi
9032
9033  else
9034    # We're on a posix platform. Hooray! :)
9035    # First separate the path from the arguments. This will split at the first
9036    # space.
9037    complete="$FOUND_MAKE"
9038    path="${complete%% *}"
9039    tmp="$complete EOL"
9040    arguments="${tmp#* }"
9041
9042    # Cannot rely on the command "which" here since it doesn't always work.
9043    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9044    if test -z "$is_absolute_path"; then
9045      # Path to executable is not absolute. Find it.
9046      IFS_save="$IFS"
9047      IFS=:
9048      for p in $PATH; do
9049        if test -f "$p/$path" && test -x "$p/$path"; then
9050          new_path="$p/$path"
9051          break
9052        fi
9053      done
9054      IFS="$IFS_save"
9055    else
9056      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9057$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9058      new_path="$path"
9059    fi
9060
9061    if test "x$new_path" = x; then
9062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9063$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9064        has_space=`$ECHO "$complete" | $GREP " "`
9065        if test "x$has_space" != x; then
9066          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9067$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9068        fi
9069        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9070      fi
9071  fi
9072
9073      # Now join together the path and the arguments once again
9074      if test "x$arguments" != xEOL; then
9075        new_complete="$new_path ${arguments% *}"
9076      else
9077        new_complete="$new_path"
9078      fi
9079
9080  if test "x$complete" != "x$new_complete"; then
9081      FOUND_MAKE="$new_complete"
9082      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9083$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9084    fi
9085
9086        fi
9087      fi
9088    fi
9089  fi
9090
9091    fi
9092
9093    if test "x$FOUND_MAKE" = x; then
9094      if test "x$TOOLS_DIR" != x; then
9095        # We have a tools-dir, check that as well before giving up.
9096        OLD_PATH=$PATH
9097        PATH=$TOOLS_DIR:$PATH
9098        for ac_prog in gmake
9099do
9100  # Extract the first word of "$ac_prog", so it can be a program name with args.
9101set dummy $ac_prog; ac_word=$2
9102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9103$as_echo_n "checking for $ac_word... " >&6; }
9104if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9105  $as_echo_n "(cached) " >&6
9106else
9107  case $CHECK_TOOLSDIR_GMAKE in
9108  [\\/]* | ?:[\\/]*)
9109  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9110  ;;
9111  *)
9112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9113for as_dir in $PATH
9114do
9115  IFS=$as_save_IFS
9116  test -z "$as_dir" && as_dir=.
9117    for ac_exec_ext in '' $ac_executable_extensions; do
9118  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9119    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9121    break 2
9122  fi
9123done
9124  done
9125IFS=$as_save_IFS
9126
9127  ;;
9128esac
9129fi
9130CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9131if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9133$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9134else
9135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9136$as_echo "no" >&6; }
9137fi
9138
9139
9140  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9141done
9142
9143
9144  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9145  DESCRIPTION="gmake in tools-dir"
9146  if test "x$MAKE_CANDIDATE" != x; then
9147    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9148$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9149    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9150    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9151    if test "x$IS_GNU_MAKE" = x; then
9152      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9153$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9154    else
9155      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9156      if test "x$IS_MODERN_MAKE" = x; then
9157        { $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
9158$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;}
9159      else
9160        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9161          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9162            MAKE_EXPECTED_ENV='cygwin'
9163          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9164            MAKE_EXPECTED_ENV='msys'
9165          else
9166            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9167          fi
9168          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9169          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9170        else
9171          # Not relevant for non-Windows
9172          IS_MAKE_CORRECT_ENV=true
9173        fi
9174        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9175          { $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
9176$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;}
9177        else
9178          FOUND_MAKE=$MAKE_CANDIDATE
9179
9180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9181
9182  # First separate the path from the arguments. This will split at the first
9183  # space.
9184  complete="$FOUND_MAKE"
9185  path="${complete%% *}"
9186  tmp="$complete EOL"
9187  arguments="${tmp#* }"
9188
9189  # Input might be given as Windows format, start by converting to
9190  # unix format.
9191  new_path=`$CYGPATH -u "$path"`
9192
9193  # Now try to locate executable using which
9194  new_path=`$WHICH "$new_path" 2> /dev/null`
9195  # bat and cmd files are not always considered executable in cygwin causing which
9196  # to not find them
9197  if test "x$new_path" = x \
9198           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9199           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9200    new_path=`$CYGPATH -u "$path"`
9201  fi
9202  if test "x$new_path" = x; then
9203    # Oops. Which didn't find the executable.
9204    # The splitting of arguments from the executable at a space might have been incorrect,
9205    # since paths with space are more likely in Windows. Give it another try with the whole
9206    # argument.
9207    path="$complete"
9208    arguments="EOL"
9209    new_path=`$CYGPATH -u "$path"`
9210    new_path=`$WHICH "$new_path" 2> /dev/null`
9211    # bat and cmd files are not always considered executable in cygwin causing which
9212    # to not find them
9213    if test "x$new_path" = x \
9214             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9215             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9216      new_path=`$CYGPATH -u "$path"`
9217    fi
9218    if test "x$new_path" = x; then
9219      # It's still not found. Now this is an unrecoverable error.
9220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9221$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9222      has_space=`$ECHO "$complete" | $GREP " "`
9223      if test "x$has_space" != x; then
9224        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9225$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9226      fi
9227      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9228    fi
9229  fi
9230
9231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9234  # "foo.exe" is OK but "foo" is an error.
9235  #
9236  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9237  # It is also a way to make sure we got the proper file name for the real test later on.
9238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9239  if test "x$test_shortpath" = x; then
9240    # Short path failed, file does not exist as specified.
9241    # Try adding .exe or .cmd
9242    if test -f "${new_path}.exe"; then
9243       input_to_shortpath="${new_path}.exe"
9244    elif test -f "${new_path}.cmd"; then
9245       input_to_shortpath="${new_path}.cmd"
9246    else
9247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9248$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9249      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9250$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9251      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9252    fi
9253  else
9254    input_to_shortpath="$new_path"
9255  fi
9256
9257  # Call helper function which possibly converts this using DOS-style short mode.
9258  # If so, the updated path is stored in $new_path.
9259  new_path="$input_to_shortpath"
9260
9261  input_path="$input_to_shortpath"
9262  # Check if we need to convert this using DOS-style short mode. If the path
9263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9264  # take no chances and rewrite it.
9265  # Note: m4 eats our [], so we need to use [ and ] instead.
9266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9267  if test "x$has_forbidden_chars" != x; then
9268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9272      # Going to short mode and back again did indeed matter. Since short mode is
9273      # case insensitive, let's make it lowercase to improve readability.
9274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9275      # Now convert it back to Unix-stile (cygpath)
9276      input_path=`$CYGPATH -u "$shortmode_path"`
9277      new_path="$input_path"
9278    fi
9279  fi
9280
9281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9282  if test "x$test_cygdrive_prefix" = x; then
9283    # As a simple fix, exclude /usr/bin since it's not a real path.
9284    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9286      # a path prefixed by /cygdrive for fixpath to work.
9287      new_path="$CYGWIN_ROOT_PATH$input_path"
9288    fi
9289  fi
9290
9291  # remove trailing .exe if any
9292  new_path="${new_path/%.exe/}"
9293
9294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9295
9296  # First separate the path from the arguments. This will split at the first
9297  # space.
9298  complete="$FOUND_MAKE"
9299  path="${complete%% *}"
9300  tmp="$complete EOL"
9301  arguments="${tmp#* }"
9302
9303  # Input might be given as Windows format, start by converting to
9304  # unix format.
9305  new_path="$path"
9306
9307  windows_path="$new_path"
9308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9309    unix_path=`$CYGPATH -u "$windows_path"`
9310    new_path="$unix_path"
9311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9313    new_path="$unix_path"
9314  fi
9315
9316
9317  # Now try to locate executable using which
9318  new_path=`$WHICH "$new_path" 2> /dev/null`
9319
9320  if test "x$new_path" = x; then
9321    # Oops. Which didn't find the executable.
9322    # The splitting of arguments from the executable at a space might have been incorrect,
9323    # since paths with space are more likely in Windows. Give it another try with the whole
9324    # argument.
9325    path="$complete"
9326    arguments="EOL"
9327    new_path="$path"
9328
9329  windows_path="$new_path"
9330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9331    unix_path=`$CYGPATH -u "$windows_path"`
9332    new_path="$unix_path"
9333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9335    new_path="$unix_path"
9336  fi
9337
9338
9339    new_path=`$WHICH "$new_path" 2> /dev/null`
9340
9341    if test "x$new_path" = x; then
9342      # It's still not found. Now this is an unrecoverable error.
9343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9344$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9345      has_space=`$ECHO "$complete" | $GREP " "`
9346      if test "x$has_space" != x; then
9347        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9348$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9349      fi
9350      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9351    fi
9352  fi
9353
9354  # Now new_path has a complete unix path to the binary
9355  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9356    # Keep paths in /bin as-is, but remove trailing .exe if any
9357    new_path="${new_path/%.exe/}"
9358    # Do not save /bin paths to all_fixpath_prefixes!
9359  else
9360    # Not in mixed or Windows style, start by that.
9361    new_path=`cmd //c echo $new_path`
9362
9363  input_path="$new_path"
9364  # Check if we need to convert this using DOS-style short mode. If the path
9365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9366  # take no chances and rewrite it.
9367  # Note: m4 eats our [], so we need to use [ and ] instead.
9368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9369  if test "x$has_forbidden_chars" != x; then
9370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9371    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9372  fi
9373
9374    # Output is in $new_path
9375
9376  windows_path="$new_path"
9377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9378    unix_path=`$CYGPATH -u "$windows_path"`
9379    new_path="$unix_path"
9380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9382    new_path="$unix_path"
9383  fi
9384
9385    # remove trailing .exe if any
9386    new_path="${new_path/%.exe/}"
9387
9388    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9389    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9390  fi
9391
9392  else
9393    # We're on a posix platform. Hooray! :)
9394    # First separate the path from the arguments. This will split at the first
9395    # space.
9396    complete="$FOUND_MAKE"
9397    path="${complete%% *}"
9398    tmp="$complete EOL"
9399    arguments="${tmp#* }"
9400
9401    # Cannot rely on the command "which" here since it doesn't always work.
9402    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9403    if test -z "$is_absolute_path"; then
9404      # Path to executable is not absolute. Find it.
9405      IFS_save="$IFS"
9406      IFS=:
9407      for p in $PATH; do
9408        if test -f "$p/$path" && test -x "$p/$path"; then
9409          new_path="$p/$path"
9410          break
9411        fi
9412      done
9413      IFS="$IFS_save"
9414    else
9415      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9416$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9417      new_path="$path"
9418    fi
9419
9420    if test "x$new_path" = x; then
9421        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9422$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9423        has_space=`$ECHO "$complete" | $GREP " "`
9424        if test "x$has_space" != x; then
9425          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9426$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9427        fi
9428        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9429      fi
9430  fi
9431
9432      # Now join together the path and the arguments once again
9433      if test "x$arguments" != xEOL; then
9434        new_complete="$new_path ${arguments% *}"
9435      else
9436        new_complete="$new_path"
9437      fi
9438
9439  if test "x$complete" != "x$new_complete"; then
9440      FOUND_MAKE="$new_complete"
9441      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9442$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9443    fi
9444
9445        fi
9446      fi
9447    fi
9448  fi
9449
9450        if test "x$FOUND_MAKE" = x; then
9451          for ac_prog in make
9452do
9453  # Extract the first word of "$ac_prog", so it can be a program name with args.
9454set dummy $ac_prog; ac_word=$2
9455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9456$as_echo_n "checking for $ac_word... " >&6; }
9457if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9458  $as_echo_n "(cached) " >&6
9459else
9460  case $CHECK_TOOLSDIR_MAKE in
9461  [\\/]* | ?:[\\/]*)
9462  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9463  ;;
9464  *)
9465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9466for as_dir in $PATH
9467do
9468  IFS=$as_save_IFS
9469  test -z "$as_dir" && as_dir=.
9470    for ac_exec_ext in '' $ac_executable_extensions; do
9471  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9472    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9474    break 2
9475  fi
9476done
9477  done
9478IFS=$as_save_IFS
9479
9480  ;;
9481esac
9482fi
9483CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9484if test -n "$CHECK_TOOLSDIR_MAKE"; then
9485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9486$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9487else
9488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9489$as_echo "no" >&6; }
9490fi
9491
9492
9493  test -n "$CHECK_TOOLSDIR_MAKE" && break
9494done
9495
9496
9497  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9498  DESCRIPTION="make in tools-dir"
9499  if test "x$MAKE_CANDIDATE" != x; then
9500    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9501$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9502    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9503    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9504    if test "x$IS_GNU_MAKE" = x; then
9505      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9506$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9507    else
9508      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9509      if test "x$IS_MODERN_MAKE" = x; then
9510        { $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
9511$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;}
9512      else
9513        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9514          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9515            MAKE_EXPECTED_ENV='cygwin'
9516          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9517            MAKE_EXPECTED_ENV='msys'
9518          else
9519            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9520          fi
9521          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9522          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9523        else
9524          # Not relevant for non-Windows
9525          IS_MAKE_CORRECT_ENV=true
9526        fi
9527        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9528          { $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
9529$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;}
9530        else
9531          FOUND_MAKE=$MAKE_CANDIDATE
9532
9533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9534
9535  # First separate the path from the arguments. This will split at the first
9536  # space.
9537  complete="$FOUND_MAKE"
9538  path="${complete%% *}"
9539  tmp="$complete EOL"
9540  arguments="${tmp#* }"
9541
9542  # Input might be given as Windows format, start by converting to
9543  # unix format.
9544  new_path=`$CYGPATH -u "$path"`
9545
9546  # Now try to locate executable using which
9547  new_path=`$WHICH "$new_path" 2> /dev/null`
9548  # bat and cmd files are not always considered executable in cygwin causing which
9549  # to not find them
9550  if test "x$new_path" = x \
9551           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9552           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9553    new_path=`$CYGPATH -u "$path"`
9554  fi
9555  if test "x$new_path" = x; then
9556    # Oops. Which didn't find the executable.
9557    # The splitting of arguments from the executable at a space might have been incorrect,
9558    # since paths with space are more likely in Windows. Give it another try with the whole
9559    # argument.
9560    path="$complete"
9561    arguments="EOL"
9562    new_path=`$CYGPATH -u "$path"`
9563    new_path=`$WHICH "$new_path" 2> /dev/null`
9564    # bat and cmd files are not always considered executable in cygwin causing which
9565    # to not find them
9566    if test "x$new_path" = x \
9567             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9568             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9569      new_path=`$CYGPATH -u "$path"`
9570    fi
9571    if test "x$new_path" = x; then
9572      # It's still not found. Now this is an unrecoverable error.
9573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9574$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9575      has_space=`$ECHO "$complete" | $GREP " "`
9576      if test "x$has_space" != x; then
9577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9579      fi
9580      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9581    fi
9582  fi
9583
9584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9587  # "foo.exe" is OK but "foo" is an error.
9588  #
9589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9590  # It is also a way to make sure we got the proper file name for the real test later on.
9591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9592  if test "x$test_shortpath" = x; then
9593    # Short path failed, file does not exist as specified.
9594    # Try adding .exe or .cmd
9595    if test -f "${new_path}.exe"; then
9596       input_to_shortpath="${new_path}.exe"
9597    elif test -f "${new_path}.cmd"; then
9598       input_to_shortpath="${new_path}.cmd"
9599    else
9600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9601$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9602      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9603$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9604      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9605    fi
9606  else
9607    input_to_shortpath="$new_path"
9608  fi
9609
9610  # Call helper function which possibly converts this using DOS-style short mode.
9611  # If so, the updated path is stored in $new_path.
9612  new_path="$input_to_shortpath"
9613
9614  input_path="$input_to_shortpath"
9615  # Check if we need to convert this using DOS-style short mode. If the path
9616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9617  # take no chances and rewrite it.
9618  # Note: m4 eats our [], so we need to use [ and ] instead.
9619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9620  if test "x$has_forbidden_chars" != x; then
9621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9625      # Going to short mode and back again did indeed matter. Since short mode is
9626      # case insensitive, let's make it lowercase to improve readability.
9627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9628      # Now convert it back to Unix-stile (cygpath)
9629      input_path=`$CYGPATH -u "$shortmode_path"`
9630      new_path="$input_path"
9631    fi
9632  fi
9633
9634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9635  if test "x$test_cygdrive_prefix" = x; then
9636    # As a simple fix, exclude /usr/bin since it's not a real path.
9637    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9639      # a path prefixed by /cygdrive for fixpath to work.
9640      new_path="$CYGWIN_ROOT_PATH$input_path"
9641    fi
9642  fi
9643
9644  # remove trailing .exe if any
9645  new_path="${new_path/%.exe/}"
9646
9647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9648
9649  # First separate the path from the arguments. This will split at the first
9650  # space.
9651  complete="$FOUND_MAKE"
9652  path="${complete%% *}"
9653  tmp="$complete EOL"
9654  arguments="${tmp#* }"
9655
9656  # Input might be given as Windows format, start by converting to
9657  # unix format.
9658  new_path="$path"
9659
9660  windows_path="$new_path"
9661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9662    unix_path=`$CYGPATH -u "$windows_path"`
9663    new_path="$unix_path"
9664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9666    new_path="$unix_path"
9667  fi
9668
9669
9670  # Now try to locate executable using which
9671  new_path=`$WHICH "$new_path" 2> /dev/null`
9672
9673  if test "x$new_path" = x; then
9674    # Oops. Which didn't find the executable.
9675    # The splitting of arguments from the executable at a space might have been incorrect,
9676    # since paths with space are more likely in Windows. Give it another try with the whole
9677    # argument.
9678    path="$complete"
9679    arguments="EOL"
9680    new_path="$path"
9681
9682  windows_path="$new_path"
9683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9684    unix_path=`$CYGPATH -u "$windows_path"`
9685    new_path="$unix_path"
9686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9688    new_path="$unix_path"
9689  fi
9690
9691
9692    new_path=`$WHICH "$new_path" 2> /dev/null`
9693
9694    if test "x$new_path" = x; then
9695      # It's still not found. Now this is an unrecoverable error.
9696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9697$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9698      has_space=`$ECHO "$complete" | $GREP " "`
9699      if test "x$has_space" != x; then
9700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9702      fi
9703      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9704    fi
9705  fi
9706
9707  # Now new_path has a complete unix path to the binary
9708  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9709    # Keep paths in /bin as-is, but remove trailing .exe if any
9710    new_path="${new_path/%.exe/}"
9711    # Do not save /bin paths to all_fixpath_prefixes!
9712  else
9713    # Not in mixed or Windows style, start by that.
9714    new_path=`cmd //c echo $new_path`
9715
9716  input_path="$new_path"
9717  # Check if we need to convert this using DOS-style short mode. If the path
9718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9719  # take no chances and rewrite it.
9720  # Note: m4 eats our [], so we need to use [ and ] instead.
9721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9722  if test "x$has_forbidden_chars" != x; then
9723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9725  fi
9726
9727    # Output is in $new_path
9728
9729  windows_path="$new_path"
9730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9731    unix_path=`$CYGPATH -u "$windows_path"`
9732    new_path="$unix_path"
9733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9735    new_path="$unix_path"
9736  fi
9737
9738    # remove trailing .exe if any
9739    new_path="${new_path/%.exe/}"
9740
9741    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9742    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9743  fi
9744
9745  else
9746    # We're on a posix platform. Hooray! :)
9747    # First separate the path from the arguments. This will split at the first
9748    # space.
9749    complete="$FOUND_MAKE"
9750    path="${complete%% *}"
9751    tmp="$complete EOL"
9752    arguments="${tmp#* }"
9753
9754    # Cannot rely on the command "which" here since it doesn't always work.
9755    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9756    if test -z "$is_absolute_path"; then
9757      # Path to executable is not absolute. Find it.
9758      IFS_save="$IFS"
9759      IFS=:
9760      for p in $PATH; do
9761        if test -f "$p/$path" && test -x "$p/$path"; then
9762          new_path="$p/$path"
9763          break
9764        fi
9765      done
9766      IFS="$IFS_save"
9767    else
9768      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9769$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9770      new_path="$path"
9771    fi
9772
9773    if test "x$new_path" = x; then
9774        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9775$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9776        has_space=`$ECHO "$complete" | $GREP " "`
9777        if test "x$has_space" != x; then
9778          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9779$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9780        fi
9781        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9782      fi
9783  fi
9784
9785      # Now join together the path and the arguments once again
9786      if test "x$arguments" != xEOL; then
9787        new_complete="$new_path ${arguments% *}"
9788      else
9789        new_complete="$new_path"
9790      fi
9791
9792  if test "x$complete" != "x$new_complete"; then
9793      FOUND_MAKE="$new_complete"
9794      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9795$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9796    fi
9797
9798        fi
9799      fi
9800    fi
9801  fi
9802
9803        fi
9804        PATH=$OLD_PATH
9805      fi
9806    fi
9807
9808    if test "x$FOUND_MAKE" = x; then
9809      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
9810    fi
9811  fi
9812
9813  MAKE=$FOUND_MAKE
9814
9815  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9816$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9817
9818
9819
9820    # Test if find supports -delete
9821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9822$as_echo_n "checking if find supports -delete... " >&6; }
9823    FIND_DELETE="-delete"
9824
9825    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9826
9827    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9828
9829    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9830    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9831        # No, it does not.
9832        rm $DELETEDIR/TestIfFindSupportsDelete
9833        FIND_DELETE="-exec rm \{\} \+"
9834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9835$as_echo "no" >&6; }
9836    else
9837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9838$as_echo "yes" >&6; }
9839    fi
9840    rmdir $DELETEDIR
9841
9842
9843
9844# These tools might not be installed by default,
9845# need hint on how to install them.
9846
9847    for ac_prog in unzip
9848do
9849  # Extract the first word of "$ac_prog", so it can be a program name with args.
9850set dummy $ac_prog; ac_word=$2
9851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9852$as_echo_n "checking for $ac_word... " >&6; }
9853if test "${ac_cv_path_UNZIP+set}" = set; then :
9854  $as_echo_n "(cached) " >&6
9855else
9856  case $UNZIP in
9857  [\\/]* | ?:[\\/]*)
9858  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9859  ;;
9860  *)
9861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9862for as_dir in $PATH
9863do
9864  IFS=$as_save_IFS
9865  test -z "$as_dir" && as_dir=.
9866    for ac_exec_ext in '' $ac_executable_extensions; do
9867  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9868    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9870    break 2
9871  fi
9872done
9873  done
9874IFS=$as_save_IFS
9875
9876  ;;
9877esac
9878fi
9879UNZIP=$ac_cv_path_UNZIP
9880if test -n "$UNZIP"; then
9881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9882$as_echo "$UNZIP" >&6; }
9883else
9884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9885$as_echo "no" >&6; }
9886fi
9887
9888
9889  test -n "$UNZIP" && break
9890done
9891
9892
9893    if test "x$UNZIP" = x; then
9894        if test "xunzip" = x; then
9895          PROG_NAME=unzip
9896        else
9897          PROG_NAME=unzip
9898        fi
9899        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9900$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9901        as_fn_error $? "Cannot continue" "$LINENO" 5
9902    fi
9903
9904
9905
9906    for ac_prog in zip
9907do
9908  # Extract the first word of "$ac_prog", so it can be a program name with args.
9909set dummy $ac_prog; ac_word=$2
9910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9911$as_echo_n "checking for $ac_word... " >&6; }
9912if test "${ac_cv_path_ZIP+set}" = set; then :
9913  $as_echo_n "(cached) " >&6
9914else
9915  case $ZIP in
9916  [\\/]* | ?:[\\/]*)
9917  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9918  ;;
9919  *)
9920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9921for as_dir in $PATH
9922do
9923  IFS=$as_save_IFS
9924  test -z "$as_dir" && as_dir=.
9925    for ac_exec_ext in '' $ac_executable_extensions; do
9926  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9927    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9929    break 2
9930  fi
9931done
9932  done
9933IFS=$as_save_IFS
9934
9935  ;;
9936esac
9937fi
9938ZIP=$ac_cv_path_ZIP
9939if test -n "$ZIP"; then
9940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9941$as_echo "$ZIP" >&6; }
9942else
9943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9944$as_echo "no" >&6; }
9945fi
9946
9947
9948  test -n "$ZIP" && break
9949done
9950
9951
9952    if test "x$ZIP" = x; then
9953        if test "xzip" = x; then
9954          PROG_NAME=zip
9955        else
9956          PROG_NAME=zip
9957        fi
9958        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9959$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9960        as_fn_error $? "Cannot continue" "$LINENO" 5
9961    fi
9962
9963
9964
9965# Non-required basic tools
9966
9967# Extract the first word of "ldd", so it can be a program name with args.
9968set dummy ldd; ac_word=$2
9969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9970$as_echo_n "checking for $ac_word... " >&6; }
9971if test "${ac_cv_path_LDD+set}" = set; then :
9972  $as_echo_n "(cached) " >&6
9973else
9974  case $LDD in
9975  [\\/]* | ?:[\\/]*)
9976  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9977  ;;
9978  *)
9979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9980for as_dir in $PATH
9981do
9982  IFS=$as_save_IFS
9983  test -z "$as_dir" && as_dir=.
9984    for ac_exec_ext in '' $ac_executable_extensions; do
9985  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9986    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9988    break 2
9989  fi
9990done
9991  done
9992IFS=$as_save_IFS
9993
9994  ;;
9995esac
9996fi
9997LDD=$ac_cv_path_LDD
9998if test -n "$LDD"; then
9999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10000$as_echo "$LDD" >&6; }
10001else
10002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10003$as_echo "no" >&6; }
10004fi
10005
10006
10007if test "x$LDD" = "x"; then
10008    # List shared lib dependencies is used for
10009    # debug output and checking for forbidden dependencies.
10010    # We can build without it.
10011    LDD="true"
10012fi
10013# Extract the first word of "otool", so it can be a program name with args.
10014set dummy otool; ac_word=$2
10015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10016$as_echo_n "checking for $ac_word... " >&6; }
10017if test "${ac_cv_path_OTOOL+set}" = set; then :
10018  $as_echo_n "(cached) " >&6
10019else
10020  case $OTOOL in
10021  [\\/]* | ?:[\\/]*)
10022  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10023  ;;
10024  *)
10025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10026for as_dir in $PATH
10027do
10028  IFS=$as_save_IFS
10029  test -z "$as_dir" && as_dir=.
10030    for ac_exec_ext in '' $ac_executable_extensions; do
10031  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10032    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10034    break 2
10035  fi
10036done
10037  done
10038IFS=$as_save_IFS
10039
10040  ;;
10041esac
10042fi
10043OTOOL=$ac_cv_path_OTOOL
10044if test -n "$OTOOL"; then
10045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10046$as_echo "$OTOOL" >&6; }
10047else
10048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10049$as_echo "no" >&6; }
10050fi
10051
10052
10053if test "x$OTOOL" = "x"; then
10054   OTOOL="true"
10055fi
10056for ac_prog in readelf greadelf
10057do
10058  # Extract the first word of "$ac_prog", so it can be a program name with args.
10059set dummy $ac_prog; ac_word=$2
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10061$as_echo_n "checking for $ac_word... " >&6; }
10062if test "${ac_cv_path_READELF+set}" = set; then :
10063  $as_echo_n "(cached) " >&6
10064else
10065  case $READELF in
10066  [\\/]* | ?:[\\/]*)
10067  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10068  ;;
10069  *)
10070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10071for as_dir in $PATH
10072do
10073  IFS=$as_save_IFS
10074  test -z "$as_dir" && as_dir=.
10075    for ac_exec_ext in '' $ac_executable_extensions; do
10076  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10077    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10079    break 2
10080  fi
10081done
10082  done
10083IFS=$as_save_IFS
10084
10085  ;;
10086esac
10087fi
10088READELF=$ac_cv_path_READELF
10089if test -n "$READELF"; then
10090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10091$as_echo "$READELF" >&6; }
10092else
10093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10094$as_echo "no" >&6; }
10095fi
10096
10097
10098  test -n "$READELF" && break
10099done
10100
10101# Extract the first word of "hg", so it can be a program name with args.
10102set dummy hg; ac_word=$2
10103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10104$as_echo_n "checking for $ac_word... " >&6; }
10105if test "${ac_cv_path_HG+set}" = set; then :
10106  $as_echo_n "(cached) " >&6
10107else
10108  case $HG in
10109  [\\/]* | ?:[\\/]*)
10110  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10111  ;;
10112  *)
10113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10114for as_dir in $PATH
10115do
10116  IFS=$as_save_IFS
10117  test -z "$as_dir" && as_dir=.
10118    for ac_exec_ext in '' $ac_executable_extensions; do
10119  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10120    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10122    break 2
10123  fi
10124done
10125  done
10126IFS=$as_save_IFS
10127
10128  ;;
10129esac
10130fi
10131HG=$ac_cv_path_HG
10132if test -n "$HG"; then
10133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10134$as_echo "$HG" >&6; }
10135else
10136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10137$as_echo "no" >&6; }
10138fi
10139
10140
10141# Extract the first word of "stat", so it can be a program name with args.
10142set dummy stat; ac_word=$2
10143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10144$as_echo_n "checking for $ac_word... " >&6; }
10145if test "${ac_cv_path_STAT+set}" = set; then :
10146  $as_echo_n "(cached) " >&6
10147else
10148  case $STAT in
10149  [\\/]* | ?:[\\/]*)
10150  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10151  ;;
10152  *)
10153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10154for as_dir in $PATH
10155do
10156  IFS=$as_save_IFS
10157  test -z "$as_dir" && as_dir=.
10158    for ac_exec_ext in '' $ac_executable_extensions; do
10159  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10160    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10162    break 2
10163  fi
10164done
10165  done
10166IFS=$as_save_IFS
10167
10168  ;;
10169esac
10170fi
10171STAT=$ac_cv_path_STAT
10172if test -n "$STAT"; then
10173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10174$as_echo "$STAT" >&6; }
10175else
10176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10177$as_echo "no" >&6; }
10178fi
10179
10180
10181# Extract the first word of "time", so it can be a program name with args.
10182set dummy time; ac_word=$2
10183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10184$as_echo_n "checking for $ac_word... " >&6; }
10185if test "${ac_cv_path_TIME+set}" = set; then :
10186  $as_echo_n "(cached) " >&6
10187else
10188  case $TIME in
10189  [\\/]* | ?:[\\/]*)
10190  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10191  ;;
10192  *)
10193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10194for as_dir in $PATH
10195do
10196  IFS=$as_save_IFS
10197  test -z "$as_dir" && as_dir=.
10198    for ac_exec_ext in '' $ac_executable_extensions; do
10199  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10200    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10202    break 2
10203  fi
10204done
10205  done
10206IFS=$as_save_IFS
10207
10208  ;;
10209esac
10210fi
10211TIME=$ac_cv_path_TIME
10212if test -n "$TIME"; then
10213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10214$as_echo "$TIME" >&6; }
10215else
10216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10217$as_echo "no" >&6; }
10218fi
10219
10220
10221
10222if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10223
10224    for ac_prog in comm
10225do
10226  # Extract the first word of "$ac_prog", so it can be a program name with args.
10227set dummy $ac_prog; ac_word=$2
10228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10229$as_echo_n "checking for $ac_word... " >&6; }
10230if test "${ac_cv_path_COMM+set}" = set; then :
10231  $as_echo_n "(cached) " >&6
10232else
10233  case $COMM in
10234  [\\/]* | ?:[\\/]*)
10235  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10236  ;;
10237  *)
10238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10239for as_dir in $PATH
10240do
10241  IFS=$as_save_IFS
10242  test -z "$as_dir" && as_dir=.
10243    for ac_exec_ext in '' $ac_executable_extensions; do
10244  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10245    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10247    break 2
10248  fi
10249done
10250  done
10251IFS=$as_save_IFS
10252
10253  ;;
10254esac
10255fi
10256COMM=$ac_cv_path_COMM
10257if test -n "$COMM"; then
10258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10259$as_echo "$COMM" >&6; }
10260else
10261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10262$as_echo "no" >&6; }
10263fi
10264
10265
10266  test -n "$COMM" && break
10267done
10268
10269
10270    if test "x$COMM" = x; then
10271        if test "xcomm" = x; then
10272          PROG_NAME=comm
10273        else
10274          PROG_NAME=comm
10275        fi
10276        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10277$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10278        as_fn_error $? "Cannot continue" "$LINENO" 5
10279    fi
10280
10281
10282fi
10283
10284if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10285
10286    for ac_prog in xattr
10287do
10288  # Extract the first word of "$ac_prog", so it can be a program name with args.
10289set dummy $ac_prog; ac_word=$2
10290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10291$as_echo_n "checking for $ac_word... " >&6; }
10292if test "${ac_cv_path_XATTR+set}" = set; then :
10293  $as_echo_n "(cached) " >&6
10294else
10295  case $XATTR in
10296  [\\/]* | ?:[\\/]*)
10297  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10298  ;;
10299  *)
10300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10301for as_dir in $PATH
10302do
10303  IFS=$as_save_IFS
10304  test -z "$as_dir" && as_dir=.
10305    for ac_exec_ext in '' $ac_executable_extensions; do
10306  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10307    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10309    break 2
10310  fi
10311done
10312  done
10313IFS=$as_save_IFS
10314
10315  ;;
10316esac
10317fi
10318XATTR=$ac_cv_path_XATTR
10319if test -n "$XATTR"; then
10320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10321$as_echo "$XATTR" >&6; }
10322else
10323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10324$as_echo "no" >&6; }
10325fi
10326
10327
10328  test -n "$XATTR" && break
10329done
10330
10331
10332    if test "x$XATTR" = x; then
10333        if test "xxattr" = x; then
10334          PROG_NAME=xattr
10335        else
10336          PROG_NAME=xattr
10337        fi
10338        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10339$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10340        as_fn_error $? "Cannot continue" "$LINENO" 5
10341    fi
10342
10343
10344  # Extract the first word of "codesign", so it can be a program name with args.
10345set dummy codesign; ac_word=$2
10346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10347$as_echo_n "checking for $ac_word... " >&6; }
10348if test "${ac_cv_path_CODESIGN+set}" = set; then :
10349  $as_echo_n "(cached) " >&6
10350else
10351  case $CODESIGN in
10352  [\\/]* | ?:[\\/]*)
10353  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10354  ;;
10355  *)
10356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10357for as_dir in $PATH
10358do
10359  IFS=$as_save_IFS
10360  test -z "$as_dir" && as_dir=.
10361    for ac_exec_ext in '' $ac_executable_extensions; do
10362  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10363    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10365    break 2
10366  fi
10367done
10368  done
10369IFS=$as_save_IFS
10370
10371  ;;
10372esac
10373fi
10374CODESIGN=$ac_cv_path_CODESIGN
10375if test -n "$CODESIGN"; then
10376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10377$as_echo "$CODESIGN" >&6; }
10378else
10379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10380$as_echo "no" >&6; }
10381fi
10382
10383
10384  if test "x$CODESIGN" != "x"; then
10385    # Verify that the openjdk_codesign certificate is present
10386    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10387$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10388    rm -f codesign-testfile
10389    touch codesign-testfile
10390    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10391    rm -f codesign-testfile
10392    if test "x$CODESIGN" = x; then
10393      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394$as_echo "no" >&6; }
10395    else
10396      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10397$as_echo "yes" >&6; }
10398    fi
10399  fi
10400fi
10401
10402
10403# Check if pkg-config is available.
10404
10405
10406if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10407	if test -n "$ac_tool_prefix"; then
10408  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10409set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10411$as_echo_n "checking for $ac_word... " >&6; }
10412if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10413  $as_echo_n "(cached) " >&6
10414else
10415  case $PKG_CONFIG in
10416  [\\/]* | ?:[\\/]*)
10417  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10418  ;;
10419  *)
10420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10421for as_dir in $PATH
10422do
10423  IFS=$as_save_IFS
10424  test -z "$as_dir" && as_dir=.
10425    for ac_exec_ext in '' $ac_executable_extensions; do
10426  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10427    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10429    break 2
10430  fi
10431done
10432  done
10433IFS=$as_save_IFS
10434
10435  ;;
10436esac
10437fi
10438PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10439if test -n "$PKG_CONFIG"; then
10440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10441$as_echo "$PKG_CONFIG" >&6; }
10442else
10443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10444$as_echo "no" >&6; }
10445fi
10446
10447
10448fi
10449if test -z "$ac_cv_path_PKG_CONFIG"; then
10450  ac_pt_PKG_CONFIG=$PKG_CONFIG
10451  # Extract the first word of "pkg-config", so it can be a program name with args.
10452set dummy pkg-config; ac_word=$2
10453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10454$as_echo_n "checking for $ac_word... " >&6; }
10455if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10456  $as_echo_n "(cached) " >&6
10457else
10458  case $ac_pt_PKG_CONFIG in
10459  [\\/]* | ?:[\\/]*)
10460  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10461  ;;
10462  *)
10463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10464for as_dir in $PATH
10465do
10466  IFS=$as_save_IFS
10467  test -z "$as_dir" && as_dir=.
10468    for ac_exec_ext in '' $ac_executable_extensions; do
10469  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10470    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10472    break 2
10473  fi
10474done
10475  done
10476IFS=$as_save_IFS
10477
10478  ;;
10479esac
10480fi
10481ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10482if test -n "$ac_pt_PKG_CONFIG"; then
10483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10484$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10485else
10486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10487$as_echo "no" >&6; }
10488fi
10489
10490  if test "x$ac_pt_PKG_CONFIG" = x; then
10491    PKG_CONFIG=""
10492  else
10493    case $cross_compiling:$ac_tool_warned in
10494yes:)
10495{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10496$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10497ac_tool_warned=yes ;;
10498esac
10499    PKG_CONFIG=$ac_pt_PKG_CONFIG
10500  fi
10501else
10502  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10503fi
10504
10505fi
10506if test -n "$PKG_CONFIG"; then
10507	_pkg_min_version=0.9.0
10508	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10509$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10510	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10511		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10512$as_echo "yes" >&6; }
10513	else
10514		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10515$as_echo "no" >&6; }
10516		PKG_CONFIG=""
10517	fi
10518
10519fi
10520
10521# After basic tools have been setup, we can check build os specific details.
10522
10523###############################################################################
10524
10525# Note that this is the build platform OS version!
10526
10527OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10528OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10529OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10530OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10531
10532
10533
10534
10535
10536# Setup builddeps, for automatic downloading of tools we need.
10537# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10538# boot-jdk setup, but we need to have basic tools setup first.
10539
10540
10541# Check whether --with-builddeps-conf was given.
10542if test "${with_builddeps_conf+set}" = set; then :
10543  withval=$with_builddeps_conf;
10544fi
10545
10546
10547
10548# Check whether --with-builddeps-server was given.
10549if test "${with_builddeps_server+set}" = set; then :
10550  withval=$with_builddeps_server;
10551fi
10552
10553
10554
10555# Check whether --with-builddeps-dir was given.
10556if test "${with_builddeps_dir+set}" = set; then :
10557  withval=$with_builddeps_dir;
10558else
10559  with_builddeps_dir=/localhome/builddeps
10560fi
10561
10562
10563
10564# Check whether --with-builddeps-group was given.
10565if test "${with_builddeps_group+set}" = set; then :
10566  withval=$with_builddeps_group;
10567fi
10568
10569
10570
10571
10572    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10573        if test "x$with_builddeps_conf" != x; then
10574            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10575$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10576            builddepsfile=$with_builddeps_conf
10577            if test -s $builddepsfile; then
10578                . $builddepsfile
10579                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10580$as_echo "loaded!" >&6; }
10581            else
10582               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10583           fi
10584        else
10585            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10586$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10587            builddepsfile=`mktemp`
10588            touch $builddepsfile
10589            # Put all found confs into a single file.
10590            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10591            # Source the file to acquire the variables
10592            if test -s $builddepsfile; then
10593                . $builddepsfile
10594                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10595$as_echo "found at least one!" >&6; }
10596            else
10597               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10598           fi
10599        fi
10600        # Create build and target names that use _ instead of "-" and ".".
10601        # This is necessary to use them in variable names.
10602        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10603        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10604        # Extract rewrite information for build and target
10605        eval rewritten_build=\${REWRITE_${build_var}}
10606        if test "x$rewritten_build" = x; then
10607            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10608            echo Build stays the same $rewritten_build
10609        else
10610            echo Rewriting build for builddeps into $rewritten_build
10611        fi
10612        eval rewritten_target=\${REWRITE_${target_var}}
10613        if test "x$rewritten_target" = x; then
10614            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10615            echo Target stays the same $rewritten_target
10616        else
10617            echo Rewriting target for builddeps into $rewritten_target
10618        fi
10619        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10620        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10621    fi
10622    for ac_prog in 7z unzip
10623do
10624  # Extract the first word of "$ac_prog", so it can be a program name with args.
10625set dummy $ac_prog; ac_word=$2
10626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10627$as_echo_n "checking for $ac_word... " >&6; }
10628if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10629  $as_echo_n "(cached) " >&6
10630else
10631  if test -n "$BDEPS_UNZIP"; then
10632  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10633else
10634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10635for as_dir in $PATH
10636do
10637  IFS=$as_save_IFS
10638  test -z "$as_dir" && as_dir=.
10639    for ac_exec_ext in '' $ac_executable_extensions; do
10640  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10641    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10643    break 2
10644  fi
10645done
10646  done
10647IFS=$as_save_IFS
10648
10649fi
10650fi
10651BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10652if test -n "$BDEPS_UNZIP"; then
10653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10654$as_echo "$BDEPS_UNZIP" >&6; }
10655else
10656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10657$as_echo "no" >&6; }
10658fi
10659
10660
10661  test -n "$BDEPS_UNZIP" && break
10662done
10663
10664    if test "x$BDEPS_UNZIP" = x7z; then
10665        BDEPS_UNZIP="7z x"
10666    fi
10667
10668    for ac_prog in wget lftp ftp
10669do
10670  # Extract the first word of "$ac_prog", so it can be a program name with args.
10671set dummy $ac_prog; ac_word=$2
10672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10673$as_echo_n "checking for $ac_word... " >&6; }
10674if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10675  $as_echo_n "(cached) " >&6
10676else
10677  if test -n "$BDEPS_FTP"; then
10678  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10679else
10680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10681for as_dir in $PATH
10682do
10683  IFS=$as_save_IFS
10684  test -z "$as_dir" && as_dir=.
10685    for ac_exec_ext in '' $ac_executable_extensions; do
10686  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10687    ac_cv_prog_BDEPS_FTP="$ac_prog"
10688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10689    break 2
10690  fi
10691done
10692  done
10693IFS=$as_save_IFS
10694
10695fi
10696fi
10697BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10698if test -n "$BDEPS_FTP"; then
10699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10700$as_echo "$BDEPS_FTP" >&6; }
10701else
10702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10703$as_echo "no" >&6; }
10704fi
10705
10706
10707  test -n "$BDEPS_FTP" && break
10708done
10709
10710
10711
10712###############################################################################
10713#
10714# Determine OpenJDK variants, options and version numbers.
10715#
10716###############################################################################
10717
10718# We need build & target for this.
10719
10720
10721###############################################################################
10722#
10723# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10724# We always build headless support.
10725#
10726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10727$as_echo_n "checking headful support... " >&6; }
10728# Check whether --enable-headful was given.
10729if test "${enable_headful+set}" = set; then :
10730  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10731else
10732  SUPPORT_HEADFUL=yes
10733fi
10734
10735
10736SUPPORT_HEADLESS=yes
10737BUILD_HEADLESS="BUILD_HEADLESS:=true"
10738
10739if test "x$SUPPORT_HEADFUL" = xyes; then
10740    # We are building both headful and headless.
10741    headful_msg="inlude support for both headful and headless"
10742fi
10743
10744if test "x$SUPPORT_HEADFUL" = xno; then
10745    # Thus we are building headless only.
10746    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10747    headful_msg="headless only"
10748fi
10749
10750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10751$as_echo "$headful_msg" >&6; }
10752
10753
10754
10755
10756
10757# Control wether Hotspot runs Queens test after build.
10758# Check whether --enable-hotspot-test-in-build was given.
10759if test "${enable_hotspot_test_in_build+set}" = set; then :
10760  enableval=$enable_hotspot_test_in_build;
10761else
10762  enable_hotspot_test_in_build=no
10763fi
10764
10765if test "x$enable_hotspot_test_in_build" = "xyes"; then
10766    TEST_IN_BUILD=true
10767else
10768    TEST_IN_BUILD=false
10769fi
10770
10771
10772###############################################################################
10773#
10774# Choose cacerts source file
10775#
10776
10777# Check whether --with-cacerts-file was given.
10778if test "${with_cacerts_file+set}" = set; then :
10779  withval=$with_cacerts_file;
10780fi
10781
10782if test "x$with_cacerts_file" != x; then
10783    CACERTS_FILE=$with_cacerts_file
10784else
10785    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10786fi
10787
10788
10789###############################################################################
10790#
10791# Enable or disable unlimited crypto
10792#
10793# Check whether --enable-unlimited-crypto was given.
10794if test "${enable_unlimited_crypto+set}" = set; then :
10795  enableval=$enable_unlimited_crypto;
10796else
10797  enable_unlimited_crypto=no
10798fi
10799
10800if test "x$enable_unlimited_crypto" = "xyes"; then
10801    UNLIMITED_CRYPTO=true
10802else
10803    UNLIMITED_CRYPTO=false
10804fi
10805
10806
10807###############################################################################
10808#
10809# Enable or disable the elliptic curve crypto implementation
10810#
10811
10812
10813###############################################################################
10814#
10815# Compress jars
10816#
10817COMPRESS_JARS=false
10818
10819
10820
10821
10822# Source the version numbers
10823. $AUTOCONF_DIR/version-numbers
10824
10825# Get the settings from parameters
10826
10827# Check whether --with-milestone was given.
10828if test "${with_milestone+set}" = set; then :
10829  withval=$with_milestone;
10830fi
10831
10832if test "x$with_milestone" = xyes; then
10833  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10834elif test "x$with_milestone" != x; then
10835    MILESTONE="$with_milestone"
10836fi
10837if test "x$MILESTONE" = x; then
10838  MILESTONE=internal
10839fi
10840
10841
10842# Check whether --with-update-version was given.
10843if test "${with_update_version+set}" = set; then :
10844  withval=$with_update_version;
10845fi
10846
10847if test "x$with_update_version" = xyes; then
10848  as_fn_error $? "Update version must have a value" "$LINENO" 5
10849elif test "x$with_update_version" != x; then
10850  JDK_UPDATE_VERSION="$with_update_version"
10851fi
10852
10853
10854# Check whether --with-build-number was given.
10855if test "${with_build_number+set}" = set; then :
10856  withval=$with_build_number;
10857fi
10858
10859if test "x$with_build_number" = xyes; then
10860  as_fn_error $? "Build number must have a value" "$LINENO" 5
10861elif test "x$with_build_number" != x; then
10862  JDK_BUILD_NUMBER="$with_build_number"
10863fi
10864if test "x$JDK_BUILD_NUMBER" = x; then
10865  JDK_BUILD_NUMBER=b00
10866fi
10867
10868
10869# Check whether --with-user-release-suffix was given.
10870if test "${with_user_release_suffix+set}" = set; then :
10871  withval=$with_user_release_suffix;
10872fi
10873
10874if test "x$with_user_release_suffix" = xyes; then
10875  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10876elif test "x$with_user_release_suffix" != x; then
10877  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10878else
10879  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10880  # Avoid [:alnum:] since it depends on the locale.
10881  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10882  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10883fi
10884
10885
10886# Now set the JDK version, milestone, build number etc.
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901COPYRIGHT_YEAR=`date +'%Y'`
10902
10903
10904if test "x$JDK_UPDATE_VERSION" != x; then
10905  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10906else
10907  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10908fi
10909
10910
10911COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10912
10913
10914
10915###############################################################################
10916#
10917# Setup BootJDK, used to bootstrap the build.
10918#
10919###############################################################################
10920
10921
10922BOOT_JDK_FOUND=no
10923
10924# Check whether --with-boot-jdk was given.
10925if test "${with_boot_jdk+set}" = set; then :
10926  withval=$with_boot_jdk;
10927fi
10928
10929
10930# We look for the Boot JDK through various means, going from more certain to
10931# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10932# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10933# must check if this is indeed valid; otherwise we'll continue looking.
10934
10935# Test: Is bootjdk explicitely set by command line arguments?
10936
10937  if test "x$BOOT_JDK_FOUND" = xno; then
10938    # Now execute the test
10939
10940if test "x$with_boot_jdk" != x; then
10941    BOOT_JDK=$with_boot_jdk
10942    BOOT_JDK_FOUND=maybe
10943    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10944$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10945fi
10946
10947
10948    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10949    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10950      # Do we have a bin/java?
10951      if test ! -x "$BOOT_JDK/bin/java"; then
10952        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10954        BOOT_JDK_FOUND=no
10955      else
10956        # Do we have a bin/javac?
10957        if test ! -x "$BOOT_JDK/bin/javac"; then
10958          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10960          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10961$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10962          BOOT_JDK_FOUND=no
10963        else
10964          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10965          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10966            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10968            BOOT_JDK_FOUND=no
10969          else
10970            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10971            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10972
10973            # Extra M4 quote needed to protect [] in grep expression.
10974            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10975            if test "x$FOUND_VERSION_78" = x; then
10976              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10978              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10979$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10980              BOOT_JDK_FOUND=no
10981            else
10982              # We're done! :-)
10983              BOOT_JDK_FOUND=yes
10984
10985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10986
10987  # Input might be given as Windows format, start by converting to
10988  # unix format.
10989  path="$BOOT_JDK"
10990  new_path=`$CYGPATH -u "$path"`
10991
10992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10995  # "foo.exe" is OK but "foo" is an error.
10996  #
10997  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10998  # It is also a way to make sure we got the proper file name for the real test later on.
10999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11000  if test "x$test_shortpath" = x; then
11001    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11002$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11003    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11004  fi
11005
11006  # Call helper function which possibly converts this using DOS-style short mode.
11007  # If so, the updated path is stored in $new_path.
11008
11009  input_path="$new_path"
11010  # Check if we need to convert this using DOS-style short mode. If the path
11011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11012  # take no chances and rewrite it.
11013  # Note: m4 eats our [], so we need to use [ and ] instead.
11014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11015  if test "x$has_forbidden_chars" != x; then
11016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11020      # Going to short mode and back again did indeed matter. Since short mode is
11021      # case insensitive, let's make it lowercase to improve readability.
11022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11023      # Now convert it back to Unix-stile (cygpath)
11024      input_path=`$CYGPATH -u "$shortmode_path"`
11025      new_path="$input_path"
11026    fi
11027  fi
11028
11029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11030  if test "x$test_cygdrive_prefix" = x; then
11031    # As a simple fix, exclude /usr/bin since it's not a real path.
11032    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11034      # a path prefixed by /cygdrive for fixpath to work.
11035      new_path="$CYGWIN_ROOT_PATH$input_path"
11036    fi
11037  fi
11038
11039
11040  if test "x$path" != "x$new_path"; then
11041    BOOT_JDK="$new_path"
11042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11043$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11044  fi
11045
11046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11047
11048  path="$BOOT_JDK"
11049  has_colon=`$ECHO $path | $GREP ^.:`
11050  new_path="$path"
11051  if test "x$has_colon" = x; then
11052    # Not in mixed or Windows style, start by that.
11053    new_path=`cmd //c echo $path`
11054  fi
11055
11056
11057  input_path="$new_path"
11058  # Check if we need to convert this using DOS-style short mode. If the path
11059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11060  # take no chances and rewrite it.
11061  # Note: m4 eats our [], so we need to use [ and ] instead.
11062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11063  if test "x$has_forbidden_chars" != x; then
11064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11066  fi
11067
11068
11069  windows_path="$new_path"
11070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11071    unix_path=`$CYGPATH -u "$windows_path"`
11072    new_path="$unix_path"
11073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11075    new_path="$unix_path"
11076  fi
11077
11078  if test "x$path" != "x$new_path"; then
11079    BOOT_JDK="$new_path"
11080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11081$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11082  fi
11083
11084  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11085  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11086
11087  else
11088    # We're on a posix platform. Hooray! :)
11089    path="$BOOT_JDK"
11090    has_space=`$ECHO "$path" | $GREP " "`
11091    if test "x$has_space" != x; then
11092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11093$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11094      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11095    fi
11096
11097    # Use eval to expand a potential ~
11098    eval path="$path"
11099    if test ! -f "$path" && test ! -d "$path"; then
11100      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11101    fi
11102
11103    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11104  fi
11105
11106              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11107$as_echo_n "checking for Boot JDK... " >&6; }
11108              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11109$as_echo "$BOOT_JDK" >&6; }
11110              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11111$as_echo_n "checking Boot JDK version... " >&6; }
11112              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11113              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11114$as_echo "$BOOT_JDK_VERSION" >&6; }
11115            fi # end check jdk version
11116          fi # end check rt.jar
11117        fi # end check javac
11118      fi # end check java
11119    fi # end check boot jdk found
11120  fi
11121
11122if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11123  # Having specified an argument which is incorrect will produce an instant failure;
11124  # we should not go on looking
11125  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11126fi
11127
11128# Test: Is bootjdk available from builddeps?
11129
11130  if test "x$BOOT_JDK_FOUND" = xno; then
11131    # Now execute the test
11132
11133
11134
11135    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11136        # Source the builddeps file again, to make sure it uses the latest variables!
11137        . $builddepsfile
11138        # Look for a target and build machine specific resource!
11139        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11140        if test "x$resource" = x; then
11141            # Ok, lets instead look for a target specific resource
11142            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11143        fi
11144        if test "x$resource" = x; then
11145            # Ok, lets instead look for a build specific resource
11146            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11147        fi
11148        if test "x$resource" = x; then
11149            # Ok, lets instead look for a generic resource
11150            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11151            resource=${builddep_bootjdk}
11152        fi
11153        if test "x$resource" != x; then
11154            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11155$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11156	    # If the resource in the builddeps.conf file is an existing directory,
11157	    # for example /java/linux/cups
11158	    if test -d ${resource}; then
11159	       depdir=${resource}
11160	    else
11161
11162# bootjdk is for example mymodule
11163# $resource is for example libs/general/libmymod_1_2_3.zip
11164# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11165# $with_builddeps_dir is for example /localhome/builddeps
11166# depdir is the name of the variable into which we store the depdir, eg MYMOD
11167# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11168# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11169    filename=`basename $resource`
11170    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11171    filebase=${filename%%.*}
11172    extension=${filename#*.}
11173    installdir=$with_builddeps_dir/$filebase
11174    if test ! -f $installdir/$filename.unpacked; then
11175        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11176$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11177        if test ! -d $installdir; then
11178            mkdir -p $installdir
11179        fi
11180        if test ! -d $installdir; then
11181            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11182        fi
11183        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11184        touch $tmpfile
11185        if test ! -f $tmpfile; then
11186            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11187        fi
11188
11189    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11190    # $tmpfile is the local file name for the downloaded file.
11191    VALID_TOOL=no
11192    if test "x$BDEPS_FTP" = xwget; then
11193       VALID_TOOL=yes
11194       wget -O $tmpfile $with_builddeps_server/$resource
11195    fi
11196    if test "x$BDEPS_FTP" = xlftp; then
11197       VALID_TOOL=yes
11198       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11199    fi
11200    if test "x$BDEPS_FTP" = xftp; then
11201        VALID_TOOL=yes
11202        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11203        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11204        FTPUSERPWD=${FTPSERVER%%@*}
11205        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11206            FTPUSER=${userpwd%%:*}
11207            FTPPWD=${userpwd#*@}
11208            FTPSERVER=${FTPSERVER#*@}
11209        else
11210            FTPUSER=ftp
11211            FTPPWD=ftp
11212        fi
11213        # the "pass" command does not work on some
11214        # ftp clients (read ftp.exe) but if it works,
11215        # passive mode is better!
11216        (\
11217            echo "user $FTPUSER $FTPPWD"        ;\
11218            echo "pass"                         ;\
11219            echo "bin"                          ;\
11220            echo "get $FTPPATH $tmpfile"              ;\
11221        ) | ftp -in $FTPSERVER
11222    fi
11223    if test "x$VALID_TOOL" != xyes; then
11224       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11225    fi
11226
11227        mv $tmpfile $installdir/$filename
11228        if test ! -s $installdir/$filename; then
11229            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11230        fi
11231        case "$extension" in
11232            zip)  echo "Unzipping $installdir/$filename..."
11233               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11234            ;;
11235            tar.gz) echo "Untaring $installdir/$filename..."
11236               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11237            ;;
11238            tgz) echo "Untaring $installdir/$filename..."
11239               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11240            ;;
11241            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11242            ;;
11243        esac
11244    fi
11245    if test -f $installdir/$filename.unpacked; then
11246        depdir=$installdir
11247    fi
11248
11249	    fi
11250            # Source the builddeps file again, because in the previous command, the depdir
11251            # was updated to point at the current build dependency install directory.
11252            . $builddepsfile
11253            # Now extract variables from the builddeps.conf files.
11254            theroot=${builddep_bootjdk_ROOT}
11255            thecflags=${builddep_bootjdk_CFLAGS}
11256            thelibs=${builddep_bootjdk_LIBS}
11257            if test "x$depdir" = x; then
11258                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11259            fi
11260            BOOT_JDK=$depdir
11261            if test "x$theroot" != x; then
11262               BOOT_JDK="$theroot"
11263            fi
11264            if test "x$thecflags" != x; then
11265               BOOT_JDK_CFLAGS="$thecflags"
11266            fi
11267            if test "x$thelibs" != x; then
11268               BOOT_JDK_LIBS="$thelibs"
11269            fi
11270            BOOT_JDK_FOUND=maybe
11271            else BOOT_JDK_FOUND=no
11272
11273        fi
11274        else BOOT_JDK_FOUND=no
11275
11276    fi
11277
11278
11279
11280    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11281    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11282      # Do we have a bin/java?
11283      if test ! -x "$BOOT_JDK/bin/java"; then
11284        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11286        BOOT_JDK_FOUND=no
11287      else
11288        # Do we have a bin/javac?
11289        if test ! -x "$BOOT_JDK/bin/javac"; then
11290          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11292          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11293$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11294          BOOT_JDK_FOUND=no
11295        else
11296          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11297          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11298            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11299$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11300            BOOT_JDK_FOUND=no
11301          else
11302            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11303            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11304
11305            # Extra M4 quote needed to protect [] in grep expression.
11306            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11307            if test "x$FOUND_VERSION_78" = x; then
11308              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11310              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11311$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11312              BOOT_JDK_FOUND=no
11313            else
11314              # We're done! :-)
11315              BOOT_JDK_FOUND=yes
11316
11317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11318
11319  # Input might be given as Windows format, start by converting to
11320  # unix format.
11321  path="$BOOT_JDK"
11322  new_path=`$CYGPATH -u "$path"`
11323
11324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11327  # "foo.exe" is OK but "foo" is an error.
11328  #
11329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11330  # It is also a way to make sure we got the proper file name for the real test later on.
11331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11332  if test "x$test_shortpath" = x; then
11333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11334$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11335    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11336  fi
11337
11338  # Call helper function which possibly converts this using DOS-style short mode.
11339  # If so, the updated path is stored in $new_path.
11340
11341  input_path="$new_path"
11342  # Check if we need to convert this using DOS-style short mode. If the path
11343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11344  # take no chances and rewrite it.
11345  # Note: m4 eats our [], so we need to use [ and ] instead.
11346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11347  if test "x$has_forbidden_chars" != x; then
11348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11352      # Going to short mode and back again did indeed matter. Since short mode is
11353      # case insensitive, let's make it lowercase to improve readability.
11354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11355      # Now convert it back to Unix-stile (cygpath)
11356      input_path=`$CYGPATH -u "$shortmode_path"`
11357      new_path="$input_path"
11358    fi
11359  fi
11360
11361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11362  if test "x$test_cygdrive_prefix" = x; then
11363    # As a simple fix, exclude /usr/bin since it's not a real path.
11364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11366      # a path prefixed by /cygdrive for fixpath to work.
11367      new_path="$CYGWIN_ROOT_PATH$input_path"
11368    fi
11369  fi
11370
11371
11372  if test "x$path" != "x$new_path"; then
11373    BOOT_JDK="$new_path"
11374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11375$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11376  fi
11377
11378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11379
11380  path="$BOOT_JDK"
11381  has_colon=`$ECHO $path | $GREP ^.:`
11382  new_path="$path"
11383  if test "x$has_colon" = x; then
11384    # Not in mixed or Windows style, start by that.
11385    new_path=`cmd //c echo $path`
11386  fi
11387
11388
11389  input_path="$new_path"
11390  # Check if we need to convert this using DOS-style short mode. If the path
11391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11392  # take no chances and rewrite it.
11393  # Note: m4 eats our [], so we need to use [ and ] instead.
11394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11395  if test "x$has_forbidden_chars" != x; then
11396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11398  fi
11399
11400
11401  windows_path="$new_path"
11402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11403    unix_path=`$CYGPATH -u "$windows_path"`
11404    new_path="$unix_path"
11405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11407    new_path="$unix_path"
11408  fi
11409
11410  if test "x$path" != "x$new_path"; then
11411    BOOT_JDK="$new_path"
11412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11413$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11414  fi
11415
11416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11418
11419  else
11420    # We're on a posix platform. Hooray! :)
11421    path="$BOOT_JDK"
11422    has_space=`$ECHO "$path" | $GREP " "`
11423    if test "x$has_space" != x; then
11424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11425$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11426      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11427    fi
11428
11429    # Use eval to expand a potential ~
11430    eval path="$path"
11431    if test ! -f "$path" && test ! -d "$path"; then
11432      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11433    fi
11434
11435    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11436  fi
11437
11438              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11439$as_echo_n "checking for Boot JDK... " >&6; }
11440              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11441$as_echo "$BOOT_JDK" >&6; }
11442              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11443$as_echo_n "checking Boot JDK version... " >&6; }
11444              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11445              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11446$as_echo "$BOOT_JDK_VERSION" >&6; }
11447            fi # end check jdk version
11448          fi # end check rt.jar
11449        fi # end check javac
11450      fi # end check java
11451    fi # end check boot jdk found
11452  fi
11453
11454
11455# Test: Is $JAVA_HOME set?
11456
11457  if test "x$BOOT_JDK_FOUND" = xno; then
11458    # Now execute the test
11459
11460    if test "x$JAVA_HOME" != x; then
11461        JAVA_HOME_PROCESSED="$JAVA_HOME"
11462
11463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11464
11465  # Input might be given as Windows format, start by converting to
11466  # unix format.
11467  path="$JAVA_HOME_PROCESSED"
11468  new_path=`$CYGPATH -u "$path"`
11469
11470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11473  # "foo.exe" is OK but "foo" is an error.
11474  #
11475  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11476  # It is also a way to make sure we got the proper file name for the real test later on.
11477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11478  if test "x$test_shortpath" = x; then
11479    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11480$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11481    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11482  fi
11483
11484  # Call helper function which possibly converts this using DOS-style short mode.
11485  # If so, the updated path is stored in $new_path.
11486
11487  input_path="$new_path"
11488  # Check if we need to convert this using DOS-style short mode. If the path
11489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11490  # take no chances and rewrite it.
11491  # Note: m4 eats our [], so we need to use [ and ] instead.
11492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11493  if test "x$has_forbidden_chars" != x; then
11494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11498      # Going to short mode and back again did indeed matter. Since short mode is
11499      # case insensitive, let's make it lowercase to improve readability.
11500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11501      # Now convert it back to Unix-stile (cygpath)
11502      input_path=`$CYGPATH -u "$shortmode_path"`
11503      new_path="$input_path"
11504    fi
11505  fi
11506
11507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11508  if test "x$test_cygdrive_prefix" = x; then
11509    # As a simple fix, exclude /usr/bin since it's not a real path.
11510    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11512      # a path prefixed by /cygdrive for fixpath to work.
11513      new_path="$CYGWIN_ROOT_PATH$input_path"
11514    fi
11515  fi
11516
11517
11518  if test "x$path" != "x$new_path"; then
11519    JAVA_HOME_PROCESSED="$new_path"
11520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11521$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11522  fi
11523
11524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11525
11526  path="$JAVA_HOME_PROCESSED"
11527  has_colon=`$ECHO $path | $GREP ^.:`
11528  new_path="$path"
11529  if test "x$has_colon" = x; then
11530    # Not in mixed or Windows style, start by that.
11531    new_path=`cmd //c echo $path`
11532  fi
11533
11534
11535  input_path="$new_path"
11536  # Check if we need to convert this using DOS-style short mode. If the path
11537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11538  # take no chances and rewrite it.
11539  # Note: m4 eats our [], so we need to use [ and ] instead.
11540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11541  if test "x$has_forbidden_chars" != x; then
11542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11544  fi
11545
11546
11547  windows_path="$new_path"
11548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11549    unix_path=`$CYGPATH -u "$windows_path"`
11550    new_path="$unix_path"
11551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11553    new_path="$unix_path"
11554  fi
11555
11556  if test "x$path" != "x$new_path"; then
11557    JAVA_HOME_PROCESSED="$new_path"
11558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11559$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11560  fi
11561
11562  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11563  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11564
11565  else
11566    # We're on a posix platform. Hooray! :)
11567    path="$JAVA_HOME_PROCESSED"
11568    has_space=`$ECHO "$path" | $GREP " "`
11569    if test "x$has_space" != x; then
11570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11571$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11572      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11573    fi
11574
11575    # Use eval to expand a potential ~
11576    eval path="$path"
11577    if test ! -f "$path" && test ! -d "$path"; then
11578      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11579    fi
11580
11581    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11582  fi
11583
11584        if test ! -d "$JAVA_HOME_PROCESSED"; then
11585            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11586$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11587        else
11588          # Aha, the user has set a JAVA_HOME
11589          # let us use that as the Boot JDK.
11590          BOOT_JDK="$JAVA_HOME_PROCESSED"
11591          BOOT_JDK_FOUND=maybe
11592          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11593$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11594        fi
11595    fi
11596
11597
11598    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11599    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11600      # Do we have a bin/java?
11601      if test ! -x "$BOOT_JDK/bin/java"; then
11602        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11604        BOOT_JDK_FOUND=no
11605      else
11606        # Do we have a bin/javac?
11607        if test ! -x "$BOOT_JDK/bin/javac"; then
11608          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11610          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11611$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11612          BOOT_JDK_FOUND=no
11613        else
11614          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11615          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11616            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11618            BOOT_JDK_FOUND=no
11619          else
11620            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11621            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11622
11623            # Extra M4 quote needed to protect [] in grep expression.
11624            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11625            if test "x$FOUND_VERSION_78" = x; then
11626              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11628              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11629$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11630              BOOT_JDK_FOUND=no
11631            else
11632              # We're done! :-)
11633              BOOT_JDK_FOUND=yes
11634
11635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11636
11637  # Input might be given as Windows format, start by converting to
11638  # unix format.
11639  path="$BOOT_JDK"
11640  new_path=`$CYGPATH -u "$path"`
11641
11642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11645  # "foo.exe" is OK but "foo" is an error.
11646  #
11647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11648  # It is also a way to make sure we got the proper file name for the real test later on.
11649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11650  if test "x$test_shortpath" = x; then
11651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11653    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11654  fi
11655
11656  # Call helper function which possibly converts this using DOS-style short mode.
11657  # If so, the updated path is stored in $new_path.
11658
11659  input_path="$new_path"
11660  # Check if we need to convert this using DOS-style short mode. If the path
11661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11662  # take no chances and rewrite it.
11663  # Note: m4 eats our [], so we need to use [ and ] instead.
11664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11665  if test "x$has_forbidden_chars" != x; then
11666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11670      # Going to short mode and back again did indeed matter. Since short mode is
11671      # case insensitive, let's make it lowercase to improve readability.
11672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11673      # Now convert it back to Unix-stile (cygpath)
11674      input_path=`$CYGPATH -u "$shortmode_path"`
11675      new_path="$input_path"
11676    fi
11677  fi
11678
11679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11680  if test "x$test_cygdrive_prefix" = x; then
11681    # As a simple fix, exclude /usr/bin since it's not a real path.
11682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11684      # a path prefixed by /cygdrive for fixpath to work.
11685      new_path="$CYGWIN_ROOT_PATH$input_path"
11686    fi
11687  fi
11688
11689
11690  if test "x$path" != "x$new_path"; then
11691    BOOT_JDK="$new_path"
11692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11693$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11694  fi
11695
11696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11697
11698  path="$BOOT_JDK"
11699  has_colon=`$ECHO $path | $GREP ^.:`
11700  new_path="$path"
11701  if test "x$has_colon" = x; then
11702    # Not in mixed or Windows style, start by that.
11703    new_path=`cmd //c echo $path`
11704  fi
11705
11706
11707  input_path="$new_path"
11708  # Check if we need to convert this using DOS-style short mode. If the path
11709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11710  # take no chances and rewrite it.
11711  # Note: m4 eats our [], so we need to use [ and ] instead.
11712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11713  if test "x$has_forbidden_chars" != x; then
11714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11716  fi
11717
11718
11719  windows_path="$new_path"
11720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11721    unix_path=`$CYGPATH -u "$windows_path"`
11722    new_path="$unix_path"
11723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11725    new_path="$unix_path"
11726  fi
11727
11728  if test "x$path" != "x$new_path"; then
11729    BOOT_JDK="$new_path"
11730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11731$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11732  fi
11733
11734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11736
11737  else
11738    # We're on a posix platform. Hooray! :)
11739    path="$BOOT_JDK"
11740    has_space=`$ECHO "$path" | $GREP " "`
11741    if test "x$has_space" != x; then
11742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11743$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11744      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11745    fi
11746
11747    # Use eval to expand a potential ~
11748    eval path="$path"
11749    if test ! -f "$path" && test ! -d "$path"; then
11750      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11751    fi
11752
11753    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11754  fi
11755
11756              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11757$as_echo_n "checking for Boot JDK... " >&6; }
11758              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11759$as_echo "$BOOT_JDK" >&6; }
11760              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11761$as_echo_n "checking Boot JDK version... " >&6; }
11762              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11763              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11764$as_echo "$BOOT_JDK_VERSION" >&6; }
11765            fi # end check jdk version
11766          fi # end check rt.jar
11767        fi # end check javac
11768      fi # end check java
11769    fi # end check boot jdk found
11770  fi
11771
11772
11773# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11774
11775  if test "x$BOOT_JDK_FOUND" = xno; then
11776    # Now execute the test
11777
11778    if test -x /usr/libexec/java_home; then
11779        BOOT_JDK=`/usr/libexec/java_home`
11780        BOOT_JDK_FOUND=maybe
11781        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11782$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11783    fi
11784
11785
11786    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11787    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11788      # Do we have a bin/java?
11789      if test ! -x "$BOOT_JDK/bin/java"; then
11790        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11792        BOOT_JDK_FOUND=no
11793      else
11794        # Do we have a bin/javac?
11795        if test ! -x "$BOOT_JDK/bin/javac"; then
11796          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11798          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11799$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11800          BOOT_JDK_FOUND=no
11801        else
11802          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11803          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11804            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11806            BOOT_JDK_FOUND=no
11807          else
11808            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11809            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11810
11811            # Extra M4 quote needed to protect [] in grep expression.
11812            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11813            if test "x$FOUND_VERSION_78" = x; then
11814              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11816              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11817$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11818              BOOT_JDK_FOUND=no
11819            else
11820              # We're done! :-)
11821              BOOT_JDK_FOUND=yes
11822
11823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11824
11825  # Input might be given as Windows format, start by converting to
11826  # unix format.
11827  path="$BOOT_JDK"
11828  new_path=`$CYGPATH -u "$path"`
11829
11830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11833  # "foo.exe" is OK but "foo" is an error.
11834  #
11835  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11836  # It is also a way to make sure we got the proper file name for the real test later on.
11837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11838  if test "x$test_shortpath" = x; then
11839    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11840$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11841    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11842  fi
11843
11844  # Call helper function which possibly converts this using DOS-style short mode.
11845  # If so, the updated path is stored in $new_path.
11846
11847  input_path="$new_path"
11848  # Check if we need to convert this using DOS-style short mode. If the path
11849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11850  # take no chances and rewrite it.
11851  # Note: m4 eats our [], so we need to use [ and ] instead.
11852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11853  if test "x$has_forbidden_chars" != x; then
11854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11858      # Going to short mode and back again did indeed matter. Since short mode is
11859      # case insensitive, let's make it lowercase to improve readability.
11860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11861      # Now convert it back to Unix-stile (cygpath)
11862      input_path=`$CYGPATH -u "$shortmode_path"`
11863      new_path="$input_path"
11864    fi
11865  fi
11866
11867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11868  if test "x$test_cygdrive_prefix" = x; then
11869    # As a simple fix, exclude /usr/bin since it's not a real path.
11870    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11872      # a path prefixed by /cygdrive for fixpath to work.
11873      new_path="$CYGWIN_ROOT_PATH$input_path"
11874    fi
11875  fi
11876
11877
11878  if test "x$path" != "x$new_path"; then
11879    BOOT_JDK="$new_path"
11880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11882  fi
11883
11884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11885
11886  path="$BOOT_JDK"
11887  has_colon=`$ECHO $path | $GREP ^.:`
11888  new_path="$path"
11889  if test "x$has_colon" = x; then
11890    # Not in mixed or Windows style, start by that.
11891    new_path=`cmd //c echo $path`
11892  fi
11893
11894
11895  input_path="$new_path"
11896  # Check if we need to convert this using DOS-style short mode. If the path
11897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11898  # take no chances and rewrite it.
11899  # Note: m4 eats our [], so we need to use [ and ] instead.
11900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11901  if test "x$has_forbidden_chars" != x; then
11902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11904  fi
11905
11906
11907  windows_path="$new_path"
11908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11909    unix_path=`$CYGPATH -u "$windows_path"`
11910    new_path="$unix_path"
11911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11913    new_path="$unix_path"
11914  fi
11915
11916  if test "x$path" != "x$new_path"; then
11917    BOOT_JDK="$new_path"
11918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11919$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11920  fi
11921
11922  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11923  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11924
11925  else
11926    # We're on a posix platform. Hooray! :)
11927    path="$BOOT_JDK"
11928    has_space=`$ECHO "$path" | $GREP " "`
11929    if test "x$has_space" != x; then
11930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11931$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11932      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11933    fi
11934
11935    # Use eval to expand a potential ~
11936    eval path="$path"
11937    if test ! -f "$path" && test ! -d "$path"; then
11938      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11939    fi
11940
11941    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11942  fi
11943
11944              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11945$as_echo_n "checking for Boot JDK... " >&6; }
11946              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11947$as_echo "$BOOT_JDK" >&6; }
11948              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11949$as_echo_n "checking Boot JDK version... " >&6; }
11950              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11951              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11952$as_echo "$BOOT_JDK_VERSION" >&6; }
11953            fi # end check jdk version
11954          fi # end check rt.jar
11955        fi # end check javac
11956      fi # end check java
11957    fi # end check boot jdk found
11958  fi
11959
11960
11961# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11962
11963  if test "x$BOOT_JDK_FOUND" = xno; then
11964    # Now execute the test
11965
11966    # Extract the first word of "javac", so it can be a program name with args.
11967set dummy javac; ac_word=$2
11968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11969$as_echo_n "checking for $ac_word... " >&6; }
11970if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11971  $as_echo_n "(cached) " >&6
11972else
11973  case $JAVAC_CHECK in
11974  [\\/]* | ?:[\\/]*)
11975  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11976  ;;
11977  *)
11978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11979for as_dir in $PATH
11980do
11981  IFS=$as_save_IFS
11982  test -z "$as_dir" && as_dir=.
11983    for ac_exec_ext in '' $ac_executable_extensions; do
11984  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11985    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11987    break 2
11988  fi
11989done
11990  done
11991IFS=$as_save_IFS
11992
11993  ;;
11994esac
11995fi
11996JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11997if test -n "$JAVAC_CHECK"; then
11998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11999$as_echo "$JAVAC_CHECK" >&6; }
12000else
12001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12002$as_echo "no" >&6; }
12003fi
12004
12005
12006    # Extract the first word of "java", so it can be a program name with args.
12007set dummy java; ac_word=$2
12008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12009$as_echo_n "checking for $ac_word... " >&6; }
12010if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12011  $as_echo_n "(cached) " >&6
12012else
12013  case $JAVA_CHECK in
12014  [\\/]* | ?:[\\/]*)
12015  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12016  ;;
12017  *)
12018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12019for as_dir in $PATH
12020do
12021  IFS=$as_save_IFS
12022  test -z "$as_dir" && as_dir=.
12023    for ac_exec_ext in '' $ac_executable_extensions; do
12024  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12025    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12027    break 2
12028  fi
12029done
12030  done
12031IFS=$as_save_IFS
12032
12033  ;;
12034esac
12035fi
12036JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12037if test -n "$JAVA_CHECK"; then
12038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12039$as_echo "$JAVA_CHECK" >&6; }
12040else
12041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12042$as_echo "no" >&6; }
12043fi
12044
12045
12046    BINARY="$JAVAC_CHECK"
12047    if test "x$JAVAC_CHECK" = x; then
12048        BINARY="$JAVA_CHECK"
12049    fi
12050    if test "x$BINARY" != x; then
12051        # So there is a java(c) binary, it might be part of a JDK.
12052        # Lets find the JDK/JRE directory by following symbolic links.
12053        # Linux/GNU systems often have links from /usr/bin/java to
12054        # /etc/alternatives/java to the real JDK binary.
12055
12056    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12057        # Follow a chain of symbolic links. Use readlink
12058        # where it exists, else fall back to horribly
12059        # complicated shell code.
12060        if test "x$READLINK_TESTED" != yes; then
12061            # On MacOSX there is a readlink tool with a different
12062            # purpose than the GNU readlink tool. Check the found readlink.
12063            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12064            if test "x$ISGNU" = x; then
12065                 # A readlink that we do not know how to use.
12066                 # Are there other non-GNU readlinks out there?
12067                 READLINK_TESTED=yes
12068                 READLINK=
12069            fi
12070        fi
12071
12072        if test "x$READLINK" != x; then
12073            BINARY=`$READLINK -f $BINARY`
12074        else
12075            # Save the current directory for restoring afterwards
12076            STARTDIR=$PWD
12077            COUNTER=0
12078            sym_link_dir=`$DIRNAME $BINARY`
12079            sym_link_file=`$BASENAME $BINARY`
12080            cd $sym_link_dir
12081            # Use -P flag to resolve symlinks in directories.
12082            cd `$THEPWDCMD -P`
12083            sym_link_dir=`$THEPWDCMD -P`
12084            # Resolve file symlinks
12085            while test $COUNTER -lt 20; do
12086                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12087                if test "x$ISLINK" == x; then
12088                    # This is not a symbolic link! We are done!
12089                    break
12090                fi
12091                # Again resolve directory symlinks since the target of the just found
12092                # link could be in a different directory
12093                cd `$DIRNAME $ISLINK`
12094                sym_link_dir=`$THEPWDCMD -P`
12095                sym_link_file=`$BASENAME $ISLINK`
12096                let COUNTER=COUNTER+1
12097            done
12098            cd $STARTDIR
12099            BINARY=$sym_link_dir/$sym_link_file
12100        fi
12101    fi
12102
12103        BOOT_JDK=`dirname "$BINARY"`
12104        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12105        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12106            # Looks like we found ourselves an JDK
12107            BOOT_JDK_FOUND=maybe
12108            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12109$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12110        fi
12111    fi
12112
12113
12114    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12115    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12116      # Do we have a bin/java?
12117      if test ! -x "$BOOT_JDK/bin/java"; then
12118        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12120        BOOT_JDK_FOUND=no
12121      else
12122        # Do we have a bin/javac?
12123        if test ! -x "$BOOT_JDK/bin/javac"; then
12124          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12126          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12127$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12128          BOOT_JDK_FOUND=no
12129        else
12130          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12131          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12132            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12133$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12134            BOOT_JDK_FOUND=no
12135          else
12136            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12137            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12138
12139            # Extra M4 quote needed to protect [] in grep expression.
12140            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12141            if test "x$FOUND_VERSION_78" = x; then
12142              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12143$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12144              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12145$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12146              BOOT_JDK_FOUND=no
12147            else
12148              # We're done! :-)
12149              BOOT_JDK_FOUND=yes
12150
12151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12152
12153  # Input might be given as Windows format, start by converting to
12154  # unix format.
12155  path="$BOOT_JDK"
12156  new_path=`$CYGPATH -u "$path"`
12157
12158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12161  # "foo.exe" is OK but "foo" is an error.
12162  #
12163  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12164  # It is also a way to make sure we got the proper file name for the real test later on.
12165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12166  if test "x$test_shortpath" = x; then
12167    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12168$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12169    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12170  fi
12171
12172  # Call helper function which possibly converts this using DOS-style short mode.
12173  # If so, the updated path is stored in $new_path.
12174
12175  input_path="$new_path"
12176  # Check if we need to convert this using DOS-style short mode. If the path
12177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12178  # take no chances and rewrite it.
12179  # Note: m4 eats our [], so we need to use [ and ] instead.
12180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12181  if test "x$has_forbidden_chars" != x; then
12182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12186      # Going to short mode and back again did indeed matter. Since short mode is
12187      # case insensitive, let's make it lowercase to improve readability.
12188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12189      # Now convert it back to Unix-stile (cygpath)
12190      input_path=`$CYGPATH -u "$shortmode_path"`
12191      new_path="$input_path"
12192    fi
12193  fi
12194
12195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12196  if test "x$test_cygdrive_prefix" = x; then
12197    # As a simple fix, exclude /usr/bin since it's not a real path.
12198    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12200      # a path prefixed by /cygdrive for fixpath to work.
12201      new_path="$CYGWIN_ROOT_PATH$input_path"
12202    fi
12203  fi
12204
12205
12206  if test "x$path" != "x$new_path"; then
12207    BOOT_JDK="$new_path"
12208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12209$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12210  fi
12211
12212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12213
12214  path="$BOOT_JDK"
12215  has_colon=`$ECHO $path | $GREP ^.:`
12216  new_path="$path"
12217  if test "x$has_colon" = x; then
12218    # Not in mixed or Windows style, start by that.
12219    new_path=`cmd //c echo $path`
12220  fi
12221
12222
12223  input_path="$new_path"
12224  # Check if we need to convert this using DOS-style short mode. If the path
12225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12226  # take no chances and rewrite it.
12227  # Note: m4 eats our [], so we need to use [ and ] instead.
12228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12229  if test "x$has_forbidden_chars" != x; then
12230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12232  fi
12233
12234
12235  windows_path="$new_path"
12236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12237    unix_path=`$CYGPATH -u "$windows_path"`
12238    new_path="$unix_path"
12239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12241    new_path="$unix_path"
12242  fi
12243
12244  if test "x$path" != "x$new_path"; then
12245    BOOT_JDK="$new_path"
12246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12247$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12248  fi
12249
12250  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12251  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12252
12253  else
12254    # We're on a posix platform. Hooray! :)
12255    path="$BOOT_JDK"
12256    has_space=`$ECHO "$path" | $GREP " "`
12257    if test "x$has_space" != x; then
12258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12259$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12260      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12261    fi
12262
12263    # Use eval to expand a potential ~
12264    eval path="$path"
12265    if test ! -f "$path" && test ! -d "$path"; then
12266      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12267    fi
12268
12269    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12270  fi
12271
12272              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12273$as_echo_n "checking for Boot JDK... " >&6; }
12274              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12275$as_echo "$BOOT_JDK" >&6; }
12276              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12277$as_echo_n "checking Boot JDK version... " >&6; }
12278              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12279              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12280$as_echo "$BOOT_JDK_VERSION" >&6; }
12281            fi # end check jdk version
12282          fi # end check rt.jar
12283        fi # end check javac
12284      fi # end check java
12285    fi # end check boot jdk found
12286  fi
12287
12288
12289# Test: Is there a JDK installed in default, well-known locations?
12290
12291  if test "x$BOOT_JDK_FOUND" = xno; then
12292    # Now execute the test
12293
12294  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12295
12296  if test "x$BOOT_JDK_FOUND" = xno; then
12297    # Now execute the test
12298
12299  if test "x$ProgramW6432" != x; then
12300    VIRTUAL_DIR="$ProgramW6432/Java"
12301
12302  windows_path="$VIRTUAL_DIR"
12303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12304    unix_path=`$CYGPATH -u "$windows_path"`
12305    VIRTUAL_DIR="$unix_path"
12306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12308    VIRTUAL_DIR="$unix_path"
12309  fi
12310
12311
12312  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12313  BOOT_JDK_SUFFIX=""
12314  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12315  if test "x$ALL_JDKS_FOUND" != x; then
12316    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12317
12318  if test "x$BOOT_JDK_FOUND" = xno; then
12319    # Now execute the test
12320
12321        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12322        if test -d "$BOOT_JDK"; then
12323          BOOT_JDK_FOUND=maybe
12324          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12325$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12326        fi
12327
12328
12329    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12330    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12331      # Do we have a bin/java?
12332      if test ! -x "$BOOT_JDK/bin/java"; then
12333        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12335        BOOT_JDK_FOUND=no
12336      else
12337        # Do we have a bin/javac?
12338        if test ! -x "$BOOT_JDK/bin/javac"; then
12339          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12341          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12342$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12343          BOOT_JDK_FOUND=no
12344        else
12345          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12346          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12347            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12348$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12349            BOOT_JDK_FOUND=no
12350          else
12351            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12352            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12353
12354            # Extra M4 quote needed to protect [] in grep expression.
12355            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12356            if test "x$FOUND_VERSION_78" = x; then
12357              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12358$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12359              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12360$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12361              BOOT_JDK_FOUND=no
12362            else
12363              # We're done! :-)
12364              BOOT_JDK_FOUND=yes
12365
12366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12367
12368  # Input might be given as Windows format, start by converting to
12369  # unix format.
12370  path="$BOOT_JDK"
12371  new_path=`$CYGPATH -u "$path"`
12372
12373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12376  # "foo.exe" is OK but "foo" is an error.
12377  #
12378  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12379  # It is also a way to make sure we got the proper file name for the real test later on.
12380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12381  if test "x$test_shortpath" = x; then
12382    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12383$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12384    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12385  fi
12386
12387  # Call helper function which possibly converts this using DOS-style short mode.
12388  # If so, the updated path is stored in $new_path.
12389
12390  input_path="$new_path"
12391  # Check if we need to convert this using DOS-style short mode. If the path
12392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12393  # take no chances and rewrite it.
12394  # Note: m4 eats our [], so we need to use [ and ] instead.
12395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12396  if test "x$has_forbidden_chars" != x; then
12397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12401      # Going to short mode and back again did indeed matter. Since short mode is
12402      # case insensitive, let's make it lowercase to improve readability.
12403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12404      # Now convert it back to Unix-stile (cygpath)
12405      input_path=`$CYGPATH -u "$shortmode_path"`
12406      new_path="$input_path"
12407    fi
12408  fi
12409
12410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12411  if test "x$test_cygdrive_prefix" = x; then
12412    # As a simple fix, exclude /usr/bin since it's not a real path.
12413    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12415      # a path prefixed by /cygdrive for fixpath to work.
12416      new_path="$CYGWIN_ROOT_PATH$input_path"
12417    fi
12418  fi
12419
12420
12421  if test "x$path" != "x$new_path"; then
12422    BOOT_JDK="$new_path"
12423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12424$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12425  fi
12426
12427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12428
12429  path="$BOOT_JDK"
12430  has_colon=`$ECHO $path | $GREP ^.:`
12431  new_path="$path"
12432  if test "x$has_colon" = x; then
12433    # Not in mixed or Windows style, start by that.
12434    new_path=`cmd //c echo $path`
12435  fi
12436
12437
12438  input_path="$new_path"
12439  # Check if we need to convert this using DOS-style short mode. If the path
12440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12441  # take no chances and rewrite it.
12442  # Note: m4 eats our [], so we need to use [ and ] instead.
12443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12444  if test "x$has_forbidden_chars" != x; then
12445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12447  fi
12448
12449
12450  windows_path="$new_path"
12451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12452    unix_path=`$CYGPATH -u "$windows_path"`
12453    new_path="$unix_path"
12454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12456    new_path="$unix_path"
12457  fi
12458
12459  if test "x$path" != "x$new_path"; then
12460    BOOT_JDK="$new_path"
12461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12462$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12463  fi
12464
12465  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12466  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12467
12468  else
12469    # We're on a posix platform. Hooray! :)
12470    path="$BOOT_JDK"
12471    has_space=`$ECHO "$path" | $GREP " "`
12472    if test "x$has_space" != x; then
12473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12474$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12475      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12476    fi
12477
12478    # Use eval to expand a potential ~
12479    eval path="$path"
12480    if test ! -f "$path" && test ! -d "$path"; then
12481      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12482    fi
12483
12484    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12485  fi
12486
12487              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12488$as_echo_n "checking for Boot JDK... " >&6; }
12489              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12490$as_echo "$BOOT_JDK" >&6; }
12491              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12492$as_echo_n "checking Boot JDK version... " >&6; }
12493              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12494              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12495$as_echo "$BOOT_JDK_VERSION" >&6; }
12496            fi # end check jdk version
12497          fi # end check rt.jar
12498        fi # end check javac
12499      fi # end check java
12500    fi # end check boot jdk found
12501  fi
12502
12503    done
12504  fi
12505
12506  fi
12507
12508
12509    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12510    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12511      # Do we have a bin/java?
12512      if test ! -x "$BOOT_JDK/bin/java"; then
12513        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12515        BOOT_JDK_FOUND=no
12516      else
12517        # Do we have a bin/javac?
12518        if test ! -x "$BOOT_JDK/bin/javac"; then
12519          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12521          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12522$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12523          BOOT_JDK_FOUND=no
12524        else
12525          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12526          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12527            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12529            BOOT_JDK_FOUND=no
12530          else
12531            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12532            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12533
12534            # Extra M4 quote needed to protect [] in grep expression.
12535            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12536            if test "x$FOUND_VERSION_78" = x; then
12537              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12538$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12539              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12540$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12541              BOOT_JDK_FOUND=no
12542            else
12543              # We're done! :-)
12544              BOOT_JDK_FOUND=yes
12545
12546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12547
12548  # Input might be given as Windows format, start by converting to
12549  # unix format.
12550  path="$BOOT_JDK"
12551  new_path=`$CYGPATH -u "$path"`
12552
12553  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12554  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12555  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12556  # "foo.exe" is OK but "foo" is an error.
12557  #
12558  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12559  # It is also a way to make sure we got the proper file name for the real test later on.
12560  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12561  if test "x$test_shortpath" = x; then
12562    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12563$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12564    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12565  fi
12566
12567  # Call helper function which possibly converts this using DOS-style short mode.
12568  # If so, the updated path is stored in $new_path.
12569
12570  input_path="$new_path"
12571  # Check if we need to convert this using DOS-style short mode. If the path
12572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12573  # take no chances and rewrite it.
12574  # Note: m4 eats our [], so we need to use [ and ] instead.
12575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12576  if test "x$has_forbidden_chars" != x; then
12577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12581      # Going to short mode and back again did indeed matter. Since short mode is
12582      # case insensitive, let's make it lowercase to improve readability.
12583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12584      # Now convert it back to Unix-stile (cygpath)
12585      input_path=`$CYGPATH -u "$shortmode_path"`
12586      new_path="$input_path"
12587    fi
12588  fi
12589
12590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12591  if test "x$test_cygdrive_prefix" = x; then
12592    # As a simple fix, exclude /usr/bin since it's not a real path.
12593    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12595      # a path prefixed by /cygdrive for fixpath to work.
12596      new_path="$CYGWIN_ROOT_PATH$input_path"
12597    fi
12598  fi
12599
12600
12601  if test "x$path" != "x$new_path"; then
12602    BOOT_JDK="$new_path"
12603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12604$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12605  fi
12606
12607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12608
12609  path="$BOOT_JDK"
12610  has_colon=`$ECHO $path | $GREP ^.:`
12611  new_path="$path"
12612  if test "x$has_colon" = x; then
12613    # Not in mixed or Windows style, start by that.
12614    new_path=`cmd //c echo $path`
12615  fi
12616
12617
12618  input_path="$new_path"
12619  # Check if we need to convert this using DOS-style short mode. If the path
12620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12621  # take no chances and rewrite it.
12622  # Note: m4 eats our [], so we need to use [ and ] instead.
12623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12624  if test "x$has_forbidden_chars" != x; then
12625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12627  fi
12628
12629
12630  windows_path="$new_path"
12631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12632    unix_path=`$CYGPATH -u "$windows_path"`
12633    new_path="$unix_path"
12634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12636    new_path="$unix_path"
12637  fi
12638
12639  if test "x$path" != "x$new_path"; then
12640    BOOT_JDK="$new_path"
12641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12642$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12643  fi
12644
12645  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12646  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12647
12648  else
12649    # We're on a posix platform. Hooray! :)
12650    path="$BOOT_JDK"
12651    has_space=`$ECHO "$path" | $GREP " "`
12652    if test "x$has_space" != x; then
12653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12654$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12655      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12656    fi
12657
12658    # Use eval to expand a potential ~
12659    eval path="$path"
12660    if test ! -f "$path" && test ! -d "$path"; then
12661      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12662    fi
12663
12664    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12665  fi
12666
12667              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12668$as_echo_n "checking for Boot JDK... " >&6; }
12669              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12670$as_echo "$BOOT_JDK" >&6; }
12671              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12672$as_echo_n "checking Boot JDK version... " >&6; }
12673              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12674              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12675$as_echo "$BOOT_JDK_VERSION" >&6; }
12676            fi # end check jdk version
12677          fi # end check rt.jar
12678        fi # end check javac
12679      fi # end check java
12680    fi # end check boot jdk found
12681  fi
12682
12683
12684  if test "x$BOOT_JDK_FOUND" = xno; then
12685    # Now execute the test
12686
12687  if test "x$PROGRAMW6432" != x; then
12688    VIRTUAL_DIR="$PROGRAMW6432/Java"
12689
12690  windows_path="$VIRTUAL_DIR"
12691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12692    unix_path=`$CYGPATH -u "$windows_path"`
12693    VIRTUAL_DIR="$unix_path"
12694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12696    VIRTUAL_DIR="$unix_path"
12697  fi
12698
12699
12700  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12701  BOOT_JDK_SUFFIX=""
12702  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12703  if test "x$ALL_JDKS_FOUND" != x; then
12704    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12705
12706  if test "x$BOOT_JDK_FOUND" = xno; then
12707    # Now execute the test
12708
12709        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12710        if test -d "$BOOT_JDK"; then
12711          BOOT_JDK_FOUND=maybe
12712          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12713$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12714        fi
12715
12716
12717    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12718    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12719      # Do we have a bin/java?
12720      if test ! -x "$BOOT_JDK/bin/java"; then
12721        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12723        BOOT_JDK_FOUND=no
12724      else
12725        # Do we have a bin/javac?
12726        if test ! -x "$BOOT_JDK/bin/javac"; then
12727          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12729          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12730$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12731          BOOT_JDK_FOUND=no
12732        else
12733          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12734          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12735            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12736$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12737            BOOT_JDK_FOUND=no
12738          else
12739            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12740            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12741
12742            # Extra M4 quote needed to protect [] in grep expression.
12743            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12744            if test "x$FOUND_VERSION_78" = x; then
12745              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12747              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12748$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12749              BOOT_JDK_FOUND=no
12750            else
12751              # We're done! :-)
12752              BOOT_JDK_FOUND=yes
12753
12754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12755
12756  # Input might be given as Windows format, start by converting to
12757  # unix format.
12758  path="$BOOT_JDK"
12759  new_path=`$CYGPATH -u "$path"`
12760
12761  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12762  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12763  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12764  # "foo.exe" is OK but "foo" is an error.
12765  #
12766  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12767  # It is also a way to make sure we got the proper file name for the real test later on.
12768  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12769  if test "x$test_shortpath" = x; then
12770    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12771$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12772    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12773  fi
12774
12775  # Call helper function which possibly converts this using DOS-style short mode.
12776  # If so, the updated path is stored in $new_path.
12777
12778  input_path="$new_path"
12779  # Check if we need to convert this using DOS-style short mode. If the path
12780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12781  # take no chances and rewrite it.
12782  # Note: m4 eats our [], so we need to use [ and ] instead.
12783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12784  if test "x$has_forbidden_chars" != x; then
12785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12789      # Going to short mode and back again did indeed matter. Since short mode is
12790      # case insensitive, let's make it lowercase to improve readability.
12791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12792      # Now convert it back to Unix-stile (cygpath)
12793      input_path=`$CYGPATH -u "$shortmode_path"`
12794      new_path="$input_path"
12795    fi
12796  fi
12797
12798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12799  if test "x$test_cygdrive_prefix" = x; then
12800    # As a simple fix, exclude /usr/bin since it's not a real path.
12801    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12803      # a path prefixed by /cygdrive for fixpath to work.
12804      new_path="$CYGWIN_ROOT_PATH$input_path"
12805    fi
12806  fi
12807
12808
12809  if test "x$path" != "x$new_path"; then
12810    BOOT_JDK="$new_path"
12811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12812$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12813  fi
12814
12815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12816
12817  path="$BOOT_JDK"
12818  has_colon=`$ECHO $path | $GREP ^.:`
12819  new_path="$path"
12820  if test "x$has_colon" = x; then
12821    # Not in mixed or Windows style, start by that.
12822    new_path=`cmd //c echo $path`
12823  fi
12824
12825
12826  input_path="$new_path"
12827  # Check if we need to convert this using DOS-style short mode. If the path
12828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12829  # take no chances and rewrite it.
12830  # Note: m4 eats our [], so we need to use [ and ] instead.
12831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12832  if test "x$has_forbidden_chars" != x; then
12833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12835  fi
12836
12837
12838  windows_path="$new_path"
12839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12840    unix_path=`$CYGPATH -u "$windows_path"`
12841    new_path="$unix_path"
12842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12844    new_path="$unix_path"
12845  fi
12846
12847  if test "x$path" != "x$new_path"; then
12848    BOOT_JDK="$new_path"
12849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12850$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12851  fi
12852
12853  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12854  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12855
12856  else
12857    # We're on a posix platform. Hooray! :)
12858    path="$BOOT_JDK"
12859    has_space=`$ECHO "$path" | $GREP " "`
12860    if test "x$has_space" != x; then
12861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12862$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12863      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12864    fi
12865
12866    # Use eval to expand a potential ~
12867    eval path="$path"
12868    if test ! -f "$path" && test ! -d "$path"; then
12869      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12870    fi
12871
12872    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12873  fi
12874
12875              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12876$as_echo_n "checking for Boot JDK... " >&6; }
12877              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12878$as_echo "$BOOT_JDK" >&6; }
12879              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12880$as_echo_n "checking Boot JDK version... " >&6; }
12881              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12882              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12883$as_echo "$BOOT_JDK_VERSION" >&6; }
12884            fi # end check jdk version
12885          fi # end check rt.jar
12886        fi # end check javac
12887      fi # end check java
12888    fi # end check boot jdk found
12889  fi
12890
12891    done
12892  fi
12893
12894  fi
12895
12896
12897    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12898    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12899      # Do we have a bin/java?
12900      if test ! -x "$BOOT_JDK/bin/java"; then
12901        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12903        BOOT_JDK_FOUND=no
12904      else
12905        # Do we have a bin/javac?
12906        if test ! -x "$BOOT_JDK/bin/javac"; then
12907          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12908$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12909          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12910$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12911          BOOT_JDK_FOUND=no
12912        else
12913          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12914          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12915            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12917            BOOT_JDK_FOUND=no
12918          else
12919            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12920            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12921
12922            # Extra M4 quote needed to protect [] in grep expression.
12923            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12924            if test "x$FOUND_VERSION_78" = x; then
12925              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12926$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12927              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12928$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12929              BOOT_JDK_FOUND=no
12930            else
12931              # We're done! :-)
12932              BOOT_JDK_FOUND=yes
12933
12934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12935
12936  # Input might be given as Windows format, start by converting to
12937  # unix format.
12938  path="$BOOT_JDK"
12939  new_path=`$CYGPATH -u "$path"`
12940
12941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12944  # "foo.exe" is OK but "foo" is an error.
12945  #
12946  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12947  # It is also a way to make sure we got the proper file name for the real test later on.
12948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12949  if test "x$test_shortpath" = x; then
12950    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12951$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12952    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12953  fi
12954
12955  # Call helper function which possibly converts this using DOS-style short mode.
12956  # If so, the updated path is stored in $new_path.
12957
12958  input_path="$new_path"
12959  # Check if we need to convert this using DOS-style short mode. If the path
12960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12961  # take no chances and rewrite it.
12962  # Note: m4 eats our [], so we need to use [ and ] instead.
12963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12964  if test "x$has_forbidden_chars" != x; then
12965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12966    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12967    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12968    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12969      # Going to short mode and back again did indeed matter. Since short mode is
12970      # case insensitive, let's make it lowercase to improve readability.
12971      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12972      # Now convert it back to Unix-stile (cygpath)
12973      input_path=`$CYGPATH -u "$shortmode_path"`
12974      new_path="$input_path"
12975    fi
12976  fi
12977
12978  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12979  if test "x$test_cygdrive_prefix" = x; then
12980    # As a simple fix, exclude /usr/bin since it's not a real path.
12981    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12982      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12983      # a path prefixed by /cygdrive for fixpath to work.
12984      new_path="$CYGWIN_ROOT_PATH$input_path"
12985    fi
12986  fi
12987
12988
12989  if test "x$path" != "x$new_path"; then
12990    BOOT_JDK="$new_path"
12991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12992$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12993  fi
12994
12995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12996
12997  path="$BOOT_JDK"
12998  has_colon=`$ECHO $path | $GREP ^.:`
12999  new_path="$path"
13000  if test "x$has_colon" = x; then
13001    # Not in mixed or Windows style, start by that.
13002    new_path=`cmd //c echo $path`
13003  fi
13004
13005
13006  input_path="$new_path"
13007  # Check if we need to convert this using DOS-style short mode. If the path
13008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13009  # take no chances and rewrite it.
13010  # Note: m4 eats our [], so we need to use [ and ] instead.
13011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13012  if test "x$has_forbidden_chars" != x; then
13013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13015  fi
13016
13017
13018  windows_path="$new_path"
13019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13020    unix_path=`$CYGPATH -u "$windows_path"`
13021    new_path="$unix_path"
13022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13024    new_path="$unix_path"
13025  fi
13026
13027  if test "x$path" != "x$new_path"; then
13028    BOOT_JDK="$new_path"
13029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13030$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13031  fi
13032
13033  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13034  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13035
13036  else
13037    # We're on a posix platform. Hooray! :)
13038    path="$BOOT_JDK"
13039    has_space=`$ECHO "$path" | $GREP " "`
13040    if test "x$has_space" != x; then
13041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13042$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13043      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13044    fi
13045
13046    # Use eval to expand a potential ~
13047    eval path="$path"
13048    if test ! -f "$path" && test ! -d "$path"; then
13049      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13050    fi
13051
13052    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13053  fi
13054
13055              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13056$as_echo_n "checking for Boot JDK... " >&6; }
13057              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13058$as_echo "$BOOT_JDK" >&6; }
13059              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13060$as_echo_n "checking Boot JDK version... " >&6; }
13061              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13062              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13063$as_echo "$BOOT_JDK_VERSION" >&6; }
13064            fi # end check jdk version
13065          fi # end check rt.jar
13066        fi # end check javac
13067      fi # end check java
13068    fi # end check boot jdk found
13069  fi
13070
13071
13072  if test "x$BOOT_JDK_FOUND" = xno; then
13073    # Now execute the test
13074
13075  if test "x$PROGRAMFILES" != x; then
13076    VIRTUAL_DIR="$PROGRAMFILES/Java"
13077
13078  windows_path="$VIRTUAL_DIR"
13079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13080    unix_path=`$CYGPATH -u "$windows_path"`
13081    VIRTUAL_DIR="$unix_path"
13082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13084    VIRTUAL_DIR="$unix_path"
13085  fi
13086
13087
13088  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13089  BOOT_JDK_SUFFIX=""
13090  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13091  if test "x$ALL_JDKS_FOUND" != x; then
13092    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13093
13094  if test "x$BOOT_JDK_FOUND" = xno; then
13095    # Now execute the test
13096
13097        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13098        if test -d "$BOOT_JDK"; then
13099          BOOT_JDK_FOUND=maybe
13100          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13101$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13102        fi
13103
13104
13105    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13106    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13107      # Do we have a bin/java?
13108      if test ! -x "$BOOT_JDK/bin/java"; then
13109        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13111        BOOT_JDK_FOUND=no
13112      else
13113        # Do we have a bin/javac?
13114        if test ! -x "$BOOT_JDK/bin/javac"; then
13115          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13116$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13117          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13118$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13119          BOOT_JDK_FOUND=no
13120        else
13121          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13122          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13123            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13124$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13125            BOOT_JDK_FOUND=no
13126          else
13127            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13128            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13129
13130            # Extra M4 quote needed to protect [] in grep expression.
13131            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13132            if test "x$FOUND_VERSION_78" = x; then
13133              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13135              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13136$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13137              BOOT_JDK_FOUND=no
13138            else
13139              # We're done! :-)
13140              BOOT_JDK_FOUND=yes
13141
13142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13143
13144  # Input might be given as Windows format, start by converting to
13145  # unix format.
13146  path="$BOOT_JDK"
13147  new_path=`$CYGPATH -u "$path"`
13148
13149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13152  # "foo.exe" is OK but "foo" is an error.
13153  #
13154  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13155  # It is also a way to make sure we got the proper file name for the real test later on.
13156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13157  if test "x$test_shortpath" = x; then
13158    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13159$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13160    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13161  fi
13162
13163  # Call helper function which possibly converts this using DOS-style short mode.
13164  # If so, the updated path is stored in $new_path.
13165
13166  input_path="$new_path"
13167  # Check if we need to convert this using DOS-style short mode. If the path
13168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13169  # take no chances and rewrite it.
13170  # Note: m4 eats our [], so we need to use [ and ] instead.
13171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13172  if test "x$has_forbidden_chars" != x; then
13173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13174    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13175    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13176    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13177      # Going to short mode and back again did indeed matter. Since short mode is
13178      # case insensitive, let's make it lowercase to improve readability.
13179      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13180      # Now convert it back to Unix-stile (cygpath)
13181      input_path=`$CYGPATH -u "$shortmode_path"`
13182      new_path="$input_path"
13183    fi
13184  fi
13185
13186  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13187  if test "x$test_cygdrive_prefix" = x; then
13188    # As a simple fix, exclude /usr/bin since it's not a real path.
13189    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13190      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13191      # a path prefixed by /cygdrive for fixpath to work.
13192      new_path="$CYGWIN_ROOT_PATH$input_path"
13193    fi
13194  fi
13195
13196
13197  if test "x$path" != "x$new_path"; then
13198    BOOT_JDK="$new_path"
13199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13200$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13201  fi
13202
13203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13204
13205  path="$BOOT_JDK"
13206  has_colon=`$ECHO $path | $GREP ^.:`
13207  new_path="$path"
13208  if test "x$has_colon" = x; then
13209    # Not in mixed or Windows style, start by that.
13210    new_path=`cmd //c echo $path`
13211  fi
13212
13213
13214  input_path="$new_path"
13215  # Check if we need to convert this using DOS-style short mode. If the path
13216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13217  # take no chances and rewrite it.
13218  # Note: m4 eats our [], so we need to use [ and ] instead.
13219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13220  if test "x$has_forbidden_chars" != x; then
13221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13223  fi
13224
13225
13226  windows_path="$new_path"
13227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13228    unix_path=`$CYGPATH -u "$windows_path"`
13229    new_path="$unix_path"
13230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13232    new_path="$unix_path"
13233  fi
13234
13235  if test "x$path" != "x$new_path"; then
13236    BOOT_JDK="$new_path"
13237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13238$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13239  fi
13240
13241  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13242  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13243
13244  else
13245    # We're on a posix platform. Hooray! :)
13246    path="$BOOT_JDK"
13247    has_space=`$ECHO "$path" | $GREP " "`
13248    if test "x$has_space" != x; then
13249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13250$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13251      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13252    fi
13253
13254    # Use eval to expand a potential ~
13255    eval path="$path"
13256    if test ! -f "$path" && test ! -d "$path"; then
13257      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13258    fi
13259
13260    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13261  fi
13262
13263              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13264$as_echo_n "checking for Boot JDK... " >&6; }
13265              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13266$as_echo "$BOOT_JDK" >&6; }
13267              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13268$as_echo_n "checking Boot JDK version... " >&6; }
13269              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13270              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13271$as_echo "$BOOT_JDK_VERSION" >&6; }
13272            fi # end check jdk version
13273          fi # end check rt.jar
13274        fi # end check javac
13275      fi # end check java
13276    fi # end check boot jdk found
13277  fi
13278
13279    done
13280  fi
13281
13282  fi
13283
13284
13285    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13286    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13287      # Do we have a bin/java?
13288      if test ! -x "$BOOT_JDK/bin/java"; then
13289        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13290$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13291        BOOT_JDK_FOUND=no
13292      else
13293        # Do we have a bin/javac?
13294        if test ! -x "$BOOT_JDK/bin/javac"; then
13295          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13297          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13298$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13299          BOOT_JDK_FOUND=no
13300        else
13301          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13302          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13303            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13304$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13305            BOOT_JDK_FOUND=no
13306          else
13307            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13308            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13309
13310            # Extra M4 quote needed to protect [] in grep expression.
13311            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13312            if test "x$FOUND_VERSION_78" = x; then
13313              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13315              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13316$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13317              BOOT_JDK_FOUND=no
13318            else
13319              # We're done! :-)
13320              BOOT_JDK_FOUND=yes
13321
13322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13323
13324  # Input might be given as Windows format, start by converting to
13325  # unix format.
13326  path="$BOOT_JDK"
13327  new_path=`$CYGPATH -u "$path"`
13328
13329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13332  # "foo.exe" is OK but "foo" is an error.
13333  #
13334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13335  # It is also a way to make sure we got the proper file name for the real test later on.
13336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13337  if test "x$test_shortpath" = x; then
13338    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13339$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13340    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13341  fi
13342
13343  # Call helper function which possibly converts this using DOS-style short mode.
13344  # If so, the updated path is stored in $new_path.
13345
13346  input_path="$new_path"
13347  # Check if we need to convert this using DOS-style short mode. If the path
13348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13349  # take no chances and rewrite it.
13350  # Note: m4 eats our [], so we need to use [ and ] instead.
13351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13352  if test "x$has_forbidden_chars" != x; then
13353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13357      # Going to short mode and back again did indeed matter. Since short mode is
13358      # case insensitive, let's make it lowercase to improve readability.
13359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13360      # Now convert it back to Unix-stile (cygpath)
13361      input_path=`$CYGPATH -u "$shortmode_path"`
13362      new_path="$input_path"
13363    fi
13364  fi
13365
13366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13367  if test "x$test_cygdrive_prefix" = x; then
13368    # As a simple fix, exclude /usr/bin since it's not a real path.
13369    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13371      # a path prefixed by /cygdrive for fixpath to work.
13372      new_path="$CYGWIN_ROOT_PATH$input_path"
13373    fi
13374  fi
13375
13376
13377  if test "x$path" != "x$new_path"; then
13378    BOOT_JDK="$new_path"
13379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13380$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13381  fi
13382
13383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13384
13385  path="$BOOT_JDK"
13386  has_colon=`$ECHO $path | $GREP ^.:`
13387  new_path="$path"
13388  if test "x$has_colon" = x; then
13389    # Not in mixed or Windows style, start by that.
13390    new_path=`cmd //c echo $path`
13391  fi
13392
13393
13394  input_path="$new_path"
13395  # Check if we need to convert this using DOS-style short mode. If the path
13396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13397  # take no chances and rewrite it.
13398  # Note: m4 eats our [], so we need to use [ and ] instead.
13399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13400  if test "x$has_forbidden_chars" != x; then
13401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13403  fi
13404
13405
13406  windows_path="$new_path"
13407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13408    unix_path=`$CYGPATH -u "$windows_path"`
13409    new_path="$unix_path"
13410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13412    new_path="$unix_path"
13413  fi
13414
13415  if test "x$path" != "x$new_path"; then
13416    BOOT_JDK="$new_path"
13417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13418$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13419  fi
13420
13421  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13422  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13423
13424  else
13425    # We're on a posix platform. Hooray! :)
13426    path="$BOOT_JDK"
13427    has_space=`$ECHO "$path" | $GREP " "`
13428    if test "x$has_space" != x; then
13429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13430$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13431      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13432    fi
13433
13434    # Use eval to expand a potential ~
13435    eval path="$path"
13436    if test ! -f "$path" && test ! -d "$path"; then
13437      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13438    fi
13439
13440    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13441  fi
13442
13443              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13444$as_echo_n "checking for Boot JDK... " >&6; }
13445              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13446$as_echo "$BOOT_JDK" >&6; }
13447              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13448$as_echo_n "checking Boot JDK version... " >&6; }
13449              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13450              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13451$as_echo "$BOOT_JDK_VERSION" >&6; }
13452            fi # end check jdk version
13453          fi # end check rt.jar
13454        fi # end check javac
13455      fi # end check java
13456    fi # end check boot jdk found
13457  fi
13458
13459
13460  if test "x$BOOT_JDK_FOUND" = xno; then
13461    # Now execute the test
13462
13463  if test "x$ProgramFiles" != x; then
13464    VIRTUAL_DIR="$ProgramFiles/Java"
13465
13466  windows_path="$VIRTUAL_DIR"
13467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13468    unix_path=`$CYGPATH -u "$windows_path"`
13469    VIRTUAL_DIR="$unix_path"
13470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13472    VIRTUAL_DIR="$unix_path"
13473  fi
13474
13475
13476  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13477  BOOT_JDK_SUFFIX=""
13478  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13479  if test "x$ALL_JDKS_FOUND" != x; then
13480    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13481
13482  if test "x$BOOT_JDK_FOUND" = xno; then
13483    # Now execute the test
13484
13485        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13486        if test -d "$BOOT_JDK"; then
13487          BOOT_JDK_FOUND=maybe
13488          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13489$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13490        fi
13491
13492
13493    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13494    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13495      # Do we have a bin/java?
13496      if test ! -x "$BOOT_JDK/bin/java"; then
13497        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13499        BOOT_JDK_FOUND=no
13500      else
13501        # Do we have a bin/javac?
13502        if test ! -x "$BOOT_JDK/bin/javac"; then
13503          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13505          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13506$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13507          BOOT_JDK_FOUND=no
13508        else
13509          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13510          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13511            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13513            BOOT_JDK_FOUND=no
13514          else
13515            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13516            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13517
13518            # Extra M4 quote needed to protect [] in grep expression.
13519            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13520            if test "x$FOUND_VERSION_78" = x; then
13521              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13523              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13524$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13525              BOOT_JDK_FOUND=no
13526            else
13527              # We're done! :-)
13528              BOOT_JDK_FOUND=yes
13529
13530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13531
13532  # Input might be given as Windows format, start by converting to
13533  # unix format.
13534  path="$BOOT_JDK"
13535  new_path=`$CYGPATH -u "$path"`
13536
13537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13540  # "foo.exe" is OK but "foo" is an error.
13541  #
13542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13543  # It is also a way to make sure we got the proper file name for the real test later on.
13544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13545  if test "x$test_shortpath" = x; then
13546    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13548    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13549  fi
13550
13551  # Call helper function which possibly converts this using DOS-style short mode.
13552  # If so, the updated path is stored in $new_path.
13553
13554  input_path="$new_path"
13555  # Check if we need to convert this using DOS-style short mode. If the path
13556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13557  # take no chances and rewrite it.
13558  # Note: m4 eats our [], so we need to use [ and ] instead.
13559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13560  if test "x$has_forbidden_chars" != x; then
13561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13565      # Going to short mode and back again did indeed matter. Since short mode is
13566      # case insensitive, let's make it lowercase to improve readability.
13567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13568      # Now convert it back to Unix-stile (cygpath)
13569      input_path=`$CYGPATH -u "$shortmode_path"`
13570      new_path="$input_path"
13571    fi
13572  fi
13573
13574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13575  if test "x$test_cygdrive_prefix" = x; then
13576    # As a simple fix, exclude /usr/bin since it's not a real path.
13577    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13579      # a path prefixed by /cygdrive for fixpath to work.
13580      new_path="$CYGWIN_ROOT_PATH$input_path"
13581    fi
13582  fi
13583
13584
13585  if test "x$path" != "x$new_path"; then
13586    BOOT_JDK="$new_path"
13587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13588$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13589  fi
13590
13591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13592
13593  path="$BOOT_JDK"
13594  has_colon=`$ECHO $path | $GREP ^.:`
13595  new_path="$path"
13596  if test "x$has_colon" = x; then
13597    # Not in mixed or Windows style, start by that.
13598    new_path=`cmd //c echo $path`
13599  fi
13600
13601
13602  input_path="$new_path"
13603  # Check if we need to convert this using DOS-style short mode. If the path
13604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13605  # take no chances and rewrite it.
13606  # Note: m4 eats our [], so we need to use [ and ] instead.
13607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13608  if test "x$has_forbidden_chars" != x; then
13609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13611  fi
13612
13613
13614  windows_path="$new_path"
13615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13616    unix_path=`$CYGPATH -u "$windows_path"`
13617    new_path="$unix_path"
13618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13620    new_path="$unix_path"
13621  fi
13622
13623  if test "x$path" != "x$new_path"; then
13624    BOOT_JDK="$new_path"
13625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13626$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13627  fi
13628
13629  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13630  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13631
13632  else
13633    # We're on a posix platform. Hooray! :)
13634    path="$BOOT_JDK"
13635    has_space=`$ECHO "$path" | $GREP " "`
13636    if test "x$has_space" != x; then
13637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13638$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13639      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13640    fi
13641
13642    # Use eval to expand a potential ~
13643    eval path="$path"
13644    if test ! -f "$path" && test ! -d "$path"; then
13645      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13646    fi
13647
13648    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13649  fi
13650
13651              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13652$as_echo_n "checking for Boot JDK... " >&6; }
13653              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13654$as_echo "$BOOT_JDK" >&6; }
13655              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13656$as_echo_n "checking Boot JDK version... " >&6; }
13657              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13658              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13659$as_echo "$BOOT_JDK_VERSION" >&6; }
13660            fi # end check jdk version
13661          fi # end check rt.jar
13662        fi # end check javac
13663      fi # end check java
13664    fi # end check boot jdk found
13665  fi
13666
13667    done
13668  fi
13669
13670  fi
13671
13672
13673    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13674    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13675      # Do we have a bin/java?
13676      if test ! -x "$BOOT_JDK/bin/java"; then
13677        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13678$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13679        BOOT_JDK_FOUND=no
13680      else
13681        # Do we have a bin/javac?
13682        if test ! -x "$BOOT_JDK/bin/javac"; then
13683          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13684$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13685          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13686$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13687          BOOT_JDK_FOUND=no
13688        else
13689          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13690          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13691            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13693            BOOT_JDK_FOUND=no
13694          else
13695            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13696            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13697
13698            # Extra M4 quote needed to protect [] in grep expression.
13699            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13700            if test "x$FOUND_VERSION_78" = x; then
13701              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13702$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13703              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13704$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13705              BOOT_JDK_FOUND=no
13706            else
13707              # We're done! :-)
13708              BOOT_JDK_FOUND=yes
13709
13710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13711
13712  # Input might be given as Windows format, start by converting to
13713  # unix format.
13714  path="$BOOT_JDK"
13715  new_path=`$CYGPATH -u "$path"`
13716
13717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13720  # "foo.exe" is OK but "foo" is an error.
13721  #
13722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13723  # It is also a way to make sure we got the proper file name for the real test later on.
13724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13725  if test "x$test_shortpath" = x; then
13726    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13727$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13728    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13729  fi
13730
13731  # Call helper function which possibly converts this using DOS-style short mode.
13732  # If so, the updated path is stored in $new_path.
13733
13734  input_path="$new_path"
13735  # Check if we need to convert this using DOS-style short mode. If the path
13736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13737  # take no chances and rewrite it.
13738  # Note: m4 eats our [], so we need to use [ and ] instead.
13739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13740  if test "x$has_forbidden_chars" != x; then
13741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13745      # Going to short mode and back again did indeed matter. Since short mode is
13746      # case insensitive, let's make it lowercase to improve readability.
13747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13748      # Now convert it back to Unix-stile (cygpath)
13749      input_path=`$CYGPATH -u "$shortmode_path"`
13750      new_path="$input_path"
13751    fi
13752  fi
13753
13754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13755  if test "x$test_cygdrive_prefix" = x; then
13756    # As a simple fix, exclude /usr/bin since it's not a real path.
13757    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13759      # a path prefixed by /cygdrive for fixpath to work.
13760      new_path="$CYGWIN_ROOT_PATH$input_path"
13761    fi
13762  fi
13763
13764
13765  if test "x$path" != "x$new_path"; then
13766    BOOT_JDK="$new_path"
13767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13768$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13769  fi
13770
13771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13772
13773  path="$BOOT_JDK"
13774  has_colon=`$ECHO $path | $GREP ^.:`
13775  new_path="$path"
13776  if test "x$has_colon" = x; then
13777    # Not in mixed or Windows style, start by that.
13778    new_path=`cmd //c echo $path`
13779  fi
13780
13781
13782  input_path="$new_path"
13783  # Check if we need to convert this using DOS-style short mode. If the path
13784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13785  # take no chances and rewrite it.
13786  # Note: m4 eats our [], so we need to use [ and ] instead.
13787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13788  if test "x$has_forbidden_chars" != x; then
13789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13791  fi
13792
13793
13794  windows_path="$new_path"
13795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13796    unix_path=`$CYGPATH -u "$windows_path"`
13797    new_path="$unix_path"
13798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13800    new_path="$unix_path"
13801  fi
13802
13803  if test "x$path" != "x$new_path"; then
13804    BOOT_JDK="$new_path"
13805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13806$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13807  fi
13808
13809  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13810  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13811
13812  else
13813    # We're on a posix platform. Hooray! :)
13814    path="$BOOT_JDK"
13815    has_space=`$ECHO "$path" | $GREP " "`
13816    if test "x$has_space" != x; then
13817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13818$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13819      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13820    fi
13821
13822    # Use eval to expand a potential ~
13823    eval path="$path"
13824    if test ! -f "$path" && test ! -d "$path"; then
13825      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13826    fi
13827
13828    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13829  fi
13830
13831              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13832$as_echo_n "checking for Boot JDK... " >&6; }
13833              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13834$as_echo "$BOOT_JDK" >&6; }
13835              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13836$as_echo_n "checking Boot JDK version... " >&6; }
13837              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13838              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13839$as_echo "$BOOT_JDK_VERSION" >&6; }
13840            fi # end check jdk version
13841          fi # end check rt.jar
13842        fi # end check javac
13843      fi # end check java
13844    fi # end check boot jdk found
13845  fi
13846
13847
13848  if test "x$BOOT_JDK_FOUND" = xno; then
13849    # Now execute the test
13850
13851  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13852  BOOT_JDK_SUFFIX=""
13853  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13854  if test "x$ALL_JDKS_FOUND" != x; then
13855    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13856
13857  if test "x$BOOT_JDK_FOUND" = xno; then
13858    # Now execute the test
13859
13860        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13861        if test -d "$BOOT_JDK"; then
13862          BOOT_JDK_FOUND=maybe
13863          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13864$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13865        fi
13866
13867
13868    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13869    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13870      # Do we have a bin/java?
13871      if test ! -x "$BOOT_JDK/bin/java"; then
13872        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13874        BOOT_JDK_FOUND=no
13875      else
13876        # Do we have a bin/javac?
13877        if test ! -x "$BOOT_JDK/bin/javac"; then
13878          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13880          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13881$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13882          BOOT_JDK_FOUND=no
13883        else
13884          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13885          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13886            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13887$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13888            BOOT_JDK_FOUND=no
13889          else
13890            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13891            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13892
13893            # Extra M4 quote needed to protect [] in grep expression.
13894            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13895            if test "x$FOUND_VERSION_78" = x; then
13896              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13898              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13899$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13900              BOOT_JDK_FOUND=no
13901            else
13902              # We're done! :-)
13903              BOOT_JDK_FOUND=yes
13904
13905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13906
13907  # Input might be given as Windows format, start by converting to
13908  # unix format.
13909  path="$BOOT_JDK"
13910  new_path=`$CYGPATH -u "$path"`
13911
13912  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13913  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13914  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13915  # "foo.exe" is OK but "foo" is an error.
13916  #
13917  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13918  # It is also a way to make sure we got the proper file name for the real test later on.
13919  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13920  if test "x$test_shortpath" = x; then
13921    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13922$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13923    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13924  fi
13925
13926  # Call helper function which possibly converts this using DOS-style short mode.
13927  # If so, the updated path is stored in $new_path.
13928
13929  input_path="$new_path"
13930  # Check if we need to convert this using DOS-style short mode. If the path
13931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13932  # take no chances and rewrite it.
13933  # Note: m4 eats our [], so we need to use [ and ] instead.
13934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13935  if test "x$has_forbidden_chars" != x; then
13936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13940      # Going to short mode and back again did indeed matter. Since short mode is
13941      # case insensitive, let's make it lowercase to improve readability.
13942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13943      # Now convert it back to Unix-stile (cygpath)
13944      input_path=`$CYGPATH -u "$shortmode_path"`
13945      new_path="$input_path"
13946    fi
13947  fi
13948
13949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13950  if test "x$test_cygdrive_prefix" = x; then
13951    # As a simple fix, exclude /usr/bin since it's not a real path.
13952    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13954      # a path prefixed by /cygdrive for fixpath to work.
13955      new_path="$CYGWIN_ROOT_PATH$input_path"
13956    fi
13957  fi
13958
13959
13960  if test "x$path" != "x$new_path"; then
13961    BOOT_JDK="$new_path"
13962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13963$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13964  fi
13965
13966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13967
13968  path="$BOOT_JDK"
13969  has_colon=`$ECHO $path | $GREP ^.:`
13970  new_path="$path"
13971  if test "x$has_colon" = x; then
13972    # Not in mixed or Windows style, start by that.
13973    new_path=`cmd //c echo $path`
13974  fi
13975
13976
13977  input_path="$new_path"
13978  # Check if we need to convert this using DOS-style short mode. If the path
13979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13980  # take no chances and rewrite it.
13981  # Note: m4 eats our [], so we need to use [ and ] instead.
13982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13983  if test "x$has_forbidden_chars" != x; then
13984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13986  fi
13987
13988
13989  windows_path="$new_path"
13990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13991    unix_path=`$CYGPATH -u "$windows_path"`
13992    new_path="$unix_path"
13993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13995    new_path="$unix_path"
13996  fi
13997
13998  if test "x$path" != "x$new_path"; then
13999    BOOT_JDK="$new_path"
14000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14001$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14002  fi
14003
14004  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14005  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14006
14007  else
14008    # We're on a posix platform. Hooray! :)
14009    path="$BOOT_JDK"
14010    has_space=`$ECHO "$path" | $GREP " "`
14011    if test "x$has_space" != x; then
14012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14013$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14014      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14015    fi
14016
14017    # Use eval to expand a potential ~
14018    eval path="$path"
14019    if test ! -f "$path" && test ! -d "$path"; then
14020      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14021    fi
14022
14023    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14024  fi
14025
14026              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14027$as_echo_n "checking for Boot JDK... " >&6; }
14028              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14029$as_echo "$BOOT_JDK" >&6; }
14030              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14031$as_echo_n "checking Boot JDK version... " >&6; }
14032              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14033              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14034$as_echo "$BOOT_JDK_VERSION" >&6; }
14035            fi # end check jdk version
14036          fi # end check rt.jar
14037        fi # end check javac
14038      fi # end check java
14039    fi # end check boot jdk found
14040  fi
14041
14042    done
14043  fi
14044
14045
14046    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14047    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14048      # Do we have a bin/java?
14049      if test ! -x "$BOOT_JDK/bin/java"; then
14050        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14051$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14052        BOOT_JDK_FOUND=no
14053      else
14054        # Do we have a bin/javac?
14055        if test ! -x "$BOOT_JDK/bin/javac"; then
14056          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14058          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14059$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14060          BOOT_JDK_FOUND=no
14061        else
14062          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14063          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14064            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14066            BOOT_JDK_FOUND=no
14067          else
14068            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14069            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14070
14071            # Extra M4 quote needed to protect [] in grep expression.
14072            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14073            if test "x$FOUND_VERSION_78" = x; then
14074              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14075$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14076              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14077$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14078              BOOT_JDK_FOUND=no
14079            else
14080              # We're done! :-)
14081              BOOT_JDK_FOUND=yes
14082
14083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14084
14085  # Input might be given as Windows format, start by converting to
14086  # unix format.
14087  path="$BOOT_JDK"
14088  new_path=`$CYGPATH -u "$path"`
14089
14090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14093  # "foo.exe" is OK but "foo" is an error.
14094  #
14095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14096  # It is also a way to make sure we got the proper file name for the real test later on.
14097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14098  if test "x$test_shortpath" = x; then
14099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14100$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14101    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14102  fi
14103
14104  # Call helper function which possibly converts this using DOS-style short mode.
14105  # If so, the updated path is stored in $new_path.
14106
14107  input_path="$new_path"
14108  # Check if we need to convert this using DOS-style short mode. If the path
14109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14110  # take no chances and rewrite it.
14111  # Note: m4 eats our [], so we need to use [ and ] instead.
14112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14113  if test "x$has_forbidden_chars" != x; then
14114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14118      # Going to short mode and back again did indeed matter. Since short mode is
14119      # case insensitive, let's make it lowercase to improve readability.
14120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14121      # Now convert it back to Unix-stile (cygpath)
14122      input_path=`$CYGPATH -u "$shortmode_path"`
14123      new_path="$input_path"
14124    fi
14125  fi
14126
14127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14128  if test "x$test_cygdrive_prefix" = x; then
14129    # As a simple fix, exclude /usr/bin since it's not a real path.
14130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14132      # a path prefixed by /cygdrive for fixpath to work.
14133      new_path="$CYGWIN_ROOT_PATH$input_path"
14134    fi
14135  fi
14136
14137
14138  if test "x$path" != "x$new_path"; then
14139    BOOT_JDK="$new_path"
14140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14142  fi
14143
14144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14145
14146  path="$BOOT_JDK"
14147  has_colon=`$ECHO $path | $GREP ^.:`
14148  new_path="$path"
14149  if test "x$has_colon" = x; then
14150    # Not in mixed or Windows style, start by that.
14151    new_path=`cmd //c echo $path`
14152  fi
14153
14154
14155  input_path="$new_path"
14156  # Check if we need to convert this using DOS-style short mode. If the path
14157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14158  # take no chances and rewrite it.
14159  # Note: m4 eats our [], so we need to use [ and ] instead.
14160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14161  if test "x$has_forbidden_chars" != x; then
14162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14164  fi
14165
14166
14167  windows_path="$new_path"
14168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14169    unix_path=`$CYGPATH -u "$windows_path"`
14170    new_path="$unix_path"
14171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14173    new_path="$unix_path"
14174  fi
14175
14176  if test "x$path" != "x$new_path"; then
14177    BOOT_JDK="$new_path"
14178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14179$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14180  fi
14181
14182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14184
14185  else
14186    # We're on a posix platform. Hooray! :)
14187    path="$BOOT_JDK"
14188    has_space=`$ECHO "$path" | $GREP " "`
14189    if test "x$has_space" != x; then
14190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14191$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14192      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14193    fi
14194
14195    # Use eval to expand a potential ~
14196    eval path="$path"
14197    if test ! -f "$path" && test ! -d "$path"; then
14198      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14199    fi
14200
14201    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14202  fi
14203
14204              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14205$as_echo_n "checking for Boot JDK... " >&6; }
14206              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14207$as_echo "$BOOT_JDK" >&6; }
14208              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14209$as_echo_n "checking Boot JDK version... " >&6; }
14210              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14211              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14212$as_echo "$BOOT_JDK_VERSION" >&6; }
14213            fi # end check jdk version
14214          fi # end check rt.jar
14215        fi # end check javac
14216      fi # end check java
14217    fi # end check boot jdk found
14218  fi
14219
14220  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14221
14222  if test "x$BOOT_JDK_FOUND" = xno; then
14223    # Now execute the test
14224
14225  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14226  BOOT_JDK_SUFFIX="/Contents/Home"
14227  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14228  if test "x$ALL_JDKS_FOUND" != x; then
14229    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14230
14231  if test "x$BOOT_JDK_FOUND" = xno; then
14232    # Now execute the test
14233
14234        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14235        if test -d "$BOOT_JDK"; then
14236          BOOT_JDK_FOUND=maybe
14237          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14238$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14239        fi
14240
14241
14242    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14243    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14244      # Do we have a bin/java?
14245      if test ! -x "$BOOT_JDK/bin/java"; then
14246        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14248        BOOT_JDK_FOUND=no
14249      else
14250        # Do we have a bin/javac?
14251        if test ! -x "$BOOT_JDK/bin/javac"; then
14252          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14253$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14254          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14255$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14256          BOOT_JDK_FOUND=no
14257        else
14258          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14259          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14260            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14262            BOOT_JDK_FOUND=no
14263          else
14264            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14265            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14266
14267            # Extra M4 quote needed to protect [] in grep expression.
14268            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14269            if test "x$FOUND_VERSION_78" = x; then
14270              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14272              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14273$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14274              BOOT_JDK_FOUND=no
14275            else
14276              # We're done! :-)
14277              BOOT_JDK_FOUND=yes
14278
14279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14280
14281  # Input might be given as Windows format, start by converting to
14282  # unix format.
14283  path="$BOOT_JDK"
14284  new_path=`$CYGPATH -u "$path"`
14285
14286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14289  # "foo.exe" is OK but "foo" is an error.
14290  #
14291  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14292  # It is also a way to make sure we got the proper file name for the real test later on.
14293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14294  if test "x$test_shortpath" = x; then
14295    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14296$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14297    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14298  fi
14299
14300  # Call helper function which possibly converts this using DOS-style short mode.
14301  # If so, the updated path is stored in $new_path.
14302
14303  input_path="$new_path"
14304  # Check if we need to convert this using DOS-style short mode. If the path
14305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14306  # take no chances and rewrite it.
14307  # Note: m4 eats our [], so we need to use [ and ] instead.
14308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14309  if test "x$has_forbidden_chars" != x; then
14310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14314      # Going to short mode and back again did indeed matter. Since short mode is
14315      # case insensitive, let's make it lowercase to improve readability.
14316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14317      # Now convert it back to Unix-stile (cygpath)
14318      input_path=`$CYGPATH -u "$shortmode_path"`
14319      new_path="$input_path"
14320    fi
14321  fi
14322
14323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14324  if test "x$test_cygdrive_prefix" = x; then
14325    # As a simple fix, exclude /usr/bin since it's not a real path.
14326    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14328      # a path prefixed by /cygdrive for fixpath to work.
14329      new_path="$CYGWIN_ROOT_PATH$input_path"
14330    fi
14331  fi
14332
14333
14334  if test "x$path" != "x$new_path"; then
14335    BOOT_JDK="$new_path"
14336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14337$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14338  fi
14339
14340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14341
14342  path="$BOOT_JDK"
14343  has_colon=`$ECHO $path | $GREP ^.:`
14344  new_path="$path"
14345  if test "x$has_colon" = x; then
14346    # Not in mixed or Windows style, start by that.
14347    new_path=`cmd //c echo $path`
14348  fi
14349
14350
14351  input_path="$new_path"
14352  # Check if we need to convert this using DOS-style short mode. If the path
14353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14354  # take no chances and rewrite it.
14355  # Note: m4 eats our [], so we need to use [ and ] instead.
14356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14357  if test "x$has_forbidden_chars" != x; then
14358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14360  fi
14361
14362
14363  windows_path="$new_path"
14364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14365    unix_path=`$CYGPATH -u "$windows_path"`
14366    new_path="$unix_path"
14367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14369    new_path="$unix_path"
14370  fi
14371
14372  if test "x$path" != "x$new_path"; then
14373    BOOT_JDK="$new_path"
14374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14375$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14376  fi
14377
14378  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14379  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14380
14381  else
14382    # We're on a posix platform. Hooray! :)
14383    path="$BOOT_JDK"
14384    has_space=`$ECHO "$path" | $GREP " "`
14385    if test "x$has_space" != x; then
14386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14387$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14388      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14389    fi
14390
14391    # Use eval to expand a potential ~
14392    eval path="$path"
14393    if test ! -f "$path" && test ! -d "$path"; then
14394      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14395    fi
14396
14397    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14398  fi
14399
14400              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14401$as_echo_n "checking for Boot JDK... " >&6; }
14402              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14403$as_echo "$BOOT_JDK" >&6; }
14404              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14405$as_echo_n "checking Boot JDK version... " >&6; }
14406              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14407              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14408$as_echo "$BOOT_JDK_VERSION" >&6; }
14409            fi # end check jdk version
14410          fi # end check rt.jar
14411        fi # end check javac
14412      fi # end check java
14413    fi # end check boot jdk found
14414  fi
14415
14416    done
14417  fi
14418
14419
14420    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14421    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14422      # Do we have a bin/java?
14423      if test ! -x "$BOOT_JDK/bin/java"; then
14424        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14425$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14426        BOOT_JDK_FOUND=no
14427      else
14428        # Do we have a bin/javac?
14429        if test ! -x "$BOOT_JDK/bin/javac"; then
14430          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14431$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14432          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14433$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14434          BOOT_JDK_FOUND=no
14435        else
14436          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14437          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14438            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14439$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14440            BOOT_JDK_FOUND=no
14441          else
14442            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14443            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14444
14445            # Extra M4 quote needed to protect [] in grep expression.
14446            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14447            if test "x$FOUND_VERSION_78" = x; then
14448              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14450              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14451$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14452              BOOT_JDK_FOUND=no
14453            else
14454              # We're done! :-)
14455              BOOT_JDK_FOUND=yes
14456
14457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14458
14459  # Input might be given as Windows format, start by converting to
14460  # unix format.
14461  path="$BOOT_JDK"
14462  new_path=`$CYGPATH -u "$path"`
14463
14464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14467  # "foo.exe" is OK but "foo" is an error.
14468  #
14469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14470  # It is also a way to make sure we got the proper file name for the real test later on.
14471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14472  if test "x$test_shortpath" = x; then
14473    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14474$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14475    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14476  fi
14477
14478  # Call helper function which possibly converts this using DOS-style short mode.
14479  # If so, the updated path is stored in $new_path.
14480
14481  input_path="$new_path"
14482  # Check if we need to convert this using DOS-style short mode. If the path
14483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14484  # take no chances and rewrite it.
14485  # Note: m4 eats our [], so we need to use [ and ] instead.
14486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14487  if test "x$has_forbidden_chars" != x; then
14488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14492      # Going to short mode and back again did indeed matter. Since short mode is
14493      # case insensitive, let's make it lowercase to improve readability.
14494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14495      # Now convert it back to Unix-stile (cygpath)
14496      input_path=`$CYGPATH -u "$shortmode_path"`
14497      new_path="$input_path"
14498    fi
14499  fi
14500
14501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14502  if test "x$test_cygdrive_prefix" = x; then
14503    # As a simple fix, exclude /usr/bin since it's not a real path.
14504    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14506      # a path prefixed by /cygdrive for fixpath to work.
14507      new_path="$CYGWIN_ROOT_PATH$input_path"
14508    fi
14509  fi
14510
14511
14512  if test "x$path" != "x$new_path"; then
14513    BOOT_JDK="$new_path"
14514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14515$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14516  fi
14517
14518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14519
14520  path="$BOOT_JDK"
14521  has_colon=`$ECHO $path | $GREP ^.:`
14522  new_path="$path"
14523  if test "x$has_colon" = x; then
14524    # Not in mixed or Windows style, start by that.
14525    new_path=`cmd //c echo $path`
14526  fi
14527
14528
14529  input_path="$new_path"
14530  # Check if we need to convert this using DOS-style short mode. If the path
14531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14532  # take no chances and rewrite it.
14533  # Note: m4 eats our [], so we need to use [ and ] instead.
14534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14535  if test "x$has_forbidden_chars" != x; then
14536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14538  fi
14539
14540
14541  windows_path="$new_path"
14542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14543    unix_path=`$CYGPATH -u "$windows_path"`
14544    new_path="$unix_path"
14545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14547    new_path="$unix_path"
14548  fi
14549
14550  if test "x$path" != "x$new_path"; then
14551    BOOT_JDK="$new_path"
14552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14553$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14554  fi
14555
14556  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14557  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14558
14559  else
14560    # We're on a posix platform. Hooray! :)
14561    path="$BOOT_JDK"
14562    has_space=`$ECHO "$path" | $GREP " "`
14563    if test "x$has_space" != x; then
14564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14565$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14566      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14567    fi
14568
14569    # Use eval to expand a potential ~
14570    eval path="$path"
14571    if test ! -f "$path" && test ! -d "$path"; then
14572      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14573    fi
14574
14575    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14576  fi
14577
14578              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14579$as_echo_n "checking for Boot JDK... " >&6; }
14580              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14581$as_echo "$BOOT_JDK" >&6; }
14582              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14583$as_echo_n "checking Boot JDK version... " >&6; }
14584              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14585              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14586$as_echo "$BOOT_JDK_VERSION" >&6; }
14587            fi # end check jdk version
14588          fi # end check rt.jar
14589        fi # end check javac
14590      fi # end check java
14591    fi # end check boot jdk found
14592  fi
14593
14594
14595  if test "x$BOOT_JDK_FOUND" = xno; then
14596    # Now execute the test
14597
14598  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14599  BOOT_JDK_SUFFIX="/Contents/Home"
14600  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14601  if test "x$ALL_JDKS_FOUND" != x; then
14602    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14603
14604  if test "x$BOOT_JDK_FOUND" = xno; then
14605    # Now execute the test
14606
14607        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14608        if test -d "$BOOT_JDK"; then
14609          BOOT_JDK_FOUND=maybe
14610          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14611$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14612        fi
14613
14614
14615    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14616    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14617      # Do we have a bin/java?
14618      if test ! -x "$BOOT_JDK/bin/java"; then
14619        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14621        BOOT_JDK_FOUND=no
14622      else
14623        # Do we have a bin/javac?
14624        if test ! -x "$BOOT_JDK/bin/javac"; then
14625          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14627          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14628$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14629          BOOT_JDK_FOUND=no
14630        else
14631          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14632          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14633            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14634$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14635            BOOT_JDK_FOUND=no
14636          else
14637            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14638            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14639
14640            # Extra M4 quote needed to protect [] in grep expression.
14641            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14642            if test "x$FOUND_VERSION_78" = x; then
14643              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14645              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14646$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14647              BOOT_JDK_FOUND=no
14648            else
14649              # We're done! :-)
14650              BOOT_JDK_FOUND=yes
14651
14652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14653
14654  # Input might be given as Windows format, start by converting to
14655  # unix format.
14656  path="$BOOT_JDK"
14657  new_path=`$CYGPATH -u "$path"`
14658
14659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14662  # "foo.exe" is OK but "foo" is an error.
14663  #
14664  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14665  # It is also a way to make sure we got the proper file name for the real test later on.
14666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14667  if test "x$test_shortpath" = x; then
14668    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14669$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14670    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14671  fi
14672
14673  # Call helper function which possibly converts this using DOS-style short mode.
14674  # If so, the updated path is stored in $new_path.
14675
14676  input_path="$new_path"
14677  # Check if we need to convert this using DOS-style short mode. If the path
14678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14679  # take no chances and rewrite it.
14680  # Note: m4 eats our [], so we need to use [ and ] instead.
14681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14682  if test "x$has_forbidden_chars" != x; then
14683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14684    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14685    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14686    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14687      # Going to short mode and back again did indeed matter. Since short mode is
14688      # case insensitive, let's make it lowercase to improve readability.
14689      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14690      # Now convert it back to Unix-stile (cygpath)
14691      input_path=`$CYGPATH -u "$shortmode_path"`
14692      new_path="$input_path"
14693    fi
14694  fi
14695
14696  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14697  if test "x$test_cygdrive_prefix" = x; then
14698    # As a simple fix, exclude /usr/bin since it's not a real path.
14699    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14700      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14701      # a path prefixed by /cygdrive for fixpath to work.
14702      new_path="$CYGWIN_ROOT_PATH$input_path"
14703    fi
14704  fi
14705
14706
14707  if test "x$path" != "x$new_path"; then
14708    BOOT_JDK="$new_path"
14709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14710$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14711  fi
14712
14713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14714
14715  path="$BOOT_JDK"
14716  has_colon=`$ECHO $path | $GREP ^.:`
14717  new_path="$path"
14718  if test "x$has_colon" = x; then
14719    # Not in mixed or Windows style, start by that.
14720    new_path=`cmd //c echo $path`
14721  fi
14722
14723
14724  input_path="$new_path"
14725  # Check if we need to convert this using DOS-style short mode. If the path
14726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14727  # take no chances and rewrite it.
14728  # Note: m4 eats our [], so we need to use [ and ] instead.
14729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14730  if test "x$has_forbidden_chars" != x; then
14731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14733  fi
14734
14735
14736  windows_path="$new_path"
14737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14738    unix_path=`$CYGPATH -u "$windows_path"`
14739    new_path="$unix_path"
14740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14742    new_path="$unix_path"
14743  fi
14744
14745  if test "x$path" != "x$new_path"; then
14746    BOOT_JDK="$new_path"
14747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14748$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14749  fi
14750
14751  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14752  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14753
14754  else
14755    # We're on a posix platform. Hooray! :)
14756    path="$BOOT_JDK"
14757    has_space=`$ECHO "$path" | $GREP " "`
14758    if test "x$has_space" != x; then
14759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14761      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14762    fi
14763
14764    # Use eval to expand a potential ~
14765    eval path="$path"
14766    if test ! -f "$path" && test ! -d "$path"; then
14767      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14768    fi
14769
14770    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14771  fi
14772
14773              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14774$as_echo_n "checking for Boot JDK... " >&6; }
14775              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14776$as_echo "$BOOT_JDK" >&6; }
14777              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14778$as_echo_n "checking Boot JDK version... " >&6; }
14779              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14780              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14781$as_echo "$BOOT_JDK_VERSION" >&6; }
14782            fi # end check jdk version
14783          fi # end check rt.jar
14784        fi # end check javac
14785      fi # end check java
14786    fi # end check boot jdk found
14787  fi
14788
14789    done
14790  fi
14791
14792
14793    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14794    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14795      # Do we have a bin/java?
14796      if test ! -x "$BOOT_JDK/bin/java"; then
14797        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14799        BOOT_JDK_FOUND=no
14800      else
14801        # Do we have a bin/javac?
14802        if test ! -x "$BOOT_JDK/bin/javac"; then
14803          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14805          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14806$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14807          BOOT_JDK_FOUND=no
14808        else
14809          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14810          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14811            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14813            BOOT_JDK_FOUND=no
14814          else
14815            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14816            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14817
14818            # Extra M4 quote needed to protect [] in grep expression.
14819            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14820            if test "x$FOUND_VERSION_78" = x; then
14821              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14823              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14824$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14825              BOOT_JDK_FOUND=no
14826            else
14827              # We're done! :-)
14828              BOOT_JDK_FOUND=yes
14829
14830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14831
14832  # Input might be given as Windows format, start by converting to
14833  # unix format.
14834  path="$BOOT_JDK"
14835  new_path=`$CYGPATH -u "$path"`
14836
14837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14840  # "foo.exe" is OK but "foo" is an error.
14841  #
14842  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14843  # It is also a way to make sure we got the proper file name for the real test later on.
14844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14845  if test "x$test_shortpath" = x; then
14846    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14847$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14848    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14849  fi
14850
14851  # Call helper function which possibly converts this using DOS-style short mode.
14852  # If so, the updated path is stored in $new_path.
14853
14854  input_path="$new_path"
14855  # Check if we need to convert this using DOS-style short mode. If the path
14856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14857  # take no chances and rewrite it.
14858  # Note: m4 eats our [], so we need to use [ and ] instead.
14859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14860  if test "x$has_forbidden_chars" != x; then
14861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14865      # Going to short mode and back again did indeed matter. Since short mode is
14866      # case insensitive, let's make it lowercase to improve readability.
14867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14868      # Now convert it back to Unix-stile (cygpath)
14869      input_path=`$CYGPATH -u "$shortmode_path"`
14870      new_path="$input_path"
14871    fi
14872  fi
14873
14874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14875  if test "x$test_cygdrive_prefix" = x; then
14876    # As a simple fix, exclude /usr/bin since it's not a real path.
14877    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14879      # a path prefixed by /cygdrive for fixpath to work.
14880      new_path="$CYGWIN_ROOT_PATH$input_path"
14881    fi
14882  fi
14883
14884
14885  if test "x$path" != "x$new_path"; then
14886    BOOT_JDK="$new_path"
14887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14888$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14889  fi
14890
14891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14892
14893  path="$BOOT_JDK"
14894  has_colon=`$ECHO $path | $GREP ^.:`
14895  new_path="$path"
14896  if test "x$has_colon" = x; then
14897    # Not in mixed or Windows style, start by that.
14898    new_path=`cmd //c echo $path`
14899  fi
14900
14901
14902  input_path="$new_path"
14903  # Check if we need to convert this using DOS-style short mode. If the path
14904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14905  # take no chances and rewrite it.
14906  # Note: m4 eats our [], so we need to use [ and ] instead.
14907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14908  if test "x$has_forbidden_chars" != x; then
14909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14911  fi
14912
14913
14914  windows_path="$new_path"
14915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14916    unix_path=`$CYGPATH -u "$windows_path"`
14917    new_path="$unix_path"
14918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14920    new_path="$unix_path"
14921  fi
14922
14923  if test "x$path" != "x$new_path"; then
14924    BOOT_JDK="$new_path"
14925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14926$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14927  fi
14928
14929  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14930  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14931
14932  else
14933    # We're on a posix platform. Hooray! :)
14934    path="$BOOT_JDK"
14935    has_space=`$ECHO "$path" | $GREP " "`
14936    if test "x$has_space" != x; then
14937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14938$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14939      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14940    fi
14941
14942    # Use eval to expand a potential ~
14943    eval path="$path"
14944    if test ! -f "$path" && test ! -d "$path"; then
14945      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14946    fi
14947
14948    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14949  fi
14950
14951              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14952$as_echo_n "checking for Boot JDK... " >&6; }
14953              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14954$as_echo "$BOOT_JDK" >&6; }
14955              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14956$as_echo_n "checking Boot JDK version... " >&6; }
14957              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14958              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14959$as_echo "$BOOT_JDK_VERSION" >&6; }
14960            fi # end check jdk version
14961          fi # end check rt.jar
14962        fi # end check javac
14963      fi # end check java
14964    fi # end check boot jdk found
14965  fi
14966
14967  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14968
14969  if test "x$BOOT_JDK_FOUND" = xno; then
14970    # Now execute the test
14971
14972  BOOT_JDK_PREFIX="/usr/lib/jvm"
14973  BOOT_JDK_SUFFIX=""
14974  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14975  if test "x$ALL_JDKS_FOUND" != x; then
14976    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14977
14978  if test "x$BOOT_JDK_FOUND" = xno; then
14979    # Now execute the test
14980
14981        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14982        if test -d "$BOOT_JDK"; then
14983          BOOT_JDK_FOUND=maybe
14984          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14985$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14986        fi
14987
14988
14989    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14990    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14991      # Do we have a bin/java?
14992      if test ! -x "$BOOT_JDK/bin/java"; then
14993        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14995        BOOT_JDK_FOUND=no
14996      else
14997        # Do we have a bin/javac?
14998        if test ! -x "$BOOT_JDK/bin/javac"; then
14999          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15001          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15002$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15003          BOOT_JDK_FOUND=no
15004        else
15005          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15006          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15007            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15009            BOOT_JDK_FOUND=no
15010          else
15011            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15012            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15013
15014            # Extra M4 quote needed to protect [] in grep expression.
15015            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15016            if test "x$FOUND_VERSION_78" = x; then
15017              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15019              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15020$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15021              BOOT_JDK_FOUND=no
15022            else
15023              # We're done! :-)
15024              BOOT_JDK_FOUND=yes
15025
15026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15027
15028  # Input might be given as Windows format, start by converting to
15029  # unix format.
15030  path="$BOOT_JDK"
15031  new_path=`$CYGPATH -u "$path"`
15032
15033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15036  # "foo.exe" is OK but "foo" is an error.
15037  #
15038  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15039  # It is also a way to make sure we got the proper file name for the real test later on.
15040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15041  if test "x$test_shortpath" = x; then
15042    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15043$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15044    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15045  fi
15046
15047  # Call helper function which possibly converts this using DOS-style short mode.
15048  # If so, the updated path is stored in $new_path.
15049
15050  input_path="$new_path"
15051  # Check if we need to convert this using DOS-style short mode. If the path
15052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15053  # take no chances and rewrite it.
15054  # Note: m4 eats our [], so we need to use [ and ] instead.
15055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15056  if test "x$has_forbidden_chars" != x; then
15057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15061      # Going to short mode and back again did indeed matter. Since short mode is
15062      # case insensitive, let's make it lowercase to improve readability.
15063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15064      # Now convert it back to Unix-stile (cygpath)
15065      input_path=`$CYGPATH -u "$shortmode_path"`
15066      new_path="$input_path"
15067    fi
15068  fi
15069
15070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15071  if test "x$test_cygdrive_prefix" = x; then
15072    # As a simple fix, exclude /usr/bin since it's not a real path.
15073    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15075      # a path prefixed by /cygdrive for fixpath to work.
15076      new_path="$CYGWIN_ROOT_PATH$input_path"
15077    fi
15078  fi
15079
15080
15081  if test "x$path" != "x$new_path"; then
15082    BOOT_JDK="$new_path"
15083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15084$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15085  fi
15086
15087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15088
15089  path="$BOOT_JDK"
15090  has_colon=`$ECHO $path | $GREP ^.:`
15091  new_path="$path"
15092  if test "x$has_colon" = x; then
15093    # Not in mixed or Windows style, start by that.
15094    new_path=`cmd //c echo $path`
15095  fi
15096
15097
15098  input_path="$new_path"
15099  # Check if we need to convert this using DOS-style short mode. If the path
15100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15101  # take no chances and rewrite it.
15102  # Note: m4 eats our [], so we need to use [ and ] instead.
15103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15104  if test "x$has_forbidden_chars" != x; then
15105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15106    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15107  fi
15108
15109
15110  windows_path="$new_path"
15111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15112    unix_path=`$CYGPATH -u "$windows_path"`
15113    new_path="$unix_path"
15114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15116    new_path="$unix_path"
15117  fi
15118
15119  if test "x$path" != "x$new_path"; then
15120    BOOT_JDK="$new_path"
15121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15122$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15123  fi
15124
15125  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15126  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15127
15128  else
15129    # We're on a posix platform. Hooray! :)
15130    path="$BOOT_JDK"
15131    has_space=`$ECHO "$path" | $GREP " "`
15132    if test "x$has_space" != x; then
15133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15134$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15135      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15136    fi
15137
15138    # Use eval to expand a potential ~
15139    eval path="$path"
15140    if test ! -f "$path" && test ! -d "$path"; then
15141      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15142    fi
15143
15144    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15145  fi
15146
15147              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15148$as_echo_n "checking for Boot JDK... " >&6; }
15149              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15150$as_echo "$BOOT_JDK" >&6; }
15151              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15152$as_echo_n "checking Boot JDK version... " >&6; }
15153              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15154              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15155$as_echo "$BOOT_JDK_VERSION" >&6; }
15156            fi # end check jdk version
15157          fi # end check rt.jar
15158        fi # end check javac
15159      fi # end check java
15160    fi # end check boot jdk found
15161  fi
15162
15163    done
15164  fi
15165
15166
15167    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15168    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15169      # Do we have a bin/java?
15170      if test ! -x "$BOOT_JDK/bin/java"; then
15171        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15173        BOOT_JDK_FOUND=no
15174      else
15175        # Do we have a bin/javac?
15176        if test ! -x "$BOOT_JDK/bin/javac"; then
15177          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15178$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15179          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15180$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15181          BOOT_JDK_FOUND=no
15182        else
15183          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15184          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15185            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15187            BOOT_JDK_FOUND=no
15188          else
15189            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15190            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15191
15192            # Extra M4 quote needed to protect [] in grep expression.
15193            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15194            if test "x$FOUND_VERSION_78" = x; then
15195              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15197              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15198$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15199              BOOT_JDK_FOUND=no
15200            else
15201              # We're done! :-)
15202              BOOT_JDK_FOUND=yes
15203
15204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15205
15206  # Input might be given as Windows format, start by converting to
15207  # unix format.
15208  path="$BOOT_JDK"
15209  new_path=`$CYGPATH -u "$path"`
15210
15211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15214  # "foo.exe" is OK but "foo" is an error.
15215  #
15216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15217  # It is also a way to make sure we got the proper file name for the real test later on.
15218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15219  if test "x$test_shortpath" = x; then
15220    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15221$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15222    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15223  fi
15224
15225  # Call helper function which possibly converts this using DOS-style short mode.
15226  # If so, the updated path is stored in $new_path.
15227
15228  input_path="$new_path"
15229  # Check if we need to convert this using DOS-style short mode. If the path
15230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15231  # take no chances and rewrite it.
15232  # Note: m4 eats our [], so we need to use [ and ] instead.
15233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15234  if test "x$has_forbidden_chars" != x; then
15235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15239      # Going to short mode and back again did indeed matter. Since short mode is
15240      # case insensitive, let's make it lowercase to improve readability.
15241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15242      # Now convert it back to Unix-stile (cygpath)
15243      input_path=`$CYGPATH -u "$shortmode_path"`
15244      new_path="$input_path"
15245    fi
15246  fi
15247
15248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15249  if test "x$test_cygdrive_prefix" = x; then
15250    # As a simple fix, exclude /usr/bin since it's not a real path.
15251    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15253      # a path prefixed by /cygdrive for fixpath to work.
15254      new_path="$CYGWIN_ROOT_PATH$input_path"
15255    fi
15256  fi
15257
15258
15259  if test "x$path" != "x$new_path"; then
15260    BOOT_JDK="$new_path"
15261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15262$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15263  fi
15264
15265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15266
15267  path="$BOOT_JDK"
15268  has_colon=`$ECHO $path | $GREP ^.:`
15269  new_path="$path"
15270  if test "x$has_colon" = x; then
15271    # Not in mixed or Windows style, start by that.
15272    new_path=`cmd //c echo $path`
15273  fi
15274
15275
15276  input_path="$new_path"
15277  # Check if we need to convert this using DOS-style short mode. If the path
15278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15279  # take no chances and rewrite it.
15280  # Note: m4 eats our [], so we need to use [ and ] instead.
15281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15282  if test "x$has_forbidden_chars" != x; then
15283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15285  fi
15286
15287
15288  windows_path="$new_path"
15289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15290    unix_path=`$CYGPATH -u "$windows_path"`
15291    new_path="$unix_path"
15292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15294    new_path="$unix_path"
15295  fi
15296
15297  if test "x$path" != "x$new_path"; then
15298    BOOT_JDK="$new_path"
15299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15300$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15301  fi
15302
15303  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15304  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15305
15306  else
15307    # We're on a posix platform. Hooray! :)
15308    path="$BOOT_JDK"
15309    has_space=`$ECHO "$path" | $GREP " "`
15310    if test "x$has_space" != x; then
15311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15312$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15313      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15314    fi
15315
15316    # Use eval to expand a potential ~
15317    eval path="$path"
15318    if test ! -f "$path" && test ! -d "$path"; then
15319      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15320    fi
15321
15322    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15323  fi
15324
15325              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15326$as_echo_n "checking for Boot JDK... " >&6; }
15327              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15328$as_echo "$BOOT_JDK" >&6; }
15329              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15330$as_echo_n "checking Boot JDK version... " >&6; }
15331              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15332              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15333$as_echo "$BOOT_JDK_VERSION" >&6; }
15334            fi # end check jdk version
15335          fi # end check rt.jar
15336        fi # end check javac
15337      fi # end check java
15338    fi # end check boot jdk found
15339  fi
15340
15341  fi
15342
15343
15344    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15345    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15346      # Do we have a bin/java?
15347      if test ! -x "$BOOT_JDK/bin/java"; then
15348        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15350        BOOT_JDK_FOUND=no
15351      else
15352        # Do we have a bin/javac?
15353        if test ! -x "$BOOT_JDK/bin/javac"; then
15354          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15355$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15356          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15357$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15358          BOOT_JDK_FOUND=no
15359        else
15360          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15361          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15362            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15363$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15364            BOOT_JDK_FOUND=no
15365          else
15366            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15367            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15368
15369            # Extra M4 quote needed to protect [] in grep expression.
15370            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15371            if test "x$FOUND_VERSION_78" = x; then
15372              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15374              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15375$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15376              BOOT_JDK_FOUND=no
15377            else
15378              # We're done! :-)
15379              BOOT_JDK_FOUND=yes
15380
15381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15382
15383  # Input might be given as Windows format, start by converting to
15384  # unix format.
15385  path="$BOOT_JDK"
15386  new_path=`$CYGPATH -u "$path"`
15387
15388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15391  # "foo.exe" is OK but "foo" is an error.
15392  #
15393  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15394  # It is also a way to make sure we got the proper file name for the real test later on.
15395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15396  if test "x$test_shortpath" = x; then
15397    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15398$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15399    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15400  fi
15401
15402  # Call helper function which possibly converts this using DOS-style short mode.
15403  # If so, the updated path is stored in $new_path.
15404
15405  input_path="$new_path"
15406  # Check if we need to convert this using DOS-style short mode. If the path
15407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15408  # take no chances and rewrite it.
15409  # Note: m4 eats our [], so we need to use [ and ] instead.
15410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15411  if test "x$has_forbidden_chars" != x; then
15412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15416      # Going to short mode and back again did indeed matter. Since short mode is
15417      # case insensitive, let's make it lowercase to improve readability.
15418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15419      # Now convert it back to Unix-stile (cygpath)
15420      input_path=`$CYGPATH -u "$shortmode_path"`
15421      new_path="$input_path"
15422    fi
15423  fi
15424
15425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15426  if test "x$test_cygdrive_prefix" = x; then
15427    # As a simple fix, exclude /usr/bin since it's not a real path.
15428    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15430      # a path prefixed by /cygdrive for fixpath to work.
15431      new_path="$CYGWIN_ROOT_PATH$input_path"
15432    fi
15433  fi
15434
15435
15436  if test "x$path" != "x$new_path"; then
15437    BOOT_JDK="$new_path"
15438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15439$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15440  fi
15441
15442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15443
15444  path="$BOOT_JDK"
15445  has_colon=`$ECHO $path | $GREP ^.:`
15446  new_path="$path"
15447  if test "x$has_colon" = x; then
15448    # Not in mixed or Windows style, start by that.
15449    new_path=`cmd //c echo $path`
15450  fi
15451
15452
15453  input_path="$new_path"
15454  # Check if we need to convert this using DOS-style short mode. If the path
15455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15456  # take no chances and rewrite it.
15457  # Note: m4 eats our [], so we need to use [ and ] instead.
15458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15459  if test "x$has_forbidden_chars" != x; then
15460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15462  fi
15463
15464
15465  windows_path="$new_path"
15466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15467    unix_path=`$CYGPATH -u "$windows_path"`
15468    new_path="$unix_path"
15469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15471    new_path="$unix_path"
15472  fi
15473
15474  if test "x$path" != "x$new_path"; then
15475    BOOT_JDK="$new_path"
15476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15477$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15478  fi
15479
15480  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15481  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15482
15483  else
15484    # We're on a posix platform. Hooray! :)
15485    path="$BOOT_JDK"
15486    has_space=`$ECHO "$path" | $GREP " "`
15487    if test "x$has_space" != x; then
15488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15489$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15490      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15491    fi
15492
15493    # Use eval to expand a potential ~
15494    eval path="$path"
15495    if test ! -f "$path" && test ! -d "$path"; then
15496      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15497    fi
15498
15499    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15500  fi
15501
15502              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15503$as_echo_n "checking for Boot JDK... " >&6; }
15504              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15505$as_echo "$BOOT_JDK" >&6; }
15506              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15507$as_echo_n "checking Boot JDK version... " >&6; }
15508              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15509              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15510$as_echo "$BOOT_JDK_VERSION" >&6; }
15511            fi # end check jdk version
15512          fi # end check rt.jar
15513        fi # end check javac
15514      fi # end check java
15515    fi # end check boot jdk found
15516  fi
15517
15518
15519# If we haven't found anything yet, we've truly lost. Give up.
15520if test "x$BOOT_JDK_FOUND" = xno; then
15521
15522    # Print a helpful message on how to acquire the necessary build dependency.
15523    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15524    MISSING_DEPENDENCY=openjdk
15525    PKGHANDLER_COMMAND=
15526
15527    case $PKGHANDLER in
15528	apt-get)
15529                apt_help     $MISSING_DEPENDENCY ;;
15530    yum)
15531                yum_help     $MISSING_DEPENDENCY ;;
15532	port)
15533                port_help    $MISSING_DEPENDENCY ;;
15534	pkgutil)
15535                pkgutil_help $MISSING_DEPENDENCY ;;
15536	pkgadd)
15537                pkgadd_help  $MISSING_DEPENDENCY ;;
15538    * )
15539      break ;;
15540    esac
15541
15542    if test "x$PKGHANDLER_COMMAND" != x; then
15543        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15544    fi
15545
15546  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15547$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15548  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15549$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15550  as_fn_error $? "Cannot continue" "$LINENO" 5
15551fi
15552
15553# Setup proper paths for what we found
15554BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15555if test ! -f "$BOOT_RTJAR"; then
15556    # On MacOSX it is called classes.jar
15557    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15558    if test -f "$BOOT_RTJAR"; then
15559      # Remove the ..
15560      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15561    fi
15562fi
15563BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15564BOOT_JDK="$BOOT_JDK"
15565
15566
15567
15568
15569# Setup tools from the Boot JDK.
15570
15571  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15572$as_echo_n "checking for java in Boot JDK... " >&6; }
15573  JAVA=$BOOT_JDK/bin/java
15574  if test ! -x $JAVA; then
15575      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15576$as_echo "not found" >&6; }
15577      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15578$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15579      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15580  fi
15581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15582$as_echo "ok" >&6; }
15583
15584
15585  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15586$as_echo_n "checking for javac in Boot JDK... " >&6; }
15587  JAVAC=$BOOT_JDK/bin/javac
15588  if test ! -x $JAVAC; then
15589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15590$as_echo "not found" >&6; }
15591      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15592$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15593      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15594  fi
15595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15596$as_echo "ok" >&6; }
15597
15598
15599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15600$as_echo_n "checking for javah in Boot JDK... " >&6; }
15601  JAVAH=$BOOT_JDK/bin/javah
15602  if test ! -x $JAVAH; then
15603      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15604$as_echo "not found" >&6; }
15605      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15606$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15607      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15608  fi
15609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15610$as_echo "ok" >&6; }
15611
15612
15613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15614$as_echo_n "checking for javap in Boot JDK... " >&6; }
15615  JAVAP=$BOOT_JDK/bin/javap
15616  if test ! -x $JAVAP; then
15617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15618$as_echo "not found" >&6; }
15619      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15620$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15621      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15622  fi
15623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15624$as_echo "ok" >&6; }
15625
15626
15627  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15628$as_echo_n "checking for jar in Boot JDK... " >&6; }
15629  JAR=$BOOT_JDK/bin/jar
15630  if test ! -x $JAR; then
15631      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15632$as_echo "not found" >&6; }
15633      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15634$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15635      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15636  fi
15637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15638$as_echo "ok" >&6; }
15639
15640
15641  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15642$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15643  RMIC=$BOOT_JDK/bin/rmic
15644  if test ! -x $RMIC; then
15645      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15646$as_echo "not found" >&6; }
15647      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15648$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15649      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15650  fi
15651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15652$as_echo "ok" >&6; }
15653
15654
15655  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15656$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15657  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15658  if test ! -x $NATIVE2ASCII; then
15659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15660$as_echo "not found" >&6; }
15661      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15662$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15663      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15664  fi
15665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15666$as_echo "ok" >&6; }
15667
15668
15669# Finally, set some other options...
15670
15671# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15672BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15673
15674
15675
15676
15677##############################################################################
15678#
15679# Specify options for anything that is run with the Boot JDK.
15680#
15681
15682# Check whether --with-boot-jdk-jvmargs was given.
15683if test "${with_boot_jdk_jvmargs+set}" = set; then :
15684  withval=$with_boot_jdk_jvmargs;
15685fi
15686
15687
15688if test "x$with_boot_jdk_jvmargs" = x; then
15689    # Not all JVM:s accept the same arguments on the command line.
15690    # OpenJDK specific increase in thread stack for JDK build,
15691    # well more specifically, when running javac.
15692    if test "x$BUILD_NUM_BITS" = x32; then
15693       STACK_SIZE=768
15694    else
15695       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15696       # since 64-bit pointers are pushed on the stach. Apparently, we need
15697       # to increase the stack space when javacing the JDK....
15698       STACK_SIZE=1536
15699    fi
15700
15701    # Minimum amount of heap memory.
15702
15703    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15704    $ECHO "Command: $JAVA -Xms64M -version" >&5
15705    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15706    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15707    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15708    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15709        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15710	JVM_ARG_OK=true
15711    else
15712	$ECHO "Arg failed:" >&5
15713	$ECHO "$OUTPUT" >&5
15714	JVM_ARG_OK=false
15715    fi
15716
15717    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15718        # Why does macosx need more heap? Its the huge JDK batch.
15719
15720    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15721    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15722    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15723    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15724    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15725    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15726        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15727	JVM_ARG_OK=true
15728    else
15729	$ECHO "Arg failed:" >&5
15730	$ECHO "$OUTPUT" >&5
15731	JVM_ARG_OK=false
15732    fi
15733
15734    else
15735
15736    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15737    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15738    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15739    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15740    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15741    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15742        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15743	JVM_ARG_OK=true
15744    else
15745	$ECHO "Arg failed:" >&5
15746	$ECHO "$OUTPUT" >&5
15747	JVM_ARG_OK=false
15748    fi
15749
15750    fi
15751    # When is adding -client something that speeds up the JVM?
15752    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15753
15754    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15755    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15756    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15757    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15758    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15759    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15760        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15761	JVM_ARG_OK=true
15762    else
15763	$ECHO "Arg failed:" >&5
15764	$ECHO "$OUTPUT" >&5
15765	JVM_ARG_OK=false
15766    fi
15767
15768
15769    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15770    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15771    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15772    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15773    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15774    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15775        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15776	JVM_ARG_OK=true
15777    else
15778	$ECHO "Arg failed:" >&5
15779	$ECHO "$OUTPUT" >&5
15780	JVM_ARG_OK=false
15781    fi
15782
15783
15784    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15785    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15786    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15787    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15788    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15789    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15790        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15791	JVM_ARG_OK=true
15792    else
15793	$ECHO "Arg failed:" >&5
15794	$ECHO "$OUTPUT" >&5
15795	JVM_ARG_OK=false
15796    fi
15797
15798    # Disable special log output when a debug build is used as Boot JDK...
15799
15800    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15801    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15802    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15803    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15804    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15805    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15806        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15807	JVM_ARG_OK=true
15808    else
15809	$ECHO "Arg failed:" >&5
15810	$ECHO "$OUTPUT" >&5
15811	JVM_ARG_OK=false
15812    fi
15813
15814fi
15815
15816BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15817
15818
15819
15820###############################################################################
15821#
15822# Configure the sources to use. We can add or override individual directories.
15823#
15824###############################################################################
15825
15826
15827
15828# Where are the sources. Any of these can be overridden
15829# using --with-override-corba and the likes.
15830LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15831CORBA_TOPDIR="$SRC_ROOT/corba"
15832JAXP_TOPDIR="$SRC_ROOT/jaxp"
15833JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15834HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15835NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15836JDK_TOPDIR="$SRC_ROOT/jdk"
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847###############################################################################
15848#
15849# Pickup additional source for a component from outside of the source root
15850# or override source for a component.
15851#
15852
15853# Check whether --with-add-source-root was given.
15854if test "${with_add_source_root+set}" = set; then :
15855  withval=$with_add_source_root;
15856fi
15857
15858
15859
15860# Check whether --with-override-source-root was given.
15861if test "${with_override_source_root+set}" = set; then :
15862  withval=$with_override_source_root;
15863fi
15864
15865
15866
15867# Check whether --with-adds-and-overrides was given.
15868if test "${with_adds_and_overrides+set}" = set; then :
15869  withval=$with_adds_and_overrides;
15870fi
15871
15872
15873if test "x$with_adds_and_overrides" != x; then
15874    with_add_source_root="$with_adds_and_overrides/adds"
15875    with_override_source_root="$with_adds_and_overrides/overrides"
15876fi
15877
15878if test "x$with_add_source_root" != x; then
15879    if ! test -d $with_add_source_root; then
15880       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15881    fi
15882    CURDIR="$PWD"
15883    cd "$with_add_source_root"
15884    ADD_SRC_ROOT="`pwd`"
15885    cd "$CURDIR"
15886    # Verify that the addon source root does not have any root makefiles.
15887    # If it does, then it is usually an error, prevent this.
15888    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15889       test -f $with_add_source_root/langtools/make/Makefile; then
15890        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
15891    fi
15892    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15893       test -f $with_add_source_root/corba/make/Makefile; then
15894        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
15895    fi
15896    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15897       test -f $with_add_source_root/jaxp/make/Makefile; then
15898        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
15899    fi
15900    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15901       test -f $with_add_source_root/jaxws/make/Makefile; then
15902        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
15903    fi
15904    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15905       test -f $with_add_source_root/hotspot/make/Makefile; then
15906        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
15907    fi
15908    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15909       test -f $with_add_source_root/jdk/make/Makefile; then
15910        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
15911    fi
15912fi
15913
15914
15915if test "x$with_override_source_root" != x; then
15916    if ! test -d $with_override_source_root; then
15917       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15918    fi
15919    CURDIR="$PWD"
15920    cd "$with_override_source_root"
15921    OVERRIDE_SRC_ROOT="`pwd`"
15922    cd "$CURDIR"
15923    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15924       test -f $with_override_source_root/langtools/make/Makefile; then
15925        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
15926    fi
15927    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15928       test -f $with_override_source_root/corba/make/Makefile; then
15929        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
15930    fi
15931    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15932       test -f $with_override_source_root/jaxp/make/Makefile; then
15933        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
15934    fi
15935    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15936       test -f $with_override_source_root/jaxws/make/Makefile; then
15937        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
15938    fi
15939    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15940       test -f $with_override_source_root/hotspot/make/Makefile; then
15941        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
15942    fi
15943    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15944       test -f $with_override_source_root/jdk/make/Makefile; then
15945        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
15946    fi
15947fi
15948
15949
15950###############################################################################
15951#
15952# Override a repo completely, this is used for example when you have 3 small
15953# development sandboxes of the langtools sources and want to avoid having 3 full
15954# OpenJDK sources checked out on disk.
15955#
15956# Assuming that the 3 langtools sandboxes are located here:
15957# /home/fredrik/sandbox1/langtools
15958# /home/fredrik/sandbox2/langtools
15959# /home/fredrik/sandbox3/langtools
15960#
15961# From the source root you create build subdirs manually:
15962#     mkdir -p build1 build2 build3
15963# in each build directory run:
15964#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15965#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15966#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15967#
15968
15969
15970# Check whether --with-override-langtools was given.
15971if test "${with_override_langtools+set}" = set; then :
15972  withval=$with_override_langtools;
15973fi
15974
15975
15976
15977# Check whether --with-override-corba was given.
15978if test "${with_override_corba+set}" = set; then :
15979  withval=$with_override_corba;
15980fi
15981
15982
15983
15984# Check whether --with-override-jaxp was given.
15985if test "${with_override_jaxp+set}" = set; then :
15986  withval=$with_override_jaxp;
15987fi
15988
15989
15990
15991# Check whether --with-override-jaxws was given.
15992if test "${with_override_jaxws+set}" = set; then :
15993  withval=$with_override_jaxws;
15994fi
15995
15996
15997
15998# Check whether --with-override-hotspot was given.
15999if test "${with_override_hotspot+set}" = set; then :
16000  withval=$with_override_hotspot;
16001fi
16002
16003
16004
16005# Check whether --with-override-jdk was given.
16006if test "${with_override_jdk+set}" = set; then :
16007  withval=$with_override_jdk;
16008fi
16009
16010
16011if test "x$with_override_langtools" != x; then
16012    CURDIR="$PWD"
16013    cd "$with_override_langtools"
16014    LANGTOOLS_TOPDIR="`pwd`"
16015    cd "$CURDIR"
16016    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16017        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16018    fi
16019    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16020$as_echo_n "checking if langtools should be overridden... " >&6; }
16021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16022$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16023fi
16024if test "x$with_override_corba" != x; then
16025    CURDIR="$PWD"
16026    cd "$with_override_corba"
16027    CORBA_TOPDIR="`pwd`"
16028    cd "$CURDIR"
16029    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16030        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16031    fi
16032    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16033$as_echo_n "checking if corba should be overridden... " >&6; }
16034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16035$as_echo "yes with $CORBA_TOPDIR" >&6; }
16036fi
16037if test "x$with_override_jaxp" != x; then
16038    CURDIR="$PWD"
16039    cd "$with_override_jaxp"
16040    JAXP_TOPDIR="`pwd`"
16041    cd "$CURDIR"
16042    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16043        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16044    fi
16045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16046$as_echo_n "checking if jaxp should be overridden... " >&6; }
16047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16048$as_echo "yes with $JAXP_TOPDIR" >&6; }
16049fi
16050if test "x$with_override_jaxws" != x; then
16051    CURDIR="$PWD"
16052    cd "$with_override_jaxws"
16053    JAXWS_TOPDIR="`pwd`"
16054    cd "$CURDIR"
16055    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16056        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16057    fi
16058    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16059$as_echo_n "checking if jaxws should be overridden... " >&6; }
16060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16061$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16062fi
16063if test "x$with_override_hotspot" != x; then
16064    CURDIR="$PWD"
16065    cd "$with_override_hotspot"
16066    HOTSPOT_TOPDIR="`pwd`"
16067    cd "$CURDIR"
16068    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16069       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16070        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16071    fi
16072    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16073$as_echo_n "checking if hotspot should be overridden... " >&6; }
16074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16075$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16076fi
16077if test "x$with_override_nashorn" != x; then
16078    CURDIR="$PWD"
16079    cd "$with_override_nashorn"
16080    NASHORN_TOPDIR="`pwd`"
16081    cd "$CURDIR"
16082    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16083        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16084    fi
16085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16086$as_echo_n "checking if nashorn should be overridden... " >&6; }
16087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16088$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16089fi
16090if test "x$with_override_jdk" != x; then
16091    CURDIR="$PWD"
16092    cd "$with_override_jdk"
16093    JDK_TOPDIR="`pwd`"
16094    cd "$CURDIR"
16095    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16096        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16097    fi
16098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16099$as_echo_n "checking if JDK should be overridden... " >&6; }
16100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16101$as_echo "yes with $JDK_TOPDIR" >&6; }
16102fi
16103
16104
16105
16106BUILD_OUTPUT="$OUTPUT_ROOT"
16107
16108
16109HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16110BUILD_HOTSPOT=true
16111
16112
16113
16114# Check whether --with-import-hotspot was given.
16115if test "${with_import_hotspot+set}" = set; then :
16116  withval=$with_import_hotspot;
16117fi
16118
16119if test "x$with_import_hotspot" != x; then
16120    CURDIR="$PWD"
16121    cd "$with_import_hotspot"
16122    HOTSPOT_DIST="`pwd`"
16123    cd "$CURDIR"
16124    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16125        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16126    fi
16127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16128$as_echo_n "checking if hotspot should be imported... " >&6; }
16129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16130$as_echo "yes from $HOTSPOT_DIST" >&6; }
16131    BUILD_HOTSPOT=false
16132fi
16133
16134JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16135
16136
16137###############################################################################
16138#
16139# Setup the toolchain (compilers etc), i.e. the tools that need to be
16140# cross-compilation aware.
16141#
16142###############################################################################
16143
16144
16145###############################################################################
16146#
16147# Configure the development tool paths and potential sysroot.
16148#
16149ac_ext=cpp
16150ac_cpp='$CXXCPP $CPPFLAGS'
16151ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16152ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16153ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16154
16155
16156# The option used to specify the target .o,.a or .so file.
16157# When compiling, how to specify the to be created object file.
16158CC_OUT_OPTION='-o$(SPACE)'
16159# When linking, how to specify the to be created executable.
16160EXE_OUT_OPTION='-o$(SPACE)'
16161# When linking, how to specify the to be created dynamically linkable library.
16162LD_OUT_OPTION='-o$(SPACE)'
16163# When archiving, how to specify the to be create static archive for object files.
16164AR_OUT_OPTION='rcs$(SPACE)'
16165
16166
16167
16168
16169
16170# Locate the actual tools
16171
16172
16173# Check whether --with-jtreg was given.
16174if test "${with_jtreg+set}" = set; then :
16175  withval=$with_jtreg;
16176else
16177  with_jtreg=no
16178fi
16179
16180
16181  if test "x$with_jtreg" = xno; then
16182    # jtreg disabled
16183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16184$as_echo_n "checking for jtreg... " >&6; }
16185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16186$as_echo "no" >&6; }
16187  else
16188    if test "x$with_jtreg" != xyes; then
16189      # with path specified.
16190      JT_HOME="$with_jtreg"
16191    fi
16192
16193    if test "x$JT_HOME" != x; then
16194      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16195$as_echo_n "checking for jtreg... " >&6; }
16196
16197      # use JT_HOME enviroment var.
16198
16199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16200
16201  # Input might be given as Windows format, start by converting to
16202  # unix format.
16203  path="$JT_HOME"
16204  new_path=`$CYGPATH -u "$path"`
16205
16206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16209  # "foo.exe" is OK but "foo" is an error.
16210  #
16211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16212  # It is also a way to make sure we got the proper file name for the real test later on.
16213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16214  if test "x$test_shortpath" = x; then
16215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16216$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16217    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16218  fi
16219
16220  # Call helper function which possibly converts this using DOS-style short mode.
16221  # If so, the updated path is stored in $new_path.
16222
16223  input_path="$new_path"
16224  # Check if we need to convert this using DOS-style short mode. If the path
16225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16226  # take no chances and rewrite it.
16227  # Note: m4 eats our [], so we need to use [ and ] instead.
16228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16229  if test "x$has_forbidden_chars" != x; then
16230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16234      # Going to short mode and back again did indeed matter. Since short mode is
16235      # case insensitive, let's make it lowercase to improve readability.
16236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16237      # Now convert it back to Unix-stile (cygpath)
16238      input_path=`$CYGPATH -u "$shortmode_path"`
16239      new_path="$input_path"
16240    fi
16241  fi
16242
16243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16244  if test "x$test_cygdrive_prefix" = x; then
16245    # As a simple fix, exclude /usr/bin since it's not a real path.
16246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16248      # a path prefixed by /cygdrive for fixpath to work.
16249      new_path="$CYGWIN_ROOT_PATH$input_path"
16250    fi
16251  fi
16252
16253
16254  if test "x$path" != "x$new_path"; then
16255    JT_HOME="$new_path"
16256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16257$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16258  fi
16259
16260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16261
16262  path="$JT_HOME"
16263  has_colon=`$ECHO $path | $GREP ^.:`
16264  new_path="$path"
16265  if test "x$has_colon" = x; then
16266    # Not in mixed or Windows style, start by that.
16267    new_path=`cmd //c echo $path`
16268  fi
16269
16270
16271  input_path="$new_path"
16272  # Check if we need to convert this using DOS-style short mode. If the path
16273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16274  # take no chances and rewrite it.
16275  # Note: m4 eats our [], so we need to use [ and ] instead.
16276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16277  if test "x$has_forbidden_chars" != x; then
16278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16280  fi
16281
16282
16283  windows_path="$new_path"
16284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16285    unix_path=`$CYGPATH -u "$windows_path"`
16286    new_path="$unix_path"
16287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16289    new_path="$unix_path"
16290  fi
16291
16292  if test "x$path" != "x$new_path"; then
16293    JT_HOME="$new_path"
16294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16295$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16296  fi
16297
16298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16300
16301  else
16302    # We're on a posix platform. Hooray! :)
16303    path="$JT_HOME"
16304    has_space=`$ECHO "$path" | $GREP " "`
16305    if test "x$has_space" != x; then
16306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16307$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16308      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16309    fi
16310
16311    # Use eval to expand a potential ~
16312    eval path="$path"
16313    if test ! -f "$path" && test ! -d "$path"; then
16314      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16315    fi
16316
16317    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16318  fi
16319
16320
16321      # jtreg win32 script works for everybody
16322      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16323
16324      if test ! -f "$JTREGEXE"; then
16325        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16326      fi
16327
16328      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16329$as_echo "$JTREGEXE" >&6; }
16330    else
16331      # try to find jtreg on path
16332
16333    for ac_prog in jtreg
16334do
16335  # Extract the first word of "$ac_prog", so it can be a program name with args.
16336set dummy $ac_prog; ac_word=$2
16337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16338$as_echo_n "checking for $ac_word... " >&6; }
16339if test "${ac_cv_path_JTREGEXE+set}" = set; then :
16340  $as_echo_n "(cached) " >&6
16341else
16342  case $JTREGEXE in
16343  [\\/]* | ?:[\\/]*)
16344  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16345  ;;
16346  *)
16347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16348for as_dir in $PATH
16349do
16350  IFS=$as_save_IFS
16351  test -z "$as_dir" && as_dir=.
16352    for ac_exec_ext in '' $ac_executable_extensions; do
16353  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16354    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16356    break 2
16357  fi
16358done
16359  done
16360IFS=$as_save_IFS
16361
16362  ;;
16363esac
16364fi
16365JTREGEXE=$ac_cv_path_JTREGEXE
16366if test -n "$JTREGEXE"; then
16367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16368$as_echo "$JTREGEXE" >&6; }
16369else
16370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16371$as_echo "no" >&6; }
16372fi
16373
16374
16375  test -n "$JTREGEXE" && break
16376done
16377
16378
16379    if test "x$JTREGEXE" = x; then
16380        if test "xjtreg" = x; then
16381          PROG_NAME=jtregexe
16382        else
16383          PROG_NAME=jtreg
16384        fi
16385        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16386$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16387        as_fn_error $? "Cannot continue" "$LINENO" 5
16388    fi
16389
16390
16391      JT_HOME="`$DIRNAME $JTREGEXE`"
16392    fi
16393  fi
16394
16395
16396
16397
16398
16399if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16400
16401  # Store path to cygwin link.exe to help excluding it when searching for
16402  # VS linker. This must be done before changing the PATH when looking for VS.
16403  # Extract the first word of "link", so it can be a program name with args.
16404set dummy link; ac_word=$2
16405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16406$as_echo_n "checking for $ac_word... " >&6; }
16407if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16408  $as_echo_n "(cached) " >&6
16409else
16410  case $CYGWIN_LINK in
16411  [\\/]* | ?:[\\/]*)
16412  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16413  ;;
16414  *)
16415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16416for as_dir in $PATH
16417do
16418  IFS=$as_save_IFS
16419  test -z "$as_dir" && as_dir=.
16420    for ac_exec_ext in '' $ac_executable_extensions; do
16421  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16422    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16424    break 2
16425  fi
16426done
16427  done
16428IFS=$as_save_IFS
16429
16430  ;;
16431esac
16432fi
16433CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16434if test -n "$CYGWIN_LINK"; then
16435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16436$as_echo "$CYGWIN_LINK" >&6; }
16437else
16438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16439$as_echo "no" >&6; }
16440fi
16441
16442
16443  if test "x$CYGWIN_LINK" != x; then
16444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16445$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16446    "$CYGWIN_LINK" --version > /dev/null
16447    if test $? -eq 0 ; then
16448      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16449$as_echo "yes" >&6; }
16450    else
16451      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16452$as_echo "no" >&6; }
16453      # This might be the VS linker. Don't exclude it later on.
16454      CYGWIN_LINK=""
16455    fi
16456  fi
16457
16458  # First-hand choice is to locate and run the vsvars bat file.
16459
16460  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16461    VCVARSFILE="vc/bin/vcvars32.bat"
16462  else
16463    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16464  fi
16465
16466  VS_ENV_CMD=""
16467  VS_ENV_ARGS=""
16468  if test "x$with_toolsdir" != x; then
16469
16470  if test "x$VS_ENV_CMD" = x; then
16471    VS100BASE="$with_toolsdir/../.."
16472    METHOD="--with-tools-dir"
16473
16474  windows_path="$VS100BASE"
16475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16476    unix_path=`$CYGPATH -u "$windows_path"`
16477    VS100BASE="$unix_path"
16478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16480    VS100BASE="$unix_path"
16481  fi
16482
16483    if test -d "$VS100BASE"; then
16484      if test -f "$VS100BASE/$VCVARSFILE"; then
16485        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16486$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16487        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16488      else
16489        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16490$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16491        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16492$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16493      fi
16494    fi
16495  fi
16496
16497  fi
16498
16499  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16500    # Having specified an argument which is incorrect will produce an instant failure;
16501    # we should not go on looking
16502    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16503$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16504    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16505$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16506    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16507  fi
16508
16509  if test "x$VS100COMNTOOLS" != x; then
16510
16511  if test "x$VS_ENV_CMD" = x; then
16512    VS100BASE="$VS100COMNTOOLS/../.."
16513    METHOD="VS100COMNTOOLS variable"
16514
16515  windows_path="$VS100BASE"
16516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16517    unix_path=`$CYGPATH -u "$windows_path"`
16518    VS100BASE="$unix_path"
16519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16521    VS100BASE="$unix_path"
16522  fi
16523
16524    if test -d "$VS100BASE"; then
16525      if test -f "$VS100BASE/$VCVARSFILE"; then
16526        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16527$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16528        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16529      else
16530        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16531$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16532        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16533$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16534      fi
16535    fi
16536  fi
16537
16538  fi
16539  if test "x$PROGRAMFILES" != x; then
16540
16541  if test "x$VS_ENV_CMD" = x; then
16542    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16543    METHOD="well-known name"
16544
16545  windows_path="$VS100BASE"
16546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16547    unix_path=`$CYGPATH -u "$windows_path"`
16548    VS100BASE="$unix_path"
16549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16551    VS100BASE="$unix_path"
16552  fi
16553
16554    if test -d "$VS100BASE"; then
16555      if test -f "$VS100BASE/$VCVARSFILE"; then
16556        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16557$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16558        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16559      else
16560        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16561$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16562        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16563$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16564      fi
16565    fi
16566  fi
16567
16568  fi
16569
16570  if test "x$VS_ENV_CMD" = x; then
16571    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16572    METHOD="well-known name"
16573
16574  windows_path="$VS100BASE"
16575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16576    unix_path=`$CYGPATH -u "$windows_path"`
16577    VS100BASE="$unix_path"
16578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16580    VS100BASE="$unix_path"
16581  fi
16582
16583    if test -d "$VS100BASE"; then
16584      if test -f "$VS100BASE/$VCVARSFILE"; then
16585        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16586$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16587        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16588      else
16589        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16590$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16591        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16592$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16593      fi
16594    fi
16595  fi
16596
16597
16598  if test "x$VS_ENV_CMD" = x; then
16599    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16600    METHOD="well-known name"
16601
16602  windows_path="$VS100BASE"
16603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16604    unix_path=`$CYGPATH -u "$windows_path"`
16605    VS100BASE="$unix_path"
16606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16608    VS100BASE="$unix_path"
16609  fi
16610
16611    if test -d "$VS100BASE"; then
16612      if test -f "$VS100BASE/$VCVARSFILE"; then
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        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16616      else
16617        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16618$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16619        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16620$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16621      fi
16622    fi
16623  fi
16624
16625
16626  if test "x$ProgramW6432" != x; then
16627
16628  if test "x$VS_ENV_CMD" = x; then
16629    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16630    METHOD="well-known name"
16631
16632  windows_path="$WIN_SDK_BASE"
16633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16634    unix_path=`$CYGPATH -u "$windows_path"`
16635    WIN_SDK_BASE="$unix_path"
16636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16638    WIN_SDK_BASE="$unix_path"
16639  fi
16640
16641    if test -d "$WIN_SDK_BASE"; then
16642      # There have been cases of partial or broken SDK installations. A missing
16643      # lib dir is not going to work.
16644      if test ! -d "$WIN_SDK_BASE/../lib"; then
16645        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16646$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16647        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16648$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16649      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16650        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16651$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16652        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16653        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16654          VS_ENV_ARGS="/x86"
16655        else
16656          VS_ENV_ARGS="/x64"
16657        fi
16658      else
16659        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16660$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16661        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16662$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16663      fi
16664    fi
16665  fi
16666
16667  fi
16668  if test "x$PROGRAMW6432" != x; then
16669
16670  if test "x$VS_ENV_CMD" = x; then
16671    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16672    METHOD="well-known name"
16673
16674  windows_path="$WIN_SDK_BASE"
16675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16676    unix_path=`$CYGPATH -u "$windows_path"`
16677    WIN_SDK_BASE="$unix_path"
16678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16680    WIN_SDK_BASE="$unix_path"
16681  fi
16682
16683    if test -d "$WIN_SDK_BASE"; then
16684      # There have been cases of partial or broken SDK installations. A missing
16685      # lib dir is not going to work.
16686      if test ! -d "$WIN_SDK_BASE/../lib"; then
16687        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16688$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16689        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16690$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16691      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16692        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16693$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16694        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16695        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16696          VS_ENV_ARGS="/x86"
16697        else
16698          VS_ENV_ARGS="/x64"
16699        fi
16700      else
16701        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16702$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16703        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16704$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16705      fi
16706    fi
16707  fi
16708
16709  fi
16710  if test "x$PROGRAMFILES" != x; then
16711
16712  if test "x$VS_ENV_CMD" = x; then
16713    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16714    METHOD="well-known name"
16715
16716  windows_path="$WIN_SDK_BASE"
16717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16718    unix_path=`$CYGPATH -u "$windows_path"`
16719    WIN_SDK_BASE="$unix_path"
16720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16722    WIN_SDK_BASE="$unix_path"
16723  fi
16724
16725    if test -d "$WIN_SDK_BASE"; then
16726      # There have been cases of partial or broken SDK installations. A missing
16727      # lib dir is not going to work.
16728      if test ! -d "$WIN_SDK_BASE/../lib"; then
16729        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16730$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16731        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16732$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16733      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16734        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16735$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16736        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16737        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16738          VS_ENV_ARGS="/x86"
16739        else
16740          VS_ENV_ARGS="/x64"
16741        fi
16742      else
16743        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16744$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16745        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16746$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16747      fi
16748    fi
16749  fi
16750
16751  fi
16752
16753  if test "x$VS_ENV_CMD" = x; then
16754    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16755    METHOD="well-known name"
16756
16757  windows_path="$WIN_SDK_BASE"
16758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16759    unix_path=`$CYGPATH -u "$windows_path"`
16760    WIN_SDK_BASE="$unix_path"
16761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16763    WIN_SDK_BASE="$unix_path"
16764  fi
16765
16766    if test -d "$WIN_SDK_BASE"; then
16767      # There have been cases of partial or broken SDK installations. A missing
16768      # lib dir is not going to work.
16769      if test ! -d "$WIN_SDK_BASE/../lib"; then
16770        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16771$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16772        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16773$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16774      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16775        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16776$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16777        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16778        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16779          VS_ENV_ARGS="/x86"
16780        else
16781          VS_ENV_ARGS="/x64"
16782        fi
16783      else
16784        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16785$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16786        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16787$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16788      fi
16789    fi
16790  fi
16791
16792
16793  if test "x$VS_ENV_CMD" = x; then
16794    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16795    METHOD="well-known name"
16796
16797  windows_path="$WIN_SDK_BASE"
16798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16799    unix_path=`$CYGPATH -u "$windows_path"`
16800    WIN_SDK_BASE="$unix_path"
16801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16803    WIN_SDK_BASE="$unix_path"
16804  fi
16805
16806    if test -d "$WIN_SDK_BASE"; then
16807      # There have been cases of partial or broken SDK installations. A missing
16808      # lib dir is not going to work.
16809      if test ! -d "$WIN_SDK_BASE/../lib"; then
16810        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16811$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16812        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16813$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16814      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16815        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16816$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16817        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16818        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16819          VS_ENV_ARGS="/x86"
16820        else
16821          VS_ENV_ARGS="/x64"
16822        fi
16823      else
16824        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16825$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16826        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16827$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16828      fi
16829    fi
16830  fi
16831
16832
16833  if test "x$VS_ENV_CMD" != x; then
16834    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16835
16836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16837
16838  # First separate the path from the arguments. This will split at the first
16839  # space.
16840  complete="$VS_ENV_CMD"
16841  path="${complete%% *}"
16842  tmp="$complete EOL"
16843  arguments="${tmp#* }"
16844
16845  # Input might be given as Windows format, start by converting to
16846  # unix format.
16847  new_path=`$CYGPATH -u "$path"`
16848
16849  # Now try to locate executable using which
16850  new_path=`$WHICH "$new_path" 2> /dev/null`
16851  # bat and cmd files are not always considered executable in cygwin causing which
16852  # to not find them
16853  if test "x$new_path" = x \
16854           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16855           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16856    new_path=`$CYGPATH -u "$path"`
16857  fi
16858  if test "x$new_path" = x; then
16859    # Oops. Which didn't find the executable.
16860    # The splitting of arguments from the executable at a space might have been incorrect,
16861    # since paths with space are more likely in Windows. Give it another try with the whole
16862    # argument.
16863    path="$complete"
16864    arguments="EOL"
16865    new_path=`$CYGPATH -u "$path"`
16866    new_path=`$WHICH "$new_path" 2> /dev/null`
16867    # bat and cmd files are not always considered executable in cygwin causing which
16868    # to not find them
16869    if test "x$new_path" = x \
16870             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16871             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16872      new_path=`$CYGPATH -u "$path"`
16873    fi
16874    if test "x$new_path" = x; then
16875      # It's still not found. Now this is an unrecoverable error.
16876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16877$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16878      has_space=`$ECHO "$complete" | $GREP " "`
16879      if test "x$has_space" != x; then
16880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16882      fi
16883      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16884    fi
16885  fi
16886
16887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16890  # "foo.exe" is OK but "foo" is an error.
16891  #
16892  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16893  # It is also a way to make sure we got the proper file name for the real test later on.
16894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16895  if test "x$test_shortpath" = x; then
16896    # Short path failed, file does not exist as specified.
16897    # Try adding .exe or .cmd
16898    if test -f "${new_path}.exe"; then
16899       input_to_shortpath="${new_path}.exe"
16900    elif test -f "${new_path}.cmd"; then
16901       input_to_shortpath="${new_path}.cmd"
16902    else
16903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16904$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16905      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16906$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16907      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16908    fi
16909  else
16910    input_to_shortpath="$new_path"
16911  fi
16912
16913  # Call helper function which possibly converts this using DOS-style short mode.
16914  # If so, the updated path is stored in $new_path.
16915  new_path="$input_to_shortpath"
16916
16917  input_path="$input_to_shortpath"
16918  # Check if we need to convert this using DOS-style short mode. If the path
16919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16920  # take no chances and rewrite it.
16921  # Note: m4 eats our [], so we need to use [ and ] instead.
16922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16923  if test "x$has_forbidden_chars" != x; then
16924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16928      # Going to short mode and back again did indeed matter. Since short mode is
16929      # case insensitive, let's make it lowercase to improve readability.
16930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16931      # Now convert it back to Unix-stile (cygpath)
16932      input_path=`$CYGPATH -u "$shortmode_path"`
16933      new_path="$input_path"
16934    fi
16935  fi
16936
16937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16938  if test "x$test_cygdrive_prefix" = x; then
16939    # As a simple fix, exclude /usr/bin since it's not a real path.
16940    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16942      # a path prefixed by /cygdrive for fixpath to work.
16943      new_path="$CYGWIN_ROOT_PATH$input_path"
16944    fi
16945  fi
16946
16947  # remove trailing .exe if any
16948  new_path="${new_path/%.exe/}"
16949
16950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16951
16952  # First separate the path from the arguments. This will split at the first
16953  # space.
16954  complete="$VS_ENV_CMD"
16955  path="${complete%% *}"
16956  tmp="$complete EOL"
16957  arguments="${tmp#* }"
16958
16959  # Input might be given as Windows format, start by converting to
16960  # unix format.
16961  new_path="$path"
16962
16963  windows_path="$new_path"
16964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16965    unix_path=`$CYGPATH -u "$windows_path"`
16966    new_path="$unix_path"
16967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16969    new_path="$unix_path"
16970  fi
16971
16972
16973  # Now try to locate executable using which
16974  new_path=`$WHICH "$new_path" 2> /dev/null`
16975
16976  if test "x$new_path" = x; then
16977    # Oops. Which didn't find the executable.
16978    # The splitting of arguments from the executable at a space might have been incorrect,
16979    # since paths with space are more likely in Windows. Give it another try with the whole
16980    # argument.
16981    path="$complete"
16982    arguments="EOL"
16983    new_path="$path"
16984
16985  windows_path="$new_path"
16986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16987    unix_path=`$CYGPATH -u "$windows_path"`
16988    new_path="$unix_path"
16989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16991    new_path="$unix_path"
16992  fi
16993
16994
16995    new_path=`$WHICH "$new_path" 2> /dev/null`
16996
16997    if test "x$new_path" = x; then
16998      # It's still not found. Now this is an unrecoverable error.
16999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17000$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17001      has_space=`$ECHO "$complete" | $GREP " "`
17002      if test "x$has_space" != x; then
17003        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17004$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17005      fi
17006      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17007    fi
17008  fi
17009
17010  # Now new_path has a complete unix path to the binary
17011  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17012    # Keep paths in /bin as-is, but remove trailing .exe if any
17013    new_path="${new_path/%.exe/}"
17014    # Do not save /bin paths to all_fixpath_prefixes!
17015  else
17016    # Not in mixed or Windows style, start by that.
17017    new_path=`cmd //c echo $new_path`
17018
17019  input_path="$new_path"
17020  # Check if we need to convert this using DOS-style short mode. If the path
17021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17022  # take no chances and rewrite it.
17023  # Note: m4 eats our [], so we need to use [ and ] instead.
17024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17025  if test "x$has_forbidden_chars" != x; then
17026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17028  fi
17029
17030    # Output is in $new_path
17031
17032  windows_path="$new_path"
17033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17034    unix_path=`$CYGPATH -u "$windows_path"`
17035    new_path="$unix_path"
17036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17038    new_path="$unix_path"
17039  fi
17040
17041    # remove trailing .exe if any
17042    new_path="${new_path/%.exe/}"
17043
17044    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17045    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17046  fi
17047
17048  else
17049    # We're on a posix platform. Hooray! :)
17050    # First separate the path from the arguments. This will split at the first
17051    # space.
17052    complete="$VS_ENV_CMD"
17053    path="${complete%% *}"
17054    tmp="$complete EOL"
17055    arguments="${tmp#* }"
17056
17057    # Cannot rely on the command "which" here since it doesn't always work.
17058    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17059    if test -z "$is_absolute_path"; then
17060      # Path to executable is not absolute. Find it.
17061      IFS_save="$IFS"
17062      IFS=:
17063      for p in $PATH; do
17064        if test -f "$p/$path" && test -x "$p/$path"; then
17065          new_path="$p/$path"
17066          break
17067        fi
17068      done
17069      IFS="$IFS_save"
17070    else
17071      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17072$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17073      new_path="$path"
17074    fi
17075
17076    if test "x$new_path" = x; then
17077        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17078$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17079        has_space=`$ECHO "$complete" | $GREP " "`
17080        if test "x$has_space" != x; then
17081          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17082$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17083        fi
17084        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17085      fi
17086  fi
17087
17088      # Now join together the path and the arguments once again
17089      if test "x$arguments" != xEOL; then
17090        new_complete="$new_path ${arguments% *}"
17091      else
17092        new_complete="$new_path"
17093      fi
17094
17095  if test "x$complete" != "x$new_complete"; then
17096      VS_ENV_CMD="$new_complete"
17097      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17098$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17099    fi
17100
17101
17102    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17103    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17104$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17105    cd $OUTPUT_ROOT
17106    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17107    # to autoconf standards.
17108
17109    #----
17110
17111    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17112    # but calculate the difference in Cygwin environment before/after running it and then
17113    # apply the diff.
17114
17115    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17116      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17117      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17118      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17119    else
17120      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17121      _dosbash=`cmd //c echo \`which bash\``
17122    fi
17123
17124    # generate the set of exported vars before/after the vs10 setup
17125    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17126    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17127    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17128    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17129
17130    # Now execute the newly created bat file.
17131    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17132    cmd /c localdevenvtmp.bat | cat
17133
17134    # apply the diff (less some non-vs10 vars named by "!")
17135    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17136    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17137    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17138
17139    # cleanup
17140    $RM localdevenvtmp*
17141    #----
17142    cd $CURDIR
17143    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17144      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17145$as_echo "no" >&6; }
17146      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17147$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17148      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17149$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17150      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17151$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17152      as_fn_error $? "Cannot continue" "$LINENO" 5
17153    fi
17154
17155    # Now set all paths and other env variables. This will allow the rest of
17156    # the configure script to find and run the compiler in the proper way.
17157    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17158$as_echo "$as_me: Setting extracted environment variables" >&6;}
17159    . $OUTPUT_ROOT/localdevenv.sh
17160  else
17161    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17162    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17163$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17164  fi
17165
17166  # At this point, we should have corrent variables in the environment, or we can't continue.
17167  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17168$as_echo_n "checking for Visual Studio variables... " >&6; }
17169
17170  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17171    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17173$as_echo "present but broken" >&6; }
17174      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17175    else
17176      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17177$as_echo "ok" >&6; }
17178      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17179      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17180      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17181      VS_PATH="$PATH"
17182
17183
17184
17185    fi
17186  else
17187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17188$as_echo "not found" >&6; }
17189
17190    if test "x$VS_ENV_CMD" = x; then
17191      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17192$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17193      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17194$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17195    else
17196      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17197$as_echo "$as_me: Running the extraction script failed." >&6;}
17198    fi
17199    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17200$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17201    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17202$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17203    as_fn_error $? "Cannot continue" "$LINENO" 5
17204  fi
17205
17206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17207$as_echo_n "checking for msvcr100.dll... " >&6; }
17208
17209# Check whether --with-msvcr-dll was given.
17210if test "${with_msvcr_dll+set}" = set; then :
17211  withval=$with_msvcr_dll;
17212fi
17213
17214  if test "x$with_msvcr_dll" != x; then
17215    MSVCR_DLL="$with_msvcr_dll"
17216  else
17217    if test "x$VCINSTALLDIR" != x; then
17218      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17219        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17220      else
17221        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17222        if test "x$MSVCR_DLL" = x; then
17223          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17224        fi
17225      fi
17226      if test "x$MSVCR_DLL" != x; then
17227        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17228$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17229      else
17230        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17231$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17232      fi
17233    fi
17234    # Try some fallback alternatives
17235    if test "x$MSVCR_DLL" = x; then
17236      # If visual studio express is installed, there is usually one with the debugger
17237      if test "x$VS100COMNTOOLS" != x; then
17238        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17239          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17240          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17241$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17242        fi
17243      fi
17244    fi
17245    if test "x$MSVCR_DLL" = x; then
17246      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17247        # Fallback for 32bit builds, look in the windows directory.
17248        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17249          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17250$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17251          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17252        fi
17253      fi
17254    fi
17255  fi
17256  if test "x$MSVCR_DLL" = x; then
17257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17258$as_echo "no" >&6; }
17259    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17260  fi
17261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17262$as_echo "$MSVCR_DLL" >&6; }
17263
17264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17265
17266  # Input might be given as Windows format, start by converting to
17267  # unix format.
17268  path="$MSVCR_DLL"
17269  new_path=`$CYGPATH -u "$path"`
17270
17271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17274  # "foo.exe" is OK but "foo" is an error.
17275  #
17276  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17277  # It is also a way to make sure we got the proper file name for the real test later on.
17278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17279  if test "x$test_shortpath" = x; then
17280    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17281$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17282    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17283  fi
17284
17285  # Call helper function which possibly converts this using DOS-style short mode.
17286  # If so, the updated path is stored in $new_path.
17287
17288  input_path="$new_path"
17289  # Check if we need to convert this using DOS-style short mode. If the path
17290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17291  # take no chances and rewrite it.
17292  # Note: m4 eats our [], so we need to use [ and ] instead.
17293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17294  if test "x$has_forbidden_chars" != x; then
17295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17296    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17297    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17298    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17299      # Going to short mode and back again did indeed matter. Since short mode is
17300      # case insensitive, let's make it lowercase to improve readability.
17301      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17302      # Now convert it back to Unix-stile (cygpath)
17303      input_path=`$CYGPATH -u "$shortmode_path"`
17304      new_path="$input_path"
17305    fi
17306  fi
17307
17308  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17309  if test "x$test_cygdrive_prefix" = x; then
17310    # As a simple fix, exclude /usr/bin since it's not a real path.
17311    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17312      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17313      # a path prefixed by /cygdrive for fixpath to work.
17314      new_path="$CYGWIN_ROOT_PATH$input_path"
17315    fi
17316  fi
17317
17318
17319  if test "x$path" != "x$new_path"; then
17320    MSVCR_DLL="$new_path"
17321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17322$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17323  fi
17324
17325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17326
17327  path="$MSVCR_DLL"
17328  has_colon=`$ECHO $path | $GREP ^.:`
17329  new_path="$path"
17330  if test "x$has_colon" = x; then
17331    # Not in mixed or Windows style, start by that.
17332    new_path=`cmd //c echo $path`
17333  fi
17334
17335
17336  input_path="$new_path"
17337  # Check if we need to convert this using DOS-style short mode. If the path
17338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17339  # take no chances and rewrite it.
17340  # Note: m4 eats our [], so we need to use [ and ] instead.
17341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17342  if test "x$has_forbidden_chars" != x; then
17343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17345  fi
17346
17347
17348  windows_path="$new_path"
17349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17350    unix_path=`$CYGPATH -u "$windows_path"`
17351    new_path="$unix_path"
17352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17354    new_path="$unix_path"
17355  fi
17356
17357  if test "x$path" != "x$new_path"; then
17358    MSVCR_DLL="$new_path"
17359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17360$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17361  fi
17362
17363  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17364  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17365
17366  else
17367    # We're on a posix platform. Hooray! :)
17368    path="$MSVCR_DLL"
17369    has_space=`$ECHO "$path" | $GREP " "`
17370    if test "x$has_space" != x; then
17371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17372$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17373      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17374    fi
17375
17376    # Use eval to expand a potential ~
17377    eval path="$path"
17378    if test ! -f "$path" && test ! -d "$path"; then
17379      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17380    fi
17381
17382    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17383  fi
17384
17385
17386
17387
17388# Check whether --with-dxsdk was given.
17389if test "${with_dxsdk+set}" = set; then :
17390  withval=$with_dxsdk;
17391fi
17392
17393
17394# Check whether --with-dxsdk-lib was given.
17395if test "${with_dxsdk_lib+set}" = set; then :
17396  withval=$with_dxsdk_lib;
17397fi
17398
17399
17400# Check whether --with-dxsdk-include was given.
17401if test "${with_dxsdk_include+set}" = set; then :
17402  withval=$with_dxsdk_include;
17403fi
17404
17405
17406  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17407$as_echo_n "checking for DirectX SDK... " >&6; }
17408
17409  if test "x$with_dxsdk" != x; then
17410    dxsdk_path="$with_dxsdk"
17411  elif test "x$DXSDK_DIR" != x; then
17412    dxsdk_path="$DXSDK_DIR"
17413  elif test -d "C:/DXSDK"; then
17414    dxsdk_path="C:/DXSDK"
17415  else
17416    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17417  fi
17418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17419$as_echo "$dxsdk_path" >&6; }
17420
17421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17422
17423  # Input might be given as Windows format, start by converting to
17424  # unix format.
17425  path="$dxsdk_path"
17426  new_path=`$CYGPATH -u "$path"`
17427
17428  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17429  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17430  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17431  # "foo.exe" is OK but "foo" is an error.
17432  #
17433  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17434  # It is also a way to make sure we got the proper file name for the real test later on.
17435  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17436  if test "x$test_shortpath" = x; then
17437    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17438$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17439    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17440  fi
17441
17442  # Call helper function which possibly converts this using DOS-style short mode.
17443  # If so, the updated path is stored in $new_path.
17444
17445  input_path="$new_path"
17446  # Check if we need to convert this using DOS-style short mode. If the path
17447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17448  # take no chances and rewrite it.
17449  # Note: m4 eats our [], so we need to use [ and ] instead.
17450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17451  if test "x$has_forbidden_chars" != x; then
17452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17456      # Going to short mode and back again did indeed matter. Since short mode is
17457      # case insensitive, let's make it lowercase to improve readability.
17458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17459      # Now convert it back to Unix-stile (cygpath)
17460      input_path=`$CYGPATH -u "$shortmode_path"`
17461      new_path="$input_path"
17462    fi
17463  fi
17464
17465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17466  if test "x$test_cygdrive_prefix" = x; then
17467    # As a simple fix, exclude /usr/bin since it's not a real path.
17468    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17470      # a path prefixed by /cygdrive for fixpath to work.
17471      new_path="$CYGWIN_ROOT_PATH$input_path"
17472    fi
17473  fi
17474
17475
17476  if test "x$path" != "x$new_path"; then
17477    dxsdk_path="$new_path"
17478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17479$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17480  fi
17481
17482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17483
17484  path="$dxsdk_path"
17485  has_colon=`$ECHO $path | $GREP ^.:`
17486  new_path="$path"
17487  if test "x$has_colon" = x; then
17488    # Not in mixed or Windows style, start by that.
17489    new_path=`cmd //c echo $path`
17490  fi
17491
17492
17493  input_path="$new_path"
17494  # Check if we need to convert this using DOS-style short mode. If the path
17495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17496  # take no chances and rewrite it.
17497  # Note: m4 eats our [], so we need to use [ and ] instead.
17498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17499  if test "x$has_forbidden_chars" != x; then
17500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17502  fi
17503
17504
17505  windows_path="$new_path"
17506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17507    unix_path=`$CYGPATH -u "$windows_path"`
17508    new_path="$unix_path"
17509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17511    new_path="$unix_path"
17512  fi
17513
17514  if test "x$path" != "x$new_path"; then
17515    dxsdk_path="$new_path"
17516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17517$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17518  fi
17519
17520  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17521  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17522
17523  else
17524    # We're on a posix platform. Hooray! :)
17525    path="$dxsdk_path"
17526    has_space=`$ECHO "$path" | $GREP " "`
17527    if test "x$has_space" != x; then
17528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17529$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17530      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17531    fi
17532
17533    # Use eval to expand a potential ~
17534    eval path="$path"
17535    if test ! -f "$path" && test ! -d "$path"; then
17536      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17537    fi
17538
17539    dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17540  fi
17541
17542
17543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17544$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17545  if test "x$with_dxsdk_lib" != x; then
17546    DXSDK_LIB_PATH="$with_dxsdk_lib"
17547  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17548    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17549  else
17550    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17551  fi
17552  # dsound.lib is linked to in jsoundds
17553  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17554    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17555  fi
17556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17557$as_echo "$DXSDK_LIB_PATH" >&6; }
17558
17559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17560
17561  # Input might be given as Windows format, start by converting to
17562  # unix format.
17563  path="$DXSDK_LIB_PATH"
17564  new_path=`$CYGPATH -u "$path"`
17565
17566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17569  # "foo.exe" is OK but "foo" is an error.
17570  #
17571  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17572  # It is also a way to make sure we got the proper file name for the real test later on.
17573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17574  if test "x$test_shortpath" = x; then
17575    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17576$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17577    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17578  fi
17579
17580  # Call helper function which possibly converts this using DOS-style short mode.
17581  # If so, the updated path is stored in $new_path.
17582
17583  input_path="$new_path"
17584  # Check if we need to convert this using DOS-style short mode. If the path
17585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17586  # take no chances and rewrite it.
17587  # Note: m4 eats our [], so we need to use [ and ] instead.
17588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17589  if test "x$has_forbidden_chars" != x; then
17590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17591    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17592    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17593    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17594      # Going to short mode and back again did indeed matter. Since short mode is
17595      # case insensitive, let's make it lowercase to improve readability.
17596      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17597      # Now convert it back to Unix-stile (cygpath)
17598      input_path=`$CYGPATH -u "$shortmode_path"`
17599      new_path="$input_path"
17600    fi
17601  fi
17602
17603  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17604  if test "x$test_cygdrive_prefix" = x; then
17605    # As a simple fix, exclude /usr/bin since it's not a real path.
17606    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17607      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17608      # a path prefixed by /cygdrive for fixpath to work.
17609      new_path="$CYGWIN_ROOT_PATH$input_path"
17610    fi
17611  fi
17612
17613
17614  if test "x$path" != "x$new_path"; then
17615    DXSDK_LIB_PATH="$new_path"
17616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17617$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17618  fi
17619
17620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17621
17622  path="$DXSDK_LIB_PATH"
17623  has_colon=`$ECHO $path | $GREP ^.:`
17624  new_path="$path"
17625  if test "x$has_colon" = x; then
17626    # Not in mixed or Windows style, start by that.
17627    new_path=`cmd //c echo $path`
17628  fi
17629
17630
17631  input_path="$new_path"
17632  # Check if we need to convert this using DOS-style short mode. If the path
17633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17634  # take no chances and rewrite it.
17635  # Note: m4 eats our [], so we need to use [ and ] instead.
17636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17637  if test "x$has_forbidden_chars" != x; then
17638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17640  fi
17641
17642
17643  windows_path="$new_path"
17644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17645    unix_path=`$CYGPATH -u "$windows_path"`
17646    new_path="$unix_path"
17647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17649    new_path="$unix_path"
17650  fi
17651
17652  if test "x$path" != "x$new_path"; then
17653    DXSDK_LIB_PATH="$new_path"
17654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17655$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17656  fi
17657
17658  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17659  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17660
17661  else
17662    # We're on a posix platform. Hooray! :)
17663    path="$DXSDK_LIB_PATH"
17664    has_space=`$ECHO "$path" | $GREP " "`
17665    if test "x$has_space" != x; then
17666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17667$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17668      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17669    fi
17670
17671    # Use eval to expand a potential ~
17672    eval path="$path"
17673    if test ! -f "$path" && test ! -d "$path"; then
17674      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17675    fi
17676
17677    DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17678  fi
17679
17680
17681  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17682$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17683  if test "x$with_dxsdk_include" != x; then
17684    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17685  else
17686    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17687  fi
17688  # dsound.h is included in jsoundds
17689  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17690    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17691  fi
17692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17693$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17694
17695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17696
17697  # Input might be given as Windows format, start by converting to
17698  # unix format.
17699  path="$DXSDK_INCLUDE_PATH"
17700  new_path=`$CYGPATH -u "$path"`
17701
17702  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17703  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17704  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17705  # "foo.exe" is OK but "foo" is an error.
17706  #
17707  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17708  # It is also a way to make sure we got the proper file name for the real test later on.
17709  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17710  if test "x$test_shortpath" = x; then
17711    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17712$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17713    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17714  fi
17715
17716  # Call helper function which possibly converts this using DOS-style short mode.
17717  # If so, the updated path is stored in $new_path.
17718
17719  input_path="$new_path"
17720  # Check if we need to convert this using DOS-style short mode. If the path
17721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17722  # take no chances and rewrite it.
17723  # Note: m4 eats our [], so we need to use [ and ] instead.
17724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17725  if test "x$has_forbidden_chars" != x; then
17726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17730      # Going to short mode and back again did indeed matter. Since short mode is
17731      # case insensitive, let's make it lowercase to improve readability.
17732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17733      # Now convert it back to Unix-stile (cygpath)
17734      input_path=`$CYGPATH -u "$shortmode_path"`
17735      new_path="$input_path"
17736    fi
17737  fi
17738
17739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17740  if test "x$test_cygdrive_prefix" = x; then
17741    # As a simple fix, exclude /usr/bin since it's not a real path.
17742    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17744      # a path prefixed by /cygdrive for fixpath to work.
17745      new_path="$CYGWIN_ROOT_PATH$input_path"
17746    fi
17747  fi
17748
17749
17750  if test "x$path" != "x$new_path"; then
17751    DXSDK_INCLUDE_PATH="$new_path"
17752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17753$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17754  fi
17755
17756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17757
17758  path="$DXSDK_INCLUDE_PATH"
17759  has_colon=`$ECHO $path | $GREP ^.:`
17760  new_path="$path"
17761  if test "x$has_colon" = x; then
17762    # Not in mixed or Windows style, start by that.
17763    new_path=`cmd //c echo $path`
17764  fi
17765
17766
17767  input_path="$new_path"
17768  # Check if we need to convert this using DOS-style short mode. If the path
17769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17770  # take no chances and rewrite it.
17771  # Note: m4 eats our [], so we need to use [ and ] instead.
17772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17773  if test "x$has_forbidden_chars" != x; then
17774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17776  fi
17777
17778
17779  windows_path="$new_path"
17780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17781    unix_path=`$CYGPATH -u "$windows_path"`
17782    new_path="$unix_path"
17783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17785    new_path="$unix_path"
17786  fi
17787
17788  if test "x$path" != "x$new_path"; then
17789    DXSDK_INCLUDE_PATH="$new_path"
17790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17791$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17792  fi
17793
17794  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17795  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17796
17797  else
17798    # We're on a posix platform. Hooray! :)
17799    path="$DXSDK_INCLUDE_PATH"
17800    has_space=`$ECHO "$path" | $GREP " "`
17801    if test "x$has_space" != x; then
17802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17803$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17804      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17805    fi
17806
17807    # Use eval to expand a potential ~
17808    eval path="$path"
17809    if test ! -f "$path" && test ! -d "$path"; then
17810      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17811    fi
17812
17813    DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
17814  fi
17815
17816
17817
17818
17819  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17820
17821fi
17822
17823
17824
17825# If --build AND --host is set, then the configure script will find any
17826# cross compilation tools in the PATH. Cross compilation tools
17827# follows the cross compilation standard where they are prefixed with ${host}.
17828# For example the binary i686-sun-solaris2.10-gcc
17829# will cross compile for i686-sun-solaris2.10
17830# If neither of build and host is not set, then build=host and the
17831# default compiler found in the path will be used.
17832# Setting only --host, does not seem to be really supported.
17833# Please set both --build and --host if you want to cross compile.
17834
17835if test "x$COMPILE_TYPE" = "xcross"; then
17836    # Now we to find a C/C++ compiler that can build executables for the build
17837    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17838    # once. Also, we need to do this before adding a tools dir to the path,
17839    # otherwise we might pick up cross-compilers which don't use standard naming.
17840    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17841    # to wait until they are properly discovered.
17842    for ac_prog in cl cc gcc
17843do
17844  # Extract the first word of "$ac_prog", so it can be a program name with args.
17845set dummy $ac_prog; ac_word=$2
17846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17847$as_echo_n "checking for $ac_word... " >&6; }
17848if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17849  $as_echo_n "(cached) " >&6
17850else
17851  case $BUILD_CC in
17852  [\\/]* | ?:[\\/]*)
17853  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17854  ;;
17855  *)
17856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17857for as_dir in $PATH
17858do
17859  IFS=$as_save_IFS
17860  test -z "$as_dir" && as_dir=.
17861    for ac_exec_ext in '' $ac_executable_extensions; do
17862  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17863    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17865    break 2
17866  fi
17867done
17868  done
17869IFS=$as_save_IFS
17870
17871  ;;
17872esac
17873fi
17874BUILD_CC=$ac_cv_path_BUILD_CC
17875if test -n "$BUILD_CC"; then
17876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17877$as_echo "$BUILD_CC" >&6; }
17878else
17879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17880$as_echo "no" >&6; }
17881fi
17882
17883
17884  test -n "$BUILD_CC" && break
17885done
17886
17887
17888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17889
17890  # First separate the path from the arguments. This will split at the first
17891  # space.
17892  complete="$BUILD_CC"
17893  path="${complete%% *}"
17894  tmp="$complete EOL"
17895  arguments="${tmp#* }"
17896
17897  # Input might be given as Windows format, start by converting to
17898  # unix format.
17899  new_path=`$CYGPATH -u "$path"`
17900
17901  # Now try to locate executable using which
17902  new_path=`$WHICH "$new_path" 2> /dev/null`
17903  # bat and cmd files are not always considered executable in cygwin causing which
17904  # to not find them
17905  if test "x$new_path" = x \
17906           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17907           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17908    new_path=`$CYGPATH -u "$path"`
17909  fi
17910  if test "x$new_path" = x; then
17911    # Oops. Which didn't find the executable.
17912    # The splitting of arguments from the executable at a space might have been incorrect,
17913    # since paths with space are more likely in Windows. Give it another try with the whole
17914    # argument.
17915    path="$complete"
17916    arguments="EOL"
17917    new_path=`$CYGPATH -u "$path"`
17918    new_path=`$WHICH "$new_path" 2> /dev/null`
17919    # bat and cmd files are not always considered executable in cygwin causing which
17920    # to not find them
17921    if test "x$new_path" = x \
17922             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17923             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17924      new_path=`$CYGPATH -u "$path"`
17925    fi
17926    if test "x$new_path" = x; then
17927      # It's still not found. Now this is an unrecoverable error.
17928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17929$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17930      has_space=`$ECHO "$complete" | $GREP " "`
17931      if test "x$has_space" != x; then
17932        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17933$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17934      fi
17935      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17936    fi
17937  fi
17938
17939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17942  # "foo.exe" is OK but "foo" is an error.
17943  #
17944  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17945  # It is also a way to make sure we got the proper file name for the real test later on.
17946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17947  if test "x$test_shortpath" = x; then
17948    # Short path failed, file does not exist as specified.
17949    # Try adding .exe or .cmd
17950    if test -f "${new_path}.exe"; then
17951       input_to_shortpath="${new_path}.exe"
17952    elif test -f "${new_path}.cmd"; then
17953       input_to_shortpath="${new_path}.cmd"
17954    else
17955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17956$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17957      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17958$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17959      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17960    fi
17961  else
17962    input_to_shortpath="$new_path"
17963  fi
17964
17965  # Call helper function which possibly converts this using DOS-style short mode.
17966  # If so, the updated path is stored in $new_path.
17967  new_path="$input_to_shortpath"
17968
17969  input_path="$input_to_shortpath"
17970  # Check if we need to convert this using DOS-style short mode. If the path
17971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17972  # take no chances and rewrite it.
17973  # Note: m4 eats our [], so we need to use [ and ] instead.
17974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17975  if test "x$has_forbidden_chars" != x; then
17976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17980      # Going to short mode and back again did indeed matter. Since short mode is
17981      # case insensitive, let's make it lowercase to improve readability.
17982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17983      # Now convert it back to Unix-stile (cygpath)
17984      input_path=`$CYGPATH -u "$shortmode_path"`
17985      new_path="$input_path"
17986    fi
17987  fi
17988
17989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17990  if test "x$test_cygdrive_prefix" = x; then
17991    # As a simple fix, exclude /usr/bin since it's not a real path.
17992    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17994      # a path prefixed by /cygdrive for fixpath to work.
17995      new_path="$CYGWIN_ROOT_PATH$input_path"
17996    fi
17997  fi
17998
17999  # remove trailing .exe if any
18000  new_path="${new_path/%.exe/}"
18001
18002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18003
18004  # First separate the path from the arguments. This will split at the first
18005  # space.
18006  complete="$BUILD_CC"
18007  path="${complete%% *}"
18008  tmp="$complete EOL"
18009  arguments="${tmp#* }"
18010
18011  # Input might be given as Windows format, start by converting to
18012  # unix format.
18013  new_path="$path"
18014
18015  windows_path="$new_path"
18016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18017    unix_path=`$CYGPATH -u "$windows_path"`
18018    new_path="$unix_path"
18019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18021    new_path="$unix_path"
18022  fi
18023
18024
18025  # Now try to locate executable using which
18026  new_path=`$WHICH "$new_path" 2> /dev/null`
18027
18028  if test "x$new_path" = x; then
18029    # Oops. Which didn't find the executable.
18030    # The splitting of arguments from the executable at a space might have been incorrect,
18031    # since paths with space are more likely in Windows. Give it another try with the whole
18032    # argument.
18033    path="$complete"
18034    arguments="EOL"
18035    new_path="$path"
18036
18037  windows_path="$new_path"
18038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18039    unix_path=`$CYGPATH -u "$windows_path"`
18040    new_path="$unix_path"
18041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18043    new_path="$unix_path"
18044  fi
18045
18046
18047    new_path=`$WHICH "$new_path" 2> /dev/null`
18048
18049    if test "x$new_path" = x; then
18050      # It's still not found. Now this is an unrecoverable error.
18051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18052$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18053      has_space=`$ECHO "$complete" | $GREP " "`
18054      if test "x$has_space" != x; then
18055        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18056$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18057      fi
18058      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18059    fi
18060  fi
18061
18062  # Now new_path has a complete unix path to the binary
18063  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18064    # Keep paths in /bin as-is, but remove trailing .exe if any
18065    new_path="${new_path/%.exe/}"
18066    # Do not save /bin paths to all_fixpath_prefixes!
18067  else
18068    # Not in mixed or Windows style, start by that.
18069    new_path=`cmd //c echo $new_path`
18070
18071  input_path="$new_path"
18072  # Check if we need to convert this using DOS-style short mode. If the path
18073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18074  # take no chances and rewrite it.
18075  # Note: m4 eats our [], so we need to use [ and ] instead.
18076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18077  if test "x$has_forbidden_chars" != x; then
18078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18080  fi
18081
18082    # Output is in $new_path
18083
18084  windows_path="$new_path"
18085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18086    unix_path=`$CYGPATH -u "$windows_path"`
18087    new_path="$unix_path"
18088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18090    new_path="$unix_path"
18091  fi
18092
18093    # remove trailing .exe if any
18094    new_path="${new_path/%.exe/}"
18095
18096    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18097    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18098  fi
18099
18100  else
18101    # We're on a posix platform. Hooray! :)
18102    # First separate the path from the arguments. This will split at the first
18103    # space.
18104    complete="$BUILD_CC"
18105    path="${complete%% *}"
18106    tmp="$complete EOL"
18107    arguments="${tmp#* }"
18108
18109    # Cannot rely on the command "which" here since it doesn't always work.
18110    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18111    if test -z "$is_absolute_path"; then
18112      # Path to executable is not absolute. Find it.
18113      IFS_save="$IFS"
18114      IFS=:
18115      for p in $PATH; do
18116        if test -f "$p/$path" && test -x "$p/$path"; then
18117          new_path="$p/$path"
18118          break
18119        fi
18120      done
18121      IFS="$IFS_save"
18122    else
18123      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18124$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18125      new_path="$path"
18126    fi
18127
18128    if test "x$new_path" = x; then
18129        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18130$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18131        has_space=`$ECHO "$complete" | $GREP " "`
18132        if test "x$has_space" != x; then
18133          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18134$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18135        fi
18136        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18137      fi
18138  fi
18139
18140      # Now join together the path and the arguments once again
18141      if test "x$arguments" != xEOL; then
18142        new_complete="$new_path ${arguments% *}"
18143      else
18144        new_complete="$new_path"
18145      fi
18146
18147  if test "x$complete" != "x$new_complete"; then
18148      BUILD_CC="$new_complete"
18149      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18150$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18151    fi
18152
18153    for ac_prog in cl CC g++
18154do
18155  # Extract the first word of "$ac_prog", so it can be a program name with args.
18156set dummy $ac_prog; ac_word=$2
18157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18158$as_echo_n "checking for $ac_word... " >&6; }
18159if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
18160  $as_echo_n "(cached) " >&6
18161else
18162  case $BUILD_CXX in
18163  [\\/]* | ?:[\\/]*)
18164  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18165  ;;
18166  *)
18167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18168for as_dir in $PATH
18169do
18170  IFS=$as_save_IFS
18171  test -z "$as_dir" && as_dir=.
18172    for ac_exec_ext in '' $ac_executable_extensions; do
18173  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18174    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18176    break 2
18177  fi
18178done
18179  done
18180IFS=$as_save_IFS
18181
18182  ;;
18183esac
18184fi
18185BUILD_CXX=$ac_cv_path_BUILD_CXX
18186if test -n "$BUILD_CXX"; then
18187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18188$as_echo "$BUILD_CXX" >&6; }
18189else
18190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18191$as_echo "no" >&6; }
18192fi
18193
18194
18195  test -n "$BUILD_CXX" && break
18196done
18197
18198
18199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18200
18201  # First separate the path from the arguments. This will split at the first
18202  # space.
18203  complete="$BUILD_CXX"
18204  path="${complete%% *}"
18205  tmp="$complete EOL"
18206  arguments="${tmp#* }"
18207
18208  # Input might be given as Windows format, start by converting to
18209  # unix format.
18210  new_path=`$CYGPATH -u "$path"`
18211
18212  # Now try to locate executable using which
18213  new_path=`$WHICH "$new_path" 2> /dev/null`
18214  # bat and cmd files are not always considered executable in cygwin causing which
18215  # to not find them
18216  if test "x$new_path" = x \
18217           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18218           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18219    new_path=`$CYGPATH -u "$path"`
18220  fi
18221  if test "x$new_path" = x; then
18222    # Oops. Which didn't find the executable.
18223    # The splitting of arguments from the executable at a space might have been incorrect,
18224    # since paths with space are more likely in Windows. Give it another try with the whole
18225    # argument.
18226    path="$complete"
18227    arguments="EOL"
18228    new_path=`$CYGPATH -u "$path"`
18229    new_path=`$WHICH "$new_path" 2> /dev/null`
18230    # bat and cmd files are not always considered executable in cygwin causing which
18231    # to not find them
18232    if test "x$new_path" = x \
18233             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18234             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18235      new_path=`$CYGPATH -u "$path"`
18236    fi
18237    if test "x$new_path" = x; then
18238      # It's still not found. Now this is an unrecoverable error.
18239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18240$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18241      has_space=`$ECHO "$complete" | $GREP " "`
18242      if test "x$has_space" != x; then
18243        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18244$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18245      fi
18246      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18247    fi
18248  fi
18249
18250  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18251  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18252  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18253  # "foo.exe" is OK but "foo" is an error.
18254  #
18255  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18256  # It is also a way to make sure we got the proper file name for the real test later on.
18257  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18258  if test "x$test_shortpath" = x; then
18259    # Short path failed, file does not exist as specified.
18260    # Try adding .exe or .cmd
18261    if test -f "${new_path}.exe"; then
18262       input_to_shortpath="${new_path}.exe"
18263    elif test -f "${new_path}.cmd"; then
18264       input_to_shortpath="${new_path}.cmd"
18265    else
18266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18267$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18268      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18269$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18270      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18271    fi
18272  else
18273    input_to_shortpath="$new_path"
18274  fi
18275
18276  # Call helper function which possibly converts this using DOS-style short mode.
18277  # If so, the updated path is stored in $new_path.
18278  new_path="$input_to_shortpath"
18279
18280  input_path="$input_to_shortpath"
18281  # Check if we need to convert this using DOS-style short mode. If the path
18282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18283  # take no chances and rewrite it.
18284  # Note: m4 eats our [], so we need to use [ and ] instead.
18285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18286  if test "x$has_forbidden_chars" != x; then
18287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18291      # Going to short mode and back again did indeed matter. Since short mode is
18292      # case insensitive, let's make it lowercase to improve readability.
18293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18294      # Now convert it back to Unix-stile (cygpath)
18295      input_path=`$CYGPATH -u "$shortmode_path"`
18296      new_path="$input_path"
18297    fi
18298  fi
18299
18300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18301  if test "x$test_cygdrive_prefix" = x; then
18302    # As a simple fix, exclude /usr/bin since it's not a real path.
18303    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18305      # a path prefixed by /cygdrive for fixpath to work.
18306      new_path="$CYGWIN_ROOT_PATH$input_path"
18307    fi
18308  fi
18309
18310  # remove trailing .exe if any
18311  new_path="${new_path/%.exe/}"
18312
18313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18314
18315  # First separate the path from the arguments. This will split at the first
18316  # space.
18317  complete="$BUILD_CXX"
18318  path="${complete%% *}"
18319  tmp="$complete EOL"
18320  arguments="${tmp#* }"
18321
18322  # Input might be given as Windows format, start by converting to
18323  # unix format.
18324  new_path="$path"
18325
18326  windows_path="$new_path"
18327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18328    unix_path=`$CYGPATH -u "$windows_path"`
18329    new_path="$unix_path"
18330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18332    new_path="$unix_path"
18333  fi
18334
18335
18336  # Now try to locate executable using which
18337  new_path=`$WHICH "$new_path" 2> /dev/null`
18338
18339  if test "x$new_path" = x; then
18340    # Oops. Which didn't find the executable.
18341    # The splitting of arguments from the executable at a space might have been incorrect,
18342    # since paths with space are more likely in Windows. Give it another try with the whole
18343    # argument.
18344    path="$complete"
18345    arguments="EOL"
18346    new_path="$path"
18347
18348  windows_path="$new_path"
18349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18350    unix_path=`$CYGPATH -u "$windows_path"`
18351    new_path="$unix_path"
18352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18354    new_path="$unix_path"
18355  fi
18356
18357
18358    new_path=`$WHICH "$new_path" 2> /dev/null`
18359
18360    if test "x$new_path" = x; then
18361      # It's still not found. Now this is an unrecoverable error.
18362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18363$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18364      has_space=`$ECHO "$complete" | $GREP " "`
18365      if test "x$has_space" != x; then
18366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18368      fi
18369      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18370    fi
18371  fi
18372
18373  # Now new_path has a complete unix path to the binary
18374  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18375    # Keep paths in /bin as-is, but remove trailing .exe if any
18376    new_path="${new_path/%.exe/}"
18377    # Do not save /bin paths to all_fixpath_prefixes!
18378  else
18379    # Not in mixed or Windows style, start by that.
18380    new_path=`cmd //c echo $new_path`
18381
18382  input_path="$new_path"
18383  # Check if we need to convert this using DOS-style short mode. If the path
18384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18385  # take no chances and rewrite it.
18386  # Note: m4 eats our [], so we need to use [ and ] instead.
18387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18388  if test "x$has_forbidden_chars" != x; then
18389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18391  fi
18392
18393    # Output is in $new_path
18394
18395  windows_path="$new_path"
18396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18397    unix_path=`$CYGPATH -u "$windows_path"`
18398    new_path="$unix_path"
18399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18401    new_path="$unix_path"
18402  fi
18403
18404    # remove trailing .exe if any
18405    new_path="${new_path/%.exe/}"
18406
18407    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18408    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18409  fi
18410
18411  else
18412    # We're on a posix platform. Hooray! :)
18413    # First separate the path from the arguments. This will split at the first
18414    # space.
18415    complete="$BUILD_CXX"
18416    path="${complete%% *}"
18417    tmp="$complete EOL"
18418    arguments="${tmp#* }"
18419
18420    # Cannot rely on the command "which" here since it doesn't always work.
18421    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18422    if test -z "$is_absolute_path"; then
18423      # Path to executable is not absolute. Find it.
18424      IFS_save="$IFS"
18425      IFS=:
18426      for p in $PATH; do
18427        if test -f "$p/$path" && test -x "$p/$path"; then
18428          new_path="$p/$path"
18429          break
18430        fi
18431      done
18432      IFS="$IFS_save"
18433    else
18434      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18435$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18436      new_path="$path"
18437    fi
18438
18439    if test "x$new_path" = x; then
18440        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18441$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18442        has_space=`$ECHO "$complete" | $GREP " "`
18443        if test "x$has_space" != x; then
18444          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18445$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18446        fi
18447        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18448      fi
18449  fi
18450
18451      # Now join together the path and the arguments once again
18452      if test "x$arguments" != xEOL; then
18453        new_complete="$new_path ${arguments% *}"
18454      else
18455        new_complete="$new_path"
18456      fi
18457
18458  if test "x$complete" != "x$new_complete"; then
18459      BUILD_CXX="$new_complete"
18460      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18461$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18462    fi
18463
18464    # Extract the first word of "ld", so it can be a program name with args.
18465set dummy ld; ac_word=$2
18466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18467$as_echo_n "checking for $ac_word... " >&6; }
18468if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18469  $as_echo_n "(cached) " >&6
18470else
18471  case $BUILD_LD in
18472  [\\/]* | ?:[\\/]*)
18473  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18474  ;;
18475  *)
18476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18477for as_dir in $PATH
18478do
18479  IFS=$as_save_IFS
18480  test -z "$as_dir" && as_dir=.
18481    for ac_exec_ext in '' $ac_executable_extensions; do
18482  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18483    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18485    break 2
18486  fi
18487done
18488  done
18489IFS=$as_save_IFS
18490
18491  ;;
18492esac
18493fi
18494BUILD_LD=$ac_cv_path_BUILD_LD
18495if test -n "$BUILD_LD"; then
18496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18497$as_echo "$BUILD_LD" >&6; }
18498else
18499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18500$as_echo "no" >&6; }
18501fi
18502
18503
18504
18505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18506
18507  # First separate the path from the arguments. This will split at the first
18508  # space.
18509  complete="$BUILD_LD"
18510  path="${complete%% *}"
18511  tmp="$complete EOL"
18512  arguments="${tmp#* }"
18513
18514  # Input might be given as Windows format, start by converting to
18515  # unix format.
18516  new_path=`$CYGPATH -u "$path"`
18517
18518  # Now try to locate executable using which
18519  new_path=`$WHICH "$new_path" 2> /dev/null`
18520  # bat and cmd files are not always considered executable in cygwin causing which
18521  # to not find them
18522  if test "x$new_path" = x \
18523           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18524           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18525    new_path=`$CYGPATH -u "$path"`
18526  fi
18527  if test "x$new_path" = x; then
18528    # Oops. Which didn't find the executable.
18529    # The splitting of arguments from the executable at a space might have been incorrect,
18530    # since paths with space are more likely in Windows. Give it another try with the whole
18531    # argument.
18532    path="$complete"
18533    arguments="EOL"
18534    new_path=`$CYGPATH -u "$path"`
18535    new_path=`$WHICH "$new_path" 2> /dev/null`
18536    # bat and cmd files are not always considered executable in cygwin causing which
18537    # to not find them
18538    if test "x$new_path" = x \
18539             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18540             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18541      new_path=`$CYGPATH -u "$path"`
18542    fi
18543    if test "x$new_path" = x; then
18544      # It's still not found. Now this is an unrecoverable error.
18545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18546$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18547      has_space=`$ECHO "$complete" | $GREP " "`
18548      if test "x$has_space" != x; then
18549        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18550$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18551      fi
18552      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18553    fi
18554  fi
18555
18556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18559  # "foo.exe" is OK but "foo" is an error.
18560  #
18561  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18562  # It is also a way to make sure we got the proper file name for the real test later on.
18563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18564  if test "x$test_shortpath" = x; then
18565    # Short path failed, file does not exist as specified.
18566    # Try adding .exe or .cmd
18567    if test -f "${new_path}.exe"; then
18568       input_to_shortpath="${new_path}.exe"
18569    elif test -f "${new_path}.cmd"; then
18570       input_to_shortpath="${new_path}.cmd"
18571    else
18572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18573$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18574      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18575$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18576      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18577    fi
18578  else
18579    input_to_shortpath="$new_path"
18580  fi
18581
18582  # Call helper function which possibly converts this using DOS-style short mode.
18583  # If so, the updated path is stored in $new_path.
18584  new_path="$input_to_shortpath"
18585
18586  input_path="$input_to_shortpath"
18587  # Check if we need to convert this using DOS-style short mode. If the path
18588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18589  # take no chances and rewrite it.
18590  # Note: m4 eats our [], so we need to use [ and ] instead.
18591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18592  if test "x$has_forbidden_chars" != x; then
18593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18597      # Going to short mode and back again did indeed matter. Since short mode is
18598      # case insensitive, let's make it lowercase to improve readability.
18599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18600      # Now convert it back to Unix-stile (cygpath)
18601      input_path=`$CYGPATH -u "$shortmode_path"`
18602      new_path="$input_path"
18603    fi
18604  fi
18605
18606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18607  if test "x$test_cygdrive_prefix" = x; then
18608    # As a simple fix, exclude /usr/bin since it's not a real path.
18609    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18611      # a path prefixed by /cygdrive for fixpath to work.
18612      new_path="$CYGWIN_ROOT_PATH$input_path"
18613    fi
18614  fi
18615
18616  # remove trailing .exe if any
18617  new_path="${new_path/%.exe/}"
18618
18619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18620
18621  # First separate the path from the arguments. This will split at the first
18622  # space.
18623  complete="$BUILD_LD"
18624  path="${complete%% *}"
18625  tmp="$complete EOL"
18626  arguments="${tmp#* }"
18627
18628  # Input might be given as Windows format, start by converting to
18629  # unix format.
18630  new_path="$path"
18631
18632  windows_path="$new_path"
18633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18634    unix_path=`$CYGPATH -u "$windows_path"`
18635    new_path="$unix_path"
18636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18638    new_path="$unix_path"
18639  fi
18640
18641
18642  # Now try to locate executable using which
18643  new_path=`$WHICH "$new_path" 2> /dev/null`
18644
18645  if test "x$new_path" = x; then
18646    # Oops. Which didn't find the executable.
18647    # The splitting of arguments from the executable at a space might have been incorrect,
18648    # since paths with space are more likely in Windows. Give it another try with the whole
18649    # argument.
18650    path="$complete"
18651    arguments="EOL"
18652    new_path="$path"
18653
18654  windows_path="$new_path"
18655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18656    unix_path=`$CYGPATH -u "$windows_path"`
18657    new_path="$unix_path"
18658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18660    new_path="$unix_path"
18661  fi
18662
18663
18664    new_path=`$WHICH "$new_path" 2> /dev/null`
18665
18666    if test "x$new_path" = x; then
18667      # It's still not found. Now this is an unrecoverable error.
18668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18669$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18670      has_space=`$ECHO "$complete" | $GREP " "`
18671      if test "x$has_space" != x; then
18672        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18673$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18674      fi
18675      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18676    fi
18677  fi
18678
18679  # Now new_path has a complete unix path to the binary
18680  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18681    # Keep paths in /bin as-is, but remove trailing .exe if any
18682    new_path="${new_path/%.exe/}"
18683    # Do not save /bin paths to all_fixpath_prefixes!
18684  else
18685    # Not in mixed or Windows style, start by that.
18686    new_path=`cmd //c echo $new_path`
18687
18688  input_path="$new_path"
18689  # Check if we need to convert this using DOS-style short mode. If the path
18690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18691  # take no chances and rewrite it.
18692  # Note: m4 eats our [], so we need to use [ and ] instead.
18693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18694  if test "x$has_forbidden_chars" != x; then
18695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18696    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18697  fi
18698
18699    # Output is in $new_path
18700
18701  windows_path="$new_path"
18702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18703    unix_path=`$CYGPATH -u "$windows_path"`
18704    new_path="$unix_path"
18705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18707    new_path="$unix_path"
18708  fi
18709
18710    # remove trailing .exe if any
18711    new_path="${new_path/%.exe/}"
18712
18713    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18714    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18715  fi
18716
18717  else
18718    # We're on a posix platform. Hooray! :)
18719    # First separate the path from the arguments. This will split at the first
18720    # space.
18721    complete="$BUILD_LD"
18722    path="${complete%% *}"
18723    tmp="$complete EOL"
18724    arguments="${tmp#* }"
18725
18726    # Cannot rely on the command "which" here since it doesn't always work.
18727    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18728    if test -z "$is_absolute_path"; then
18729      # Path to executable is not absolute. Find it.
18730      IFS_save="$IFS"
18731      IFS=:
18732      for p in $PATH; do
18733        if test -f "$p/$path" && test -x "$p/$path"; then
18734          new_path="$p/$path"
18735          break
18736        fi
18737      done
18738      IFS="$IFS_save"
18739    else
18740      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18741$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18742      new_path="$path"
18743    fi
18744
18745    if test "x$new_path" = x; then
18746        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18747$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18748        has_space=`$ECHO "$complete" | $GREP " "`
18749        if test "x$has_space" != x; then
18750          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18751$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18752        fi
18753        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18754      fi
18755  fi
18756
18757      # Now join together the path and the arguments once again
18758      if test "x$arguments" != xEOL; then
18759        new_complete="$new_path ${arguments% *}"
18760      else
18761        new_complete="$new_path"
18762      fi
18763
18764  if test "x$complete" != "x$new_complete"; then
18765      BUILD_LD="$new_complete"
18766      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18767$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18768    fi
18769
18770fi
18771
18772
18773
18774
18775# If a devkit is found on the builddeps server, then prepend its path to the
18776# PATH variable. If there are cross compilers available in the devkit, these
18777# will be found by AC_PROG_CC et al.
18778DEVKIT=
18779
18780
18781    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18782        # Source the builddeps file again, to make sure it uses the latest variables!
18783        . $builddepsfile
18784        # Look for a target and build machine specific resource!
18785        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18786        if test "x$resource" = x; then
18787            # Ok, lets instead look for a target specific resource
18788            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18789        fi
18790        if test "x$resource" = x; then
18791            # Ok, lets instead look for a build specific resource
18792            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18793        fi
18794        if test "x$resource" = x; then
18795            # Ok, lets instead look for a generic resource
18796            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18797            resource=${builddep_devkit}
18798        fi
18799        if test "x$resource" != x; then
18800            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18801$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18802	    # If the resource in the builddeps.conf file is an existing directory,
18803	    # for example /java/linux/cups
18804	    if test -d ${resource}; then
18805	       depdir=${resource}
18806	    else
18807
18808# devkit is for example mymodule
18809# $resource is for example libs/general/libmymod_1_2_3.zip
18810# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18811# $with_builddeps_dir is for example /localhome/builddeps
18812# depdir is the name of the variable into which we store the depdir, eg MYMOD
18813# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18814# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18815    filename=`basename $resource`
18816    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18817    filebase=${filename%%.*}
18818    extension=${filename#*.}
18819    installdir=$with_builddeps_dir/$filebase
18820    if test ! -f $installdir/$filename.unpacked; then
18821        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18822$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18823        if test ! -d $installdir; then
18824            mkdir -p $installdir
18825        fi
18826        if test ! -d $installdir; then
18827            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18828        fi
18829        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18830        touch $tmpfile
18831        if test ! -f $tmpfile; then
18832            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18833        fi
18834
18835    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18836    # $tmpfile is the local file name for the downloaded file.
18837    VALID_TOOL=no
18838    if test "x$BDEPS_FTP" = xwget; then
18839       VALID_TOOL=yes
18840       wget -O $tmpfile $with_builddeps_server/$resource
18841    fi
18842    if test "x$BDEPS_FTP" = xlftp; then
18843       VALID_TOOL=yes
18844       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18845    fi
18846    if test "x$BDEPS_FTP" = xftp; then
18847        VALID_TOOL=yes
18848        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18849        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18850        FTPUSERPWD=${FTPSERVER%%@*}
18851        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18852            FTPUSER=${userpwd%%:*}
18853            FTPPWD=${userpwd#*@}
18854            FTPSERVER=${FTPSERVER#*@}
18855        else
18856            FTPUSER=ftp
18857            FTPPWD=ftp
18858        fi
18859        # the "pass" command does not work on some
18860        # ftp clients (read ftp.exe) but if it works,
18861        # passive mode is better!
18862        (\
18863            echo "user $FTPUSER $FTPPWD"        ;\
18864            echo "pass"                         ;\
18865            echo "bin"                          ;\
18866            echo "get $FTPPATH $tmpfile"              ;\
18867        ) | ftp -in $FTPSERVER
18868    fi
18869    if test "x$VALID_TOOL" != xyes; then
18870       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18871    fi
18872
18873        mv $tmpfile $installdir/$filename
18874        if test ! -s $installdir/$filename; then
18875            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18876        fi
18877        case "$extension" in
18878            zip)  echo "Unzipping $installdir/$filename..."
18879               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18880            ;;
18881            tar.gz) echo "Untaring $installdir/$filename..."
18882               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18883            ;;
18884            tgz) echo "Untaring $installdir/$filename..."
18885               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18886            ;;
18887            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18888            ;;
18889        esac
18890    fi
18891    if test -f $installdir/$filename.unpacked; then
18892        depdir=$installdir
18893    fi
18894
18895	    fi
18896            # Source the builddeps file again, because in the previous command, the depdir
18897            # was updated to point at the current build dependency install directory.
18898            . $builddepsfile
18899            # Now extract variables from the builddeps.conf files.
18900            theroot=${builddep_devkit_ROOT}
18901            thecflags=${builddep_devkit_CFLAGS}
18902            thelibs=${builddep_devkit_LIBS}
18903            if test "x$depdir" = x; then
18904                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18905            fi
18906            DEVKIT=$depdir
18907            if test "x$theroot" != x; then
18908               DEVKIT="$theroot"
18909            fi
18910            if test "x$thecflags" != x; then
18911               DEVKIT_CFLAGS="$thecflags"
18912            fi
18913            if test "x$thelibs" != x; then
18914               DEVKIT_LIBS="$thelibs"
18915            fi
18916            # Found devkit
18917                     PATH="$DEVKIT/bin:$PATH"
18918                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18919                     if test "x$x_includes" = "xNONE"; then
18920                         x_includes="$SYS_ROOT/usr/include/X11"
18921                     fi
18922                     if test "x$x_libraries" = "xNONE"; then
18923                         x_libraries="$SYS_ROOT/usr/lib"
18924                     fi
18925
18926
18927        fi
18928
18929    fi
18930
18931
18932if test "x$SYS_ROOT" != "x/" ; then
18933    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18934    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18935    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18936    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18937    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18938    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18939fi
18940
18941# Store the CFLAGS etal passed to the configure script.
18942ORG_CFLAGS="$CFLAGS"
18943ORG_CXXFLAGS="$CXXFLAGS"
18944ORG_OBJCFLAGS="$OBJCFLAGS"
18945
18946# autoconf magic only relies on PATH, so update it if tools dir is specified
18947OLD_PATH="$PATH"
18948if test "x$TOOLS_DIR" != x; then
18949  PATH=$TOOLS_DIR:$PATH
18950fi
18951
18952
18953### Locate C compiler (CC)
18954
18955# On windows, only cl.exe is supported.
18956# On Solaris, cc is preferred to gcc.
18957# Elsewhere, gcc is preferred to cc.
18958
18959if test "x$CC" != x; then
18960  COMPILER_CHECK_LIST="$CC"
18961elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18962  COMPILER_CHECK_LIST="cl"
18963elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18964  COMPILER_CHECK_LIST="cc gcc"
18965else
18966  COMPILER_CHECK_LIST="gcc cc"
18967fi
18968
18969
18970  COMPILER_NAME=C
18971
18972  CC=
18973  # If TOOLS_DIR is set, check for all compiler names in there first
18974  # before checking the rest of the PATH.
18975  if test -n "$TOOLS_DIR"; then
18976    PATH_save="$PATH"
18977    PATH="$TOOLS_DIR"
18978    for ac_prog in $COMPILER_CHECK_LIST
18979do
18980  # Extract the first word of "$ac_prog", so it can be a program name with args.
18981set dummy $ac_prog; ac_word=$2
18982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18983$as_echo_n "checking for $ac_word... " >&6; }
18984if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18985  $as_echo_n "(cached) " >&6
18986else
18987  case $TOOLS_DIR_CC in
18988  [\\/]* | ?:[\\/]*)
18989  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18990  ;;
18991  *)
18992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18993for as_dir in $PATH
18994do
18995  IFS=$as_save_IFS
18996  test -z "$as_dir" && as_dir=.
18997    for ac_exec_ext in '' $ac_executable_extensions; do
18998  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18999    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19001    break 2
19002  fi
19003done
19004  done
19005IFS=$as_save_IFS
19006
19007  ;;
19008esac
19009fi
19010TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19011if test -n "$TOOLS_DIR_CC"; then
19012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19013$as_echo "$TOOLS_DIR_CC" >&6; }
19014else
19015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19016$as_echo "no" >&6; }
19017fi
19018
19019
19020  test -n "$TOOLS_DIR_CC" && break
19021done
19022
19023    CC=$TOOLS_DIR_CC
19024    PATH="$PATH_save"
19025  fi
19026
19027  # AC_PATH_PROGS can't be run multiple times with the same variable,
19028  # so create a new name for this run.
19029  if test "x$CC" = x; then
19030    for ac_prog in $COMPILER_CHECK_LIST
19031do
19032  # Extract the first word of "$ac_prog", so it can be a program name with args.
19033set dummy $ac_prog; ac_word=$2
19034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19035$as_echo_n "checking for $ac_word... " >&6; }
19036if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
19037  $as_echo_n "(cached) " >&6
19038else
19039  case $POTENTIAL_CC in
19040  [\\/]* | ?:[\\/]*)
19041  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19042  ;;
19043  *)
19044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19045for as_dir in $PATH
19046do
19047  IFS=$as_save_IFS
19048  test -z "$as_dir" && as_dir=.
19049    for ac_exec_ext in '' $ac_executable_extensions; do
19050  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19051    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19053    break 2
19054  fi
19055done
19056  done
19057IFS=$as_save_IFS
19058
19059  ;;
19060esac
19061fi
19062POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19063if test -n "$POTENTIAL_CC"; then
19064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19065$as_echo "$POTENTIAL_CC" >&6; }
19066else
19067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19068$as_echo "no" >&6; }
19069fi
19070
19071
19072  test -n "$POTENTIAL_CC" && break
19073done
19074
19075    CC=$POTENTIAL_CC
19076  fi
19077
19078  if test "x$CC" = x; then
19079
19080    # Print a helpful message on how to acquire the necessary build dependency.
19081    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19082    MISSING_DEPENDENCY=devkit
19083    PKGHANDLER_COMMAND=
19084
19085    case $PKGHANDLER in
19086	apt-get)
19087                apt_help     $MISSING_DEPENDENCY ;;
19088    yum)
19089                yum_help     $MISSING_DEPENDENCY ;;
19090	port)
19091                port_help    $MISSING_DEPENDENCY ;;
19092	pkgutil)
19093                pkgutil_help $MISSING_DEPENDENCY ;;
19094	pkgadd)
19095                pkgadd_help  $MISSING_DEPENDENCY ;;
19096    * )
19097      break ;;
19098    esac
19099
19100    if test "x$PKGHANDLER_COMMAND" != x; then
19101        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19102    fi
19103
19104      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19105  fi
19106
19107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19108
19109  # First separate the path from the arguments. This will split at the first
19110  # space.
19111  complete="$CC"
19112  path="${complete%% *}"
19113  tmp="$complete EOL"
19114  arguments="${tmp#* }"
19115
19116  # Input might be given as Windows format, start by converting to
19117  # unix format.
19118  new_path=`$CYGPATH -u "$path"`
19119
19120  # Now try to locate executable using which
19121  new_path=`$WHICH "$new_path" 2> /dev/null`
19122  # bat and cmd files are not always considered executable in cygwin causing which
19123  # to not find them
19124  if test "x$new_path" = x \
19125           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19126           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19127    new_path=`$CYGPATH -u "$path"`
19128  fi
19129  if test "x$new_path" = x; then
19130    # Oops. Which didn't find the executable.
19131    # The splitting of arguments from the executable at a space might have been incorrect,
19132    # since paths with space are more likely in Windows. Give it another try with the whole
19133    # argument.
19134    path="$complete"
19135    arguments="EOL"
19136    new_path=`$CYGPATH -u "$path"`
19137    new_path=`$WHICH "$new_path" 2> /dev/null`
19138    # bat and cmd files are not always considered executable in cygwin causing which
19139    # to not find them
19140    if test "x$new_path" = x \
19141             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19142             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19143      new_path=`$CYGPATH -u "$path"`
19144    fi
19145    if test "x$new_path" = x; then
19146      # It's still not found. Now this is an unrecoverable error.
19147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19148$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19149      has_space=`$ECHO "$complete" | $GREP " "`
19150      if test "x$has_space" != x; then
19151        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19152$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19153      fi
19154      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19155    fi
19156  fi
19157
19158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19161  # "foo.exe" is OK but "foo" is an error.
19162  #
19163  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19164  # It is also a way to make sure we got the proper file name for the real test later on.
19165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19166  if test "x$test_shortpath" = x; then
19167    # Short path failed, file does not exist as specified.
19168    # Try adding .exe or .cmd
19169    if test -f "${new_path}.exe"; then
19170       input_to_shortpath="${new_path}.exe"
19171    elif test -f "${new_path}.cmd"; then
19172       input_to_shortpath="${new_path}.cmd"
19173    else
19174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19175$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19176      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19177$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19178      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19179    fi
19180  else
19181    input_to_shortpath="$new_path"
19182  fi
19183
19184  # Call helper function which possibly converts this using DOS-style short mode.
19185  # If so, the updated path is stored in $new_path.
19186  new_path="$input_to_shortpath"
19187
19188  input_path="$input_to_shortpath"
19189  # Check if we need to convert this using DOS-style short mode. If the path
19190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19191  # take no chances and rewrite it.
19192  # Note: m4 eats our [], so we need to use [ and ] instead.
19193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19194  if test "x$has_forbidden_chars" != x; then
19195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19199      # Going to short mode and back again did indeed matter. Since short mode is
19200      # case insensitive, let's make it lowercase to improve readability.
19201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19202      # Now convert it back to Unix-stile (cygpath)
19203      input_path=`$CYGPATH -u "$shortmode_path"`
19204      new_path="$input_path"
19205    fi
19206  fi
19207
19208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19209  if test "x$test_cygdrive_prefix" = x; then
19210    # As a simple fix, exclude /usr/bin since it's not a real path.
19211    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19213      # a path prefixed by /cygdrive for fixpath to work.
19214      new_path="$CYGWIN_ROOT_PATH$input_path"
19215    fi
19216  fi
19217
19218  # remove trailing .exe if any
19219  new_path="${new_path/%.exe/}"
19220
19221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19222
19223  # First separate the path from the arguments. This will split at the first
19224  # space.
19225  complete="$CC"
19226  path="${complete%% *}"
19227  tmp="$complete EOL"
19228  arguments="${tmp#* }"
19229
19230  # Input might be given as Windows format, start by converting to
19231  # unix format.
19232  new_path="$path"
19233
19234  windows_path="$new_path"
19235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19236    unix_path=`$CYGPATH -u "$windows_path"`
19237    new_path="$unix_path"
19238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19240    new_path="$unix_path"
19241  fi
19242
19243
19244  # Now try to locate executable using which
19245  new_path=`$WHICH "$new_path" 2> /dev/null`
19246
19247  if test "x$new_path" = x; then
19248    # Oops. Which didn't find the executable.
19249    # The splitting of arguments from the executable at a space might have been incorrect,
19250    # since paths with space are more likely in Windows. Give it another try with the whole
19251    # argument.
19252    path="$complete"
19253    arguments="EOL"
19254    new_path="$path"
19255
19256  windows_path="$new_path"
19257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19258    unix_path=`$CYGPATH -u "$windows_path"`
19259    new_path="$unix_path"
19260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19262    new_path="$unix_path"
19263  fi
19264
19265
19266    new_path=`$WHICH "$new_path" 2> /dev/null`
19267
19268    if test "x$new_path" = x; then
19269      # It's still not found. Now this is an unrecoverable error.
19270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19271$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19272      has_space=`$ECHO "$complete" | $GREP " "`
19273      if test "x$has_space" != x; then
19274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19276      fi
19277      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19278    fi
19279  fi
19280
19281  # Now new_path has a complete unix path to the binary
19282  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19283    # Keep paths in /bin as-is, but remove trailing .exe if any
19284    new_path="${new_path/%.exe/}"
19285    # Do not save /bin paths to all_fixpath_prefixes!
19286  else
19287    # Not in mixed or Windows style, start by that.
19288    new_path=`cmd //c echo $new_path`
19289
19290  input_path="$new_path"
19291  # Check if we need to convert this using DOS-style short mode. If the path
19292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19293  # take no chances and rewrite it.
19294  # Note: m4 eats our [], so we need to use [ and ] instead.
19295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19296  if test "x$has_forbidden_chars" != x; then
19297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19299  fi
19300
19301    # Output is in $new_path
19302
19303  windows_path="$new_path"
19304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19305    unix_path=`$CYGPATH -u "$windows_path"`
19306    new_path="$unix_path"
19307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19309    new_path="$unix_path"
19310  fi
19311
19312    # remove trailing .exe if any
19313    new_path="${new_path/%.exe/}"
19314
19315    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19316    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19317  fi
19318
19319  else
19320    # We're on a posix platform. Hooray! :)
19321    # First separate the path from the arguments. This will split at the first
19322    # space.
19323    complete="$CC"
19324    path="${complete%% *}"
19325    tmp="$complete EOL"
19326    arguments="${tmp#* }"
19327
19328    # Cannot rely on the command "which" here since it doesn't always work.
19329    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19330    if test -z "$is_absolute_path"; then
19331      # Path to executable is not absolute. Find it.
19332      IFS_save="$IFS"
19333      IFS=:
19334      for p in $PATH; do
19335        if test -f "$p/$path" && test -x "$p/$path"; then
19336          new_path="$p/$path"
19337          break
19338        fi
19339      done
19340      IFS="$IFS_save"
19341    else
19342      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19343$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19344      new_path="$path"
19345    fi
19346
19347    if test "x$new_path" = x; then
19348        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19349$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19350        has_space=`$ECHO "$complete" | $GREP " "`
19351        if test "x$has_space" != x; then
19352          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19353$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19354        fi
19355        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19356      fi
19357  fi
19358
19359      # Now join together the path and the arguments once again
19360      if test "x$arguments" != xEOL; then
19361        new_complete="$new_path ${arguments% *}"
19362      else
19363        new_complete="$new_path"
19364      fi
19365
19366  if test "x$complete" != "x$new_complete"; then
19367      CC="$new_complete"
19368      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19369$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19370    fi
19371
19372  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19373$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19374  TEST_COMPILER="$CC"
19375
19376    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19377        # Follow a chain of symbolic links. Use readlink
19378        # where it exists, else fall back to horribly
19379        # complicated shell code.
19380        if test "x$READLINK_TESTED" != yes; then
19381            # On MacOSX there is a readlink tool with a different
19382            # purpose than the GNU readlink tool. Check the found readlink.
19383            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19384            if test "x$ISGNU" = x; then
19385                 # A readlink that we do not know how to use.
19386                 # Are there other non-GNU readlinks out there?
19387                 READLINK_TESTED=yes
19388                 READLINK=
19389            fi
19390        fi
19391
19392        if test "x$READLINK" != x; then
19393            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19394        else
19395            # Save the current directory for restoring afterwards
19396            STARTDIR=$PWD
19397            COUNTER=0
19398            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19399            sym_link_file=`$BASENAME $TEST_COMPILER`
19400            cd $sym_link_dir
19401            # Use -P flag to resolve symlinks in directories.
19402            cd `$THEPWDCMD -P`
19403            sym_link_dir=`$THEPWDCMD -P`
19404            # Resolve file symlinks
19405            while test $COUNTER -lt 20; do
19406                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19407                if test "x$ISLINK" == x; then
19408                    # This is not a symbolic link! We are done!
19409                    break
19410                fi
19411                # Again resolve directory symlinks since the target of the just found
19412                # link could be in a different directory
19413                cd `$DIRNAME $ISLINK`
19414                sym_link_dir=`$THEPWDCMD -P`
19415                sym_link_file=`$BASENAME $ISLINK`
19416                let COUNTER=COUNTER+1
19417            done
19418            cd $STARTDIR
19419            TEST_COMPILER=$sym_link_dir/$sym_link_file
19420        fi
19421    fi
19422
19423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19424$as_echo "$TEST_COMPILER" >&6; }
19425  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19426$as_echo_n "checking if CC is disguised ccache... " >&6; }
19427
19428  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19429  if test "x$COMPILER_BASENAME" = "xccache"; then
19430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19431$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19432    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19433    # We want to control ccache invocation ourselves, so ignore this cc and try
19434    # searching again.
19435
19436    # Remove the path to the fake ccache cc from the PATH
19437    RETRY_COMPILER_SAVED_PATH="$PATH"
19438    COMPILER_DIRNAME=`$DIRNAME $CC`
19439    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19440
19441    # Try again looking for our compiler
19442    if test -n "$ac_tool_prefix"; then
19443  for ac_prog in $COMPILER_CHECK_LIST
19444  do
19445    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19446set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19448$as_echo_n "checking for $ac_word... " >&6; }
19449if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19450  $as_echo_n "(cached) " >&6
19451else
19452  if test -n "$PROPER_COMPILER_CC"; then
19453  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19454else
19455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19456for as_dir in $PATH
19457do
19458  IFS=$as_save_IFS
19459  test -z "$as_dir" && as_dir=.
19460    for ac_exec_ext in '' $ac_executable_extensions; do
19461  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19462    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19464    break 2
19465  fi
19466done
19467  done
19468IFS=$as_save_IFS
19469
19470fi
19471fi
19472PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19473if test -n "$PROPER_COMPILER_CC"; then
19474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19475$as_echo "$PROPER_COMPILER_CC" >&6; }
19476else
19477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19478$as_echo "no" >&6; }
19479fi
19480
19481
19482    test -n "$PROPER_COMPILER_CC" && break
19483  done
19484fi
19485if test -z "$PROPER_COMPILER_CC"; then
19486  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19487  for ac_prog in $COMPILER_CHECK_LIST
19488do
19489  # Extract the first word of "$ac_prog", so it can be a program name with args.
19490set dummy $ac_prog; ac_word=$2
19491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19492$as_echo_n "checking for $ac_word... " >&6; }
19493if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19494  $as_echo_n "(cached) " >&6
19495else
19496  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19497  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19498else
19499as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19500for as_dir in $PATH
19501do
19502  IFS=$as_save_IFS
19503  test -z "$as_dir" && as_dir=.
19504    for ac_exec_ext in '' $ac_executable_extensions; do
19505  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19506    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19508    break 2
19509  fi
19510done
19511  done
19512IFS=$as_save_IFS
19513
19514fi
19515fi
19516ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19517if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19519$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19520else
19521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19522$as_echo "no" >&6; }
19523fi
19524
19525
19526  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19527done
19528
19529  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19530    PROPER_COMPILER_CC=""
19531  else
19532    case $cross_compiling:$ac_tool_warned in
19533yes:)
19534{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19535$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19536ac_tool_warned=yes ;;
19537esac
19538    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19539  fi
19540fi
19541
19542
19543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19544
19545  # First separate the path from the arguments. This will split at the first
19546  # space.
19547  complete="$PROPER_COMPILER_CC"
19548  path="${complete%% *}"
19549  tmp="$complete EOL"
19550  arguments="${tmp#* }"
19551
19552  # Input might be given as Windows format, start by converting to
19553  # unix format.
19554  new_path=`$CYGPATH -u "$path"`
19555
19556  # Now try to locate executable using which
19557  new_path=`$WHICH "$new_path" 2> /dev/null`
19558  # bat and cmd files are not always considered executable in cygwin causing which
19559  # to not find them
19560  if test "x$new_path" = x \
19561           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19562           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19563    new_path=`$CYGPATH -u "$path"`
19564  fi
19565  if test "x$new_path" = x; then
19566    # Oops. Which didn't find the executable.
19567    # The splitting of arguments from the executable at a space might have been incorrect,
19568    # since paths with space are more likely in Windows. Give it another try with the whole
19569    # argument.
19570    path="$complete"
19571    arguments="EOL"
19572    new_path=`$CYGPATH -u "$path"`
19573    new_path=`$WHICH "$new_path" 2> /dev/null`
19574    # bat and cmd files are not always considered executable in cygwin causing which
19575    # to not find them
19576    if test "x$new_path" = x \
19577             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19578             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19579      new_path=`$CYGPATH -u "$path"`
19580    fi
19581    if test "x$new_path" = x; then
19582      # It's still not found. Now this is an unrecoverable error.
19583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19584$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19585      has_space=`$ECHO "$complete" | $GREP " "`
19586      if test "x$has_space" != x; then
19587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19589      fi
19590      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19591    fi
19592  fi
19593
19594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19597  # "foo.exe" is OK but "foo" is an error.
19598  #
19599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19600  # It is also a way to make sure we got the proper file name for the real test later on.
19601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19602  if test "x$test_shortpath" = x; then
19603    # Short path failed, file does not exist as specified.
19604    # Try adding .exe or .cmd
19605    if test -f "${new_path}.exe"; then
19606       input_to_shortpath="${new_path}.exe"
19607    elif test -f "${new_path}.cmd"; then
19608       input_to_shortpath="${new_path}.cmd"
19609    else
19610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19611$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19612      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19613$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19614      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19615    fi
19616  else
19617    input_to_shortpath="$new_path"
19618  fi
19619
19620  # Call helper function which possibly converts this using DOS-style short mode.
19621  # If so, the updated path is stored in $new_path.
19622  new_path="$input_to_shortpath"
19623
19624  input_path="$input_to_shortpath"
19625  # Check if we need to convert this using DOS-style short mode. If the path
19626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19627  # take no chances and rewrite it.
19628  # Note: m4 eats our [], so we need to use [ and ] instead.
19629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19630  if test "x$has_forbidden_chars" != x; then
19631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19635      # Going to short mode and back again did indeed matter. Since short mode is
19636      # case insensitive, let's make it lowercase to improve readability.
19637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19638      # Now convert it back to Unix-stile (cygpath)
19639      input_path=`$CYGPATH -u "$shortmode_path"`
19640      new_path="$input_path"
19641    fi
19642  fi
19643
19644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19645  if test "x$test_cygdrive_prefix" = x; then
19646    # As a simple fix, exclude /usr/bin since it's not a real path.
19647    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19649      # a path prefixed by /cygdrive for fixpath to work.
19650      new_path="$CYGWIN_ROOT_PATH$input_path"
19651    fi
19652  fi
19653
19654  # remove trailing .exe if any
19655  new_path="${new_path/%.exe/}"
19656
19657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19658
19659  # First separate the path from the arguments. This will split at the first
19660  # space.
19661  complete="$PROPER_COMPILER_CC"
19662  path="${complete%% *}"
19663  tmp="$complete EOL"
19664  arguments="${tmp#* }"
19665
19666  # Input might be given as Windows format, start by converting to
19667  # unix format.
19668  new_path="$path"
19669
19670  windows_path="$new_path"
19671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19672    unix_path=`$CYGPATH -u "$windows_path"`
19673    new_path="$unix_path"
19674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19676    new_path="$unix_path"
19677  fi
19678
19679
19680  # Now try to locate executable using which
19681  new_path=`$WHICH "$new_path" 2> /dev/null`
19682
19683  if test "x$new_path" = x; then
19684    # Oops. Which didn't find the executable.
19685    # The splitting of arguments from the executable at a space might have been incorrect,
19686    # since paths with space are more likely in Windows. Give it another try with the whole
19687    # argument.
19688    path="$complete"
19689    arguments="EOL"
19690    new_path="$path"
19691
19692  windows_path="$new_path"
19693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19694    unix_path=`$CYGPATH -u "$windows_path"`
19695    new_path="$unix_path"
19696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19698    new_path="$unix_path"
19699  fi
19700
19701
19702    new_path=`$WHICH "$new_path" 2> /dev/null`
19703
19704    if test "x$new_path" = x; then
19705      # It's still not found. Now this is an unrecoverable error.
19706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19707$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19708      has_space=`$ECHO "$complete" | $GREP " "`
19709      if test "x$has_space" != x; then
19710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19712      fi
19713      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19714    fi
19715  fi
19716
19717  # Now new_path has a complete unix path to the binary
19718  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19719    # Keep paths in /bin as-is, but remove trailing .exe if any
19720    new_path="${new_path/%.exe/}"
19721    # Do not save /bin paths to all_fixpath_prefixes!
19722  else
19723    # Not in mixed or Windows style, start by that.
19724    new_path=`cmd //c echo $new_path`
19725
19726  input_path="$new_path"
19727  # Check if we need to convert this using DOS-style short mode. If the path
19728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19729  # take no chances and rewrite it.
19730  # Note: m4 eats our [], so we need to use [ and ] instead.
19731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19732  if test "x$has_forbidden_chars" != x; then
19733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19735  fi
19736
19737    # Output is in $new_path
19738
19739  windows_path="$new_path"
19740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19741    unix_path=`$CYGPATH -u "$windows_path"`
19742    new_path="$unix_path"
19743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19745    new_path="$unix_path"
19746  fi
19747
19748    # remove trailing .exe if any
19749    new_path="${new_path/%.exe/}"
19750
19751    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19752    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19753  fi
19754
19755  else
19756    # We're on a posix platform. Hooray! :)
19757    # First separate the path from the arguments. This will split at the first
19758    # space.
19759    complete="$PROPER_COMPILER_CC"
19760    path="${complete%% *}"
19761    tmp="$complete EOL"
19762    arguments="${tmp#* }"
19763
19764    # Cannot rely on the command "which" here since it doesn't always work.
19765    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19766    if test -z "$is_absolute_path"; then
19767      # Path to executable is not absolute. Find it.
19768      IFS_save="$IFS"
19769      IFS=:
19770      for p in $PATH; do
19771        if test -f "$p/$path" && test -x "$p/$path"; then
19772          new_path="$p/$path"
19773          break
19774        fi
19775      done
19776      IFS="$IFS_save"
19777    else
19778      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19779$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19780      new_path="$path"
19781    fi
19782
19783    if test "x$new_path" = x; then
19784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19785$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19786        has_space=`$ECHO "$complete" | $GREP " "`
19787        if test "x$has_space" != x; then
19788          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19789$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19790        fi
19791        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19792      fi
19793  fi
19794
19795      # Now join together the path and the arguments once again
19796      if test "x$arguments" != xEOL; then
19797        new_complete="$new_path ${arguments% *}"
19798      else
19799        new_complete="$new_path"
19800      fi
19801
19802  if test "x$complete" != "x$new_complete"; then
19803      PROPER_COMPILER_CC="$new_complete"
19804      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19805$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19806    fi
19807
19808    PATH="$RETRY_COMPILER_SAVED_PATH"
19809
19810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19811$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19812
19813    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19814        # Follow a chain of symbolic links. Use readlink
19815        # where it exists, else fall back to horribly
19816        # complicated shell code.
19817        if test "x$READLINK_TESTED" != yes; then
19818            # On MacOSX there is a readlink tool with a different
19819            # purpose than the GNU readlink tool. Check the found readlink.
19820            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19821            if test "x$ISGNU" = x; then
19822                 # A readlink that we do not know how to use.
19823                 # Are there other non-GNU readlinks out there?
19824                 READLINK_TESTED=yes
19825                 READLINK=
19826            fi
19827        fi
19828
19829        if test "x$READLINK" != x; then
19830            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19831        else
19832            # Save the current directory for restoring afterwards
19833            STARTDIR=$PWD
19834            COUNTER=0
19835            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19836            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19837            cd $sym_link_dir
19838            # Use -P flag to resolve symlinks in directories.
19839            cd `$THEPWDCMD -P`
19840            sym_link_dir=`$THEPWDCMD -P`
19841            # Resolve file symlinks
19842            while test $COUNTER -lt 20; do
19843                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19844                if test "x$ISLINK" == x; then
19845                    # This is not a symbolic link! We are done!
19846                    break
19847                fi
19848                # Again resolve directory symlinks since the target of the just found
19849                # link could be in a different directory
19850                cd `$DIRNAME $ISLINK`
19851                sym_link_dir=`$THEPWDCMD -P`
19852                sym_link_file=`$BASENAME $ISLINK`
19853                let COUNTER=COUNTER+1
19854            done
19855            cd $STARTDIR
19856            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19857        fi
19858    fi
19859
19860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19861$as_echo "$PROPER_COMPILER_CC" >&6; }
19862    CC="$PROPER_COMPILER_CC"
19863  else
19864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19865$as_echo "no, keeping CC" >&6; }
19866    CC="$TEST_COMPILER"
19867  fi
19868
19869  COMPILER=$CC
19870  COMPILER_NAME=$COMPILER_NAME
19871
19872  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19873    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19874    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19875    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19876    if test $? -ne 0; then
19877      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19878
19879      { $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
19880$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19881      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19882$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19883      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19884    else
19885      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19886      COMPILER_VENDOR="Sun Studio"
19887    fi
19888  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19889    # First line typically looks something like:
19890    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19891    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19892    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19893    COMPILER_VENDOR="Microsoft CL.EXE"
19894    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19895    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19896      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19897        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19898      fi
19899    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19900      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19901        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19902      fi
19903    fi
19904  else
19905    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19906    # Check that this is likely to be GCC.
19907    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19908    if test $? -ne 0; then
19909      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19910$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19911      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19912$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19913      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19914    fi
19915
19916    # First line typically looks something like:
19917    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19918    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19919    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19920  fi
19921  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19922  CC_VERSION="$COMPILER_VERSION"
19923  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19924  CC_VENDOR="$COMPILER_VENDOR"
19925
19926  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19927$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19928
19929
19930# Now that we have resolved CC ourself, let autoconf have its go at it
19931ac_ext=c
19932ac_cpp='$CPP $CPPFLAGS'
19933ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19934ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19935ac_compiler_gnu=$ac_cv_c_compiler_gnu
19936if test -n "$ac_tool_prefix"; then
19937  for ac_prog in $CC
19938  do
19939    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19940set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19942$as_echo_n "checking for $ac_word... " >&6; }
19943if test "${ac_cv_prog_CC+set}" = set; then :
19944  $as_echo_n "(cached) " >&6
19945else
19946  if test -n "$CC"; then
19947  ac_cv_prog_CC="$CC" # Let the user override the test.
19948else
19949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19950for as_dir in $PATH
19951do
19952  IFS=$as_save_IFS
19953  test -z "$as_dir" && as_dir=.
19954    for ac_exec_ext in '' $ac_executable_extensions; do
19955  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19956    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19958    break 2
19959  fi
19960done
19961  done
19962IFS=$as_save_IFS
19963
19964fi
19965fi
19966CC=$ac_cv_prog_CC
19967if test -n "$CC"; then
19968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19969$as_echo "$CC" >&6; }
19970else
19971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19972$as_echo "no" >&6; }
19973fi
19974
19975
19976    test -n "$CC" && break
19977  done
19978fi
19979if test -z "$CC"; then
19980  ac_ct_CC=$CC
19981  for ac_prog in $CC
19982do
19983  # Extract the first word of "$ac_prog", so it can be a program name with args.
19984set dummy $ac_prog; ac_word=$2
19985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19986$as_echo_n "checking for $ac_word... " >&6; }
19987if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19988  $as_echo_n "(cached) " >&6
19989else
19990  if test -n "$ac_ct_CC"; then
19991  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19992else
19993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19994for as_dir in $PATH
19995do
19996  IFS=$as_save_IFS
19997  test -z "$as_dir" && as_dir=.
19998    for ac_exec_ext in '' $ac_executable_extensions; do
19999  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20000    ac_cv_prog_ac_ct_CC="$ac_prog"
20001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20002    break 2
20003  fi
20004done
20005  done
20006IFS=$as_save_IFS
20007
20008fi
20009fi
20010ac_ct_CC=$ac_cv_prog_ac_ct_CC
20011if test -n "$ac_ct_CC"; then
20012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20013$as_echo "$ac_ct_CC" >&6; }
20014else
20015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20016$as_echo "no" >&6; }
20017fi
20018
20019
20020  test -n "$ac_ct_CC" && break
20021done
20022
20023  if test "x$ac_ct_CC" = x; then
20024    CC=""
20025  else
20026    case $cross_compiling:$ac_tool_warned in
20027yes:)
20028{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20029$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20030ac_tool_warned=yes ;;
20031esac
20032    CC=$ac_ct_CC
20033  fi
20034fi
20035
20036
20037test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20038$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20039as_fn_error $? "no acceptable C compiler found in \$PATH
20040See \`config.log' for more details" "$LINENO" 5 ; }
20041
20042# Provide some information about the compiler.
20043$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20044set X $ac_compile
20045ac_compiler=$2
20046for ac_option in --version -v -V -qversion; do
20047  { { ac_try="$ac_compiler $ac_option >&5"
20048case "(($ac_try" in
20049  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20050  *) ac_try_echo=$ac_try;;
20051esac
20052eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20053$as_echo "$ac_try_echo"; } >&5
20054  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20055  ac_status=$?
20056  if test -s conftest.err; then
20057    sed '10a\
20058... rest of stderr output deleted ...
20059         10q' conftest.err >conftest.er1
20060    cat conftest.er1 >&5
20061  fi
20062  rm -f conftest.er1 conftest.err
20063  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20064  test $ac_status = 0; }
20065done
20066
20067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20068/* end confdefs.h.  */
20069
20070int
20071main ()
20072{
20073
20074  ;
20075  return 0;
20076}
20077_ACEOF
20078ac_clean_files_save=$ac_clean_files
20079ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20080# Try to create an executable without -o first, disregard a.out.
20081# It will help us diagnose broken compilers, and finding out an intuition
20082# of exeext.
20083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20084$as_echo_n "checking whether the C compiler works... " >&6; }
20085ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20086
20087# The possible output files:
20088ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20089
20090ac_rmfiles=
20091for ac_file in $ac_files
20092do
20093  case $ac_file in
20094    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20095    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20096  esac
20097done
20098rm -f $ac_rmfiles
20099
20100if { { ac_try="$ac_link_default"
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_link_default") 2>&5
20108  ac_status=$?
20109  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20110  test $ac_status = 0; }; then :
20111  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20112# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20113# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20114# so that the user can short-circuit this test for compilers unknown to
20115# Autoconf.
20116for ac_file in $ac_files ''
20117do
20118  test -f "$ac_file" || continue
20119  case $ac_file in
20120    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20121	;;
20122    [ab].out )
20123	# We found the default executable, but exeext='' is most
20124	# certainly right.
20125	break;;
20126    *.* )
20127	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20128	then :; else
20129	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20130	fi
20131	# We set ac_cv_exeext here because the later test for it is not
20132	# safe: cross compilers may not add the suffix if given an `-o'
20133	# argument, so we may need to know it at that point already.
20134	# Even if this section looks crufty: it has the advantage of
20135	# actually working.
20136	break;;
20137    * )
20138	break;;
20139  esac
20140done
20141test "$ac_cv_exeext" = no && ac_cv_exeext=
20142
20143else
20144  ac_file=''
20145fi
20146if test -z "$ac_file"; then :
20147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20148$as_echo "no" >&6; }
20149$as_echo "$as_me: failed program was:" >&5
20150sed 's/^/| /' conftest.$ac_ext >&5
20151
20152{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20153$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20154as_fn_error 77 "C compiler cannot create executables
20155See \`config.log' for more details" "$LINENO" 5 ; }
20156else
20157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20158$as_echo "yes" >&6; }
20159fi
20160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20161$as_echo_n "checking for C compiler default output file name... " >&6; }
20162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20163$as_echo "$ac_file" >&6; }
20164ac_exeext=$ac_cv_exeext
20165
20166rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20167ac_clean_files=$ac_clean_files_save
20168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20169$as_echo_n "checking for suffix of executables... " >&6; }
20170if { { ac_try="$ac_link"
20171case "(($ac_try" in
20172  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20173  *) ac_try_echo=$ac_try;;
20174esac
20175eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20176$as_echo "$ac_try_echo"; } >&5
20177  (eval "$ac_link") 2>&5
20178  ac_status=$?
20179  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20180  test $ac_status = 0; }; then :
20181  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20182# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20183# work properly (i.e., refer to `conftest.exe'), while it won't with
20184# `rm'.
20185for ac_file in conftest.exe conftest conftest.*; do
20186  test -f "$ac_file" || continue
20187  case $ac_file in
20188    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20189    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20190	  break;;
20191    * ) break;;
20192  esac
20193done
20194else
20195  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20196$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20197as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20198See \`config.log' for more details" "$LINENO" 5 ; }
20199fi
20200rm -f conftest conftest$ac_cv_exeext
20201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20202$as_echo "$ac_cv_exeext" >&6; }
20203
20204rm -f conftest.$ac_ext
20205EXEEXT=$ac_cv_exeext
20206ac_exeext=$EXEEXT
20207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20208/* end confdefs.h.  */
20209#include <stdio.h>
20210int
20211main ()
20212{
20213FILE *f = fopen ("conftest.out", "w");
20214 return ferror (f) || fclose (f) != 0;
20215
20216  ;
20217  return 0;
20218}
20219_ACEOF
20220ac_clean_files="$ac_clean_files conftest.out"
20221# Check that the compiler produces executables we can run.  If not, either
20222# the compiler is broken, or we cross compile.
20223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20224$as_echo_n "checking whether we are cross compiling... " >&6; }
20225if test "$cross_compiling" != yes; then
20226  { { ac_try="$ac_link"
20227case "(($ac_try" in
20228  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20229  *) ac_try_echo=$ac_try;;
20230esac
20231eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20232$as_echo "$ac_try_echo"; } >&5
20233  (eval "$ac_link") 2>&5
20234  ac_status=$?
20235  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20236  test $ac_status = 0; }
20237  if { ac_try='./conftest$ac_cv_exeext'
20238  { { case "(($ac_try" in
20239  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20240  *) ac_try_echo=$ac_try;;
20241esac
20242eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20243$as_echo "$ac_try_echo"; } >&5
20244  (eval "$ac_try") 2>&5
20245  ac_status=$?
20246  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20247  test $ac_status = 0; }; }; then
20248    cross_compiling=no
20249  else
20250    if test "$cross_compiling" = maybe; then
20251	cross_compiling=yes
20252    else
20253	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20254$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20255as_fn_error $? "cannot run C compiled programs.
20256If you meant to cross compile, use \`--host'.
20257See \`config.log' for more details" "$LINENO" 5 ; }
20258    fi
20259  fi
20260fi
20261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20262$as_echo "$cross_compiling" >&6; }
20263
20264rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20265ac_clean_files=$ac_clean_files_save
20266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20267$as_echo_n "checking for suffix of object files... " >&6; }
20268if test "${ac_cv_objext+set}" = set; then :
20269  $as_echo_n "(cached) " >&6
20270else
20271  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20272/* end confdefs.h.  */
20273
20274int
20275main ()
20276{
20277
20278  ;
20279  return 0;
20280}
20281_ACEOF
20282rm -f conftest.o conftest.obj
20283if { { ac_try="$ac_compile"
20284case "(($ac_try" in
20285  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20286  *) ac_try_echo=$ac_try;;
20287esac
20288eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20289$as_echo "$ac_try_echo"; } >&5
20290  (eval "$ac_compile") 2>&5
20291  ac_status=$?
20292  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20293  test $ac_status = 0; }; then :
20294  for ac_file in conftest.o conftest.obj conftest.*; do
20295  test -f "$ac_file" || continue;
20296  case $ac_file in
20297    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20298    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20299       break;;
20300  esac
20301done
20302else
20303  $as_echo "$as_me: failed program was:" >&5
20304sed 's/^/| /' conftest.$ac_ext >&5
20305
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 compute suffix of object files: cannot compile
20309See \`config.log' for more details" "$LINENO" 5 ; }
20310fi
20311rm -f conftest.$ac_cv_objext conftest.$ac_ext
20312fi
20313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20314$as_echo "$ac_cv_objext" >&6; }
20315OBJEXT=$ac_cv_objext
20316ac_objext=$OBJEXT
20317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20318$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20319if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20320  $as_echo_n "(cached) " >&6
20321else
20322  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20323/* end confdefs.h.  */
20324
20325int
20326main ()
20327{
20328#ifndef __GNUC__
20329       choke me
20330#endif
20331
20332  ;
20333  return 0;
20334}
20335_ACEOF
20336if ac_fn_c_try_compile "$LINENO"; then :
20337  ac_compiler_gnu=yes
20338else
20339  ac_compiler_gnu=no
20340fi
20341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20342ac_cv_c_compiler_gnu=$ac_compiler_gnu
20343
20344fi
20345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20346$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20347if test $ac_compiler_gnu = yes; then
20348  GCC=yes
20349else
20350  GCC=
20351fi
20352ac_test_CFLAGS=${CFLAGS+set}
20353ac_save_CFLAGS=$CFLAGS
20354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20355$as_echo_n "checking whether $CC accepts -g... " >&6; }
20356if test "${ac_cv_prog_cc_g+set}" = set; then :
20357  $as_echo_n "(cached) " >&6
20358else
20359  ac_save_c_werror_flag=$ac_c_werror_flag
20360   ac_c_werror_flag=yes
20361   ac_cv_prog_cc_g=no
20362   CFLAGS="-g"
20363   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20364/* end confdefs.h.  */
20365
20366int
20367main ()
20368{
20369
20370  ;
20371  return 0;
20372}
20373_ACEOF
20374if ac_fn_c_try_compile "$LINENO"; then :
20375  ac_cv_prog_cc_g=yes
20376else
20377  CFLAGS=""
20378      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20379/* end confdefs.h.  */
20380
20381int
20382main ()
20383{
20384
20385  ;
20386  return 0;
20387}
20388_ACEOF
20389if ac_fn_c_try_compile "$LINENO"; then :
20390
20391else
20392  ac_c_werror_flag=$ac_save_c_werror_flag
20393	 CFLAGS="-g"
20394	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20395/* end confdefs.h.  */
20396
20397int
20398main ()
20399{
20400
20401  ;
20402  return 0;
20403}
20404_ACEOF
20405if ac_fn_c_try_compile "$LINENO"; then :
20406  ac_cv_prog_cc_g=yes
20407fi
20408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20409fi
20410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20411fi
20412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20413   ac_c_werror_flag=$ac_save_c_werror_flag
20414fi
20415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20416$as_echo "$ac_cv_prog_cc_g" >&6; }
20417if test "$ac_test_CFLAGS" = set; then
20418  CFLAGS=$ac_save_CFLAGS
20419elif test $ac_cv_prog_cc_g = yes; then
20420  if test "$GCC" = yes; then
20421    CFLAGS="-g -O2"
20422  else
20423    CFLAGS="-g"
20424  fi
20425else
20426  if test "$GCC" = yes; then
20427    CFLAGS="-O2"
20428  else
20429    CFLAGS=
20430  fi
20431fi
20432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20433$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20434if test "${ac_cv_prog_cc_c89+set}" = set; then :
20435  $as_echo_n "(cached) " >&6
20436else
20437  ac_cv_prog_cc_c89=no
20438ac_save_CC=$CC
20439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20440/* end confdefs.h.  */
20441#include <stdarg.h>
20442#include <stdio.h>
20443#include <sys/types.h>
20444#include <sys/stat.h>
20445/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20446struct buf { int x; };
20447FILE * (*rcsopen) (struct buf *, struct stat *, int);
20448static char *e (p, i)
20449     char **p;
20450     int i;
20451{
20452  return p[i];
20453}
20454static char *f (char * (*g) (char **, int), char **p, ...)
20455{
20456  char *s;
20457  va_list v;
20458  va_start (v,p);
20459  s = g (p, va_arg (v,int));
20460  va_end (v);
20461  return s;
20462}
20463
20464/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20465   function prototypes and stuff, but not '\xHH' hex character constants.
20466   These don't provoke an error unfortunately, instead are silently treated
20467   as 'x'.  The following induces an error, until -std is added to get
20468   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20469   array size at least.  It's necessary to write '\x00'==0 to get something
20470   that's true only with -std.  */
20471int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20472
20473/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20474   inside strings and character constants.  */
20475#define FOO(x) 'x'
20476int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20477
20478int test (int i, double x);
20479struct s1 {int (*f) (int a);};
20480struct s2 {int (*f) (double a);};
20481int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20482int argc;
20483char **argv;
20484int
20485main ()
20486{
20487return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20488  ;
20489  return 0;
20490}
20491_ACEOF
20492for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20493	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20494do
20495  CC="$ac_save_CC $ac_arg"
20496  if ac_fn_c_try_compile "$LINENO"; then :
20497  ac_cv_prog_cc_c89=$ac_arg
20498fi
20499rm -f core conftest.err conftest.$ac_objext
20500  test "x$ac_cv_prog_cc_c89" != "xno" && break
20501done
20502rm -f conftest.$ac_ext
20503CC=$ac_save_CC
20504
20505fi
20506# AC_CACHE_VAL
20507case "x$ac_cv_prog_cc_c89" in
20508  x)
20509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20510$as_echo "none needed" >&6; } ;;
20511  xno)
20512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20513$as_echo "unsupported" >&6; } ;;
20514  *)
20515    CC="$CC $ac_cv_prog_cc_c89"
20516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20517$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20518esac
20519if test "x$ac_cv_prog_cc_c89" != xno; then :
20520
20521fi
20522
20523ac_ext=cpp
20524ac_cpp='$CXXCPP $CPPFLAGS'
20525ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20526ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20527ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20528
20529
20530### Locate C++ compiler (CXX)
20531
20532if test "x$CXX" != x; then
20533  COMPILER_CHECK_LIST="$CXX"
20534elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20535  COMPILER_CHECK_LIST="cl"
20536elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20537  COMPILER_CHECK_LIST="CC g++"
20538else
20539  COMPILER_CHECK_LIST="g++ CC"
20540fi
20541
20542
20543  COMPILER_NAME=C++
20544
20545  CXX=
20546  # If TOOLS_DIR is set, check for all compiler names in there first
20547  # before checking the rest of the PATH.
20548  if test -n "$TOOLS_DIR"; then
20549    PATH_save="$PATH"
20550    PATH="$TOOLS_DIR"
20551    for ac_prog in $COMPILER_CHECK_LIST
20552do
20553  # Extract the first word of "$ac_prog", so it can be a program name with args.
20554set dummy $ac_prog; ac_word=$2
20555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20556$as_echo_n "checking for $ac_word... " >&6; }
20557if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20558  $as_echo_n "(cached) " >&6
20559else
20560  case $TOOLS_DIR_CXX in
20561  [\\/]* | ?:[\\/]*)
20562  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20563  ;;
20564  *)
20565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20566for as_dir in $PATH
20567do
20568  IFS=$as_save_IFS
20569  test -z "$as_dir" && as_dir=.
20570    for ac_exec_ext in '' $ac_executable_extensions; do
20571  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20572    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20574    break 2
20575  fi
20576done
20577  done
20578IFS=$as_save_IFS
20579
20580  ;;
20581esac
20582fi
20583TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20584if test -n "$TOOLS_DIR_CXX"; then
20585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20586$as_echo "$TOOLS_DIR_CXX" >&6; }
20587else
20588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20589$as_echo "no" >&6; }
20590fi
20591
20592
20593  test -n "$TOOLS_DIR_CXX" && break
20594done
20595
20596    CXX=$TOOLS_DIR_CXX
20597    PATH="$PATH_save"
20598  fi
20599
20600  # AC_PATH_PROGS can't be run multiple times with the same variable,
20601  # so create a new name for this run.
20602  if test "x$CXX" = x; then
20603    for ac_prog in $COMPILER_CHECK_LIST
20604do
20605  # Extract the first word of "$ac_prog", so it can be a program name with args.
20606set dummy $ac_prog; ac_word=$2
20607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20608$as_echo_n "checking for $ac_word... " >&6; }
20609if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20610  $as_echo_n "(cached) " >&6
20611else
20612  case $POTENTIAL_CXX in
20613  [\\/]* | ?:[\\/]*)
20614  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20615  ;;
20616  *)
20617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20618for as_dir in $PATH
20619do
20620  IFS=$as_save_IFS
20621  test -z "$as_dir" && as_dir=.
20622    for ac_exec_ext in '' $ac_executable_extensions; do
20623  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20624    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20626    break 2
20627  fi
20628done
20629  done
20630IFS=$as_save_IFS
20631
20632  ;;
20633esac
20634fi
20635POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20636if test -n "$POTENTIAL_CXX"; then
20637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20638$as_echo "$POTENTIAL_CXX" >&6; }
20639else
20640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20641$as_echo "no" >&6; }
20642fi
20643
20644
20645  test -n "$POTENTIAL_CXX" && break
20646done
20647
20648    CXX=$POTENTIAL_CXX
20649  fi
20650
20651  if test "x$CXX" = x; then
20652
20653    # Print a helpful message on how to acquire the necessary build dependency.
20654    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20655    MISSING_DEPENDENCY=devkit
20656    PKGHANDLER_COMMAND=
20657
20658    case $PKGHANDLER in
20659	apt-get)
20660                apt_help     $MISSING_DEPENDENCY ;;
20661    yum)
20662                yum_help     $MISSING_DEPENDENCY ;;
20663	port)
20664                port_help    $MISSING_DEPENDENCY ;;
20665	pkgutil)
20666                pkgutil_help $MISSING_DEPENDENCY ;;
20667	pkgadd)
20668                pkgadd_help  $MISSING_DEPENDENCY ;;
20669    * )
20670      break ;;
20671    esac
20672
20673    if test "x$PKGHANDLER_COMMAND" != x; then
20674        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20675    fi
20676
20677      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20678  fi
20679
20680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20681
20682  # First separate the path from the arguments. This will split at the first
20683  # space.
20684  complete="$CXX"
20685  path="${complete%% *}"
20686  tmp="$complete EOL"
20687  arguments="${tmp#* }"
20688
20689  # Input might be given as Windows format, start by converting to
20690  # unix format.
20691  new_path=`$CYGPATH -u "$path"`
20692
20693  # Now try to locate executable using which
20694  new_path=`$WHICH "$new_path" 2> /dev/null`
20695  # bat and cmd files are not always considered executable in cygwin causing which
20696  # to not find them
20697  if test "x$new_path" = x \
20698           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20699           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20700    new_path=`$CYGPATH -u "$path"`
20701  fi
20702  if test "x$new_path" = x; then
20703    # Oops. Which didn't find the executable.
20704    # The splitting of arguments from the executable at a space might have been incorrect,
20705    # since paths with space are more likely in Windows. Give it another try with the whole
20706    # argument.
20707    path="$complete"
20708    arguments="EOL"
20709    new_path=`$CYGPATH -u "$path"`
20710    new_path=`$WHICH "$new_path" 2> /dev/null`
20711    # bat and cmd files are not always considered executable in cygwin causing which
20712    # to not find them
20713    if test "x$new_path" = x \
20714             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20715             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20716      new_path=`$CYGPATH -u "$path"`
20717    fi
20718    if test "x$new_path" = x; then
20719      # It's still not found. Now this is an unrecoverable error.
20720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20721$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20722      has_space=`$ECHO "$complete" | $GREP " "`
20723      if test "x$has_space" != x; then
20724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20726      fi
20727      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20728    fi
20729  fi
20730
20731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20734  # "foo.exe" is OK but "foo" is an error.
20735  #
20736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20737  # It is also a way to make sure we got the proper file name for the real test later on.
20738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20739  if test "x$test_shortpath" = x; then
20740    # Short path failed, file does not exist as specified.
20741    # Try adding .exe or .cmd
20742    if test -f "${new_path}.exe"; then
20743       input_to_shortpath="${new_path}.exe"
20744    elif test -f "${new_path}.cmd"; then
20745       input_to_shortpath="${new_path}.cmd"
20746    else
20747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20748$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20749      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20750$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20751      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20752    fi
20753  else
20754    input_to_shortpath="$new_path"
20755  fi
20756
20757  # Call helper function which possibly converts this using DOS-style short mode.
20758  # If so, the updated path is stored in $new_path.
20759  new_path="$input_to_shortpath"
20760
20761  input_path="$input_to_shortpath"
20762  # Check if we need to convert this using DOS-style short mode. If the path
20763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20764  # take no chances and rewrite it.
20765  # Note: m4 eats our [], so we need to use [ and ] instead.
20766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20767  if test "x$has_forbidden_chars" != x; then
20768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20772      # Going to short mode and back again did indeed matter. Since short mode is
20773      # case insensitive, let's make it lowercase to improve readability.
20774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20775      # Now convert it back to Unix-stile (cygpath)
20776      input_path=`$CYGPATH -u "$shortmode_path"`
20777      new_path="$input_path"
20778    fi
20779  fi
20780
20781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20782  if test "x$test_cygdrive_prefix" = x; then
20783    # As a simple fix, exclude /usr/bin since it's not a real path.
20784    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20786      # a path prefixed by /cygdrive for fixpath to work.
20787      new_path="$CYGWIN_ROOT_PATH$input_path"
20788    fi
20789  fi
20790
20791  # remove trailing .exe if any
20792  new_path="${new_path/%.exe/}"
20793
20794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20795
20796  # First separate the path from the arguments. This will split at the first
20797  # space.
20798  complete="$CXX"
20799  path="${complete%% *}"
20800  tmp="$complete EOL"
20801  arguments="${tmp#* }"
20802
20803  # Input might be given as Windows format, start by converting to
20804  # unix format.
20805  new_path="$path"
20806
20807  windows_path="$new_path"
20808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20809    unix_path=`$CYGPATH -u "$windows_path"`
20810    new_path="$unix_path"
20811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20813    new_path="$unix_path"
20814  fi
20815
20816
20817  # Now try to locate executable using which
20818  new_path=`$WHICH "$new_path" 2> /dev/null`
20819
20820  if test "x$new_path" = x; then
20821    # Oops. Which didn't find the executable.
20822    # The splitting of arguments from the executable at a space might have been incorrect,
20823    # since paths with space are more likely in Windows. Give it another try with the whole
20824    # argument.
20825    path="$complete"
20826    arguments="EOL"
20827    new_path="$path"
20828
20829  windows_path="$new_path"
20830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20831    unix_path=`$CYGPATH -u "$windows_path"`
20832    new_path="$unix_path"
20833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20835    new_path="$unix_path"
20836  fi
20837
20838
20839    new_path=`$WHICH "$new_path" 2> /dev/null`
20840
20841    if test "x$new_path" = x; then
20842      # It's still not found. Now this is an unrecoverable error.
20843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20844$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20845      has_space=`$ECHO "$complete" | $GREP " "`
20846      if test "x$has_space" != x; then
20847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20849      fi
20850      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20851    fi
20852  fi
20853
20854  # Now new_path has a complete unix path to the binary
20855  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20856    # Keep paths in /bin as-is, but remove trailing .exe if any
20857    new_path="${new_path/%.exe/}"
20858    # Do not save /bin paths to all_fixpath_prefixes!
20859  else
20860    # Not in mixed or Windows style, start by that.
20861    new_path=`cmd //c echo $new_path`
20862
20863  input_path="$new_path"
20864  # Check if we need to convert this using DOS-style short mode. If the path
20865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20866  # take no chances and rewrite it.
20867  # Note: m4 eats our [], so we need to use [ and ] instead.
20868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20869  if test "x$has_forbidden_chars" != x; then
20870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20872  fi
20873
20874    # Output is in $new_path
20875
20876  windows_path="$new_path"
20877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20878    unix_path=`$CYGPATH -u "$windows_path"`
20879    new_path="$unix_path"
20880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20882    new_path="$unix_path"
20883  fi
20884
20885    # remove trailing .exe if any
20886    new_path="${new_path/%.exe/}"
20887
20888    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20889    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20890  fi
20891
20892  else
20893    # We're on a posix platform. Hooray! :)
20894    # First separate the path from the arguments. This will split at the first
20895    # space.
20896    complete="$CXX"
20897    path="${complete%% *}"
20898    tmp="$complete EOL"
20899    arguments="${tmp#* }"
20900
20901    # Cannot rely on the command "which" here since it doesn't always work.
20902    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20903    if test -z "$is_absolute_path"; then
20904      # Path to executable is not absolute. Find it.
20905      IFS_save="$IFS"
20906      IFS=:
20907      for p in $PATH; do
20908        if test -f "$p/$path" && test -x "$p/$path"; then
20909          new_path="$p/$path"
20910          break
20911        fi
20912      done
20913      IFS="$IFS_save"
20914    else
20915      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20916$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20917      new_path="$path"
20918    fi
20919
20920    if test "x$new_path" = x; then
20921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20922$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20923        has_space=`$ECHO "$complete" | $GREP " "`
20924        if test "x$has_space" != x; then
20925          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20926$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20927        fi
20928        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20929      fi
20930  fi
20931
20932      # Now join together the path and the arguments once again
20933      if test "x$arguments" != xEOL; then
20934        new_complete="$new_path ${arguments% *}"
20935      else
20936        new_complete="$new_path"
20937      fi
20938
20939  if test "x$complete" != "x$new_complete"; then
20940      CXX="$new_complete"
20941      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20942$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20943    fi
20944
20945  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20946$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20947  TEST_COMPILER="$CXX"
20948
20949    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20950        # Follow a chain of symbolic links. Use readlink
20951        # where it exists, else fall back to horribly
20952        # complicated shell code.
20953        if test "x$READLINK_TESTED" != yes; then
20954            # On MacOSX there is a readlink tool with a different
20955            # purpose than the GNU readlink tool. Check the found readlink.
20956            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20957            if test "x$ISGNU" = x; then
20958                 # A readlink that we do not know how to use.
20959                 # Are there other non-GNU readlinks out there?
20960                 READLINK_TESTED=yes
20961                 READLINK=
20962            fi
20963        fi
20964
20965        if test "x$READLINK" != x; then
20966            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20967        else
20968            # Save the current directory for restoring afterwards
20969            STARTDIR=$PWD
20970            COUNTER=0
20971            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20972            sym_link_file=`$BASENAME $TEST_COMPILER`
20973            cd $sym_link_dir
20974            # Use -P flag to resolve symlinks in directories.
20975            cd `$THEPWDCMD -P`
20976            sym_link_dir=`$THEPWDCMD -P`
20977            # Resolve file symlinks
20978            while test $COUNTER -lt 20; do
20979                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20980                if test "x$ISLINK" == x; then
20981                    # This is not a symbolic link! We are done!
20982                    break
20983                fi
20984                # Again resolve directory symlinks since the target of the just found
20985                # link could be in a different directory
20986                cd `$DIRNAME $ISLINK`
20987                sym_link_dir=`$THEPWDCMD -P`
20988                sym_link_file=`$BASENAME $ISLINK`
20989                let COUNTER=COUNTER+1
20990            done
20991            cd $STARTDIR
20992            TEST_COMPILER=$sym_link_dir/$sym_link_file
20993        fi
20994    fi
20995
20996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20997$as_echo "$TEST_COMPILER" >&6; }
20998  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20999$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21000
21001  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21002  if test "x$COMPILER_BASENAME" = "xccache"; then
21003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21004$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21005    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21006    # We want to control ccache invocation ourselves, so ignore this cc and try
21007    # searching again.
21008
21009    # Remove the path to the fake ccache cc from the PATH
21010    RETRY_COMPILER_SAVED_PATH="$PATH"
21011    COMPILER_DIRNAME=`$DIRNAME $CXX`
21012    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21013
21014    # Try again looking for our compiler
21015    if test -n "$ac_tool_prefix"; then
21016  for ac_prog in $COMPILER_CHECK_LIST
21017  do
21018    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21019set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21021$as_echo_n "checking for $ac_word... " >&6; }
21022if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
21023  $as_echo_n "(cached) " >&6
21024else
21025  if test -n "$PROPER_COMPILER_CXX"; then
21026  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21027else
21028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21029for as_dir in $PATH
21030do
21031  IFS=$as_save_IFS
21032  test -z "$as_dir" && as_dir=.
21033    for ac_exec_ext in '' $ac_executable_extensions; do
21034  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21035    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21037    break 2
21038  fi
21039done
21040  done
21041IFS=$as_save_IFS
21042
21043fi
21044fi
21045PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21046if test -n "$PROPER_COMPILER_CXX"; then
21047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21048$as_echo "$PROPER_COMPILER_CXX" >&6; }
21049else
21050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21051$as_echo "no" >&6; }
21052fi
21053
21054
21055    test -n "$PROPER_COMPILER_CXX" && break
21056  done
21057fi
21058if test -z "$PROPER_COMPILER_CXX"; then
21059  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21060  for ac_prog in $COMPILER_CHECK_LIST
21061do
21062  # Extract the first word of "$ac_prog", so it can be a program name with args.
21063set dummy $ac_prog; ac_word=$2
21064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21065$as_echo_n "checking for $ac_word... " >&6; }
21066if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
21067  $as_echo_n "(cached) " >&6
21068else
21069  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21070  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21071else
21072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21073for as_dir in $PATH
21074do
21075  IFS=$as_save_IFS
21076  test -z "$as_dir" && as_dir=.
21077    for ac_exec_ext in '' $ac_executable_extensions; do
21078  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21079    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21081    break 2
21082  fi
21083done
21084  done
21085IFS=$as_save_IFS
21086
21087fi
21088fi
21089ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21090if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21092$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21093else
21094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21095$as_echo "no" >&6; }
21096fi
21097
21098
21099  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21100done
21101
21102  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21103    PROPER_COMPILER_CXX=""
21104  else
21105    case $cross_compiling:$ac_tool_warned in
21106yes:)
21107{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21108$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21109ac_tool_warned=yes ;;
21110esac
21111    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21112  fi
21113fi
21114
21115
21116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21117
21118  # First separate the path from the arguments. This will split at the first
21119  # space.
21120  complete="$PROPER_COMPILER_CXX"
21121  path="${complete%% *}"
21122  tmp="$complete EOL"
21123  arguments="${tmp#* }"
21124
21125  # Input might be given as Windows format, start by converting to
21126  # unix format.
21127  new_path=`$CYGPATH -u "$path"`
21128
21129  # Now try to locate executable using which
21130  new_path=`$WHICH "$new_path" 2> /dev/null`
21131  # bat and cmd files are not always considered executable in cygwin causing which
21132  # to not find them
21133  if test "x$new_path" = x \
21134           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21135           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21136    new_path=`$CYGPATH -u "$path"`
21137  fi
21138  if test "x$new_path" = x; then
21139    # Oops. Which didn't find the executable.
21140    # The splitting of arguments from the executable at a space might have been incorrect,
21141    # since paths with space are more likely in Windows. Give it another try with the whole
21142    # argument.
21143    path="$complete"
21144    arguments="EOL"
21145    new_path=`$CYGPATH -u "$path"`
21146    new_path=`$WHICH "$new_path" 2> /dev/null`
21147    # bat and cmd files are not always considered executable in cygwin causing which
21148    # to not find them
21149    if test "x$new_path" = x \
21150             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21151             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21152      new_path=`$CYGPATH -u "$path"`
21153    fi
21154    if test "x$new_path" = x; then
21155      # It's still not found. Now this is an unrecoverable error.
21156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21157$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21158      has_space=`$ECHO "$complete" | $GREP " "`
21159      if test "x$has_space" != x; then
21160        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21161$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21162      fi
21163      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21164    fi
21165  fi
21166
21167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21170  # "foo.exe" is OK but "foo" is an error.
21171  #
21172  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21173  # It is also a way to make sure we got the proper file name for the real test later on.
21174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21175  if test "x$test_shortpath" = x; then
21176    # Short path failed, file does not exist as specified.
21177    # Try adding .exe or .cmd
21178    if test -f "${new_path}.exe"; then
21179       input_to_shortpath="${new_path}.exe"
21180    elif test -f "${new_path}.cmd"; then
21181       input_to_shortpath="${new_path}.cmd"
21182    else
21183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21184$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21185      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21186$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21187      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21188    fi
21189  else
21190    input_to_shortpath="$new_path"
21191  fi
21192
21193  # Call helper function which possibly converts this using DOS-style short mode.
21194  # If so, the updated path is stored in $new_path.
21195  new_path="$input_to_shortpath"
21196
21197  input_path="$input_to_shortpath"
21198  # Check if we need to convert this using DOS-style short mode. If the path
21199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21200  # take no chances and rewrite it.
21201  # Note: m4 eats our [], so we need to use [ and ] instead.
21202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21203  if test "x$has_forbidden_chars" != x; then
21204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21208      # Going to short mode and back again did indeed matter. Since short mode is
21209      # case insensitive, let's make it lowercase to improve readability.
21210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21211      # Now convert it back to Unix-stile (cygpath)
21212      input_path=`$CYGPATH -u "$shortmode_path"`
21213      new_path="$input_path"
21214    fi
21215  fi
21216
21217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21218  if test "x$test_cygdrive_prefix" = x; then
21219    # As a simple fix, exclude /usr/bin since it's not a real path.
21220    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21222      # a path prefixed by /cygdrive for fixpath to work.
21223      new_path="$CYGWIN_ROOT_PATH$input_path"
21224    fi
21225  fi
21226
21227  # remove trailing .exe if any
21228  new_path="${new_path/%.exe/}"
21229
21230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21231
21232  # First separate the path from the arguments. This will split at the first
21233  # space.
21234  complete="$PROPER_COMPILER_CXX"
21235  path="${complete%% *}"
21236  tmp="$complete EOL"
21237  arguments="${tmp#* }"
21238
21239  # Input might be given as Windows format, start by converting to
21240  # unix format.
21241  new_path="$path"
21242
21243  windows_path="$new_path"
21244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21245    unix_path=`$CYGPATH -u "$windows_path"`
21246    new_path="$unix_path"
21247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21249    new_path="$unix_path"
21250  fi
21251
21252
21253  # Now try to locate executable using which
21254  new_path=`$WHICH "$new_path" 2> /dev/null`
21255
21256  if test "x$new_path" = x; then
21257    # Oops. Which didn't find the executable.
21258    # The splitting of arguments from the executable at a space might have been incorrect,
21259    # since paths with space are more likely in Windows. Give it another try with the whole
21260    # argument.
21261    path="$complete"
21262    arguments="EOL"
21263    new_path="$path"
21264
21265  windows_path="$new_path"
21266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21267    unix_path=`$CYGPATH -u "$windows_path"`
21268    new_path="$unix_path"
21269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21271    new_path="$unix_path"
21272  fi
21273
21274
21275    new_path=`$WHICH "$new_path" 2> /dev/null`
21276
21277    if test "x$new_path" = x; then
21278      # It's still not found. Now this is an unrecoverable error.
21279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21280$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21281      has_space=`$ECHO "$complete" | $GREP " "`
21282      if test "x$has_space" != x; then
21283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21285      fi
21286      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21287    fi
21288  fi
21289
21290  # Now new_path has a complete unix path to the binary
21291  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21292    # Keep paths in /bin as-is, but remove trailing .exe if any
21293    new_path="${new_path/%.exe/}"
21294    # Do not save /bin paths to all_fixpath_prefixes!
21295  else
21296    # Not in mixed or Windows style, start by that.
21297    new_path=`cmd //c echo $new_path`
21298
21299  input_path="$new_path"
21300  # Check if we need to convert this using DOS-style short mode. If the path
21301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21302  # take no chances and rewrite it.
21303  # Note: m4 eats our [], so we need to use [ and ] instead.
21304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21305  if test "x$has_forbidden_chars" != x; then
21306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21308  fi
21309
21310    # Output is in $new_path
21311
21312  windows_path="$new_path"
21313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21314    unix_path=`$CYGPATH -u "$windows_path"`
21315    new_path="$unix_path"
21316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21318    new_path="$unix_path"
21319  fi
21320
21321    # remove trailing .exe if any
21322    new_path="${new_path/%.exe/}"
21323
21324    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21325    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21326  fi
21327
21328  else
21329    # We're on a posix platform. Hooray! :)
21330    # First separate the path from the arguments. This will split at the first
21331    # space.
21332    complete="$PROPER_COMPILER_CXX"
21333    path="${complete%% *}"
21334    tmp="$complete EOL"
21335    arguments="${tmp#* }"
21336
21337    # Cannot rely on the command "which" here since it doesn't always work.
21338    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21339    if test -z "$is_absolute_path"; then
21340      # Path to executable is not absolute. Find it.
21341      IFS_save="$IFS"
21342      IFS=:
21343      for p in $PATH; do
21344        if test -f "$p/$path" && test -x "$p/$path"; then
21345          new_path="$p/$path"
21346          break
21347        fi
21348      done
21349      IFS="$IFS_save"
21350    else
21351      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21352$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21353      new_path="$path"
21354    fi
21355
21356    if test "x$new_path" = x; then
21357        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21358$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21359        has_space=`$ECHO "$complete" | $GREP " "`
21360        if test "x$has_space" != x; then
21361          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21362$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21363        fi
21364        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21365      fi
21366  fi
21367
21368      # Now join together the path and the arguments once again
21369      if test "x$arguments" != xEOL; then
21370        new_complete="$new_path ${arguments% *}"
21371      else
21372        new_complete="$new_path"
21373      fi
21374
21375  if test "x$complete" != "x$new_complete"; then
21376      PROPER_COMPILER_CXX="$new_complete"
21377      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21378$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21379    fi
21380
21381    PATH="$RETRY_COMPILER_SAVED_PATH"
21382
21383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21384$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21385
21386    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21387        # Follow a chain of symbolic links. Use readlink
21388        # where it exists, else fall back to horribly
21389        # complicated shell code.
21390        if test "x$READLINK_TESTED" != yes; then
21391            # On MacOSX there is a readlink tool with a different
21392            # purpose than the GNU readlink tool. Check the found readlink.
21393            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21394            if test "x$ISGNU" = x; then
21395                 # A readlink that we do not know how to use.
21396                 # Are there other non-GNU readlinks out there?
21397                 READLINK_TESTED=yes
21398                 READLINK=
21399            fi
21400        fi
21401
21402        if test "x$READLINK" != x; then
21403            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21404        else
21405            # Save the current directory for restoring afterwards
21406            STARTDIR=$PWD
21407            COUNTER=0
21408            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21409            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21410            cd $sym_link_dir
21411            # Use -P flag to resolve symlinks in directories.
21412            cd `$THEPWDCMD -P`
21413            sym_link_dir=`$THEPWDCMD -P`
21414            # Resolve file symlinks
21415            while test $COUNTER -lt 20; do
21416                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21417                if test "x$ISLINK" == x; then
21418                    # This is not a symbolic link! We are done!
21419                    break
21420                fi
21421                # Again resolve directory symlinks since the target of the just found
21422                # link could be in a different directory
21423                cd `$DIRNAME $ISLINK`
21424                sym_link_dir=`$THEPWDCMD -P`
21425                sym_link_file=`$BASENAME $ISLINK`
21426                let COUNTER=COUNTER+1
21427            done
21428            cd $STARTDIR
21429            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21430        fi
21431    fi
21432
21433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21434$as_echo "$PROPER_COMPILER_CXX" >&6; }
21435    CXX="$PROPER_COMPILER_CXX"
21436  else
21437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21438$as_echo "no, keeping CXX" >&6; }
21439    CXX="$TEST_COMPILER"
21440  fi
21441
21442  COMPILER=$CXX
21443  COMPILER_NAME=$COMPILER_NAME
21444
21445  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21446    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21447    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21448    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21449    if test $? -ne 0; then
21450      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21451
21452      { $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
21453$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21454      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21455$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21456      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21457    else
21458      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21459      COMPILER_VENDOR="Sun Studio"
21460    fi
21461  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21462    # First line typically looks something like:
21463    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21464    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21465    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21466    COMPILER_VENDOR="Microsoft CL.EXE"
21467    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21468    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21469      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21470        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21471      fi
21472    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21473      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21474        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21475      fi
21476    fi
21477  else
21478    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21479    # Check that this is likely to be GCC.
21480    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21481    if test $? -ne 0; then
21482      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21483$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21484      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21485$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21486      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21487    fi
21488
21489    # First line typically looks something like:
21490    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21491    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21492    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21493  fi
21494  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21495  CXX_VERSION="$COMPILER_VERSION"
21496  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21497  CXX_VENDOR="$COMPILER_VENDOR"
21498
21499  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21500$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21501
21502
21503# Now that we have resolved CXX ourself, let autoconf have its go at it
21504ac_ext=cpp
21505ac_cpp='$CXXCPP $CPPFLAGS'
21506ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21507ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21508ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21509if test -z "$CXX"; then
21510  if test -n "$CCC"; then
21511    CXX=$CCC
21512  else
21513    if test -n "$ac_tool_prefix"; then
21514  for ac_prog in $CXX
21515  do
21516    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21517set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21519$as_echo_n "checking for $ac_word... " >&6; }
21520if test "${ac_cv_prog_CXX+set}" = set; then :
21521  $as_echo_n "(cached) " >&6
21522else
21523  if test -n "$CXX"; then
21524  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21525else
21526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21527for as_dir in $PATH
21528do
21529  IFS=$as_save_IFS
21530  test -z "$as_dir" && as_dir=.
21531    for ac_exec_ext in '' $ac_executable_extensions; do
21532  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21533    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21535    break 2
21536  fi
21537done
21538  done
21539IFS=$as_save_IFS
21540
21541fi
21542fi
21543CXX=$ac_cv_prog_CXX
21544if test -n "$CXX"; then
21545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21546$as_echo "$CXX" >&6; }
21547else
21548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21549$as_echo "no" >&6; }
21550fi
21551
21552
21553    test -n "$CXX" && break
21554  done
21555fi
21556if test -z "$CXX"; then
21557  ac_ct_CXX=$CXX
21558  for ac_prog in $CXX
21559do
21560  # Extract the first word of "$ac_prog", so it can be a program name with args.
21561set dummy $ac_prog; ac_word=$2
21562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21563$as_echo_n "checking for $ac_word... " >&6; }
21564if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21565  $as_echo_n "(cached) " >&6
21566else
21567  if test -n "$ac_ct_CXX"; then
21568  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21569else
21570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21571for as_dir in $PATH
21572do
21573  IFS=$as_save_IFS
21574  test -z "$as_dir" && as_dir=.
21575    for ac_exec_ext in '' $ac_executable_extensions; do
21576  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21577    ac_cv_prog_ac_ct_CXX="$ac_prog"
21578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21579    break 2
21580  fi
21581done
21582  done
21583IFS=$as_save_IFS
21584
21585fi
21586fi
21587ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21588if test -n "$ac_ct_CXX"; then
21589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21590$as_echo "$ac_ct_CXX" >&6; }
21591else
21592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21593$as_echo "no" >&6; }
21594fi
21595
21596
21597  test -n "$ac_ct_CXX" && break
21598done
21599
21600  if test "x$ac_ct_CXX" = x; then
21601    CXX="g++"
21602  else
21603    case $cross_compiling:$ac_tool_warned in
21604yes:)
21605{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21606$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21607ac_tool_warned=yes ;;
21608esac
21609    CXX=$ac_ct_CXX
21610  fi
21611fi
21612
21613  fi
21614fi
21615# Provide some information about the compiler.
21616$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21617set X $ac_compile
21618ac_compiler=$2
21619for ac_option in --version -v -V -qversion; do
21620  { { ac_try="$ac_compiler $ac_option >&5"
21621case "(($ac_try" in
21622  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21623  *) ac_try_echo=$ac_try;;
21624esac
21625eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21626$as_echo "$ac_try_echo"; } >&5
21627  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21628  ac_status=$?
21629  if test -s conftest.err; then
21630    sed '10a\
21631... rest of stderr output deleted ...
21632         10q' conftest.err >conftest.er1
21633    cat conftest.er1 >&5
21634  fi
21635  rm -f conftest.er1 conftest.err
21636  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21637  test $ac_status = 0; }
21638done
21639
21640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21641$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21642if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21643  $as_echo_n "(cached) " >&6
21644else
21645  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21646/* end confdefs.h.  */
21647
21648int
21649main ()
21650{
21651#ifndef __GNUC__
21652       choke me
21653#endif
21654
21655  ;
21656  return 0;
21657}
21658_ACEOF
21659if ac_fn_cxx_try_compile "$LINENO"; then :
21660  ac_compiler_gnu=yes
21661else
21662  ac_compiler_gnu=no
21663fi
21664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21665ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21666
21667fi
21668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21669$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21670if test $ac_compiler_gnu = yes; then
21671  GXX=yes
21672else
21673  GXX=
21674fi
21675ac_test_CXXFLAGS=${CXXFLAGS+set}
21676ac_save_CXXFLAGS=$CXXFLAGS
21677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21678$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21679if test "${ac_cv_prog_cxx_g+set}" = set; then :
21680  $as_echo_n "(cached) " >&6
21681else
21682  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21683   ac_cxx_werror_flag=yes
21684   ac_cv_prog_cxx_g=no
21685   CXXFLAGS="-g"
21686   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21687/* end confdefs.h.  */
21688
21689int
21690main ()
21691{
21692
21693  ;
21694  return 0;
21695}
21696_ACEOF
21697if ac_fn_cxx_try_compile "$LINENO"; then :
21698  ac_cv_prog_cxx_g=yes
21699else
21700  CXXFLAGS=""
21701      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21702/* end confdefs.h.  */
21703
21704int
21705main ()
21706{
21707
21708  ;
21709  return 0;
21710}
21711_ACEOF
21712if ac_fn_cxx_try_compile "$LINENO"; then :
21713
21714else
21715  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21716	 CXXFLAGS="-g"
21717	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21718/* end confdefs.h.  */
21719
21720int
21721main ()
21722{
21723
21724  ;
21725  return 0;
21726}
21727_ACEOF
21728if ac_fn_cxx_try_compile "$LINENO"; then :
21729  ac_cv_prog_cxx_g=yes
21730fi
21731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21732fi
21733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21734fi
21735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21736   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21737fi
21738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21739$as_echo "$ac_cv_prog_cxx_g" >&6; }
21740if test "$ac_test_CXXFLAGS" = set; then
21741  CXXFLAGS=$ac_save_CXXFLAGS
21742elif test $ac_cv_prog_cxx_g = yes; then
21743  if test "$GXX" = yes; then
21744    CXXFLAGS="-g -O2"
21745  else
21746    CXXFLAGS="-g"
21747  fi
21748else
21749  if test "$GXX" = yes; then
21750    CXXFLAGS="-O2"
21751  else
21752    CXXFLAGS=
21753  fi
21754fi
21755ac_ext=cpp
21756ac_cpp='$CXXCPP $CPPFLAGS'
21757ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21758ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21759ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21760
21761
21762### Locate other tools
21763
21764if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21765    ac_ext=m
21766ac_cpp='$OBJCPP $CPPFLAGS'
21767ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21768ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21769ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21770if test -n "$ac_tool_prefix"; then
21771  for ac_prog in gcc objcc objc cc CC
21772  do
21773    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21774set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21776$as_echo_n "checking for $ac_word... " >&6; }
21777if test "${ac_cv_prog_OBJC+set}" = set; then :
21778  $as_echo_n "(cached) " >&6
21779else
21780  if test -n "$OBJC"; then
21781  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21782else
21783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21784for as_dir in $PATH
21785do
21786  IFS=$as_save_IFS
21787  test -z "$as_dir" && as_dir=.
21788    for ac_exec_ext in '' $ac_executable_extensions; do
21789  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21790    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21792    break 2
21793  fi
21794done
21795  done
21796IFS=$as_save_IFS
21797
21798fi
21799fi
21800OBJC=$ac_cv_prog_OBJC
21801if test -n "$OBJC"; then
21802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21803$as_echo "$OBJC" >&6; }
21804else
21805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21806$as_echo "no" >&6; }
21807fi
21808
21809
21810    test -n "$OBJC" && break
21811  done
21812fi
21813if test -z "$OBJC"; then
21814  ac_ct_OBJC=$OBJC
21815  for ac_prog in gcc objcc objc cc CC
21816do
21817  # Extract the first word of "$ac_prog", so it can be a program name with args.
21818set dummy $ac_prog; ac_word=$2
21819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21820$as_echo_n "checking for $ac_word... " >&6; }
21821if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21822  $as_echo_n "(cached) " >&6
21823else
21824  if test -n "$ac_ct_OBJC"; then
21825  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21826else
21827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21828for as_dir in $PATH
21829do
21830  IFS=$as_save_IFS
21831  test -z "$as_dir" && as_dir=.
21832    for ac_exec_ext in '' $ac_executable_extensions; do
21833  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21834    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21836    break 2
21837  fi
21838done
21839  done
21840IFS=$as_save_IFS
21841
21842fi
21843fi
21844ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21845if test -n "$ac_ct_OBJC"; then
21846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21847$as_echo "$ac_ct_OBJC" >&6; }
21848else
21849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21850$as_echo "no" >&6; }
21851fi
21852
21853
21854  test -n "$ac_ct_OBJC" && break
21855done
21856
21857  if test "x$ac_ct_OBJC" = x; then
21858    OBJC="gcc"
21859  else
21860    case $cross_compiling:$ac_tool_warned in
21861yes:)
21862{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21863$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21864ac_tool_warned=yes ;;
21865esac
21866    OBJC=$ac_ct_OBJC
21867  fi
21868fi
21869
21870# Provide some information about the compiler.
21871$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21872set X $ac_compile
21873ac_compiler=$2
21874for ac_option in --version -v -V -qversion; do
21875  { { ac_try="$ac_compiler $ac_option >&5"
21876case "(($ac_try" in
21877  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21878  *) ac_try_echo=$ac_try;;
21879esac
21880eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21881$as_echo "$ac_try_echo"; } >&5
21882  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21883  ac_status=$?
21884  if test -s conftest.err; then
21885    sed '10a\
21886... rest of stderr output deleted ...
21887         10q' conftest.err >conftest.er1
21888    cat conftest.er1 >&5
21889  fi
21890  rm -f conftest.er1 conftest.err
21891  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21892  test $ac_status = 0; }
21893done
21894
21895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21896$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21897if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21898  $as_echo_n "(cached) " >&6
21899else
21900  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21901/* end confdefs.h.  */
21902
21903int
21904main ()
21905{
21906#ifndef __GNUC__
21907       choke me
21908#endif
21909
21910  ;
21911  return 0;
21912}
21913_ACEOF
21914if ac_fn_objc_try_compile "$LINENO"; then :
21915  ac_compiler_gnu=yes
21916else
21917  ac_compiler_gnu=no
21918fi
21919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21920ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21921
21922fi
21923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21924$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21925if test $ac_compiler_gnu = yes; then
21926  GOBJC=yes
21927else
21928  GOBJC=
21929fi
21930ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21931ac_save_OBJCFLAGS=$OBJCFLAGS
21932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21933$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21934if test "${ac_cv_prog_objc_g+set}" = set; then :
21935  $as_echo_n "(cached) " >&6
21936else
21937  ac_save_objc_werror_flag=$ac_objc_werror_flag
21938   ac_objc_werror_flag=yes
21939   ac_cv_prog_objc_g=no
21940   OBJCFLAGS="-g"
21941   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21942/* end confdefs.h.  */
21943
21944int
21945main ()
21946{
21947
21948  ;
21949  return 0;
21950}
21951_ACEOF
21952if ac_fn_objc_try_compile "$LINENO"; then :
21953  ac_cv_prog_objc_g=yes
21954else
21955  OBJCFLAGS=""
21956      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21957/* end confdefs.h.  */
21958
21959int
21960main ()
21961{
21962
21963  ;
21964  return 0;
21965}
21966_ACEOF
21967if ac_fn_objc_try_compile "$LINENO"; then :
21968
21969else
21970  ac_objc_werror_flag=$ac_save_objc_werror_flag
21971	 OBJCFLAGS="-g"
21972	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21973/* end confdefs.h.  */
21974
21975int
21976main ()
21977{
21978
21979  ;
21980  return 0;
21981}
21982_ACEOF
21983if ac_fn_objc_try_compile "$LINENO"; then :
21984  ac_cv_prog_objc_g=yes
21985fi
21986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21987fi
21988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21989fi
21990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21991   ac_objc_werror_flag=$ac_save_objc_werror_flag
21992fi
21993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21994$as_echo "$ac_cv_prog_objc_g" >&6; }
21995if test "$ac_test_OBJCFLAGS" = set; then
21996  OBJCFLAGS=$ac_save_OBJCFLAGS
21997elif test $ac_cv_prog_objc_g = yes; then
21998  if test "$GOBJC" = yes; then
21999    OBJCFLAGS="-g -O2"
22000  else
22001    OBJCFLAGS="-g"
22002  fi
22003else
22004  if test "$GOBJC" = yes; then
22005    OBJCFLAGS="-O2"
22006  else
22007    OBJCFLAGS=
22008  fi
22009fi
22010ac_ext=cpp
22011ac_cpp='$CXXCPP $CPPFLAGS'
22012ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22013ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22014ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22015
22016
22017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22018
22019  # First separate the path from the arguments. This will split at the first
22020  # space.
22021  complete="$OBJC"
22022  path="${complete%% *}"
22023  tmp="$complete EOL"
22024  arguments="${tmp#* }"
22025
22026  # Input might be given as Windows format, start by converting to
22027  # unix format.
22028  new_path=`$CYGPATH -u "$path"`
22029
22030  # Now try to locate executable using which
22031  new_path=`$WHICH "$new_path" 2> /dev/null`
22032  # bat and cmd files are not always considered executable in cygwin causing which
22033  # to not find them
22034  if test "x$new_path" = x \
22035           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22036           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22037    new_path=`$CYGPATH -u "$path"`
22038  fi
22039  if test "x$new_path" = x; then
22040    # Oops. Which didn't find the executable.
22041    # The splitting of arguments from the executable at a space might have been incorrect,
22042    # since paths with space are more likely in Windows. Give it another try with the whole
22043    # argument.
22044    path="$complete"
22045    arguments="EOL"
22046    new_path=`$CYGPATH -u "$path"`
22047    new_path=`$WHICH "$new_path" 2> /dev/null`
22048    # bat and cmd files are not always considered executable in cygwin causing which
22049    # to not find them
22050    if test "x$new_path" = x \
22051             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22052             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22053      new_path=`$CYGPATH -u "$path"`
22054    fi
22055    if test "x$new_path" = x; then
22056      # It's still not found. Now this is an unrecoverable error.
22057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22058$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22059      has_space=`$ECHO "$complete" | $GREP " "`
22060      if test "x$has_space" != x; then
22061        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22063      fi
22064      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22065    fi
22066  fi
22067
22068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22071  # "foo.exe" is OK but "foo" is an error.
22072  #
22073  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22074  # It is also a way to make sure we got the proper file name for the real test later on.
22075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22076  if test "x$test_shortpath" = x; then
22077    # Short path failed, file does not exist as specified.
22078    # Try adding .exe or .cmd
22079    if test -f "${new_path}.exe"; then
22080       input_to_shortpath="${new_path}.exe"
22081    elif test -f "${new_path}.cmd"; then
22082       input_to_shortpath="${new_path}.cmd"
22083    else
22084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22085$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22086      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22087$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22088      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22089    fi
22090  else
22091    input_to_shortpath="$new_path"
22092  fi
22093
22094  # Call helper function which possibly converts this using DOS-style short mode.
22095  # If so, the updated path is stored in $new_path.
22096  new_path="$input_to_shortpath"
22097
22098  input_path="$input_to_shortpath"
22099  # Check if we need to convert this using DOS-style short mode. If the path
22100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22101  # take no chances and rewrite it.
22102  # Note: m4 eats our [], so we need to use [ and ] instead.
22103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22104  if test "x$has_forbidden_chars" != x; then
22105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22109      # Going to short mode and back again did indeed matter. Since short mode is
22110      # case insensitive, let's make it lowercase to improve readability.
22111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22112      # Now convert it back to Unix-stile (cygpath)
22113      input_path=`$CYGPATH -u "$shortmode_path"`
22114      new_path="$input_path"
22115    fi
22116  fi
22117
22118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22119  if test "x$test_cygdrive_prefix" = x; then
22120    # As a simple fix, exclude /usr/bin since it's not a real path.
22121    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22123      # a path prefixed by /cygdrive for fixpath to work.
22124      new_path="$CYGWIN_ROOT_PATH$input_path"
22125    fi
22126  fi
22127
22128  # remove trailing .exe if any
22129  new_path="${new_path/%.exe/}"
22130
22131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22132
22133  # First separate the path from the arguments. This will split at the first
22134  # space.
22135  complete="$OBJC"
22136  path="${complete%% *}"
22137  tmp="$complete EOL"
22138  arguments="${tmp#* }"
22139
22140  # Input might be given as Windows format, start by converting to
22141  # unix format.
22142  new_path="$path"
22143
22144  windows_path="$new_path"
22145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22146    unix_path=`$CYGPATH -u "$windows_path"`
22147    new_path="$unix_path"
22148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22150    new_path="$unix_path"
22151  fi
22152
22153
22154  # Now try to locate executable using which
22155  new_path=`$WHICH "$new_path" 2> /dev/null`
22156
22157  if test "x$new_path" = x; then
22158    # Oops. Which didn't find the executable.
22159    # The splitting of arguments from the executable at a space might have been incorrect,
22160    # since paths with space are more likely in Windows. Give it another try with the whole
22161    # argument.
22162    path="$complete"
22163    arguments="EOL"
22164    new_path="$path"
22165
22166  windows_path="$new_path"
22167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22168    unix_path=`$CYGPATH -u "$windows_path"`
22169    new_path="$unix_path"
22170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22172    new_path="$unix_path"
22173  fi
22174
22175
22176    new_path=`$WHICH "$new_path" 2> /dev/null`
22177
22178    if test "x$new_path" = x; then
22179      # It's still not found. Now this is an unrecoverable error.
22180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22181$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22182      has_space=`$ECHO "$complete" | $GREP " "`
22183      if test "x$has_space" != x; then
22184        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22185$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22186      fi
22187      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22188    fi
22189  fi
22190
22191  # Now new_path has a complete unix path to the binary
22192  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22193    # Keep paths in /bin as-is, but remove trailing .exe if any
22194    new_path="${new_path/%.exe/}"
22195    # Do not save /bin paths to all_fixpath_prefixes!
22196  else
22197    # Not in mixed or Windows style, start by that.
22198    new_path=`cmd //c echo $new_path`
22199
22200  input_path="$new_path"
22201  # Check if we need to convert this using DOS-style short mode. If the path
22202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22203  # take no chances and rewrite it.
22204  # Note: m4 eats our [], so we need to use [ and ] instead.
22205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22206  if test "x$has_forbidden_chars" != x; then
22207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22209  fi
22210
22211    # Output is in $new_path
22212
22213  windows_path="$new_path"
22214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22215    unix_path=`$CYGPATH -u "$windows_path"`
22216    new_path="$unix_path"
22217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22219    new_path="$unix_path"
22220  fi
22221
22222    # remove trailing .exe if any
22223    new_path="${new_path/%.exe/}"
22224
22225    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22226    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22227  fi
22228
22229  else
22230    # We're on a posix platform. Hooray! :)
22231    # First separate the path from the arguments. This will split at the first
22232    # space.
22233    complete="$OBJC"
22234    path="${complete%% *}"
22235    tmp="$complete EOL"
22236    arguments="${tmp#* }"
22237
22238    # Cannot rely on the command "which" here since it doesn't always work.
22239    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22240    if test -z "$is_absolute_path"; then
22241      # Path to executable is not absolute. Find it.
22242      IFS_save="$IFS"
22243      IFS=:
22244      for p in $PATH; do
22245        if test -f "$p/$path" && test -x "$p/$path"; then
22246          new_path="$p/$path"
22247          break
22248        fi
22249      done
22250      IFS="$IFS_save"
22251    else
22252      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22253$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22254      new_path="$path"
22255    fi
22256
22257    if test "x$new_path" = x; then
22258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22259$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22260        has_space=`$ECHO "$complete" | $GREP " "`
22261        if test "x$has_space" != x; then
22262          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22263$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22264        fi
22265        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22266      fi
22267  fi
22268
22269      # Now join together the path and the arguments once again
22270      if test "x$arguments" != xEOL; then
22271        new_complete="$new_path ${arguments% *}"
22272      else
22273        new_complete="$new_path"
22274      fi
22275
22276  if test "x$complete" != "x$new_complete"; then
22277      OBJC="$new_complete"
22278      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22279$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22280    fi
22281
22282else
22283    OBJC=
22284fi
22285
22286# Restore the flags to the user specified values.
22287# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22288CFLAGS="$ORG_CFLAGS"
22289CXXFLAGS="$ORG_CXXFLAGS"
22290OBJCFLAGS="$ORG_OBJCFLAGS"
22291
22292LD="$CC"
22293LDEXE="$CC"
22294LDCXX="$CXX"
22295LDEXECXX="$CXX"
22296
22297# LDEXE is the linker to use, when creating executables.
22298
22299# Linking C++ libraries.
22300
22301# Linking C++ executables.
22302
22303
22304if test "x$OPENJDK_TARGET_OS" != xwindows; then
22305    if test -n "$ac_tool_prefix"; then
22306  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22307set dummy ${ac_tool_prefix}ar; ac_word=$2
22308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22309$as_echo_n "checking for $ac_word... " >&6; }
22310if test "${ac_cv_prog_AR+set}" = set; then :
22311  $as_echo_n "(cached) " >&6
22312else
22313  if test -n "$AR"; then
22314  ac_cv_prog_AR="$AR" # Let the user override the test.
22315else
22316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22317for as_dir in $PATH
22318do
22319  IFS=$as_save_IFS
22320  test -z "$as_dir" && as_dir=.
22321    for ac_exec_ext in '' $ac_executable_extensions; do
22322  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22323    ac_cv_prog_AR="${ac_tool_prefix}ar"
22324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22325    break 2
22326  fi
22327done
22328  done
22329IFS=$as_save_IFS
22330
22331fi
22332fi
22333AR=$ac_cv_prog_AR
22334if test -n "$AR"; then
22335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22336$as_echo "$AR" >&6; }
22337else
22338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22339$as_echo "no" >&6; }
22340fi
22341
22342
22343fi
22344if test -z "$ac_cv_prog_AR"; then
22345  ac_ct_AR=$AR
22346  # Extract the first word of "ar", so it can be a program name with args.
22347set dummy ar; ac_word=$2
22348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22349$as_echo_n "checking for $ac_word... " >&6; }
22350if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22351  $as_echo_n "(cached) " >&6
22352else
22353  if test -n "$ac_ct_AR"; then
22354  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22355else
22356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22357for as_dir in $PATH
22358do
22359  IFS=$as_save_IFS
22360  test -z "$as_dir" && as_dir=.
22361    for ac_exec_ext in '' $ac_executable_extensions; do
22362  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22363    ac_cv_prog_ac_ct_AR="ar"
22364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22365    break 2
22366  fi
22367done
22368  done
22369IFS=$as_save_IFS
22370
22371fi
22372fi
22373ac_ct_AR=$ac_cv_prog_ac_ct_AR
22374if test -n "$ac_ct_AR"; then
22375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22376$as_echo "$ac_ct_AR" >&6; }
22377else
22378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22379$as_echo "no" >&6; }
22380fi
22381
22382  if test "x$ac_ct_AR" = x; then
22383    AR=""
22384  else
22385    case $cross_compiling:$ac_tool_warned in
22386yes:)
22387{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22388$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22389ac_tool_warned=yes ;;
22390esac
22391    AR=$ac_ct_AR
22392  fi
22393else
22394  AR="$ac_cv_prog_AR"
22395fi
22396
22397
22398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22399
22400  # First separate the path from the arguments. This will split at the first
22401  # space.
22402  complete="$AR"
22403  path="${complete%% *}"
22404  tmp="$complete EOL"
22405  arguments="${tmp#* }"
22406
22407  # Input might be given as Windows format, start by converting to
22408  # unix format.
22409  new_path=`$CYGPATH -u "$path"`
22410
22411  # Now try to locate executable using which
22412  new_path=`$WHICH "$new_path" 2> /dev/null`
22413  # bat and cmd files are not always considered executable in cygwin causing which
22414  # to not find them
22415  if test "x$new_path" = x \
22416           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22417           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22418    new_path=`$CYGPATH -u "$path"`
22419  fi
22420  if test "x$new_path" = x; then
22421    # Oops. Which didn't find the executable.
22422    # The splitting of arguments from the executable at a space might have been incorrect,
22423    # since paths with space are more likely in Windows. Give it another try with the whole
22424    # argument.
22425    path="$complete"
22426    arguments="EOL"
22427    new_path=`$CYGPATH -u "$path"`
22428    new_path=`$WHICH "$new_path" 2> /dev/null`
22429    # bat and cmd files are not always considered executable in cygwin causing which
22430    # to not find them
22431    if test "x$new_path" = x \
22432             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22433             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22434      new_path=`$CYGPATH -u "$path"`
22435    fi
22436    if test "x$new_path" = x; then
22437      # It's still not found. Now this is an unrecoverable error.
22438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22439$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22440      has_space=`$ECHO "$complete" | $GREP " "`
22441      if test "x$has_space" != x; then
22442        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22443$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22444      fi
22445      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22446    fi
22447  fi
22448
22449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22452  # "foo.exe" is OK but "foo" is an error.
22453  #
22454  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22455  # It is also a way to make sure we got the proper file name for the real test later on.
22456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22457  if test "x$test_shortpath" = x; then
22458    # Short path failed, file does not exist as specified.
22459    # Try adding .exe or .cmd
22460    if test -f "${new_path}.exe"; then
22461       input_to_shortpath="${new_path}.exe"
22462    elif test -f "${new_path}.cmd"; then
22463       input_to_shortpath="${new_path}.cmd"
22464    else
22465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22466$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22467      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22468$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22469      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22470    fi
22471  else
22472    input_to_shortpath="$new_path"
22473  fi
22474
22475  # Call helper function which possibly converts this using DOS-style short mode.
22476  # If so, the updated path is stored in $new_path.
22477  new_path="$input_to_shortpath"
22478
22479  input_path="$input_to_shortpath"
22480  # Check if we need to convert this using DOS-style short mode. If the path
22481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22482  # take no chances and rewrite it.
22483  # Note: m4 eats our [], so we need to use [ and ] instead.
22484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22485  if test "x$has_forbidden_chars" != x; then
22486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22490      # Going to short mode and back again did indeed matter. Since short mode is
22491      # case insensitive, let's make it lowercase to improve readability.
22492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22493      # Now convert it back to Unix-stile (cygpath)
22494      input_path=`$CYGPATH -u "$shortmode_path"`
22495      new_path="$input_path"
22496    fi
22497  fi
22498
22499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22500  if test "x$test_cygdrive_prefix" = x; then
22501    # As a simple fix, exclude /usr/bin since it's not a real path.
22502    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22504      # a path prefixed by /cygdrive for fixpath to work.
22505      new_path="$CYGWIN_ROOT_PATH$input_path"
22506    fi
22507  fi
22508
22509  # remove trailing .exe if any
22510  new_path="${new_path/%.exe/}"
22511
22512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22513
22514  # First separate the path from the arguments. This will split at the first
22515  # space.
22516  complete="$AR"
22517  path="${complete%% *}"
22518  tmp="$complete EOL"
22519  arguments="${tmp#* }"
22520
22521  # Input might be given as Windows format, start by converting to
22522  # unix format.
22523  new_path="$path"
22524
22525  windows_path="$new_path"
22526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22527    unix_path=`$CYGPATH -u "$windows_path"`
22528    new_path="$unix_path"
22529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22531    new_path="$unix_path"
22532  fi
22533
22534
22535  # Now try to locate executable using which
22536  new_path=`$WHICH "$new_path" 2> /dev/null`
22537
22538  if test "x$new_path" = x; then
22539    # Oops. Which didn't find the executable.
22540    # The splitting of arguments from the executable at a space might have been incorrect,
22541    # since paths with space are more likely in Windows. Give it another try with the whole
22542    # argument.
22543    path="$complete"
22544    arguments="EOL"
22545    new_path="$path"
22546
22547  windows_path="$new_path"
22548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22549    unix_path=`$CYGPATH -u "$windows_path"`
22550    new_path="$unix_path"
22551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22553    new_path="$unix_path"
22554  fi
22555
22556
22557    new_path=`$WHICH "$new_path" 2> /dev/null`
22558
22559    if test "x$new_path" = x; then
22560      # It's still not found. Now this is an unrecoverable error.
22561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22562$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22563      has_space=`$ECHO "$complete" | $GREP " "`
22564      if test "x$has_space" != x; then
22565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22567      fi
22568      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22569    fi
22570  fi
22571
22572  # Now new_path has a complete unix path to the binary
22573  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22574    # Keep paths in /bin as-is, but remove trailing .exe if any
22575    new_path="${new_path/%.exe/}"
22576    # Do not save /bin paths to all_fixpath_prefixes!
22577  else
22578    # Not in mixed or Windows style, start by that.
22579    new_path=`cmd //c echo $new_path`
22580
22581  input_path="$new_path"
22582  # Check if we need to convert this using DOS-style short mode. If the path
22583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22584  # take no chances and rewrite it.
22585  # Note: m4 eats our [], so we need to use [ and ] instead.
22586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22587  if test "x$has_forbidden_chars" != x; then
22588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22590  fi
22591
22592    # Output is in $new_path
22593
22594  windows_path="$new_path"
22595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22596    unix_path=`$CYGPATH -u "$windows_path"`
22597    new_path="$unix_path"
22598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22600    new_path="$unix_path"
22601  fi
22602
22603    # remove trailing .exe if any
22604    new_path="${new_path/%.exe/}"
22605
22606    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22607    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22608  fi
22609
22610  else
22611    # We're on a posix platform. Hooray! :)
22612    # First separate the path from the arguments. This will split at the first
22613    # space.
22614    complete="$AR"
22615    path="${complete%% *}"
22616    tmp="$complete EOL"
22617    arguments="${tmp#* }"
22618
22619    # Cannot rely on the command "which" here since it doesn't always work.
22620    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22621    if test -z "$is_absolute_path"; then
22622      # Path to executable is not absolute. Find it.
22623      IFS_save="$IFS"
22624      IFS=:
22625      for p in $PATH; do
22626        if test -f "$p/$path" && test -x "$p/$path"; then
22627          new_path="$p/$path"
22628          break
22629        fi
22630      done
22631      IFS="$IFS_save"
22632    else
22633      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22634$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22635      new_path="$path"
22636    fi
22637
22638    if test "x$new_path" = x; then
22639        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22640$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22641        has_space=`$ECHO "$complete" | $GREP " "`
22642        if test "x$has_space" != x; then
22643          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22644$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22645        fi
22646        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22647      fi
22648  fi
22649
22650      # Now join together the path and the arguments once again
22651      if test "x$arguments" != xEOL; then
22652        new_complete="$new_path ${arguments% *}"
22653      else
22654        new_complete="$new_path"
22655      fi
22656
22657  if test "x$complete" != "x$new_complete"; then
22658      AR="$new_complete"
22659      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22660$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22661    fi
22662
22663fi
22664if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22665    ARFLAGS="-r"
22666else
22667    ARFLAGS=""
22668fi
22669
22670
22671# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22672HOTSPOT_CXX="$CXX"
22673HOTSPOT_LD="$LD"
22674
22675
22676
22677COMPILER_NAME=gcc
22678COMPILER_TYPE=CC
22679if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22680
22681    # For now, assume that we are always compiling using cl.exe.
22682    CC_OUT_OPTION=-Fo
22683    EXE_OUT_OPTION=-out:
22684    LD_OUT_OPTION=-out:
22685    AR_OUT_OPTION=-out:
22686    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22687    # program for something completely different.
22688    # Extract the first word of "link", so it can be a program name with args.
22689set dummy link; ac_word=$2
22690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22691$as_echo_n "checking for $ac_word... " >&6; }
22692if test "${ac_cv_prog_WINLD+set}" = set; then :
22693  $as_echo_n "(cached) " >&6
22694else
22695  if test -n "$WINLD"; then
22696  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22697else
22698  ac_prog_rejected=no
22699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22700for as_dir in $PATH
22701do
22702  IFS=$as_save_IFS
22703  test -z "$as_dir" && as_dir=.
22704    for ac_exec_ext in '' $ac_executable_extensions; do
22705  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22706    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22707       ac_prog_rejected=yes
22708       continue
22709     fi
22710    ac_cv_prog_WINLD="link"
22711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22712    break 2
22713  fi
22714done
22715  done
22716IFS=$as_save_IFS
22717
22718if test $ac_prog_rejected = yes; then
22719  # We found a bogon in the path, so make sure we never use it.
22720  set dummy $ac_cv_prog_WINLD
22721  shift
22722  if test $# != 0; then
22723    # We chose a different compiler from the bogus one.
22724    # However, it has the same basename, so the bogon will be chosen
22725    # first if we set WINLD to just the basename; use the full file name.
22726    shift
22727    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22728  fi
22729fi
22730fi
22731fi
22732WINLD=$ac_cv_prog_WINLD
22733if test -n "$WINLD"; then
22734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22735$as_echo "$WINLD" >&6; }
22736else
22737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22738$as_echo "no" >&6; }
22739fi
22740
22741
22742    # Since we must ignore the first found link, WINLD will contain
22743    # the full path to the link.exe program.
22744
22745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22746
22747  # First separate the path from the arguments. This will split at the first
22748  # space.
22749  complete="$WINLD"
22750  path="${complete%% *}"
22751  tmp="$complete EOL"
22752  arguments="${tmp#* }"
22753
22754  # Input might be given as Windows format, start by converting to
22755  # unix format.
22756  new_path=`$CYGPATH -u "$path"`
22757
22758  # Now try to locate executable using which
22759  new_path=`$WHICH "$new_path" 2> /dev/null`
22760  # bat and cmd files are not always considered executable in cygwin causing which
22761  # to not find them
22762  if test "x$new_path" = x \
22763           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22764           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22765    new_path=`$CYGPATH -u "$path"`
22766  fi
22767  if test "x$new_path" = x; then
22768    # Oops. Which didn't find the executable.
22769    # The splitting of arguments from the executable at a space might have been incorrect,
22770    # since paths with space are more likely in Windows. Give it another try with the whole
22771    # argument.
22772    path="$complete"
22773    arguments="EOL"
22774    new_path=`$CYGPATH -u "$path"`
22775    new_path=`$WHICH "$new_path" 2> /dev/null`
22776    # bat and cmd files are not always considered executable in cygwin causing which
22777    # to not find them
22778    if test "x$new_path" = x \
22779             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22780             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22781      new_path=`$CYGPATH -u "$path"`
22782    fi
22783    if test "x$new_path" = x; then
22784      # It's still not found. Now this is an unrecoverable error.
22785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22786$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22787      has_space=`$ECHO "$complete" | $GREP " "`
22788      if test "x$has_space" != x; then
22789        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22790$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22791      fi
22792      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22793    fi
22794  fi
22795
22796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22799  # "foo.exe" is OK but "foo" is an error.
22800  #
22801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22802  # It is also a way to make sure we got the proper file name for the real test later on.
22803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22804  if test "x$test_shortpath" = x; then
22805    # Short path failed, file does not exist as specified.
22806    # Try adding .exe or .cmd
22807    if test -f "${new_path}.exe"; then
22808       input_to_shortpath="${new_path}.exe"
22809    elif test -f "${new_path}.cmd"; then
22810       input_to_shortpath="${new_path}.cmd"
22811    else
22812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22813$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22814      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22815$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22816      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22817    fi
22818  else
22819    input_to_shortpath="$new_path"
22820  fi
22821
22822  # Call helper function which possibly converts this using DOS-style short mode.
22823  # If so, the updated path is stored in $new_path.
22824  new_path="$input_to_shortpath"
22825
22826  input_path="$input_to_shortpath"
22827  # Check if we need to convert this using DOS-style short mode. If the path
22828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22829  # take no chances and rewrite it.
22830  # Note: m4 eats our [], so we need to use [ and ] instead.
22831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22832  if test "x$has_forbidden_chars" != x; then
22833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22837      # Going to short mode and back again did indeed matter. Since short mode is
22838      # case insensitive, let's make it lowercase to improve readability.
22839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22840      # Now convert it back to Unix-stile (cygpath)
22841      input_path=`$CYGPATH -u "$shortmode_path"`
22842      new_path="$input_path"
22843    fi
22844  fi
22845
22846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22847  if test "x$test_cygdrive_prefix" = x; then
22848    # As a simple fix, exclude /usr/bin since it's not a real path.
22849    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22851      # a path prefixed by /cygdrive for fixpath to work.
22852      new_path="$CYGWIN_ROOT_PATH$input_path"
22853    fi
22854  fi
22855
22856  # remove trailing .exe if any
22857  new_path="${new_path/%.exe/}"
22858
22859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22860
22861  # First separate the path from the arguments. This will split at the first
22862  # space.
22863  complete="$WINLD"
22864  path="${complete%% *}"
22865  tmp="$complete EOL"
22866  arguments="${tmp#* }"
22867
22868  # Input might be given as Windows format, start by converting to
22869  # unix format.
22870  new_path="$path"
22871
22872  windows_path="$new_path"
22873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22874    unix_path=`$CYGPATH -u "$windows_path"`
22875    new_path="$unix_path"
22876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22878    new_path="$unix_path"
22879  fi
22880
22881
22882  # Now try to locate executable using which
22883  new_path=`$WHICH "$new_path" 2> /dev/null`
22884
22885  if test "x$new_path" = x; then
22886    # Oops. Which didn't find the executable.
22887    # The splitting of arguments from the executable at a space might have been incorrect,
22888    # since paths with space are more likely in Windows. Give it another try with the whole
22889    # argument.
22890    path="$complete"
22891    arguments="EOL"
22892    new_path="$path"
22893
22894  windows_path="$new_path"
22895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22896    unix_path=`$CYGPATH -u "$windows_path"`
22897    new_path="$unix_path"
22898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22900    new_path="$unix_path"
22901  fi
22902
22903
22904    new_path=`$WHICH "$new_path" 2> /dev/null`
22905
22906    if test "x$new_path" = x; then
22907      # It's still not found. Now this is an unrecoverable error.
22908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22909$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22910      has_space=`$ECHO "$complete" | $GREP " "`
22911      if test "x$has_space" != x; then
22912        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22913$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22914      fi
22915      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22916    fi
22917  fi
22918
22919  # Now new_path has a complete unix path to the binary
22920  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22921    # Keep paths in /bin as-is, but remove trailing .exe if any
22922    new_path="${new_path/%.exe/}"
22923    # Do not save /bin paths to all_fixpath_prefixes!
22924  else
22925    # Not in mixed or Windows style, start by that.
22926    new_path=`cmd //c echo $new_path`
22927
22928  input_path="$new_path"
22929  # Check if we need to convert this using DOS-style short mode. If the path
22930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22931  # take no chances and rewrite it.
22932  # Note: m4 eats our [], so we need to use [ and ] instead.
22933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22934  if test "x$has_forbidden_chars" != x; then
22935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22937  fi
22938
22939    # Output is in $new_path
22940
22941  windows_path="$new_path"
22942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22943    unix_path=`$CYGPATH -u "$windows_path"`
22944    new_path="$unix_path"
22945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22947    new_path="$unix_path"
22948  fi
22949
22950    # remove trailing .exe if any
22951    new_path="${new_path/%.exe/}"
22952
22953    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22954    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22955  fi
22956
22957  else
22958    # We're on a posix platform. Hooray! :)
22959    # First separate the path from the arguments. This will split at the first
22960    # space.
22961    complete="$WINLD"
22962    path="${complete%% *}"
22963    tmp="$complete EOL"
22964    arguments="${tmp#* }"
22965
22966    # Cannot rely on the command "which" here since it doesn't always work.
22967    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22968    if test -z "$is_absolute_path"; then
22969      # Path to executable is not absolute. Find it.
22970      IFS_save="$IFS"
22971      IFS=:
22972      for p in $PATH; do
22973        if test -f "$p/$path" && test -x "$p/$path"; then
22974          new_path="$p/$path"
22975          break
22976        fi
22977      done
22978      IFS="$IFS_save"
22979    else
22980      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22981$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22982      new_path="$path"
22983    fi
22984
22985    if test "x$new_path" = x; then
22986        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22987$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22988        has_space=`$ECHO "$complete" | $GREP " "`
22989        if test "x$has_space" != x; then
22990          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22991$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22992        fi
22993        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22994      fi
22995  fi
22996
22997      # Now join together the path and the arguments once again
22998      if test "x$arguments" != xEOL; then
22999        new_complete="$new_path ${arguments% *}"
23000      else
23001        new_complete="$new_path"
23002      fi
23003
23004  if test "x$complete" != "x$new_complete"; then
23005      WINLD="$new_complete"
23006      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23007$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23008    fi
23009
23010    printf "Windows linker was found at $WINLD\n"
23011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23012$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23013    "$WINLD" --version > /dev/null
23014    if test $? -eq 0 ; then
23015      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23016$as_echo "no" >&6; }
23017      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23018    else
23019      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23020$as_echo "yes" >&6; }
23021    fi
23022    LD="$WINLD"
23023    LDEXE="$WINLD"
23024    LDCXX="$WINLD"
23025    LDEXECXX="$WINLD"
23026
23027    # Extract the first word of "mt", so it can be a program name with args.
23028set dummy mt; ac_word=$2
23029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23030$as_echo_n "checking for $ac_word... " >&6; }
23031if test "${ac_cv_prog_MT+set}" = set; then :
23032  $as_echo_n "(cached) " >&6
23033else
23034  if test -n "$MT"; then
23035  ac_cv_prog_MT="$MT" # Let the user override the test.
23036else
23037  ac_prog_rejected=no
23038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23039for as_dir in $PATH
23040do
23041  IFS=$as_save_IFS
23042  test -z "$as_dir" && as_dir=.
23043    for ac_exec_ext in '' $ac_executable_extensions; do
23044  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23045    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23046       ac_prog_rejected=yes
23047       continue
23048     fi
23049    ac_cv_prog_MT="mt"
23050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23051    break 2
23052  fi
23053done
23054  done
23055IFS=$as_save_IFS
23056
23057if test $ac_prog_rejected = yes; then
23058  # We found a bogon in the path, so make sure we never use it.
23059  set dummy $ac_cv_prog_MT
23060  shift
23061  if test $# != 0; then
23062    # We chose a different compiler from the bogus one.
23063    # However, it has the same basename, so the bogon will be chosen
23064    # first if we set MT to just the basename; use the full file name.
23065    shift
23066    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23067  fi
23068fi
23069fi
23070fi
23071MT=$ac_cv_prog_MT
23072if test -n "$MT"; then
23073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23074$as_echo "$MT" >&6; }
23075else
23076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23077$as_echo "no" >&6; }
23078fi
23079
23080
23081
23082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23083
23084  # First separate the path from the arguments. This will split at the first
23085  # space.
23086  complete="$MT"
23087  path="${complete%% *}"
23088  tmp="$complete EOL"
23089  arguments="${tmp#* }"
23090
23091  # Input might be given as Windows format, start by converting to
23092  # unix format.
23093  new_path=`$CYGPATH -u "$path"`
23094
23095  # Now try to locate executable using which
23096  new_path=`$WHICH "$new_path" 2> /dev/null`
23097  # bat and cmd files are not always considered executable in cygwin causing which
23098  # to not find them
23099  if test "x$new_path" = x \
23100           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23101           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23102    new_path=`$CYGPATH -u "$path"`
23103  fi
23104  if test "x$new_path" = x; then
23105    # Oops. Which didn't find the executable.
23106    # The splitting of arguments from the executable at a space might have been incorrect,
23107    # since paths with space are more likely in Windows. Give it another try with the whole
23108    # argument.
23109    path="$complete"
23110    arguments="EOL"
23111    new_path=`$CYGPATH -u "$path"`
23112    new_path=`$WHICH "$new_path" 2> /dev/null`
23113    # bat and cmd files are not always considered executable in cygwin causing which
23114    # to not find them
23115    if test "x$new_path" = x \
23116             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23117             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23118      new_path=`$CYGPATH -u "$path"`
23119    fi
23120    if test "x$new_path" = x; then
23121      # It's still not found. Now this is an unrecoverable error.
23122      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23123$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23124      has_space=`$ECHO "$complete" | $GREP " "`
23125      if test "x$has_space" != x; then
23126        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23127$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23128      fi
23129      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23130    fi
23131  fi
23132
23133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23136  # "foo.exe" is OK but "foo" is an error.
23137  #
23138  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23139  # It is also a way to make sure we got the proper file name for the real test later on.
23140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23141  if test "x$test_shortpath" = x; then
23142    # Short path failed, file does not exist as specified.
23143    # Try adding .exe or .cmd
23144    if test -f "${new_path}.exe"; then
23145       input_to_shortpath="${new_path}.exe"
23146    elif test -f "${new_path}.cmd"; then
23147       input_to_shortpath="${new_path}.cmd"
23148    else
23149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23150$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23151      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23152$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23153      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23154    fi
23155  else
23156    input_to_shortpath="$new_path"
23157  fi
23158
23159  # Call helper function which possibly converts this using DOS-style short mode.
23160  # If so, the updated path is stored in $new_path.
23161  new_path="$input_to_shortpath"
23162
23163  input_path="$input_to_shortpath"
23164  # Check if we need to convert this using DOS-style short mode. If the path
23165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23166  # take no chances and rewrite it.
23167  # Note: m4 eats our [], so we need to use [ and ] instead.
23168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23169  if test "x$has_forbidden_chars" != x; then
23170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23174      # Going to short mode and back again did indeed matter. Since short mode is
23175      # case insensitive, let's make it lowercase to improve readability.
23176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23177      # Now convert it back to Unix-stile (cygpath)
23178      input_path=`$CYGPATH -u "$shortmode_path"`
23179      new_path="$input_path"
23180    fi
23181  fi
23182
23183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23184  if test "x$test_cygdrive_prefix" = x; then
23185    # As a simple fix, exclude /usr/bin since it's not a real path.
23186    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23188      # a path prefixed by /cygdrive for fixpath to work.
23189      new_path="$CYGWIN_ROOT_PATH$input_path"
23190    fi
23191  fi
23192
23193  # remove trailing .exe if any
23194  new_path="${new_path/%.exe/}"
23195
23196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23197
23198  # First separate the path from the arguments. This will split at the first
23199  # space.
23200  complete="$MT"
23201  path="${complete%% *}"
23202  tmp="$complete EOL"
23203  arguments="${tmp#* }"
23204
23205  # Input might be given as Windows format, start by converting to
23206  # unix format.
23207  new_path="$path"
23208
23209  windows_path="$new_path"
23210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23211    unix_path=`$CYGPATH -u "$windows_path"`
23212    new_path="$unix_path"
23213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23215    new_path="$unix_path"
23216  fi
23217
23218
23219  # Now try to locate executable using which
23220  new_path=`$WHICH "$new_path" 2> /dev/null`
23221
23222  if test "x$new_path" = x; then
23223    # Oops. Which didn't find the executable.
23224    # The splitting of arguments from the executable at a space might have been incorrect,
23225    # since paths with space are more likely in Windows. Give it another try with the whole
23226    # argument.
23227    path="$complete"
23228    arguments="EOL"
23229    new_path="$path"
23230
23231  windows_path="$new_path"
23232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23233    unix_path=`$CYGPATH -u "$windows_path"`
23234    new_path="$unix_path"
23235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23237    new_path="$unix_path"
23238  fi
23239
23240
23241    new_path=`$WHICH "$new_path" 2> /dev/null`
23242
23243    if test "x$new_path" = x; then
23244      # It's still not found. Now this is an unrecoverable error.
23245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23246$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23247      has_space=`$ECHO "$complete" | $GREP " "`
23248      if test "x$has_space" != x; then
23249        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23250$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23251      fi
23252      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23253    fi
23254  fi
23255
23256  # Now new_path has a complete unix path to the binary
23257  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23258    # Keep paths in /bin as-is, but remove trailing .exe if any
23259    new_path="${new_path/%.exe/}"
23260    # Do not save /bin paths to all_fixpath_prefixes!
23261  else
23262    # Not in mixed or Windows style, start by that.
23263    new_path=`cmd //c echo $new_path`
23264
23265  input_path="$new_path"
23266  # Check if we need to convert this using DOS-style short mode. If the path
23267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23268  # take no chances and rewrite it.
23269  # Note: m4 eats our [], so we need to use [ and ] instead.
23270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23271  if test "x$has_forbidden_chars" != x; then
23272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23273    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23274  fi
23275
23276    # Output is in $new_path
23277
23278  windows_path="$new_path"
23279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23280    unix_path=`$CYGPATH -u "$windows_path"`
23281    new_path="$unix_path"
23282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23284    new_path="$unix_path"
23285  fi
23286
23287    # remove trailing .exe if any
23288    new_path="${new_path/%.exe/}"
23289
23290    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23291    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23292  fi
23293
23294  else
23295    # We're on a posix platform. Hooray! :)
23296    # First separate the path from the arguments. This will split at the first
23297    # space.
23298    complete="$MT"
23299    path="${complete%% *}"
23300    tmp="$complete EOL"
23301    arguments="${tmp#* }"
23302
23303    # Cannot rely on the command "which" here since it doesn't always work.
23304    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23305    if test -z "$is_absolute_path"; then
23306      # Path to executable is not absolute. Find it.
23307      IFS_save="$IFS"
23308      IFS=:
23309      for p in $PATH; do
23310        if test -f "$p/$path" && test -x "$p/$path"; then
23311          new_path="$p/$path"
23312          break
23313        fi
23314      done
23315      IFS="$IFS_save"
23316    else
23317      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23318$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23319      new_path="$path"
23320    fi
23321
23322    if test "x$new_path" = x; then
23323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23324$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23325        has_space=`$ECHO "$complete" | $GREP " "`
23326        if test "x$has_space" != x; then
23327          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23328$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23329        fi
23330        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23331      fi
23332  fi
23333
23334      # Now join together the path and the arguments once again
23335      if test "x$arguments" != xEOL; then
23336        new_complete="$new_path ${arguments% *}"
23337      else
23338        new_complete="$new_path"
23339      fi
23340
23341  if test "x$complete" != "x$new_complete"; then
23342      MT="$new_complete"
23343      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23344$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23345    fi
23346
23347    # The resource compiler
23348    # Extract the first word of "rc", so it can be a program name with args.
23349set dummy rc; ac_word=$2
23350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23351$as_echo_n "checking for $ac_word... " >&6; }
23352if test "${ac_cv_prog_RC+set}" = set; then :
23353  $as_echo_n "(cached) " >&6
23354else
23355  if test -n "$RC"; then
23356  ac_cv_prog_RC="$RC" # Let the user override the test.
23357else
23358  ac_prog_rejected=no
23359as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23360for as_dir in $PATH
23361do
23362  IFS=$as_save_IFS
23363  test -z "$as_dir" && as_dir=.
23364    for ac_exec_ext in '' $ac_executable_extensions; do
23365  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23366    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23367       ac_prog_rejected=yes
23368       continue
23369     fi
23370    ac_cv_prog_RC="rc"
23371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23372    break 2
23373  fi
23374done
23375  done
23376IFS=$as_save_IFS
23377
23378if test $ac_prog_rejected = yes; then
23379  # We found a bogon in the path, so make sure we never use it.
23380  set dummy $ac_cv_prog_RC
23381  shift
23382  if test $# != 0; then
23383    # We chose a different compiler from the bogus one.
23384    # However, it has the same basename, so the bogon will be chosen
23385    # first if we set RC to just the basename; use the full file name.
23386    shift
23387    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23388  fi
23389fi
23390fi
23391fi
23392RC=$ac_cv_prog_RC
23393if test -n "$RC"; then
23394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23395$as_echo "$RC" >&6; }
23396else
23397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23398$as_echo "no" >&6; }
23399fi
23400
23401
23402
23403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23404
23405  # First separate the path from the arguments. This will split at the first
23406  # space.
23407  complete="$RC"
23408  path="${complete%% *}"
23409  tmp="$complete EOL"
23410  arguments="${tmp#* }"
23411
23412  # Input might be given as Windows format, start by converting to
23413  # unix format.
23414  new_path=`$CYGPATH -u "$path"`
23415
23416  # Now try to locate executable using which
23417  new_path=`$WHICH "$new_path" 2> /dev/null`
23418  # bat and cmd files are not always considered executable in cygwin causing which
23419  # to not find them
23420  if test "x$new_path" = x \
23421           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23422           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23423    new_path=`$CYGPATH -u "$path"`
23424  fi
23425  if test "x$new_path" = x; then
23426    # Oops. Which didn't find the executable.
23427    # The splitting of arguments from the executable at a space might have been incorrect,
23428    # since paths with space are more likely in Windows. Give it another try with the whole
23429    # argument.
23430    path="$complete"
23431    arguments="EOL"
23432    new_path=`$CYGPATH -u "$path"`
23433    new_path=`$WHICH "$new_path" 2> /dev/null`
23434    # bat and cmd files are not always considered executable in cygwin causing which
23435    # to not find them
23436    if test "x$new_path" = x \
23437             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23438             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23439      new_path=`$CYGPATH -u "$path"`
23440    fi
23441    if test "x$new_path" = x; then
23442      # It's still not found. Now this is an unrecoverable error.
23443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23444$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23445      has_space=`$ECHO "$complete" | $GREP " "`
23446      if test "x$has_space" != x; then
23447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23449      fi
23450      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23451    fi
23452  fi
23453
23454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23457  # "foo.exe" is OK but "foo" is an error.
23458  #
23459  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23460  # It is also a way to make sure we got the proper file name for the real test later on.
23461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23462  if test "x$test_shortpath" = x; then
23463    # Short path failed, file does not exist as specified.
23464    # Try adding .exe or .cmd
23465    if test -f "${new_path}.exe"; then
23466       input_to_shortpath="${new_path}.exe"
23467    elif test -f "${new_path}.cmd"; then
23468       input_to_shortpath="${new_path}.cmd"
23469    else
23470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23471$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23472      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23473$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23474      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23475    fi
23476  else
23477    input_to_shortpath="$new_path"
23478  fi
23479
23480  # Call helper function which possibly converts this using DOS-style short mode.
23481  # If so, the updated path is stored in $new_path.
23482  new_path="$input_to_shortpath"
23483
23484  input_path="$input_to_shortpath"
23485  # Check if we need to convert this using DOS-style short mode. If the path
23486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23487  # take no chances and rewrite it.
23488  # Note: m4 eats our [], so we need to use [ and ] instead.
23489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23490  if test "x$has_forbidden_chars" != x; then
23491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23495      # Going to short mode and back again did indeed matter. Since short mode is
23496      # case insensitive, let's make it lowercase to improve readability.
23497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23498      # Now convert it back to Unix-stile (cygpath)
23499      input_path=`$CYGPATH -u "$shortmode_path"`
23500      new_path="$input_path"
23501    fi
23502  fi
23503
23504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23505  if test "x$test_cygdrive_prefix" = x; then
23506    # As a simple fix, exclude /usr/bin since it's not a real path.
23507    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23509      # a path prefixed by /cygdrive for fixpath to work.
23510      new_path="$CYGWIN_ROOT_PATH$input_path"
23511    fi
23512  fi
23513
23514  # remove trailing .exe if any
23515  new_path="${new_path/%.exe/}"
23516
23517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23518
23519  # First separate the path from the arguments. This will split at the first
23520  # space.
23521  complete="$RC"
23522  path="${complete%% *}"
23523  tmp="$complete EOL"
23524  arguments="${tmp#* }"
23525
23526  # Input might be given as Windows format, start by converting to
23527  # unix format.
23528  new_path="$path"
23529
23530  windows_path="$new_path"
23531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23532    unix_path=`$CYGPATH -u "$windows_path"`
23533    new_path="$unix_path"
23534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23536    new_path="$unix_path"
23537  fi
23538
23539
23540  # Now try to locate executable using which
23541  new_path=`$WHICH "$new_path" 2> /dev/null`
23542
23543  if test "x$new_path" = x; then
23544    # Oops. Which didn't find the executable.
23545    # The splitting of arguments from the executable at a space might have been incorrect,
23546    # since paths with space are more likely in Windows. Give it another try with the whole
23547    # argument.
23548    path="$complete"
23549    arguments="EOL"
23550    new_path="$path"
23551
23552  windows_path="$new_path"
23553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23554    unix_path=`$CYGPATH -u "$windows_path"`
23555    new_path="$unix_path"
23556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23558    new_path="$unix_path"
23559  fi
23560
23561
23562    new_path=`$WHICH "$new_path" 2> /dev/null`
23563
23564    if test "x$new_path" = x; then
23565      # It's still not found. Now this is an unrecoverable error.
23566      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23567$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23568      has_space=`$ECHO "$complete" | $GREP " "`
23569      if test "x$has_space" != x; then
23570        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23571$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23572      fi
23573      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23574    fi
23575  fi
23576
23577  # Now new_path has a complete unix path to the binary
23578  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23579    # Keep paths in /bin as-is, but remove trailing .exe if any
23580    new_path="${new_path/%.exe/}"
23581    # Do not save /bin paths to all_fixpath_prefixes!
23582  else
23583    # Not in mixed or Windows style, start by that.
23584    new_path=`cmd //c echo $new_path`
23585
23586  input_path="$new_path"
23587  # Check if we need to convert this using DOS-style short mode. If the path
23588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23589  # take no chances and rewrite it.
23590  # Note: m4 eats our [], so we need to use [ and ] instead.
23591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23592  if test "x$has_forbidden_chars" != x; then
23593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23595  fi
23596
23597    # Output is in $new_path
23598
23599  windows_path="$new_path"
23600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23601    unix_path=`$CYGPATH -u "$windows_path"`
23602    new_path="$unix_path"
23603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23605    new_path="$unix_path"
23606  fi
23607
23608    # remove trailing .exe if any
23609    new_path="${new_path/%.exe/}"
23610
23611    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23612    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23613  fi
23614
23615  else
23616    # We're on a posix platform. Hooray! :)
23617    # First separate the path from the arguments. This will split at the first
23618    # space.
23619    complete="$RC"
23620    path="${complete%% *}"
23621    tmp="$complete EOL"
23622    arguments="${tmp#* }"
23623
23624    # Cannot rely on the command "which" here since it doesn't always work.
23625    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23626    if test -z "$is_absolute_path"; then
23627      # Path to executable is not absolute. Find it.
23628      IFS_save="$IFS"
23629      IFS=:
23630      for p in $PATH; do
23631        if test -f "$p/$path" && test -x "$p/$path"; then
23632          new_path="$p/$path"
23633          break
23634        fi
23635      done
23636      IFS="$IFS_save"
23637    else
23638      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23639$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23640      new_path="$path"
23641    fi
23642
23643    if test "x$new_path" = x; then
23644        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23645$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23646        has_space=`$ECHO "$complete" | $GREP " "`
23647        if test "x$has_space" != x; then
23648          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23649$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23650        fi
23651        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23652      fi
23653  fi
23654
23655      # Now join together the path and the arguments once again
23656      if test "x$arguments" != xEOL; then
23657        new_complete="$new_path ${arguments% *}"
23658      else
23659        new_complete="$new_path"
23660      fi
23661
23662  if test "x$complete" != "x$new_complete"; then
23663      RC="$new_complete"
23664      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23665$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23666    fi
23667
23668
23669    # For hotspot, we need these in Windows mixed path,
23670    # so rewrite them all. Need added .exe suffix.
23671    HOTSPOT_CXX="$CXX.exe"
23672    HOTSPOT_LD="$LD.exe"
23673    HOTSPOT_MT="$MT.exe"
23674    HOTSPOT_RC="$RC.exe"
23675
23676  unix_path="$HOTSPOT_CXX"
23677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23678    windows_path=`$CYGPATH -m "$unix_path"`
23679    HOTSPOT_CXX="$windows_path"
23680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23681    windows_path=`cmd //c echo $unix_path`
23682    HOTSPOT_CXX="$windows_path"
23683  fi
23684
23685
23686  unix_path="$HOTSPOT_LD"
23687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23688    windows_path=`$CYGPATH -m "$unix_path"`
23689    HOTSPOT_LD="$windows_path"
23690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23691    windows_path=`cmd //c echo $unix_path`
23692    HOTSPOT_LD="$windows_path"
23693  fi
23694
23695
23696  unix_path="$HOTSPOT_MT"
23697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23698    windows_path=`$CYGPATH -m "$unix_path"`
23699    HOTSPOT_MT="$windows_path"
23700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23701    windows_path=`cmd //c echo $unix_path`
23702    HOTSPOT_MT="$windows_path"
23703  fi
23704
23705
23706  unix_path="$HOTSPOT_RC"
23707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23708    windows_path=`$CYGPATH -m "$unix_path"`
23709    HOTSPOT_RC="$windows_path"
23710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23711    windows_path=`cmd //c echo $unix_path`
23712    HOTSPOT_RC="$windows_path"
23713  fi
23714
23715
23716
23717
23718    RC_FLAGS="-nologo -l 0x409 -r"
23719    if test "x$VARIANT" = xOPT; then :
23720
23721        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23722
23723fi
23724    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23725    if test "x$JDK_UPDATE_VERSION" = x; then :
23726
23727        JDK_UPDATE_VERSION_NOTNULL=0
23728
23729fi
23730    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23731    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23732    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23733    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23734    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23735    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23736    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23737
23738    # lib.exe is used to create static libraries.
23739    # Extract the first word of "lib", so it can be a program name with args.
23740set dummy lib; ac_word=$2
23741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23742$as_echo_n "checking for $ac_word... " >&6; }
23743if test "${ac_cv_prog_WINAR+set}" = set; then :
23744  $as_echo_n "(cached) " >&6
23745else
23746  if test -n "$WINAR"; then
23747  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23748else
23749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23750for as_dir in $PATH
23751do
23752  IFS=$as_save_IFS
23753  test -z "$as_dir" && as_dir=.
23754    for ac_exec_ext in '' $ac_executable_extensions; do
23755  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23756    ac_cv_prog_WINAR="lib"
23757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23758    break 2
23759  fi
23760done
23761  done
23762IFS=$as_save_IFS
23763
23764fi
23765fi
23766WINAR=$ac_cv_prog_WINAR
23767if test -n "$WINAR"; then
23768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23769$as_echo "$WINAR" >&6; }
23770else
23771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23772$as_echo "no" >&6; }
23773fi
23774
23775
23776
23777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23778
23779  # First separate the path from the arguments. This will split at the first
23780  # space.
23781  complete="$WINAR"
23782  path="${complete%% *}"
23783  tmp="$complete EOL"
23784  arguments="${tmp#* }"
23785
23786  # Input might be given as Windows format, start by converting to
23787  # unix format.
23788  new_path=`$CYGPATH -u "$path"`
23789
23790  # Now try to locate executable using which
23791  new_path=`$WHICH "$new_path" 2> /dev/null`
23792  # bat and cmd files are not always considered executable in cygwin causing which
23793  # to not find them
23794  if test "x$new_path" = x \
23795           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23796           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23797    new_path=`$CYGPATH -u "$path"`
23798  fi
23799  if test "x$new_path" = x; then
23800    # Oops. Which didn't find the executable.
23801    # The splitting of arguments from the executable at a space might have been incorrect,
23802    # since paths with space are more likely in Windows. Give it another try with the whole
23803    # argument.
23804    path="$complete"
23805    arguments="EOL"
23806    new_path=`$CYGPATH -u "$path"`
23807    new_path=`$WHICH "$new_path" 2> /dev/null`
23808    # bat and cmd files are not always considered executable in cygwin causing which
23809    # to not find them
23810    if test "x$new_path" = x \
23811             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23812             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23813      new_path=`$CYGPATH -u "$path"`
23814    fi
23815    if test "x$new_path" = x; then
23816      # It's still not found. Now this is an unrecoverable error.
23817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23818$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23819      has_space=`$ECHO "$complete" | $GREP " "`
23820      if test "x$has_space" != x; then
23821        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23822$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23823      fi
23824      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23825    fi
23826  fi
23827
23828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23831  # "foo.exe" is OK but "foo" is an error.
23832  #
23833  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23834  # It is also a way to make sure we got the proper file name for the real test later on.
23835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23836  if test "x$test_shortpath" = x; then
23837    # Short path failed, file does not exist as specified.
23838    # Try adding .exe or .cmd
23839    if test -f "${new_path}.exe"; then
23840       input_to_shortpath="${new_path}.exe"
23841    elif test -f "${new_path}.cmd"; then
23842       input_to_shortpath="${new_path}.cmd"
23843    else
23844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23845$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23846      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23847$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23848      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23849    fi
23850  else
23851    input_to_shortpath="$new_path"
23852  fi
23853
23854  # Call helper function which possibly converts this using DOS-style short mode.
23855  # If so, the updated path is stored in $new_path.
23856  new_path="$input_to_shortpath"
23857
23858  input_path="$input_to_shortpath"
23859  # Check if we need to convert this using DOS-style short mode. If the path
23860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23861  # take no chances and rewrite it.
23862  # Note: m4 eats our [], so we need to use [ and ] instead.
23863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23864  if test "x$has_forbidden_chars" != x; then
23865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23869      # Going to short mode and back again did indeed matter. Since short mode is
23870      # case insensitive, let's make it lowercase to improve readability.
23871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23872      # Now convert it back to Unix-stile (cygpath)
23873      input_path=`$CYGPATH -u "$shortmode_path"`
23874      new_path="$input_path"
23875    fi
23876  fi
23877
23878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23879  if test "x$test_cygdrive_prefix" = x; then
23880    # As a simple fix, exclude /usr/bin since it's not a real path.
23881    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23883      # a path prefixed by /cygdrive for fixpath to work.
23884      new_path="$CYGWIN_ROOT_PATH$input_path"
23885    fi
23886  fi
23887
23888  # remove trailing .exe if any
23889  new_path="${new_path/%.exe/}"
23890
23891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23892
23893  # First separate the path from the arguments. This will split at the first
23894  # space.
23895  complete="$WINAR"
23896  path="${complete%% *}"
23897  tmp="$complete EOL"
23898  arguments="${tmp#* }"
23899
23900  # Input might be given as Windows format, start by converting to
23901  # unix format.
23902  new_path="$path"
23903
23904  windows_path="$new_path"
23905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23906    unix_path=`$CYGPATH -u "$windows_path"`
23907    new_path="$unix_path"
23908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23910    new_path="$unix_path"
23911  fi
23912
23913
23914  # Now try to locate executable using which
23915  new_path=`$WHICH "$new_path" 2> /dev/null`
23916
23917  if test "x$new_path" = x; then
23918    # Oops. Which didn't find the executable.
23919    # The splitting of arguments from the executable at a space might have been incorrect,
23920    # since paths with space are more likely in Windows. Give it another try with the whole
23921    # argument.
23922    path="$complete"
23923    arguments="EOL"
23924    new_path="$path"
23925
23926  windows_path="$new_path"
23927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23928    unix_path=`$CYGPATH -u "$windows_path"`
23929    new_path="$unix_path"
23930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23932    new_path="$unix_path"
23933  fi
23934
23935
23936    new_path=`$WHICH "$new_path" 2> /dev/null`
23937
23938    if test "x$new_path" = x; then
23939      # It's still not found. Now this is an unrecoverable error.
23940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23941$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23942      has_space=`$ECHO "$complete" | $GREP " "`
23943      if test "x$has_space" != x; then
23944        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23945$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23946      fi
23947      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23948    fi
23949  fi
23950
23951  # Now new_path has a complete unix path to the binary
23952  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23953    # Keep paths in /bin as-is, but remove trailing .exe if any
23954    new_path="${new_path/%.exe/}"
23955    # Do not save /bin paths to all_fixpath_prefixes!
23956  else
23957    # Not in mixed or Windows style, start by that.
23958    new_path=`cmd //c echo $new_path`
23959
23960  input_path="$new_path"
23961  # Check if we need to convert this using DOS-style short mode. If the path
23962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23963  # take no chances and rewrite it.
23964  # Note: m4 eats our [], so we need to use [ and ] instead.
23965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23966  if test "x$has_forbidden_chars" != x; then
23967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23969  fi
23970
23971    # Output is in $new_path
23972
23973  windows_path="$new_path"
23974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23975    unix_path=`$CYGPATH -u "$windows_path"`
23976    new_path="$unix_path"
23977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23979    new_path="$unix_path"
23980  fi
23981
23982    # remove trailing .exe if any
23983    new_path="${new_path/%.exe/}"
23984
23985    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23986    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23987  fi
23988
23989  else
23990    # We're on a posix platform. Hooray! :)
23991    # First separate the path from the arguments. This will split at the first
23992    # space.
23993    complete="$WINAR"
23994    path="${complete%% *}"
23995    tmp="$complete EOL"
23996    arguments="${tmp#* }"
23997
23998    # Cannot rely on the command "which" here since it doesn't always work.
23999    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24000    if test -z "$is_absolute_path"; then
24001      # Path to executable is not absolute. Find it.
24002      IFS_save="$IFS"
24003      IFS=:
24004      for p in $PATH; do
24005        if test -f "$p/$path" && test -x "$p/$path"; then
24006          new_path="$p/$path"
24007          break
24008        fi
24009      done
24010      IFS="$IFS_save"
24011    else
24012      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24013$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24014      new_path="$path"
24015    fi
24016
24017    if test "x$new_path" = x; then
24018        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24019$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24020        has_space=`$ECHO "$complete" | $GREP " "`
24021        if test "x$has_space" != x; then
24022          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24023$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24024        fi
24025        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24026      fi
24027  fi
24028
24029      # Now join together the path and the arguments once again
24030      if test "x$arguments" != xEOL; then
24031        new_complete="$new_path ${arguments% *}"
24032      else
24033        new_complete="$new_path"
24034      fi
24035
24036  if test "x$complete" != "x$new_complete"; then
24037      WINAR="$new_complete"
24038      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24039$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24040    fi
24041
24042    AR="$WINAR"
24043    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24044
24045    # Extract the first word of "dumpbin", so it can be a program name with args.
24046set dummy dumpbin; ac_word=$2
24047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24048$as_echo_n "checking for $ac_word... " >&6; }
24049if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
24050  $as_echo_n "(cached) " >&6
24051else
24052  if test -n "$DUMPBIN"; then
24053  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24054else
24055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24056for as_dir in $PATH
24057do
24058  IFS=$as_save_IFS
24059  test -z "$as_dir" && as_dir=.
24060    for ac_exec_ext in '' $ac_executable_extensions; do
24061  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24062    ac_cv_prog_DUMPBIN="dumpbin"
24063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24064    break 2
24065  fi
24066done
24067  done
24068IFS=$as_save_IFS
24069
24070fi
24071fi
24072DUMPBIN=$ac_cv_prog_DUMPBIN
24073if test -n "$DUMPBIN"; then
24074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24075$as_echo "$DUMPBIN" >&6; }
24076else
24077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24078$as_echo "no" >&6; }
24079fi
24080
24081
24082
24083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24084
24085  # First separate the path from the arguments. This will split at the first
24086  # space.
24087  complete="$DUMPBIN"
24088  path="${complete%% *}"
24089  tmp="$complete EOL"
24090  arguments="${tmp#* }"
24091
24092  # Input might be given as Windows format, start by converting to
24093  # unix format.
24094  new_path=`$CYGPATH -u "$path"`
24095
24096  # Now try to locate executable using which
24097  new_path=`$WHICH "$new_path" 2> /dev/null`
24098  # bat and cmd files are not always considered executable in cygwin causing which
24099  # to not find them
24100  if test "x$new_path" = x \
24101           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24102           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24103    new_path=`$CYGPATH -u "$path"`
24104  fi
24105  if test "x$new_path" = x; then
24106    # Oops. Which didn't find the executable.
24107    # The splitting of arguments from the executable at a space might have been incorrect,
24108    # since paths with space are more likely in Windows. Give it another try with the whole
24109    # argument.
24110    path="$complete"
24111    arguments="EOL"
24112    new_path=`$CYGPATH -u "$path"`
24113    new_path=`$WHICH "$new_path" 2> /dev/null`
24114    # bat and cmd files are not always considered executable in cygwin causing which
24115    # to not find them
24116    if test "x$new_path" = x \
24117             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24118             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24119      new_path=`$CYGPATH -u "$path"`
24120    fi
24121    if test "x$new_path" = x; then
24122      # It's still not found. Now this is an unrecoverable error.
24123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24124$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24125      has_space=`$ECHO "$complete" | $GREP " "`
24126      if test "x$has_space" != x; then
24127        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24128$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24129      fi
24130      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24131    fi
24132  fi
24133
24134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24137  # "foo.exe" is OK but "foo" is an error.
24138  #
24139  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24140  # It is also a way to make sure we got the proper file name for the real test later on.
24141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24142  if test "x$test_shortpath" = x; then
24143    # Short path failed, file does not exist as specified.
24144    # Try adding .exe or .cmd
24145    if test -f "${new_path}.exe"; then
24146       input_to_shortpath="${new_path}.exe"
24147    elif test -f "${new_path}.cmd"; then
24148       input_to_shortpath="${new_path}.cmd"
24149    else
24150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24151$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24152      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24153$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24154      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24155    fi
24156  else
24157    input_to_shortpath="$new_path"
24158  fi
24159
24160  # Call helper function which possibly converts this using DOS-style short mode.
24161  # If so, the updated path is stored in $new_path.
24162  new_path="$input_to_shortpath"
24163
24164  input_path="$input_to_shortpath"
24165  # Check if we need to convert this using DOS-style short mode. If the path
24166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24167  # take no chances and rewrite it.
24168  # Note: m4 eats our [], so we need to use [ and ] instead.
24169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24170  if test "x$has_forbidden_chars" != x; then
24171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24172    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24173    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24174    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24175      # Going to short mode and back again did indeed matter. Since short mode is
24176      # case insensitive, let's make it lowercase to improve readability.
24177      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24178      # Now convert it back to Unix-stile (cygpath)
24179      input_path=`$CYGPATH -u "$shortmode_path"`
24180      new_path="$input_path"
24181    fi
24182  fi
24183
24184  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24185  if test "x$test_cygdrive_prefix" = x; then
24186    # As a simple fix, exclude /usr/bin since it's not a real path.
24187    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24188      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24189      # a path prefixed by /cygdrive for fixpath to work.
24190      new_path="$CYGWIN_ROOT_PATH$input_path"
24191    fi
24192  fi
24193
24194  # remove trailing .exe if any
24195  new_path="${new_path/%.exe/}"
24196
24197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24198
24199  # First separate the path from the arguments. This will split at the first
24200  # space.
24201  complete="$DUMPBIN"
24202  path="${complete%% *}"
24203  tmp="$complete EOL"
24204  arguments="${tmp#* }"
24205
24206  # Input might be given as Windows format, start by converting to
24207  # unix format.
24208  new_path="$path"
24209
24210  windows_path="$new_path"
24211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24212    unix_path=`$CYGPATH -u "$windows_path"`
24213    new_path="$unix_path"
24214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24216    new_path="$unix_path"
24217  fi
24218
24219
24220  # Now try to locate executable using which
24221  new_path=`$WHICH "$new_path" 2> /dev/null`
24222
24223  if test "x$new_path" = x; then
24224    # Oops. Which didn't find the executable.
24225    # The splitting of arguments from the executable at a space might have been incorrect,
24226    # since paths with space are more likely in Windows. Give it another try with the whole
24227    # argument.
24228    path="$complete"
24229    arguments="EOL"
24230    new_path="$path"
24231
24232  windows_path="$new_path"
24233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24234    unix_path=`$CYGPATH -u "$windows_path"`
24235    new_path="$unix_path"
24236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24238    new_path="$unix_path"
24239  fi
24240
24241
24242    new_path=`$WHICH "$new_path" 2> /dev/null`
24243
24244    if test "x$new_path" = x; then
24245      # It's still not found. Now this is an unrecoverable error.
24246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24247$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24248      has_space=`$ECHO "$complete" | $GREP " "`
24249      if test "x$has_space" != x; then
24250        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24251$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24252      fi
24253      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24254    fi
24255  fi
24256
24257  # Now new_path has a complete unix path to the binary
24258  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24259    # Keep paths in /bin as-is, but remove trailing .exe if any
24260    new_path="${new_path/%.exe/}"
24261    # Do not save /bin paths to all_fixpath_prefixes!
24262  else
24263    # Not in mixed or Windows style, start by that.
24264    new_path=`cmd //c echo $new_path`
24265
24266  input_path="$new_path"
24267  # Check if we need to convert this using DOS-style short mode. If the path
24268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24269  # take no chances and rewrite it.
24270  # Note: m4 eats our [], so we need to use [ and ] instead.
24271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24272  if test "x$has_forbidden_chars" != x; then
24273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24274    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24275  fi
24276
24277    # Output is in $new_path
24278
24279  windows_path="$new_path"
24280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24281    unix_path=`$CYGPATH -u "$windows_path"`
24282    new_path="$unix_path"
24283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24285    new_path="$unix_path"
24286  fi
24287
24288    # remove trailing .exe if any
24289    new_path="${new_path/%.exe/}"
24290
24291    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24292    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24293  fi
24294
24295  else
24296    # We're on a posix platform. Hooray! :)
24297    # First separate the path from the arguments. This will split at the first
24298    # space.
24299    complete="$DUMPBIN"
24300    path="${complete%% *}"
24301    tmp="$complete EOL"
24302    arguments="${tmp#* }"
24303
24304    # Cannot rely on the command "which" here since it doesn't always work.
24305    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24306    if test -z "$is_absolute_path"; then
24307      # Path to executable is not absolute. Find it.
24308      IFS_save="$IFS"
24309      IFS=:
24310      for p in $PATH; do
24311        if test -f "$p/$path" && test -x "$p/$path"; then
24312          new_path="$p/$path"
24313          break
24314        fi
24315      done
24316      IFS="$IFS_save"
24317    else
24318      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24319$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24320      new_path="$path"
24321    fi
24322
24323    if test "x$new_path" = x; then
24324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24325$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24326        has_space=`$ECHO "$complete" | $GREP " "`
24327        if test "x$has_space" != x; then
24328          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24329$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24330        fi
24331        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24332      fi
24333  fi
24334
24335      # Now join together the path and the arguments once again
24336      if test "x$arguments" != xEOL; then
24337        new_complete="$new_path ${arguments% *}"
24338      else
24339        new_complete="$new_path"
24340      fi
24341
24342  if test "x$complete" != "x$new_complete"; then
24343      DUMPBIN="$new_complete"
24344      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24345$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24346    fi
24347
24348
24349    COMPILER_TYPE=CL
24350    CCXXFLAGS="$CCXXFLAGS -nologo"
24351
24352fi
24353
24354
24355
24356ac_ext=c
24357ac_cpp='$CPP $CPPFLAGS'
24358ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24359ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24360ac_compiler_gnu=$ac_cv_c_compiler_gnu
24361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24362$as_echo_n "checking how to run the C preprocessor... " >&6; }
24363# On Suns, sometimes $CPP names a directory.
24364if test -n "$CPP" && test -d "$CPP"; then
24365  CPP=
24366fi
24367if test -z "$CPP"; then
24368  if test "${ac_cv_prog_CPP+set}" = set; then :
24369  $as_echo_n "(cached) " >&6
24370else
24371      # Double quotes because CPP needs to be expanded
24372    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24373    do
24374      ac_preproc_ok=false
24375for ac_c_preproc_warn_flag in '' yes
24376do
24377  # Use a header file that comes with gcc, so configuring glibc
24378  # with a fresh cross-compiler works.
24379  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24380  # <limits.h> exists even on freestanding compilers.
24381  # On the NeXT, cc -E runs the code through the compiler's parser,
24382  # not just through cpp. "Syntax error" is here to catch this case.
24383  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24384/* end confdefs.h.  */
24385#ifdef __STDC__
24386# include <limits.h>
24387#else
24388# include <assert.h>
24389#endif
24390		     Syntax error
24391_ACEOF
24392if ac_fn_c_try_cpp "$LINENO"; then :
24393
24394else
24395  # Broken: fails on valid input.
24396continue
24397fi
24398rm -f conftest.err conftest.i conftest.$ac_ext
24399
24400  # OK, works on sane cases.  Now check whether nonexistent headers
24401  # can be detected and how.
24402  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24403/* end confdefs.h.  */
24404#include <ac_nonexistent.h>
24405_ACEOF
24406if ac_fn_c_try_cpp "$LINENO"; then :
24407  # Broken: success on invalid input.
24408continue
24409else
24410  # Passes both tests.
24411ac_preproc_ok=:
24412break
24413fi
24414rm -f conftest.err conftest.i conftest.$ac_ext
24415
24416done
24417# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24418rm -f conftest.i conftest.err conftest.$ac_ext
24419if $ac_preproc_ok; then :
24420  break
24421fi
24422
24423    done
24424    ac_cv_prog_CPP=$CPP
24425
24426fi
24427  CPP=$ac_cv_prog_CPP
24428else
24429  ac_cv_prog_CPP=$CPP
24430fi
24431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24432$as_echo "$CPP" >&6; }
24433ac_preproc_ok=false
24434for ac_c_preproc_warn_flag in '' yes
24435do
24436  # Use a header file that comes with gcc, so configuring glibc
24437  # with a fresh cross-compiler works.
24438  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24439  # <limits.h> exists even on freestanding compilers.
24440  # On the NeXT, cc -E runs the code through the compiler's parser,
24441  # not just through cpp. "Syntax error" is here to catch this case.
24442  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24443/* end confdefs.h.  */
24444#ifdef __STDC__
24445# include <limits.h>
24446#else
24447# include <assert.h>
24448#endif
24449		     Syntax error
24450_ACEOF
24451if ac_fn_c_try_cpp "$LINENO"; then :
24452
24453else
24454  # Broken: fails on valid input.
24455continue
24456fi
24457rm -f conftest.err conftest.i conftest.$ac_ext
24458
24459  # OK, works on sane cases.  Now check whether nonexistent headers
24460  # can be detected and how.
24461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24462/* end confdefs.h.  */
24463#include <ac_nonexistent.h>
24464_ACEOF
24465if ac_fn_c_try_cpp "$LINENO"; then :
24466  # Broken: success on invalid input.
24467continue
24468else
24469  # Passes both tests.
24470ac_preproc_ok=:
24471break
24472fi
24473rm -f conftest.err conftest.i conftest.$ac_ext
24474
24475done
24476# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24477rm -f conftest.i conftest.err conftest.$ac_ext
24478if $ac_preproc_ok; then :
24479
24480else
24481  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24482$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24483as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24484See \`config.log' for more details" "$LINENO" 5 ; }
24485fi
24486
24487ac_ext=cpp
24488ac_cpp='$CXXCPP $CPPFLAGS'
24489ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24490ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24491ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24492
24493
24494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24495
24496  # First separate the path from the arguments. This will split at the first
24497  # space.
24498  complete="$CPP"
24499  path="${complete%% *}"
24500  tmp="$complete EOL"
24501  arguments="${tmp#* }"
24502
24503  # Input might be given as Windows format, start by converting to
24504  # unix format.
24505  new_path=`$CYGPATH -u "$path"`
24506
24507  # Now try to locate executable using which
24508  new_path=`$WHICH "$new_path" 2> /dev/null`
24509  # bat and cmd files are not always considered executable in cygwin causing which
24510  # to not find them
24511  if test "x$new_path" = x \
24512           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24513           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24514    new_path=`$CYGPATH -u "$path"`
24515  fi
24516  if test "x$new_path" = x; then
24517    # Oops. Which didn't find the executable.
24518    # The splitting of arguments from the executable at a space might have been incorrect,
24519    # since paths with space are more likely in Windows. Give it another try with the whole
24520    # argument.
24521    path="$complete"
24522    arguments="EOL"
24523    new_path=`$CYGPATH -u "$path"`
24524    new_path=`$WHICH "$new_path" 2> /dev/null`
24525    # bat and cmd files are not always considered executable in cygwin causing which
24526    # to not find them
24527    if test "x$new_path" = x \
24528             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24529             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24530      new_path=`$CYGPATH -u "$path"`
24531    fi
24532    if test "x$new_path" = x; then
24533      # It's still not found. Now this is an unrecoverable error.
24534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24535$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24536      has_space=`$ECHO "$complete" | $GREP " "`
24537      if test "x$has_space" != x; then
24538        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24539$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24540      fi
24541      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24542    fi
24543  fi
24544
24545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24548  # "foo.exe" is OK but "foo" is an error.
24549  #
24550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24551  # It is also a way to make sure we got the proper file name for the real test later on.
24552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24553  if test "x$test_shortpath" = x; then
24554    # Short path failed, file does not exist as specified.
24555    # Try adding .exe or .cmd
24556    if test -f "${new_path}.exe"; then
24557       input_to_shortpath="${new_path}.exe"
24558    elif test -f "${new_path}.cmd"; then
24559       input_to_shortpath="${new_path}.cmd"
24560    else
24561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24562$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24563      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24564$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24565      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24566    fi
24567  else
24568    input_to_shortpath="$new_path"
24569  fi
24570
24571  # Call helper function which possibly converts this using DOS-style short mode.
24572  # If so, the updated path is stored in $new_path.
24573  new_path="$input_to_shortpath"
24574
24575  input_path="$input_to_shortpath"
24576  # Check if we need to convert this using DOS-style short mode. If the path
24577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24578  # take no chances and rewrite it.
24579  # Note: m4 eats our [], so we need to use [ and ] instead.
24580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24581  if test "x$has_forbidden_chars" != x; then
24582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24586      # Going to short mode and back again did indeed matter. Since short mode is
24587      # case insensitive, let's make it lowercase to improve readability.
24588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24589      # Now convert it back to Unix-stile (cygpath)
24590      input_path=`$CYGPATH -u "$shortmode_path"`
24591      new_path="$input_path"
24592    fi
24593  fi
24594
24595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24596  if test "x$test_cygdrive_prefix" = x; then
24597    # As a simple fix, exclude /usr/bin since it's not a real path.
24598    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24600      # a path prefixed by /cygdrive for fixpath to work.
24601      new_path="$CYGWIN_ROOT_PATH$input_path"
24602    fi
24603  fi
24604
24605  # remove trailing .exe if any
24606  new_path="${new_path/%.exe/}"
24607
24608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24609
24610  # First separate the path from the arguments. This will split at the first
24611  # space.
24612  complete="$CPP"
24613  path="${complete%% *}"
24614  tmp="$complete EOL"
24615  arguments="${tmp#* }"
24616
24617  # Input might be given as Windows format, start by converting to
24618  # unix format.
24619  new_path="$path"
24620
24621  windows_path="$new_path"
24622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24623    unix_path=`$CYGPATH -u "$windows_path"`
24624    new_path="$unix_path"
24625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24627    new_path="$unix_path"
24628  fi
24629
24630
24631  # Now try to locate executable using which
24632  new_path=`$WHICH "$new_path" 2> /dev/null`
24633
24634  if test "x$new_path" = x; then
24635    # Oops. Which didn't find the executable.
24636    # The splitting of arguments from the executable at a space might have been incorrect,
24637    # since paths with space are more likely in Windows. Give it another try with the whole
24638    # argument.
24639    path="$complete"
24640    arguments="EOL"
24641    new_path="$path"
24642
24643  windows_path="$new_path"
24644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24645    unix_path=`$CYGPATH -u "$windows_path"`
24646    new_path="$unix_path"
24647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24649    new_path="$unix_path"
24650  fi
24651
24652
24653    new_path=`$WHICH "$new_path" 2> /dev/null`
24654
24655    if test "x$new_path" = x; then
24656      # It's still not found. Now this is an unrecoverable error.
24657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24658$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24659      has_space=`$ECHO "$complete" | $GREP " "`
24660      if test "x$has_space" != x; then
24661        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24662$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24663      fi
24664      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24665    fi
24666  fi
24667
24668  # Now new_path has a complete unix path to the binary
24669  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24670    # Keep paths in /bin as-is, but remove trailing .exe if any
24671    new_path="${new_path/%.exe/}"
24672    # Do not save /bin paths to all_fixpath_prefixes!
24673  else
24674    # Not in mixed or Windows style, start by that.
24675    new_path=`cmd //c echo $new_path`
24676
24677  input_path="$new_path"
24678  # Check if we need to convert this using DOS-style short mode. If the path
24679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24680  # take no chances and rewrite it.
24681  # Note: m4 eats our [], so we need to use [ and ] instead.
24682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24683  if test "x$has_forbidden_chars" != x; then
24684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24686  fi
24687
24688    # Output is in $new_path
24689
24690  windows_path="$new_path"
24691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24692    unix_path=`$CYGPATH -u "$windows_path"`
24693    new_path="$unix_path"
24694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24696    new_path="$unix_path"
24697  fi
24698
24699    # remove trailing .exe if any
24700    new_path="${new_path/%.exe/}"
24701
24702    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24703    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24704  fi
24705
24706  else
24707    # We're on a posix platform. Hooray! :)
24708    # First separate the path from the arguments. This will split at the first
24709    # space.
24710    complete="$CPP"
24711    path="${complete%% *}"
24712    tmp="$complete EOL"
24713    arguments="${tmp#* }"
24714
24715    # Cannot rely on the command "which" here since it doesn't always work.
24716    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24717    if test -z "$is_absolute_path"; then
24718      # Path to executable is not absolute. Find it.
24719      IFS_save="$IFS"
24720      IFS=:
24721      for p in $PATH; do
24722        if test -f "$p/$path" && test -x "$p/$path"; then
24723          new_path="$p/$path"
24724          break
24725        fi
24726      done
24727      IFS="$IFS_save"
24728    else
24729      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24730$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24731      new_path="$path"
24732    fi
24733
24734    if test "x$new_path" = x; then
24735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24736$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24737        has_space=`$ECHO "$complete" | $GREP " "`
24738        if test "x$has_space" != x; then
24739          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24740$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24741        fi
24742        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24743      fi
24744  fi
24745
24746      # Now join together the path and the arguments once again
24747      if test "x$arguments" != xEOL; then
24748        new_complete="$new_path ${arguments% *}"
24749      else
24750        new_complete="$new_path"
24751      fi
24752
24753  if test "x$complete" != "x$new_complete"; then
24754      CPP="$new_complete"
24755      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24756$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24757    fi
24758
24759
24760ac_ext=cpp
24761ac_cpp='$CXXCPP $CPPFLAGS'
24762ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24763ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24764ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24766$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24767if test -z "$CXXCPP"; then
24768  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24769  $as_echo_n "(cached) " >&6
24770else
24771      # Double quotes because CXXCPP needs to be expanded
24772    for CXXCPP in "$CXX -E" "/lib/cpp"
24773    do
24774      ac_preproc_ok=false
24775for ac_cxx_preproc_warn_flag in '' yes
24776do
24777  # Use a header file that comes with gcc, so configuring glibc
24778  # with a fresh cross-compiler works.
24779  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24780  # <limits.h> exists even on freestanding compilers.
24781  # On the NeXT, cc -E runs the code through the compiler's parser,
24782  # not just through cpp. "Syntax error" is here to catch this case.
24783  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24784/* end confdefs.h.  */
24785#ifdef __STDC__
24786# include <limits.h>
24787#else
24788# include <assert.h>
24789#endif
24790		     Syntax error
24791_ACEOF
24792if ac_fn_cxx_try_cpp "$LINENO"; then :
24793
24794else
24795  # Broken: fails on valid input.
24796continue
24797fi
24798rm -f conftest.err conftest.i conftest.$ac_ext
24799
24800  # OK, works on sane cases.  Now check whether nonexistent headers
24801  # can be detected and how.
24802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24803/* end confdefs.h.  */
24804#include <ac_nonexistent.h>
24805_ACEOF
24806if ac_fn_cxx_try_cpp "$LINENO"; then :
24807  # Broken: success on invalid input.
24808continue
24809else
24810  # Passes both tests.
24811ac_preproc_ok=:
24812break
24813fi
24814rm -f conftest.err conftest.i conftest.$ac_ext
24815
24816done
24817# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24818rm -f conftest.i conftest.err conftest.$ac_ext
24819if $ac_preproc_ok; then :
24820  break
24821fi
24822
24823    done
24824    ac_cv_prog_CXXCPP=$CXXCPP
24825
24826fi
24827  CXXCPP=$ac_cv_prog_CXXCPP
24828else
24829  ac_cv_prog_CXXCPP=$CXXCPP
24830fi
24831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24832$as_echo "$CXXCPP" >&6; }
24833ac_preproc_ok=false
24834for ac_cxx_preproc_warn_flag in '' yes
24835do
24836  # Use a header file that comes with gcc, so configuring glibc
24837  # with a fresh cross-compiler works.
24838  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24839  # <limits.h> exists even on freestanding compilers.
24840  # On the NeXT, cc -E runs the code through the compiler's parser,
24841  # not just through cpp. "Syntax error" is here to catch this case.
24842  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24843/* end confdefs.h.  */
24844#ifdef __STDC__
24845# include <limits.h>
24846#else
24847# include <assert.h>
24848#endif
24849		     Syntax error
24850_ACEOF
24851if ac_fn_cxx_try_cpp "$LINENO"; then :
24852
24853else
24854  # Broken: fails on valid input.
24855continue
24856fi
24857rm -f conftest.err conftest.i conftest.$ac_ext
24858
24859  # OK, works on sane cases.  Now check whether nonexistent headers
24860  # can be detected and how.
24861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24862/* end confdefs.h.  */
24863#include <ac_nonexistent.h>
24864_ACEOF
24865if ac_fn_cxx_try_cpp "$LINENO"; then :
24866  # Broken: success on invalid input.
24867continue
24868else
24869  # Passes both tests.
24870ac_preproc_ok=:
24871break
24872fi
24873rm -f conftest.err conftest.i conftest.$ac_ext
24874
24875done
24876# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24877rm -f conftest.i conftest.err conftest.$ac_ext
24878if $ac_preproc_ok; then :
24879
24880else
24881  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24882$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24883as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24884See \`config.log' for more details" "$LINENO" 5 ; }
24885fi
24886
24887ac_ext=cpp
24888ac_cpp='$CXXCPP $CPPFLAGS'
24889ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24890ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24891ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24892
24893
24894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24895
24896  # First separate the path from the arguments. This will split at the first
24897  # space.
24898  complete="$CXXCPP"
24899  path="${complete%% *}"
24900  tmp="$complete EOL"
24901  arguments="${tmp#* }"
24902
24903  # Input might be given as Windows format, start by converting to
24904  # unix format.
24905  new_path=`$CYGPATH -u "$path"`
24906
24907  # Now try to locate executable using which
24908  new_path=`$WHICH "$new_path" 2> /dev/null`
24909  # bat and cmd files are not always considered executable in cygwin causing which
24910  # to not find them
24911  if test "x$new_path" = x \
24912           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24913           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24914    new_path=`$CYGPATH -u "$path"`
24915  fi
24916  if test "x$new_path" = x; then
24917    # Oops. Which didn't find the executable.
24918    # The splitting of arguments from the executable at a space might have been incorrect,
24919    # since paths with space are more likely in Windows. Give it another try with the whole
24920    # argument.
24921    path="$complete"
24922    arguments="EOL"
24923    new_path=`$CYGPATH -u "$path"`
24924    new_path=`$WHICH "$new_path" 2> /dev/null`
24925    # bat and cmd files are not always considered executable in cygwin causing which
24926    # to not find them
24927    if test "x$new_path" = x \
24928             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24929             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24930      new_path=`$CYGPATH -u "$path"`
24931    fi
24932    if test "x$new_path" = x; then
24933      # It's still not found. Now this is an unrecoverable error.
24934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24935$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24936      has_space=`$ECHO "$complete" | $GREP " "`
24937      if test "x$has_space" != x; then
24938        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24939$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24940      fi
24941      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24942    fi
24943  fi
24944
24945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24948  # "foo.exe" is OK but "foo" is an error.
24949  #
24950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24951  # It is also a way to make sure we got the proper file name for the real test later on.
24952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24953  if test "x$test_shortpath" = x; then
24954    # Short path failed, file does not exist as specified.
24955    # Try adding .exe or .cmd
24956    if test -f "${new_path}.exe"; then
24957       input_to_shortpath="${new_path}.exe"
24958    elif test -f "${new_path}.cmd"; then
24959       input_to_shortpath="${new_path}.cmd"
24960    else
24961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24962$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24963      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24964$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24965      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24966    fi
24967  else
24968    input_to_shortpath="$new_path"
24969  fi
24970
24971  # Call helper function which possibly converts this using DOS-style short mode.
24972  # If so, the updated path is stored in $new_path.
24973  new_path="$input_to_shortpath"
24974
24975  input_path="$input_to_shortpath"
24976  # Check if we need to convert this using DOS-style short mode. If the path
24977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24978  # take no chances and rewrite it.
24979  # Note: m4 eats our [], so we need to use [ and ] instead.
24980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24981  if test "x$has_forbidden_chars" != x; then
24982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24986      # Going to short mode and back again did indeed matter. Since short mode is
24987      # case insensitive, let's make it lowercase to improve readability.
24988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24989      # Now convert it back to Unix-stile (cygpath)
24990      input_path=`$CYGPATH -u "$shortmode_path"`
24991      new_path="$input_path"
24992    fi
24993  fi
24994
24995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24996  if test "x$test_cygdrive_prefix" = x; then
24997    # As a simple fix, exclude /usr/bin since it's not a real path.
24998    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25000      # a path prefixed by /cygdrive for fixpath to work.
25001      new_path="$CYGWIN_ROOT_PATH$input_path"
25002    fi
25003  fi
25004
25005  # remove trailing .exe if any
25006  new_path="${new_path/%.exe/}"
25007
25008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25009
25010  # First separate the path from the arguments. This will split at the first
25011  # space.
25012  complete="$CXXCPP"
25013  path="${complete%% *}"
25014  tmp="$complete EOL"
25015  arguments="${tmp#* }"
25016
25017  # Input might be given as Windows format, start by converting to
25018  # unix format.
25019  new_path="$path"
25020
25021  windows_path="$new_path"
25022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25023    unix_path=`$CYGPATH -u "$windows_path"`
25024    new_path="$unix_path"
25025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25027    new_path="$unix_path"
25028  fi
25029
25030
25031  # Now try to locate executable using which
25032  new_path=`$WHICH "$new_path" 2> /dev/null`
25033
25034  if test "x$new_path" = x; then
25035    # Oops. Which didn't find the executable.
25036    # The splitting of arguments from the executable at a space might have been incorrect,
25037    # since paths with space are more likely in Windows. Give it another try with the whole
25038    # argument.
25039    path="$complete"
25040    arguments="EOL"
25041    new_path="$path"
25042
25043  windows_path="$new_path"
25044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25045    unix_path=`$CYGPATH -u "$windows_path"`
25046    new_path="$unix_path"
25047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25049    new_path="$unix_path"
25050  fi
25051
25052
25053    new_path=`$WHICH "$new_path" 2> /dev/null`
25054
25055    if test "x$new_path" = x; then
25056      # It's still not found. Now this is an unrecoverable error.
25057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25058$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25059      has_space=`$ECHO "$complete" | $GREP " "`
25060      if test "x$has_space" != x; then
25061        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25063      fi
25064      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25065    fi
25066  fi
25067
25068  # Now new_path has a complete unix path to the binary
25069  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25070    # Keep paths in /bin as-is, but remove trailing .exe if any
25071    new_path="${new_path/%.exe/}"
25072    # Do not save /bin paths to all_fixpath_prefixes!
25073  else
25074    # Not in mixed or Windows style, start by that.
25075    new_path=`cmd //c echo $new_path`
25076
25077  input_path="$new_path"
25078  # Check if we need to convert this using DOS-style short mode. If the path
25079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25080  # take no chances and rewrite it.
25081  # Note: m4 eats our [], so we need to use [ and ] instead.
25082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25083  if test "x$has_forbidden_chars" != x; then
25084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25086  fi
25087
25088    # Output is in $new_path
25089
25090  windows_path="$new_path"
25091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25092    unix_path=`$CYGPATH -u "$windows_path"`
25093    new_path="$unix_path"
25094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25096    new_path="$unix_path"
25097  fi
25098
25099    # remove trailing .exe if any
25100    new_path="${new_path/%.exe/}"
25101
25102    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25103    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25104  fi
25105
25106  else
25107    # We're on a posix platform. Hooray! :)
25108    # First separate the path from the arguments. This will split at the first
25109    # space.
25110    complete="$CXXCPP"
25111    path="${complete%% *}"
25112    tmp="$complete EOL"
25113    arguments="${tmp#* }"
25114
25115    # Cannot rely on the command "which" here since it doesn't always work.
25116    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25117    if test -z "$is_absolute_path"; then
25118      # Path to executable is not absolute. Find it.
25119      IFS_save="$IFS"
25120      IFS=:
25121      for p in $PATH; do
25122        if test -f "$p/$path" && test -x "$p/$path"; then
25123          new_path="$p/$path"
25124          break
25125        fi
25126      done
25127      IFS="$IFS_save"
25128    else
25129      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25130$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25131      new_path="$path"
25132    fi
25133
25134    if test "x$new_path" = x; then
25135        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25136$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25137        has_space=`$ECHO "$complete" | $GREP " "`
25138        if test "x$has_space" != x; then
25139          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25140$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25141        fi
25142        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25143      fi
25144  fi
25145
25146      # Now join together the path and the arguments once again
25147      if test "x$arguments" != xEOL; then
25148        new_complete="$new_path ${arguments% *}"
25149      else
25150        new_complete="$new_path"
25151      fi
25152
25153  if test "x$complete" != "x$new_complete"; then
25154      CXXCPP="$new_complete"
25155      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25156$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25157    fi
25158
25159
25160if test "x$COMPILE_TYPE" != "xcross"; then
25161    # If we are not cross compiling, use the same compilers for
25162    # building the build platform executables. The cross-compilation
25163    # case needed to be done earlier, but this can only be done after
25164    # the native tools have been localized.
25165    BUILD_CC="$CC"
25166    BUILD_CXX="$CXX"
25167    BUILD_LD="$LD"
25168fi
25169
25170# for solaris we really need solaris tools, and not gnu equivalent
25171#   these seems to normally reside in /usr/ccs/bin so add that to path before
25172#   starting to probe
25173#
25174#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25175#         so that it can be overriden --with-tools-dir
25176if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25177    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25178fi
25179
25180# Find the right assembler.
25181if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25182    # Extract the first word of "as", so it can be a program name with args.
25183set dummy as; ac_word=$2
25184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25185$as_echo_n "checking for $ac_word... " >&6; }
25186if test "${ac_cv_path_AS+set}" = set; then :
25187  $as_echo_n "(cached) " >&6
25188else
25189  case $AS in
25190  [\\/]* | ?:[\\/]*)
25191  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25192  ;;
25193  *)
25194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25195for as_dir in $PATH
25196do
25197  IFS=$as_save_IFS
25198  test -z "$as_dir" && as_dir=.
25199    for ac_exec_ext in '' $ac_executable_extensions; do
25200  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25201    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25203    break 2
25204  fi
25205done
25206  done
25207IFS=$as_save_IFS
25208
25209  ;;
25210esac
25211fi
25212AS=$ac_cv_path_AS
25213if test -n "$AS"; then
25214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25215$as_echo "$AS" >&6; }
25216else
25217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25218$as_echo "no" >&6; }
25219fi
25220
25221
25222
25223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25224
25225  # First separate the path from the arguments. This will split at the first
25226  # space.
25227  complete="$AS"
25228  path="${complete%% *}"
25229  tmp="$complete EOL"
25230  arguments="${tmp#* }"
25231
25232  # Input might be given as Windows format, start by converting to
25233  # unix format.
25234  new_path=`$CYGPATH -u "$path"`
25235
25236  # Now try to locate executable using which
25237  new_path=`$WHICH "$new_path" 2> /dev/null`
25238  # bat and cmd files are not always considered executable in cygwin causing which
25239  # to not find them
25240  if test "x$new_path" = x \
25241           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25242           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25243    new_path=`$CYGPATH -u "$path"`
25244  fi
25245  if test "x$new_path" = x; then
25246    # Oops. Which didn't find the executable.
25247    # The splitting of arguments from the executable at a space might have been incorrect,
25248    # since paths with space are more likely in Windows. Give it another try with the whole
25249    # argument.
25250    path="$complete"
25251    arguments="EOL"
25252    new_path=`$CYGPATH -u "$path"`
25253    new_path=`$WHICH "$new_path" 2> /dev/null`
25254    # bat and cmd files are not always considered executable in cygwin causing which
25255    # to not find them
25256    if test "x$new_path" = x \
25257             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25258             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25259      new_path=`$CYGPATH -u "$path"`
25260    fi
25261    if test "x$new_path" = x; then
25262      # It's still not found. Now this is an unrecoverable error.
25263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25264$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25265      has_space=`$ECHO "$complete" | $GREP " "`
25266      if test "x$has_space" != x; then
25267        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25268$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25269      fi
25270      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25271    fi
25272  fi
25273
25274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25277  # "foo.exe" is OK but "foo" is an error.
25278  #
25279  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25280  # It is also a way to make sure we got the proper file name for the real test later on.
25281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25282  if test "x$test_shortpath" = x; then
25283    # Short path failed, file does not exist as specified.
25284    # Try adding .exe or .cmd
25285    if test -f "${new_path}.exe"; then
25286       input_to_shortpath="${new_path}.exe"
25287    elif test -f "${new_path}.cmd"; then
25288       input_to_shortpath="${new_path}.cmd"
25289    else
25290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25291$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25292      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25293$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25294      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25295    fi
25296  else
25297    input_to_shortpath="$new_path"
25298  fi
25299
25300  # Call helper function which possibly converts this using DOS-style short mode.
25301  # If so, the updated path is stored in $new_path.
25302  new_path="$input_to_shortpath"
25303
25304  input_path="$input_to_shortpath"
25305  # Check if we need to convert this using DOS-style short mode. If the path
25306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25307  # take no chances and rewrite it.
25308  # Note: m4 eats our [], so we need to use [ and ] instead.
25309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25310  if test "x$has_forbidden_chars" != x; then
25311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25315      # Going to short mode and back again did indeed matter. Since short mode is
25316      # case insensitive, let's make it lowercase to improve readability.
25317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25318      # Now convert it back to Unix-stile (cygpath)
25319      input_path=`$CYGPATH -u "$shortmode_path"`
25320      new_path="$input_path"
25321    fi
25322  fi
25323
25324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25325  if test "x$test_cygdrive_prefix" = x; then
25326    # As a simple fix, exclude /usr/bin since it's not a real path.
25327    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25329      # a path prefixed by /cygdrive for fixpath to work.
25330      new_path="$CYGWIN_ROOT_PATH$input_path"
25331    fi
25332  fi
25333
25334  # remove trailing .exe if any
25335  new_path="${new_path/%.exe/}"
25336
25337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25338
25339  # First separate the path from the arguments. This will split at the first
25340  # space.
25341  complete="$AS"
25342  path="${complete%% *}"
25343  tmp="$complete EOL"
25344  arguments="${tmp#* }"
25345
25346  # Input might be given as Windows format, start by converting to
25347  # unix format.
25348  new_path="$path"
25349
25350  windows_path="$new_path"
25351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25352    unix_path=`$CYGPATH -u "$windows_path"`
25353    new_path="$unix_path"
25354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25356    new_path="$unix_path"
25357  fi
25358
25359
25360  # Now try to locate executable using which
25361  new_path=`$WHICH "$new_path" 2> /dev/null`
25362
25363  if test "x$new_path" = x; then
25364    # Oops. Which didn't find the executable.
25365    # The splitting of arguments from the executable at a space might have been incorrect,
25366    # since paths with space are more likely in Windows. Give it another try with the whole
25367    # argument.
25368    path="$complete"
25369    arguments="EOL"
25370    new_path="$path"
25371
25372  windows_path="$new_path"
25373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25374    unix_path=`$CYGPATH -u "$windows_path"`
25375    new_path="$unix_path"
25376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25378    new_path="$unix_path"
25379  fi
25380
25381
25382    new_path=`$WHICH "$new_path" 2> /dev/null`
25383
25384    if test "x$new_path" = x; then
25385      # It's still not found. Now this is an unrecoverable error.
25386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25387$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25388      has_space=`$ECHO "$complete" | $GREP " "`
25389      if test "x$has_space" != x; then
25390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25392      fi
25393      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25394    fi
25395  fi
25396
25397  # Now new_path has a complete unix path to the binary
25398  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25399    # Keep paths in /bin as-is, but remove trailing .exe if any
25400    new_path="${new_path/%.exe/}"
25401    # Do not save /bin paths to all_fixpath_prefixes!
25402  else
25403    # Not in mixed or Windows style, start by that.
25404    new_path=`cmd //c echo $new_path`
25405
25406  input_path="$new_path"
25407  # Check if we need to convert this using DOS-style short mode. If the path
25408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25409  # take no chances and rewrite it.
25410  # Note: m4 eats our [], so we need to use [ and ] instead.
25411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25412  if test "x$has_forbidden_chars" != x; then
25413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25415  fi
25416
25417    # Output is in $new_path
25418
25419  windows_path="$new_path"
25420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25421    unix_path=`$CYGPATH -u "$windows_path"`
25422    new_path="$unix_path"
25423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25425    new_path="$unix_path"
25426  fi
25427
25428    # remove trailing .exe if any
25429    new_path="${new_path/%.exe/}"
25430
25431    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25432    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25433  fi
25434
25435  else
25436    # We're on a posix platform. Hooray! :)
25437    # First separate the path from the arguments. This will split at the first
25438    # space.
25439    complete="$AS"
25440    path="${complete%% *}"
25441    tmp="$complete EOL"
25442    arguments="${tmp#* }"
25443
25444    # Cannot rely on the command "which" here since it doesn't always work.
25445    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25446    if test -z "$is_absolute_path"; then
25447      # Path to executable is not absolute. Find it.
25448      IFS_save="$IFS"
25449      IFS=:
25450      for p in $PATH; do
25451        if test -f "$p/$path" && test -x "$p/$path"; then
25452          new_path="$p/$path"
25453          break
25454        fi
25455      done
25456      IFS="$IFS_save"
25457    else
25458      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25459$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25460      new_path="$path"
25461    fi
25462
25463    if test "x$new_path" = x; then
25464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25465$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25466        has_space=`$ECHO "$complete" | $GREP " "`
25467        if test "x$has_space" != x; then
25468          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25469$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25470        fi
25471        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25472      fi
25473  fi
25474
25475      # Now join together the path and the arguments once again
25476      if test "x$arguments" != xEOL; then
25477        new_complete="$new_path ${arguments% *}"
25478      else
25479        new_complete="$new_path"
25480      fi
25481
25482  if test "x$complete" != "x$new_complete"; then
25483      AS="$new_complete"
25484      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25485$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25486    fi
25487
25488else
25489    AS="$CC -c"
25490fi
25491
25492
25493if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25494    # Extract the first word of "nm", so it can be a program name with args.
25495set dummy nm; ac_word=$2
25496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25497$as_echo_n "checking for $ac_word... " >&6; }
25498if test "${ac_cv_path_NM+set}" = set; then :
25499  $as_echo_n "(cached) " >&6
25500else
25501  case $NM in
25502  [\\/]* | ?:[\\/]*)
25503  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25504  ;;
25505  *)
25506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25507for as_dir in $PATH
25508do
25509  IFS=$as_save_IFS
25510  test -z "$as_dir" && as_dir=.
25511    for ac_exec_ext in '' $ac_executable_extensions; do
25512  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25513    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25515    break 2
25516  fi
25517done
25518  done
25519IFS=$as_save_IFS
25520
25521  ;;
25522esac
25523fi
25524NM=$ac_cv_path_NM
25525if test -n "$NM"; then
25526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25527$as_echo "$NM" >&6; }
25528else
25529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25530$as_echo "no" >&6; }
25531fi
25532
25533
25534
25535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25536
25537  # First separate the path from the arguments. This will split at the first
25538  # space.
25539  complete="$NM"
25540  path="${complete%% *}"
25541  tmp="$complete EOL"
25542  arguments="${tmp#* }"
25543
25544  # Input might be given as Windows format, start by converting to
25545  # unix format.
25546  new_path=`$CYGPATH -u "$path"`
25547
25548  # Now try to locate executable using which
25549  new_path=`$WHICH "$new_path" 2> /dev/null`
25550  # bat and cmd files are not always considered executable in cygwin causing which
25551  # to not find them
25552  if test "x$new_path" = x \
25553           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25554           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25555    new_path=`$CYGPATH -u "$path"`
25556  fi
25557  if test "x$new_path" = x; then
25558    # Oops. Which didn't find the executable.
25559    # The splitting of arguments from the executable at a space might have been incorrect,
25560    # since paths with space are more likely in Windows. Give it another try with the whole
25561    # argument.
25562    path="$complete"
25563    arguments="EOL"
25564    new_path=`$CYGPATH -u "$path"`
25565    new_path=`$WHICH "$new_path" 2> /dev/null`
25566    # bat and cmd files are not always considered executable in cygwin causing which
25567    # to not find them
25568    if test "x$new_path" = x \
25569             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25570             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25571      new_path=`$CYGPATH -u "$path"`
25572    fi
25573    if test "x$new_path" = x; then
25574      # It's still not found. Now this is an unrecoverable error.
25575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25576$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25577      has_space=`$ECHO "$complete" | $GREP " "`
25578      if test "x$has_space" != x; then
25579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25581      fi
25582      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25583    fi
25584  fi
25585
25586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25589  # "foo.exe" is OK but "foo" is an error.
25590  #
25591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25592  # It is also a way to make sure we got the proper file name for the real test later on.
25593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25594  if test "x$test_shortpath" = x; then
25595    # Short path failed, file does not exist as specified.
25596    # Try adding .exe or .cmd
25597    if test -f "${new_path}.exe"; then
25598       input_to_shortpath="${new_path}.exe"
25599    elif test -f "${new_path}.cmd"; then
25600       input_to_shortpath="${new_path}.cmd"
25601    else
25602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25603$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25604      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25605$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25606      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25607    fi
25608  else
25609    input_to_shortpath="$new_path"
25610  fi
25611
25612  # Call helper function which possibly converts this using DOS-style short mode.
25613  # If so, the updated path is stored in $new_path.
25614  new_path="$input_to_shortpath"
25615
25616  input_path="$input_to_shortpath"
25617  # Check if we need to convert this using DOS-style short mode. If the path
25618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25619  # take no chances and rewrite it.
25620  # Note: m4 eats our [], so we need to use [ and ] instead.
25621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25622  if test "x$has_forbidden_chars" != x; then
25623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25627      # Going to short mode and back again did indeed matter. Since short mode is
25628      # case insensitive, let's make it lowercase to improve readability.
25629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25630      # Now convert it back to Unix-stile (cygpath)
25631      input_path=`$CYGPATH -u "$shortmode_path"`
25632      new_path="$input_path"
25633    fi
25634  fi
25635
25636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25637  if test "x$test_cygdrive_prefix" = x; then
25638    # As a simple fix, exclude /usr/bin since it's not a real path.
25639    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25641      # a path prefixed by /cygdrive for fixpath to work.
25642      new_path="$CYGWIN_ROOT_PATH$input_path"
25643    fi
25644  fi
25645
25646  # remove trailing .exe if any
25647  new_path="${new_path/%.exe/}"
25648
25649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25650
25651  # First separate the path from the arguments. This will split at the first
25652  # space.
25653  complete="$NM"
25654  path="${complete%% *}"
25655  tmp="$complete EOL"
25656  arguments="${tmp#* }"
25657
25658  # Input might be given as Windows format, start by converting to
25659  # unix format.
25660  new_path="$path"
25661
25662  windows_path="$new_path"
25663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25664    unix_path=`$CYGPATH -u "$windows_path"`
25665    new_path="$unix_path"
25666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25668    new_path="$unix_path"
25669  fi
25670
25671
25672  # Now try to locate executable using which
25673  new_path=`$WHICH "$new_path" 2> /dev/null`
25674
25675  if test "x$new_path" = x; then
25676    # Oops. Which didn't find the executable.
25677    # The splitting of arguments from the executable at a space might have been incorrect,
25678    # since paths with space are more likely in Windows. Give it another try with the whole
25679    # argument.
25680    path="$complete"
25681    arguments="EOL"
25682    new_path="$path"
25683
25684  windows_path="$new_path"
25685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25686    unix_path=`$CYGPATH -u "$windows_path"`
25687    new_path="$unix_path"
25688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25690    new_path="$unix_path"
25691  fi
25692
25693
25694    new_path=`$WHICH "$new_path" 2> /dev/null`
25695
25696    if test "x$new_path" = x; then
25697      # It's still not found. Now this is an unrecoverable error.
25698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25699$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25700      has_space=`$ECHO "$complete" | $GREP " "`
25701      if test "x$has_space" != x; then
25702        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25704      fi
25705      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25706    fi
25707  fi
25708
25709  # Now new_path has a complete unix path to the binary
25710  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25711    # Keep paths in /bin as-is, but remove trailing .exe if any
25712    new_path="${new_path/%.exe/}"
25713    # Do not save /bin paths to all_fixpath_prefixes!
25714  else
25715    # Not in mixed or Windows style, start by that.
25716    new_path=`cmd //c echo $new_path`
25717
25718  input_path="$new_path"
25719  # Check if we need to convert this using DOS-style short mode. If the path
25720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25721  # take no chances and rewrite it.
25722  # Note: m4 eats our [], so we need to use [ and ] instead.
25723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25724  if test "x$has_forbidden_chars" != x; then
25725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25727  fi
25728
25729    # Output is in $new_path
25730
25731  windows_path="$new_path"
25732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25733    unix_path=`$CYGPATH -u "$windows_path"`
25734    new_path="$unix_path"
25735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25737    new_path="$unix_path"
25738  fi
25739
25740    # remove trailing .exe if any
25741    new_path="${new_path/%.exe/}"
25742
25743    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25744    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25745  fi
25746
25747  else
25748    # We're on a posix platform. Hooray! :)
25749    # First separate the path from the arguments. This will split at the first
25750    # space.
25751    complete="$NM"
25752    path="${complete%% *}"
25753    tmp="$complete EOL"
25754    arguments="${tmp#* }"
25755
25756    # Cannot rely on the command "which" here since it doesn't always work.
25757    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25758    if test -z "$is_absolute_path"; then
25759      # Path to executable is not absolute. Find it.
25760      IFS_save="$IFS"
25761      IFS=:
25762      for p in $PATH; do
25763        if test -f "$p/$path" && test -x "$p/$path"; then
25764          new_path="$p/$path"
25765          break
25766        fi
25767      done
25768      IFS="$IFS_save"
25769    else
25770      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25771$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25772      new_path="$path"
25773    fi
25774
25775    if test "x$new_path" = x; then
25776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25777$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25778        has_space=`$ECHO "$complete" | $GREP " "`
25779        if test "x$has_space" != x; then
25780          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25781$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25782        fi
25783        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25784      fi
25785  fi
25786
25787      # Now join together the path and the arguments once again
25788      if test "x$arguments" != xEOL; then
25789        new_complete="$new_path ${arguments% *}"
25790      else
25791        new_complete="$new_path"
25792      fi
25793
25794  if test "x$complete" != "x$new_complete"; then
25795      NM="$new_complete"
25796      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25797$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25798    fi
25799
25800    # Extract the first word of "gnm", so it can be a program name with args.
25801set dummy gnm; ac_word=$2
25802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25803$as_echo_n "checking for $ac_word... " >&6; }
25804if test "${ac_cv_path_GNM+set}" = set; then :
25805  $as_echo_n "(cached) " >&6
25806else
25807  case $GNM in
25808  [\\/]* | ?:[\\/]*)
25809  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25810  ;;
25811  *)
25812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25813for as_dir in $PATH
25814do
25815  IFS=$as_save_IFS
25816  test -z "$as_dir" && as_dir=.
25817    for ac_exec_ext in '' $ac_executable_extensions; do
25818  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25819    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25821    break 2
25822  fi
25823done
25824  done
25825IFS=$as_save_IFS
25826
25827  ;;
25828esac
25829fi
25830GNM=$ac_cv_path_GNM
25831if test -n "$GNM"; then
25832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25833$as_echo "$GNM" >&6; }
25834else
25835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25836$as_echo "no" >&6; }
25837fi
25838
25839
25840
25841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25842
25843  # First separate the path from the arguments. This will split at the first
25844  # space.
25845  complete="$GNM"
25846  path="${complete%% *}"
25847  tmp="$complete EOL"
25848  arguments="${tmp#* }"
25849
25850  # Input might be given as Windows format, start by converting to
25851  # unix format.
25852  new_path=`$CYGPATH -u "$path"`
25853
25854  # Now try to locate executable using which
25855  new_path=`$WHICH "$new_path" 2> /dev/null`
25856  # bat and cmd files are not always considered executable in cygwin causing which
25857  # to not find them
25858  if test "x$new_path" = x \
25859           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25860           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25861    new_path=`$CYGPATH -u "$path"`
25862  fi
25863  if test "x$new_path" = x; then
25864    # Oops. Which didn't find the executable.
25865    # The splitting of arguments from the executable at a space might have been incorrect,
25866    # since paths with space are more likely in Windows. Give it another try with the whole
25867    # argument.
25868    path="$complete"
25869    arguments="EOL"
25870    new_path=`$CYGPATH -u "$path"`
25871    new_path=`$WHICH "$new_path" 2> /dev/null`
25872    # bat and cmd files are not always considered executable in cygwin causing which
25873    # to not find them
25874    if test "x$new_path" = x \
25875             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25876             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25877      new_path=`$CYGPATH -u "$path"`
25878    fi
25879    if test "x$new_path" = x; then
25880      # It's still not found. Now this is an unrecoverable error.
25881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25882$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25883      has_space=`$ECHO "$complete" | $GREP " "`
25884      if test "x$has_space" != x; then
25885        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25886$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25887      fi
25888      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25889    fi
25890  fi
25891
25892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25895  # "foo.exe" is OK but "foo" is an error.
25896  #
25897  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25898  # It is also a way to make sure we got the proper file name for the real test later on.
25899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25900  if test "x$test_shortpath" = x; then
25901    # Short path failed, file does not exist as specified.
25902    # Try adding .exe or .cmd
25903    if test -f "${new_path}.exe"; then
25904       input_to_shortpath="${new_path}.exe"
25905    elif test -f "${new_path}.cmd"; then
25906       input_to_shortpath="${new_path}.cmd"
25907    else
25908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25909$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25910      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25911$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25912      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25913    fi
25914  else
25915    input_to_shortpath="$new_path"
25916  fi
25917
25918  # Call helper function which possibly converts this using DOS-style short mode.
25919  # If so, the updated path is stored in $new_path.
25920  new_path="$input_to_shortpath"
25921
25922  input_path="$input_to_shortpath"
25923  # Check if we need to convert this using DOS-style short mode. If the path
25924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25925  # take no chances and rewrite it.
25926  # Note: m4 eats our [], so we need to use [ and ] instead.
25927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25928  if test "x$has_forbidden_chars" != x; then
25929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25933      # Going to short mode and back again did indeed matter. Since short mode is
25934      # case insensitive, let's make it lowercase to improve readability.
25935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25936      # Now convert it back to Unix-stile (cygpath)
25937      input_path=`$CYGPATH -u "$shortmode_path"`
25938      new_path="$input_path"
25939    fi
25940  fi
25941
25942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25943  if test "x$test_cygdrive_prefix" = x; then
25944    # As a simple fix, exclude /usr/bin since it's not a real path.
25945    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25947      # a path prefixed by /cygdrive for fixpath to work.
25948      new_path="$CYGWIN_ROOT_PATH$input_path"
25949    fi
25950  fi
25951
25952  # remove trailing .exe if any
25953  new_path="${new_path/%.exe/}"
25954
25955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25956
25957  # First separate the path from the arguments. This will split at the first
25958  # space.
25959  complete="$GNM"
25960  path="${complete%% *}"
25961  tmp="$complete EOL"
25962  arguments="${tmp#* }"
25963
25964  # Input might be given as Windows format, start by converting to
25965  # unix format.
25966  new_path="$path"
25967
25968  windows_path="$new_path"
25969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25970    unix_path=`$CYGPATH -u "$windows_path"`
25971    new_path="$unix_path"
25972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25974    new_path="$unix_path"
25975  fi
25976
25977
25978  # Now try to locate executable using which
25979  new_path=`$WHICH "$new_path" 2> /dev/null`
25980
25981  if test "x$new_path" = x; then
25982    # Oops. Which didn't find the executable.
25983    # The splitting of arguments from the executable at a space might have been incorrect,
25984    # since paths with space are more likely in Windows. Give it another try with the whole
25985    # argument.
25986    path="$complete"
25987    arguments="EOL"
25988    new_path="$path"
25989
25990  windows_path="$new_path"
25991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25992    unix_path=`$CYGPATH -u "$windows_path"`
25993    new_path="$unix_path"
25994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25996    new_path="$unix_path"
25997  fi
25998
25999
26000    new_path=`$WHICH "$new_path" 2> /dev/null`
26001
26002    if test "x$new_path" = x; then
26003      # It's still not found. Now this is an unrecoverable error.
26004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26005$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26006      has_space=`$ECHO "$complete" | $GREP " "`
26007      if test "x$has_space" != x; then
26008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26010      fi
26011      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26012    fi
26013  fi
26014
26015  # Now new_path has a complete unix path to the binary
26016  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26017    # Keep paths in /bin as-is, but remove trailing .exe if any
26018    new_path="${new_path/%.exe/}"
26019    # Do not save /bin paths to all_fixpath_prefixes!
26020  else
26021    # Not in mixed or Windows style, start by that.
26022    new_path=`cmd //c echo $new_path`
26023
26024  input_path="$new_path"
26025  # Check if we need to convert this using DOS-style short mode. If the path
26026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26027  # take no chances and rewrite it.
26028  # Note: m4 eats our [], so we need to use [ and ] instead.
26029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26030  if test "x$has_forbidden_chars" != x; then
26031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26032    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26033  fi
26034
26035    # Output is in $new_path
26036
26037  windows_path="$new_path"
26038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26039    unix_path=`$CYGPATH -u "$windows_path"`
26040    new_path="$unix_path"
26041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26043    new_path="$unix_path"
26044  fi
26045
26046    # remove trailing .exe if any
26047    new_path="${new_path/%.exe/}"
26048
26049    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26050    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26051  fi
26052
26053  else
26054    # We're on a posix platform. Hooray! :)
26055    # First separate the path from the arguments. This will split at the first
26056    # space.
26057    complete="$GNM"
26058    path="${complete%% *}"
26059    tmp="$complete EOL"
26060    arguments="${tmp#* }"
26061
26062    # Cannot rely on the command "which" here since it doesn't always work.
26063    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26064    if test -z "$is_absolute_path"; then
26065      # Path to executable is not absolute. Find it.
26066      IFS_save="$IFS"
26067      IFS=:
26068      for p in $PATH; do
26069        if test -f "$p/$path" && test -x "$p/$path"; then
26070          new_path="$p/$path"
26071          break
26072        fi
26073      done
26074      IFS="$IFS_save"
26075    else
26076      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26077$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26078      new_path="$path"
26079    fi
26080
26081    if test "x$new_path" = x; then
26082        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26083$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26084        has_space=`$ECHO "$complete" | $GREP " "`
26085        if test "x$has_space" != x; then
26086          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26087$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26088        fi
26089        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26090      fi
26091  fi
26092
26093      # Now join together the path and the arguments once again
26094      if test "x$arguments" != xEOL; then
26095        new_complete="$new_path ${arguments% *}"
26096      else
26097        new_complete="$new_path"
26098      fi
26099
26100  if test "x$complete" != "x$new_complete"; then
26101      GNM="$new_complete"
26102      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26103$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26104    fi
26105
26106    # Extract the first word of "strip", so it can be a program name with args.
26107set dummy strip; ac_word=$2
26108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26109$as_echo_n "checking for $ac_word... " >&6; }
26110if test "${ac_cv_path_STRIP+set}" = set; then :
26111  $as_echo_n "(cached) " >&6
26112else
26113  case $STRIP in
26114  [\\/]* | ?:[\\/]*)
26115  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26116  ;;
26117  *)
26118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26119for as_dir in $PATH
26120do
26121  IFS=$as_save_IFS
26122  test -z "$as_dir" && as_dir=.
26123    for ac_exec_ext in '' $ac_executable_extensions; do
26124  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26125    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26127    break 2
26128  fi
26129done
26130  done
26131IFS=$as_save_IFS
26132
26133  ;;
26134esac
26135fi
26136STRIP=$ac_cv_path_STRIP
26137if test -n "$STRIP"; then
26138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26139$as_echo "$STRIP" >&6; }
26140else
26141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26142$as_echo "no" >&6; }
26143fi
26144
26145
26146
26147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26148
26149  # First separate the path from the arguments. This will split at the first
26150  # space.
26151  complete="$STRIP"
26152  path="${complete%% *}"
26153  tmp="$complete EOL"
26154  arguments="${tmp#* }"
26155
26156  # Input might be given as Windows format, start by converting to
26157  # unix format.
26158  new_path=`$CYGPATH -u "$path"`
26159
26160  # Now try to locate executable using which
26161  new_path=`$WHICH "$new_path" 2> /dev/null`
26162  # bat and cmd files are not always considered executable in cygwin causing which
26163  # to not find them
26164  if test "x$new_path" = x \
26165           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26166           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26167    new_path=`$CYGPATH -u "$path"`
26168  fi
26169  if test "x$new_path" = x; then
26170    # Oops. Which didn't find the executable.
26171    # The splitting of arguments from the executable at a space might have been incorrect,
26172    # since paths with space are more likely in Windows. Give it another try with the whole
26173    # argument.
26174    path="$complete"
26175    arguments="EOL"
26176    new_path=`$CYGPATH -u "$path"`
26177    new_path=`$WHICH "$new_path" 2> /dev/null`
26178    # bat and cmd files are not always considered executable in cygwin causing which
26179    # to not find them
26180    if test "x$new_path" = x \
26181             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26182             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26183      new_path=`$CYGPATH -u "$path"`
26184    fi
26185    if test "x$new_path" = x; then
26186      # It's still not found. Now this is an unrecoverable error.
26187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26188$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26189      has_space=`$ECHO "$complete" | $GREP " "`
26190      if test "x$has_space" != x; then
26191        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26192$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26193      fi
26194      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26195    fi
26196  fi
26197
26198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26201  # "foo.exe" is OK but "foo" is an error.
26202  #
26203  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26204  # It is also a way to make sure we got the proper file name for the real test later on.
26205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26206  if test "x$test_shortpath" = x; then
26207    # Short path failed, file does not exist as specified.
26208    # Try adding .exe or .cmd
26209    if test -f "${new_path}.exe"; then
26210       input_to_shortpath="${new_path}.exe"
26211    elif test -f "${new_path}.cmd"; then
26212       input_to_shortpath="${new_path}.cmd"
26213    else
26214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26215$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26216      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26217$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26218      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26219    fi
26220  else
26221    input_to_shortpath="$new_path"
26222  fi
26223
26224  # Call helper function which possibly converts this using DOS-style short mode.
26225  # If so, the updated path is stored in $new_path.
26226  new_path="$input_to_shortpath"
26227
26228  input_path="$input_to_shortpath"
26229  # Check if we need to convert this using DOS-style short mode. If the path
26230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26231  # take no chances and rewrite it.
26232  # Note: m4 eats our [], so we need to use [ and ] instead.
26233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26234  if test "x$has_forbidden_chars" != x; then
26235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26239      # Going to short mode and back again did indeed matter. Since short mode is
26240      # case insensitive, let's make it lowercase to improve readability.
26241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26242      # Now convert it back to Unix-stile (cygpath)
26243      input_path=`$CYGPATH -u "$shortmode_path"`
26244      new_path="$input_path"
26245    fi
26246  fi
26247
26248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26249  if test "x$test_cygdrive_prefix" = x; then
26250    # As a simple fix, exclude /usr/bin since it's not a real path.
26251    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26253      # a path prefixed by /cygdrive for fixpath to work.
26254      new_path="$CYGWIN_ROOT_PATH$input_path"
26255    fi
26256  fi
26257
26258  # remove trailing .exe if any
26259  new_path="${new_path/%.exe/}"
26260
26261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26262
26263  # First separate the path from the arguments. This will split at the first
26264  # space.
26265  complete="$STRIP"
26266  path="${complete%% *}"
26267  tmp="$complete EOL"
26268  arguments="${tmp#* }"
26269
26270  # Input might be given as Windows format, start by converting to
26271  # unix format.
26272  new_path="$path"
26273
26274  windows_path="$new_path"
26275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26276    unix_path=`$CYGPATH -u "$windows_path"`
26277    new_path="$unix_path"
26278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26280    new_path="$unix_path"
26281  fi
26282
26283
26284  # Now try to locate executable using which
26285  new_path=`$WHICH "$new_path" 2> /dev/null`
26286
26287  if test "x$new_path" = x; then
26288    # Oops. Which didn't find the executable.
26289    # The splitting of arguments from the executable at a space might have been incorrect,
26290    # since paths with space are more likely in Windows. Give it another try with the whole
26291    # argument.
26292    path="$complete"
26293    arguments="EOL"
26294    new_path="$path"
26295
26296  windows_path="$new_path"
26297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26298    unix_path=`$CYGPATH -u "$windows_path"`
26299    new_path="$unix_path"
26300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26302    new_path="$unix_path"
26303  fi
26304
26305
26306    new_path=`$WHICH "$new_path" 2> /dev/null`
26307
26308    if test "x$new_path" = x; then
26309      # It's still not found. Now this is an unrecoverable error.
26310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26311$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26312      has_space=`$ECHO "$complete" | $GREP " "`
26313      if test "x$has_space" != x; then
26314        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26315$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26316      fi
26317      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26318    fi
26319  fi
26320
26321  # Now new_path has a complete unix path to the binary
26322  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26323    # Keep paths in /bin as-is, but remove trailing .exe if any
26324    new_path="${new_path/%.exe/}"
26325    # Do not save /bin paths to all_fixpath_prefixes!
26326  else
26327    # Not in mixed or Windows style, start by that.
26328    new_path=`cmd //c echo $new_path`
26329
26330  input_path="$new_path"
26331  # Check if we need to convert this using DOS-style short mode. If the path
26332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26333  # take no chances and rewrite it.
26334  # Note: m4 eats our [], so we need to use [ and ] instead.
26335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26336  if test "x$has_forbidden_chars" != x; then
26337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26339  fi
26340
26341    # Output is in $new_path
26342
26343  windows_path="$new_path"
26344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26345    unix_path=`$CYGPATH -u "$windows_path"`
26346    new_path="$unix_path"
26347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26349    new_path="$unix_path"
26350  fi
26351
26352    # remove trailing .exe if any
26353    new_path="${new_path/%.exe/}"
26354
26355    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26356    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26357  fi
26358
26359  else
26360    # We're on a posix platform. Hooray! :)
26361    # First separate the path from the arguments. This will split at the first
26362    # space.
26363    complete="$STRIP"
26364    path="${complete%% *}"
26365    tmp="$complete EOL"
26366    arguments="${tmp#* }"
26367
26368    # Cannot rely on the command "which" here since it doesn't always work.
26369    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26370    if test -z "$is_absolute_path"; then
26371      # Path to executable is not absolute. Find it.
26372      IFS_save="$IFS"
26373      IFS=:
26374      for p in $PATH; do
26375        if test -f "$p/$path" && test -x "$p/$path"; then
26376          new_path="$p/$path"
26377          break
26378        fi
26379      done
26380      IFS="$IFS_save"
26381    else
26382      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26383$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26384      new_path="$path"
26385    fi
26386
26387    if test "x$new_path" = x; then
26388        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26389$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26390        has_space=`$ECHO "$complete" | $GREP " "`
26391        if test "x$has_space" != x; then
26392          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26393$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26394        fi
26395        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26396      fi
26397  fi
26398
26399      # Now join together the path and the arguments once again
26400      if test "x$arguments" != xEOL; then
26401        new_complete="$new_path ${arguments% *}"
26402      else
26403        new_complete="$new_path"
26404      fi
26405
26406  if test "x$complete" != "x$new_complete"; then
26407      STRIP="$new_complete"
26408      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26409$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26410    fi
26411
26412    # Extract the first word of "mcs", so it can be a program name with args.
26413set dummy mcs; ac_word=$2
26414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26415$as_echo_n "checking for $ac_word... " >&6; }
26416if test "${ac_cv_path_MCS+set}" = set; then :
26417  $as_echo_n "(cached) " >&6
26418else
26419  case $MCS in
26420  [\\/]* | ?:[\\/]*)
26421  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26422  ;;
26423  *)
26424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26425for as_dir in $PATH
26426do
26427  IFS=$as_save_IFS
26428  test -z "$as_dir" && as_dir=.
26429    for ac_exec_ext in '' $ac_executable_extensions; do
26430  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26431    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26433    break 2
26434  fi
26435done
26436  done
26437IFS=$as_save_IFS
26438
26439  ;;
26440esac
26441fi
26442MCS=$ac_cv_path_MCS
26443if test -n "$MCS"; then
26444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26445$as_echo "$MCS" >&6; }
26446else
26447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26448$as_echo "no" >&6; }
26449fi
26450
26451
26452
26453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26454
26455  # First separate the path from the arguments. This will split at the first
26456  # space.
26457  complete="$MCS"
26458  path="${complete%% *}"
26459  tmp="$complete EOL"
26460  arguments="${tmp#* }"
26461
26462  # Input might be given as Windows format, start by converting to
26463  # unix format.
26464  new_path=`$CYGPATH -u "$path"`
26465
26466  # Now try to locate executable using which
26467  new_path=`$WHICH "$new_path" 2> /dev/null`
26468  # bat and cmd files are not always considered executable in cygwin causing which
26469  # to not find them
26470  if test "x$new_path" = x \
26471           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26472           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26473    new_path=`$CYGPATH -u "$path"`
26474  fi
26475  if test "x$new_path" = x; then
26476    # Oops. Which didn't find the executable.
26477    # The splitting of arguments from the executable at a space might have been incorrect,
26478    # since paths with space are more likely in Windows. Give it another try with the whole
26479    # argument.
26480    path="$complete"
26481    arguments="EOL"
26482    new_path=`$CYGPATH -u "$path"`
26483    new_path=`$WHICH "$new_path" 2> /dev/null`
26484    # bat and cmd files are not always considered executable in cygwin causing which
26485    # to not find them
26486    if test "x$new_path" = x \
26487             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26488             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26489      new_path=`$CYGPATH -u "$path"`
26490    fi
26491    if test "x$new_path" = x; then
26492      # It's still not found. Now this is an unrecoverable error.
26493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26494$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26495      has_space=`$ECHO "$complete" | $GREP " "`
26496      if test "x$has_space" != x; then
26497        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26498$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26499      fi
26500      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26501    fi
26502  fi
26503
26504  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26505  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26506  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26507  # "foo.exe" is OK but "foo" is an error.
26508  #
26509  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26510  # It is also a way to make sure we got the proper file name for the real test later on.
26511  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26512  if test "x$test_shortpath" = x; then
26513    # Short path failed, file does not exist as specified.
26514    # Try adding .exe or .cmd
26515    if test -f "${new_path}.exe"; then
26516       input_to_shortpath="${new_path}.exe"
26517    elif test -f "${new_path}.cmd"; then
26518       input_to_shortpath="${new_path}.cmd"
26519    else
26520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26521$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26522      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26523$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26524      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26525    fi
26526  else
26527    input_to_shortpath="$new_path"
26528  fi
26529
26530  # Call helper function which possibly converts this using DOS-style short mode.
26531  # If so, the updated path is stored in $new_path.
26532  new_path="$input_to_shortpath"
26533
26534  input_path="$input_to_shortpath"
26535  # Check if we need to convert this using DOS-style short mode. If the path
26536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26537  # take no chances and rewrite it.
26538  # Note: m4 eats our [], so we need to use [ and ] instead.
26539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26540  if test "x$has_forbidden_chars" != x; then
26541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26545      # Going to short mode and back again did indeed matter. Since short mode is
26546      # case insensitive, let's make it lowercase to improve readability.
26547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26548      # Now convert it back to Unix-stile (cygpath)
26549      input_path=`$CYGPATH -u "$shortmode_path"`
26550      new_path="$input_path"
26551    fi
26552  fi
26553
26554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26555  if test "x$test_cygdrive_prefix" = x; then
26556    # As a simple fix, exclude /usr/bin since it's not a real path.
26557    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26559      # a path prefixed by /cygdrive for fixpath to work.
26560      new_path="$CYGWIN_ROOT_PATH$input_path"
26561    fi
26562  fi
26563
26564  # remove trailing .exe if any
26565  new_path="${new_path/%.exe/}"
26566
26567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26568
26569  # First separate the path from the arguments. This will split at the first
26570  # space.
26571  complete="$MCS"
26572  path="${complete%% *}"
26573  tmp="$complete EOL"
26574  arguments="${tmp#* }"
26575
26576  # Input might be given as Windows format, start by converting to
26577  # unix format.
26578  new_path="$path"
26579
26580  windows_path="$new_path"
26581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26582    unix_path=`$CYGPATH -u "$windows_path"`
26583    new_path="$unix_path"
26584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26586    new_path="$unix_path"
26587  fi
26588
26589
26590  # Now try to locate executable using which
26591  new_path=`$WHICH "$new_path" 2> /dev/null`
26592
26593  if test "x$new_path" = x; then
26594    # Oops. Which didn't find the executable.
26595    # The splitting of arguments from the executable at a space might have been incorrect,
26596    # since paths with space are more likely in Windows. Give it another try with the whole
26597    # argument.
26598    path="$complete"
26599    arguments="EOL"
26600    new_path="$path"
26601
26602  windows_path="$new_path"
26603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26604    unix_path=`$CYGPATH -u "$windows_path"`
26605    new_path="$unix_path"
26606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26608    new_path="$unix_path"
26609  fi
26610
26611
26612    new_path=`$WHICH "$new_path" 2> /dev/null`
26613
26614    if test "x$new_path" = x; then
26615      # It's still not found. Now this is an unrecoverable error.
26616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26617$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26618      has_space=`$ECHO "$complete" | $GREP " "`
26619      if test "x$has_space" != x; then
26620        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26621$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26622      fi
26623      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26624    fi
26625  fi
26626
26627  # Now new_path has a complete unix path to the binary
26628  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26629    # Keep paths in /bin as-is, but remove trailing .exe if any
26630    new_path="${new_path/%.exe/}"
26631    # Do not save /bin paths to all_fixpath_prefixes!
26632  else
26633    # Not in mixed or Windows style, start by that.
26634    new_path=`cmd //c echo $new_path`
26635
26636  input_path="$new_path"
26637  # Check if we need to convert this using DOS-style short mode. If the path
26638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26639  # take no chances and rewrite it.
26640  # Note: m4 eats our [], so we need to use [ and ] instead.
26641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26642  if test "x$has_forbidden_chars" != x; then
26643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26644    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26645  fi
26646
26647    # Output is in $new_path
26648
26649  windows_path="$new_path"
26650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26651    unix_path=`$CYGPATH -u "$windows_path"`
26652    new_path="$unix_path"
26653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26655    new_path="$unix_path"
26656  fi
26657
26658    # remove trailing .exe if any
26659    new_path="${new_path/%.exe/}"
26660
26661    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26662    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26663  fi
26664
26665  else
26666    # We're on a posix platform. Hooray! :)
26667    # First separate the path from the arguments. This will split at the first
26668    # space.
26669    complete="$MCS"
26670    path="${complete%% *}"
26671    tmp="$complete EOL"
26672    arguments="${tmp#* }"
26673
26674    # Cannot rely on the command "which" here since it doesn't always work.
26675    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26676    if test -z "$is_absolute_path"; then
26677      # Path to executable is not absolute. Find it.
26678      IFS_save="$IFS"
26679      IFS=:
26680      for p in $PATH; do
26681        if test -f "$p/$path" && test -x "$p/$path"; then
26682          new_path="$p/$path"
26683          break
26684        fi
26685      done
26686      IFS="$IFS_save"
26687    else
26688      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26689$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26690      new_path="$path"
26691    fi
26692
26693    if test "x$new_path" = x; then
26694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26695$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26696        has_space=`$ECHO "$complete" | $GREP " "`
26697        if test "x$has_space" != x; then
26698          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26699$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26700        fi
26701        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26702      fi
26703  fi
26704
26705      # Now join together the path and the arguments once again
26706      if test "x$arguments" != xEOL; then
26707        new_complete="$new_path ${arguments% *}"
26708      else
26709        new_complete="$new_path"
26710      fi
26711
26712  if test "x$complete" != "x$new_complete"; then
26713      MCS="$new_complete"
26714      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26715$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26716    fi
26717
26718elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26719    if test -n "$ac_tool_prefix"; then
26720  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26721set dummy ${ac_tool_prefix}nm; ac_word=$2
26722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26723$as_echo_n "checking for $ac_word... " >&6; }
26724if test "${ac_cv_prog_NM+set}" = set; then :
26725  $as_echo_n "(cached) " >&6
26726else
26727  if test -n "$NM"; then
26728  ac_cv_prog_NM="$NM" # Let the user override the test.
26729else
26730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26731for as_dir in $PATH
26732do
26733  IFS=$as_save_IFS
26734  test -z "$as_dir" && as_dir=.
26735    for ac_exec_ext in '' $ac_executable_extensions; do
26736  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26737    ac_cv_prog_NM="${ac_tool_prefix}nm"
26738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26739    break 2
26740  fi
26741done
26742  done
26743IFS=$as_save_IFS
26744
26745fi
26746fi
26747NM=$ac_cv_prog_NM
26748if test -n "$NM"; then
26749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26750$as_echo "$NM" >&6; }
26751else
26752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26753$as_echo "no" >&6; }
26754fi
26755
26756
26757fi
26758if test -z "$ac_cv_prog_NM"; then
26759  ac_ct_NM=$NM
26760  # Extract the first word of "nm", so it can be a program name with args.
26761set dummy nm; ac_word=$2
26762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26763$as_echo_n "checking for $ac_word... " >&6; }
26764if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26765  $as_echo_n "(cached) " >&6
26766else
26767  if test -n "$ac_ct_NM"; then
26768  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26769else
26770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26771for as_dir in $PATH
26772do
26773  IFS=$as_save_IFS
26774  test -z "$as_dir" && as_dir=.
26775    for ac_exec_ext in '' $ac_executable_extensions; do
26776  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26777    ac_cv_prog_ac_ct_NM="nm"
26778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26779    break 2
26780  fi
26781done
26782  done
26783IFS=$as_save_IFS
26784
26785fi
26786fi
26787ac_ct_NM=$ac_cv_prog_ac_ct_NM
26788if test -n "$ac_ct_NM"; then
26789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26790$as_echo "$ac_ct_NM" >&6; }
26791else
26792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26793$as_echo "no" >&6; }
26794fi
26795
26796  if test "x$ac_ct_NM" = x; then
26797    NM=""
26798  else
26799    case $cross_compiling:$ac_tool_warned in
26800yes:)
26801{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26802$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26803ac_tool_warned=yes ;;
26804esac
26805    NM=$ac_ct_NM
26806  fi
26807else
26808  NM="$ac_cv_prog_NM"
26809fi
26810
26811
26812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26813
26814  # First separate the path from the arguments. This will split at the first
26815  # space.
26816  complete="$NM"
26817  path="${complete%% *}"
26818  tmp="$complete EOL"
26819  arguments="${tmp#* }"
26820
26821  # Input might be given as Windows format, start by converting to
26822  # unix format.
26823  new_path=`$CYGPATH -u "$path"`
26824
26825  # Now try to locate executable using which
26826  new_path=`$WHICH "$new_path" 2> /dev/null`
26827  # bat and cmd files are not always considered executable in cygwin causing which
26828  # to not find them
26829  if test "x$new_path" = x \
26830           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26831           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26832    new_path=`$CYGPATH -u "$path"`
26833  fi
26834  if test "x$new_path" = x; then
26835    # Oops. Which didn't find the executable.
26836    # The splitting of arguments from the executable at a space might have been incorrect,
26837    # since paths with space are more likely in Windows. Give it another try with the whole
26838    # argument.
26839    path="$complete"
26840    arguments="EOL"
26841    new_path=`$CYGPATH -u "$path"`
26842    new_path=`$WHICH "$new_path" 2> /dev/null`
26843    # bat and cmd files are not always considered executable in cygwin causing which
26844    # to not find them
26845    if test "x$new_path" = x \
26846             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26847             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26848      new_path=`$CYGPATH -u "$path"`
26849    fi
26850    if test "x$new_path" = x; then
26851      # It's still not found. Now this is an unrecoverable error.
26852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26853$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26854      has_space=`$ECHO "$complete" | $GREP " "`
26855      if test "x$has_space" != x; then
26856        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26857$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26858      fi
26859      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26860    fi
26861  fi
26862
26863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26866  # "foo.exe" is OK but "foo" is an error.
26867  #
26868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26869  # It is also a way to make sure we got the proper file name for the real test later on.
26870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26871  if test "x$test_shortpath" = x; then
26872    # Short path failed, file does not exist as specified.
26873    # Try adding .exe or .cmd
26874    if test -f "${new_path}.exe"; then
26875       input_to_shortpath="${new_path}.exe"
26876    elif test -f "${new_path}.cmd"; then
26877       input_to_shortpath="${new_path}.cmd"
26878    else
26879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26880$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26881      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26882$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26883      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26884    fi
26885  else
26886    input_to_shortpath="$new_path"
26887  fi
26888
26889  # Call helper function which possibly converts this using DOS-style short mode.
26890  # If so, the updated path is stored in $new_path.
26891  new_path="$input_to_shortpath"
26892
26893  input_path="$input_to_shortpath"
26894  # Check if we need to convert this using DOS-style short mode. If the path
26895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26896  # take no chances and rewrite it.
26897  # Note: m4 eats our [], so we need to use [ and ] instead.
26898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26899  if test "x$has_forbidden_chars" != x; then
26900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26904      # Going to short mode and back again did indeed matter. Since short mode is
26905      # case insensitive, let's make it lowercase to improve readability.
26906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26907      # Now convert it back to Unix-stile (cygpath)
26908      input_path=`$CYGPATH -u "$shortmode_path"`
26909      new_path="$input_path"
26910    fi
26911  fi
26912
26913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26914  if test "x$test_cygdrive_prefix" = x; then
26915    # As a simple fix, exclude /usr/bin since it's not a real path.
26916    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26918      # a path prefixed by /cygdrive for fixpath to work.
26919      new_path="$CYGWIN_ROOT_PATH$input_path"
26920    fi
26921  fi
26922
26923  # remove trailing .exe if any
26924  new_path="${new_path/%.exe/}"
26925
26926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26927
26928  # First separate the path from the arguments. This will split at the first
26929  # space.
26930  complete="$NM"
26931  path="${complete%% *}"
26932  tmp="$complete EOL"
26933  arguments="${tmp#* }"
26934
26935  # Input might be given as Windows format, start by converting to
26936  # unix format.
26937  new_path="$path"
26938
26939  windows_path="$new_path"
26940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26941    unix_path=`$CYGPATH -u "$windows_path"`
26942    new_path="$unix_path"
26943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26945    new_path="$unix_path"
26946  fi
26947
26948
26949  # Now try to locate executable using which
26950  new_path=`$WHICH "$new_path" 2> /dev/null`
26951
26952  if test "x$new_path" = x; then
26953    # Oops. Which didn't find the executable.
26954    # The splitting of arguments from the executable at a space might have been incorrect,
26955    # since paths with space are more likely in Windows. Give it another try with the whole
26956    # argument.
26957    path="$complete"
26958    arguments="EOL"
26959    new_path="$path"
26960
26961  windows_path="$new_path"
26962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26963    unix_path=`$CYGPATH -u "$windows_path"`
26964    new_path="$unix_path"
26965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26967    new_path="$unix_path"
26968  fi
26969
26970
26971    new_path=`$WHICH "$new_path" 2> /dev/null`
26972
26973    if test "x$new_path" = x; then
26974      # It's still not found. Now this is an unrecoverable error.
26975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26976$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26977      has_space=`$ECHO "$complete" | $GREP " "`
26978      if test "x$has_space" != x; then
26979        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26980$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26981      fi
26982      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26983    fi
26984  fi
26985
26986  # Now new_path has a complete unix path to the binary
26987  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26988    # Keep paths in /bin as-is, but remove trailing .exe if any
26989    new_path="${new_path/%.exe/}"
26990    # Do not save /bin paths to all_fixpath_prefixes!
26991  else
26992    # Not in mixed or Windows style, start by that.
26993    new_path=`cmd //c echo $new_path`
26994
26995  input_path="$new_path"
26996  # Check if we need to convert this using DOS-style short mode. If the path
26997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26998  # take no chances and rewrite it.
26999  # Note: m4 eats our [], so we need to use [ and ] instead.
27000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27001  if test "x$has_forbidden_chars" != x; then
27002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27004  fi
27005
27006    # Output is in $new_path
27007
27008  windows_path="$new_path"
27009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27010    unix_path=`$CYGPATH -u "$windows_path"`
27011    new_path="$unix_path"
27012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27014    new_path="$unix_path"
27015  fi
27016
27017    # remove trailing .exe if any
27018    new_path="${new_path/%.exe/}"
27019
27020    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27021    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27022  fi
27023
27024  else
27025    # We're on a posix platform. Hooray! :)
27026    # First separate the path from the arguments. This will split at the first
27027    # space.
27028    complete="$NM"
27029    path="${complete%% *}"
27030    tmp="$complete EOL"
27031    arguments="${tmp#* }"
27032
27033    # Cannot rely on the command "which" here since it doesn't always work.
27034    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27035    if test -z "$is_absolute_path"; then
27036      # Path to executable is not absolute. Find it.
27037      IFS_save="$IFS"
27038      IFS=:
27039      for p in $PATH; do
27040        if test -f "$p/$path" && test -x "$p/$path"; then
27041          new_path="$p/$path"
27042          break
27043        fi
27044      done
27045      IFS="$IFS_save"
27046    else
27047      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27048$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27049      new_path="$path"
27050    fi
27051
27052    if test "x$new_path" = x; then
27053        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27054$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27055        has_space=`$ECHO "$complete" | $GREP " "`
27056        if test "x$has_space" != x; then
27057          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27058$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27059        fi
27060        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27061      fi
27062  fi
27063
27064      # Now join together the path and the arguments once again
27065      if test "x$arguments" != xEOL; then
27066        new_complete="$new_path ${arguments% *}"
27067      else
27068        new_complete="$new_path"
27069      fi
27070
27071  if test "x$complete" != "x$new_complete"; then
27072      NM="$new_complete"
27073      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27074$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27075    fi
27076
27077    GNM="$NM"
27078
27079    if test -n "$ac_tool_prefix"; then
27080  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27081set dummy ${ac_tool_prefix}strip; ac_word=$2
27082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27083$as_echo_n "checking for $ac_word... " >&6; }
27084if test "${ac_cv_prog_STRIP+set}" = set; then :
27085  $as_echo_n "(cached) " >&6
27086else
27087  if test -n "$STRIP"; then
27088  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27089else
27090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27091for as_dir in $PATH
27092do
27093  IFS=$as_save_IFS
27094  test -z "$as_dir" && as_dir=.
27095    for ac_exec_ext in '' $ac_executable_extensions; do
27096  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27097    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27099    break 2
27100  fi
27101done
27102  done
27103IFS=$as_save_IFS
27104
27105fi
27106fi
27107STRIP=$ac_cv_prog_STRIP
27108if test -n "$STRIP"; then
27109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27110$as_echo "$STRIP" >&6; }
27111else
27112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27113$as_echo "no" >&6; }
27114fi
27115
27116
27117fi
27118if test -z "$ac_cv_prog_STRIP"; then
27119  ac_ct_STRIP=$STRIP
27120  # Extract the first word of "strip", so it can be a program name with args.
27121set dummy strip; ac_word=$2
27122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27123$as_echo_n "checking for $ac_word... " >&6; }
27124if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
27125  $as_echo_n "(cached) " >&6
27126else
27127  if test -n "$ac_ct_STRIP"; then
27128  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27129else
27130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27131for as_dir in $PATH
27132do
27133  IFS=$as_save_IFS
27134  test -z "$as_dir" && as_dir=.
27135    for ac_exec_ext in '' $ac_executable_extensions; do
27136  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27137    ac_cv_prog_ac_ct_STRIP="strip"
27138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27139    break 2
27140  fi
27141done
27142  done
27143IFS=$as_save_IFS
27144
27145fi
27146fi
27147ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27148if test -n "$ac_ct_STRIP"; then
27149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27150$as_echo "$ac_ct_STRIP" >&6; }
27151else
27152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27153$as_echo "no" >&6; }
27154fi
27155
27156  if test "x$ac_ct_STRIP" = x; then
27157    STRIP=""
27158  else
27159    case $cross_compiling:$ac_tool_warned in
27160yes:)
27161{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27162$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27163ac_tool_warned=yes ;;
27164esac
27165    STRIP=$ac_ct_STRIP
27166  fi
27167else
27168  STRIP="$ac_cv_prog_STRIP"
27169fi
27170
27171
27172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27173
27174  # First separate the path from the arguments. This will split at the first
27175  # space.
27176  complete="$STRIP"
27177  path="${complete%% *}"
27178  tmp="$complete EOL"
27179  arguments="${tmp#* }"
27180
27181  # Input might be given as Windows format, start by converting to
27182  # unix format.
27183  new_path=`$CYGPATH -u "$path"`
27184
27185  # Now try to locate executable using which
27186  new_path=`$WHICH "$new_path" 2> /dev/null`
27187  # bat and cmd files are not always considered executable in cygwin causing which
27188  # to not find them
27189  if test "x$new_path" = x \
27190           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27191           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27192    new_path=`$CYGPATH -u "$path"`
27193  fi
27194  if test "x$new_path" = x; then
27195    # Oops. Which didn't find the executable.
27196    # The splitting of arguments from the executable at a space might have been incorrect,
27197    # since paths with space are more likely in Windows. Give it another try with the whole
27198    # argument.
27199    path="$complete"
27200    arguments="EOL"
27201    new_path=`$CYGPATH -u "$path"`
27202    new_path=`$WHICH "$new_path" 2> /dev/null`
27203    # bat and cmd files are not always considered executable in cygwin causing which
27204    # to not find them
27205    if test "x$new_path" = x \
27206             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27207             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27208      new_path=`$CYGPATH -u "$path"`
27209    fi
27210    if test "x$new_path" = x; then
27211      # It's still not found. Now this is an unrecoverable error.
27212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27213$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27214      has_space=`$ECHO "$complete" | $GREP " "`
27215      if test "x$has_space" != x; then
27216        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27217$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27218      fi
27219      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27220    fi
27221  fi
27222
27223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27226  # "foo.exe" is OK but "foo" is an error.
27227  #
27228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27229  # It is also a way to make sure we got the proper file name for the real test later on.
27230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27231  if test "x$test_shortpath" = x; then
27232    # Short path failed, file does not exist as specified.
27233    # Try adding .exe or .cmd
27234    if test -f "${new_path}.exe"; then
27235       input_to_shortpath="${new_path}.exe"
27236    elif test -f "${new_path}.cmd"; then
27237       input_to_shortpath="${new_path}.cmd"
27238    else
27239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27240$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27241      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27242$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27243      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27244    fi
27245  else
27246    input_to_shortpath="$new_path"
27247  fi
27248
27249  # Call helper function which possibly converts this using DOS-style short mode.
27250  # If so, the updated path is stored in $new_path.
27251  new_path="$input_to_shortpath"
27252
27253  input_path="$input_to_shortpath"
27254  # Check if we need to convert this using DOS-style short mode. If the path
27255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27256  # take no chances and rewrite it.
27257  # Note: m4 eats our [], so we need to use [ and ] instead.
27258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27259  if test "x$has_forbidden_chars" != x; then
27260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27264      # Going to short mode and back again did indeed matter. Since short mode is
27265      # case insensitive, let's make it lowercase to improve readability.
27266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27267      # Now convert it back to Unix-stile (cygpath)
27268      input_path=`$CYGPATH -u "$shortmode_path"`
27269      new_path="$input_path"
27270    fi
27271  fi
27272
27273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27274  if test "x$test_cygdrive_prefix" = x; then
27275    # As a simple fix, exclude /usr/bin since it's not a real path.
27276    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27278      # a path prefixed by /cygdrive for fixpath to work.
27279      new_path="$CYGWIN_ROOT_PATH$input_path"
27280    fi
27281  fi
27282
27283  # remove trailing .exe if any
27284  new_path="${new_path/%.exe/}"
27285
27286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27287
27288  # First separate the path from the arguments. This will split at the first
27289  # space.
27290  complete="$STRIP"
27291  path="${complete%% *}"
27292  tmp="$complete EOL"
27293  arguments="${tmp#* }"
27294
27295  # Input might be given as Windows format, start by converting to
27296  # unix format.
27297  new_path="$path"
27298
27299  windows_path="$new_path"
27300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27301    unix_path=`$CYGPATH -u "$windows_path"`
27302    new_path="$unix_path"
27303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27305    new_path="$unix_path"
27306  fi
27307
27308
27309  # Now try to locate executable using which
27310  new_path=`$WHICH "$new_path" 2> /dev/null`
27311
27312  if test "x$new_path" = x; then
27313    # Oops. Which didn't find the executable.
27314    # The splitting of arguments from the executable at a space might have been incorrect,
27315    # since paths with space are more likely in Windows. Give it another try with the whole
27316    # argument.
27317    path="$complete"
27318    arguments="EOL"
27319    new_path="$path"
27320
27321  windows_path="$new_path"
27322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27323    unix_path=`$CYGPATH -u "$windows_path"`
27324    new_path="$unix_path"
27325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27327    new_path="$unix_path"
27328  fi
27329
27330
27331    new_path=`$WHICH "$new_path" 2> /dev/null`
27332
27333    if test "x$new_path" = x; then
27334      # It's still not found. Now this is an unrecoverable error.
27335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27336$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27337      has_space=`$ECHO "$complete" | $GREP " "`
27338      if test "x$has_space" != x; then
27339        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27340$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27341      fi
27342      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27343    fi
27344  fi
27345
27346  # Now new_path has a complete unix path to the binary
27347  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27348    # Keep paths in /bin as-is, but remove trailing .exe if any
27349    new_path="${new_path/%.exe/}"
27350    # Do not save /bin paths to all_fixpath_prefixes!
27351  else
27352    # Not in mixed or Windows style, start by that.
27353    new_path=`cmd //c echo $new_path`
27354
27355  input_path="$new_path"
27356  # Check if we need to convert this using DOS-style short mode. If the path
27357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27358  # take no chances and rewrite it.
27359  # Note: m4 eats our [], so we need to use [ and ] instead.
27360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27361  if test "x$has_forbidden_chars" != x; then
27362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27364  fi
27365
27366    # Output is in $new_path
27367
27368  windows_path="$new_path"
27369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27370    unix_path=`$CYGPATH -u "$windows_path"`
27371    new_path="$unix_path"
27372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27374    new_path="$unix_path"
27375  fi
27376
27377    # remove trailing .exe if any
27378    new_path="${new_path/%.exe/}"
27379
27380    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27381    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27382  fi
27383
27384  else
27385    # We're on a posix platform. Hooray! :)
27386    # First separate the path from the arguments. This will split at the first
27387    # space.
27388    complete="$STRIP"
27389    path="${complete%% *}"
27390    tmp="$complete EOL"
27391    arguments="${tmp#* }"
27392
27393    # Cannot rely on the command "which" here since it doesn't always work.
27394    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27395    if test -z "$is_absolute_path"; then
27396      # Path to executable is not absolute. Find it.
27397      IFS_save="$IFS"
27398      IFS=:
27399      for p in $PATH; do
27400        if test -f "$p/$path" && test -x "$p/$path"; then
27401          new_path="$p/$path"
27402          break
27403        fi
27404      done
27405      IFS="$IFS_save"
27406    else
27407      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27408$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27409      new_path="$path"
27410    fi
27411
27412    if test "x$new_path" = x; then
27413        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27414$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27415        has_space=`$ECHO "$complete" | $GREP " "`
27416        if test "x$has_space" != x; then
27417          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27418$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27419        fi
27420        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27421      fi
27422  fi
27423
27424      # Now join together the path and the arguments once again
27425      if test "x$arguments" != xEOL; then
27426        new_complete="$new_path ${arguments% *}"
27427      else
27428        new_complete="$new_path"
27429      fi
27430
27431  if test "x$complete" != "x$new_complete"; then
27432      STRIP="$new_complete"
27433      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27434$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27435    fi
27436
27437fi
27438
27439# objcopy is used for moving debug symbols to separate files when
27440# full debug symbols are enabled.
27441if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27442    if test -n "$ac_tool_prefix"; then
27443  for ac_prog in gobjcopy objcopy
27444  do
27445    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27446set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27448$as_echo_n "checking for $ac_word... " >&6; }
27449if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
27450  $as_echo_n "(cached) " >&6
27451else
27452  if test -n "$OBJCOPY"; then
27453  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27454else
27455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27456for as_dir in $PATH
27457do
27458  IFS=$as_save_IFS
27459  test -z "$as_dir" && as_dir=.
27460    for ac_exec_ext in '' $ac_executable_extensions; do
27461  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27462    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27464    break 2
27465  fi
27466done
27467  done
27468IFS=$as_save_IFS
27469
27470fi
27471fi
27472OBJCOPY=$ac_cv_prog_OBJCOPY
27473if test -n "$OBJCOPY"; then
27474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27475$as_echo "$OBJCOPY" >&6; }
27476else
27477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27478$as_echo "no" >&6; }
27479fi
27480
27481
27482    test -n "$OBJCOPY" && break
27483  done
27484fi
27485if test -z "$OBJCOPY"; then
27486  ac_ct_OBJCOPY=$OBJCOPY
27487  for ac_prog in gobjcopy objcopy
27488do
27489  # Extract the first word of "$ac_prog", so it can be a program name with args.
27490set dummy $ac_prog; ac_word=$2
27491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27492$as_echo_n "checking for $ac_word... " >&6; }
27493if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
27494  $as_echo_n "(cached) " >&6
27495else
27496  if test -n "$ac_ct_OBJCOPY"; then
27497  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27498else
27499as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27500for as_dir in $PATH
27501do
27502  IFS=$as_save_IFS
27503  test -z "$as_dir" && as_dir=.
27504    for ac_exec_ext in '' $ac_executable_extensions; do
27505  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27506    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27508    break 2
27509  fi
27510done
27511  done
27512IFS=$as_save_IFS
27513
27514fi
27515fi
27516ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27517if test -n "$ac_ct_OBJCOPY"; then
27518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27519$as_echo "$ac_ct_OBJCOPY" >&6; }
27520else
27521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27522$as_echo "no" >&6; }
27523fi
27524
27525
27526  test -n "$ac_ct_OBJCOPY" && break
27527done
27528
27529  if test "x$ac_ct_OBJCOPY" = x; then
27530    OBJCOPY=""
27531  else
27532    case $cross_compiling:$ac_tool_warned in
27533yes:)
27534{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27535$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27536ac_tool_warned=yes ;;
27537esac
27538    OBJCOPY=$ac_ct_OBJCOPY
27539  fi
27540fi
27541
27542    # Only call fixup if objcopy was found.
27543    if test -n "$OBJCOPY"; then
27544
27545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27546
27547  # First separate the path from the arguments. This will split at the first
27548  # space.
27549  complete="$OBJCOPY"
27550  path="${complete%% *}"
27551  tmp="$complete EOL"
27552  arguments="${tmp#* }"
27553
27554  # Input might be given as Windows format, start by converting to
27555  # unix format.
27556  new_path=`$CYGPATH -u "$path"`
27557
27558  # Now try to locate executable using which
27559  new_path=`$WHICH "$new_path" 2> /dev/null`
27560  # bat and cmd files are not always considered executable in cygwin causing which
27561  # to not find them
27562  if test "x$new_path" = x \
27563           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27564           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27565    new_path=`$CYGPATH -u "$path"`
27566  fi
27567  if test "x$new_path" = x; then
27568    # Oops. Which didn't find the executable.
27569    # The splitting of arguments from the executable at a space might have been incorrect,
27570    # since paths with space are more likely in Windows. Give it another try with the whole
27571    # argument.
27572    path="$complete"
27573    arguments="EOL"
27574    new_path=`$CYGPATH -u "$path"`
27575    new_path=`$WHICH "$new_path" 2> /dev/null`
27576    # bat and cmd files are not always considered executable in cygwin causing which
27577    # to not find them
27578    if test "x$new_path" = x \
27579             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27580             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27581      new_path=`$CYGPATH -u "$path"`
27582    fi
27583    if test "x$new_path" = x; then
27584      # It's still not found. Now this is an unrecoverable error.
27585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27586$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27587      has_space=`$ECHO "$complete" | $GREP " "`
27588      if test "x$has_space" != x; then
27589        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27591      fi
27592      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27593    fi
27594  fi
27595
27596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27599  # "foo.exe" is OK but "foo" is an error.
27600  #
27601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27602  # It is also a way to make sure we got the proper file name for the real test later on.
27603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27604  if test "x$test_shortpath" = x; then
27605    # Short path failed, file does not exist as specified.
27606    # Try adding .exe or .cmd
27607    if test -f "${new_path}.exe"; then
27608       input_to_shortpath="${new_path}.exe"
27609    elif test -f "${new_path}.cmd"; then
27610       input_to_shortpath="${new_path}.cmd"
27611    else
27612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27613$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27614      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27615$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27616      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27617    fi
27618  else
27619    input_to_shortpath="$new_path"
27620  fi
27621
27622  # Call helper function which possibly converts this using DOS-style short mode.
27623  # If so, the updated path is stored in $new_path.
27624  new_path="$input_to_shortpath"
27625
27626  input_path="$input_to_shortpath"
27627  # Check if we need to convert this using DOS-style short mode. If the path
27628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27629  # take no chances and rewrite it.
27630  # Note: m4 eats our [], so we need to use [ and ] instead.
27631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27632  if test "x$has_forbidden_chars" != x; then
27633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27637      # Going to short mode and back again did indeed matter. Since short mode is
27638      # case insensitive, let's make it lowercase to improve readability.
27639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27640      # Now convert it back to Unix-stile (cygpath)
27641      input_path=`$CYGPATH -u "$shortmode_path"`
27642      new_path="$input_path"
27643    fi
27644  fi
27645
27646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27647  if test "x$test_cygdrive_prefix" = x; then
27648    # As a simple fix, exclude /usr/bin since it's not a real path.
27649    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27651      # a path prefixed by /cygdrive for fixpath to work.
27652      new_path="$CYGWIN_ROOT_PATH$input_path"
27653    fi
27654  fi
27655
27656  # remove trailing .exe if any
27657  new_path="${new_path/%.exe/}"
27658
27659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27660
27661  # First separate the path from the arguments. This will split at the first
27662  # space.
27663  complete="$OBJCOPY"
27664  path="${complete%% *}"
27665  tmp="$complete EOL"
27666  arguments="${tmp#* }"
27667
27668  # Input might be given as Windows format, start by converting to
27669  # unix format.
27670  new_path="$path"
27671
27672  windows_path="$new_path"
27673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27674    unix_path=`$CYGPATH -u "$windows_path"`
27675    new_path="$unix_path"
27676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27678    new_path="$unix_path"
27679  fi
27680
27681
27682  # Now try to locate executable using which
27683  new_path=`$WHICH "$new_path" 2> /dev/null`
27684
27685  if test "x$new_path" = x; then
27686    # Oops. Which didn't find the executable.
27687    # The splitting of arguments from the executable at a space might have been incorrect,
27688    # since paths with space are more likely in Windows. Give it another try with the whole
27689    # argument.
27690    path="$complete"
27691    arguments="EOL"
27692    new_path="$path"
27693
27694  windows_path="$new_path"
27695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27696    unix_path=`$CYGPATH -u "$windows_path"`
27697    new_path="$unix_path"
27698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27700    new_path="$unix_path"
27701  fi
27702
27703
27704    new_path=`$WHICH "$new_path" 2> /dev/null`
27705
27706    if test "x$new_path" = x; then
27707      # It's still not found. Now this is an unrecoverable error.
27708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27709$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27710      has_space=`$ECHO "$complete" | $GREP " "`
27711      if test "x$has_space" != x; then
27712        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27713$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27714      fi
27715      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27716    fi
27717  fi
27718
27719  # Now new_path has a complete unix path to the binary
27720  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27721    # Keep paths in /bin as-is, but remove trailing .exe if any
27722    new_path="${new_path/%.exe/}"
27723    # Do not save /bin paths to all_fixpath_prefixes!
27724  else
27725    # Not in mixed or Windows style, start by that.
27726    new_path=`cmd //c echo $new_path`
27727
27728  input_path="$new_path"
27729  # Check if we need to convert this using DOS-style short mode. If the path
27730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27731  # take no chances and rewrite it.
27732  # Note: m4 eats our [], so we need to use [ and ] instead.
27733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27734  if test "x$has_forbidden_chars" != x; then
27735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27737  fi
27738
27739    # Output is in $new_path
27740
27741  windows_path="$new_path"
27742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27743    unix_path=`$CYGPATH -u "$windows_path"`
27744    new_path="$unix_path"
27745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27747    new_path="$unix_path"
27748  fi
27749
27750    # remove trailing .exe if any
27751    new_path="${new_path/%.exe/}"
27752
27753    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27754    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27755  fi
27756
27757  else
27758    # We're on a posix platform. Hooray! :)
27759    # First separate the path from the arguments. This will split at the first
27760    # space.
27761    complete="$OBJCOPY"
27762    path="${complete%% *}"
27763    tmp="$complete EOL"
27764    arguments="${tmp#* }"
27765
27766    # Cannot rely on the command "which" here since it doesn't always work.
27767    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27768    if test -z "$is_absolute_path"; then
27769      # Path to executable is not absolute. Find it.
27770      IFS_save="$IFS"
27771      IFS=:
27772      for p in $PATH; do
27773        if test -f "$p/$path" && test -x "$p/$path"; then
27774          new_path="$p/$path"
27775          break
27776        fi
27777      done
27778      IFS="$IFS_save"
27779    else
27780      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27781$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27782      new_path="$path"
27783    fi
27784
27785    if test "x$new_path" = x; then
27786        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27787$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27788        has_space=`$ECHO "$complete" | $GREP " "`
27789        if test "x$has_space" != x; then
27790          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27791$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27792        fi
27793        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27794      fi
27795  fi
27796
27797      # Now join together the path and the arguments once again
27798      if test "x$arguments" != xEOL; then
27799        new_complete="$new_path ${arguments% *}"
27800      else
27801        new_complete="$new_path"
27802      fi
27803
27804  if test "x$complete" != "x$new_complete"; then
27805      OBJCOPY="$new_complete"
27806      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27807$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27808    fi
27809
27810    fi
27811fi
27812
27813if test -n "$ac_tool_prefix"; then
27814  for ac_prog in gobjdump objdump
27815  do
27816    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27817set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27819$as_echo_n "checking for $ac_word... " >&6; }
27820if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
27821  $as_echo_n "(cached) " >&6
27822else
27823  if test -n "$OBJDUMP"; then
27824  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27825else
27826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27827for as_dir in $PATH
27828do
27829  IFS=$as_save_IFS
27830  test -z "$as_dir" && as_dir=.
27831    for ac_exec_ext in '' $ac_executable_extensions; do
27832  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27833    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27835    break 2
27836  fi
27837done
27838  done
27839IFS=$as_save_IFS
27840
27841fi
27842fi
27843OBJDUMP=$ac_cv_prog_OBJDUMP
27844if test -n "$OBJDUMP"; then
27845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27846$as_echo "$OBJDUMP" >&6; }
27847else
27848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27849$as_echo "no" >&6; }
27850fi
27851
27852
27853    test -n "$OBJDUMP" && break
27854  done
27855fi
27856if test -z "$OBJDUMP"; then
27857  ac_ct_OBJDUMP=$OBJDUMP
27858  for ac_prog in gobjdump objdump
27859do
27860  # Extract the first word of "$ac_prog", so it can be a program name with args.
27861set dummy $ac_prog; ac_word=$2
27862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27863$as_echo_n "checking for $ac_word... " >&6; }
27864if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
27865  $as_echo_n "(cached) " >&6
27866else
27867  if test -n "$ac_ct_OBJDUMP"; then
27868  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27869else
27870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27871for as_dir in $PATH
27872do
27873  IFS=$as_save_IFS
27874  test -z "$as_dir" && as_dir=.
27875    for ac_exec_ext in '' $ac_executable_extensions; do
27876  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27877    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27879    break 2
27880  fi
27881done
27882  done
27883IFS=$as_save_IFS
27884
27885fi
27886fi
27887ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27888if test -n "$ac_ct_OBJDUMP"; then
27889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27890$as_echo "$ac_ct_OBJDUMP" >&6; }
27891else
27892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27893$as_echo "no" >&6; }
27894fi
27895
27896
27897  test -n "$ac_ct_OBJDUMP" && break
27898done
27899
27900  if test "x$ac_ct_OBJDUMP" = x; then
27901    OBJDUMP=""
27902  else
27903    case $cross_compiling:$ac_tool_warned in
27904yes:)
27905{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27906$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27907ac_tool_warned=yes ;;
27908esac
27909    OBJDUMP=$ac_ct_OBJDUMP
27910  fi
27911fi
27912
27913if test "x$OBJDUMP" != x; then
27914  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27915
27916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27917
27918  # First separate the path from the arguments. This will split at the first
27919  # space.
27920  complete="$OBJDUMP"
27921  path="${complete%% *}"
27922  tmp="$complete EOL"
27923  arguments="${tmp#* }"
27924
27925  # Input might be given as Windows format, start by converting to
27926  # unix format.
27927  new_path=`$CYGPATH -u "$path"`
27928
27929  # Now try to locate executable using which
27930  new_path=`$WHICH "$new_path" 2> /dev/null`
27931  # bat and cmd files are not always considered executable in cygwin causing which
27932  # to not find them
27933  if test "x$new_path" = x \
27934           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27935           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27936    new_path=`$CYGPATH -u "$path"`
27937  fi
27938  if test "x$new_path" = x; then
27939    # Oops. Which didn't find the executable.
27940    # The splitting of arguments from the executable at a space might have been incorrect,
27941    # since paths with space are more likely in Windows. Give it another try with the whole
27942    # argument.
27943    path="$complete"
27944    arguments="EOL"
27945    new_path=`$CYGPATH -u "$path"`
27946    new_path=`$WHICH "$new_path" 2> /dev/null`
27947    # bat and cmd files are not always considered executable in cygwin causing which
27948    # to not find them
27949    if test "x$new_path" = x \
27950             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27951             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27952      new_path=`$CYGPATH -u "$path"`
27953    fi
27954    if test "x$new_path" = x; then
27955      # It's still not found. Now this is an unrecoverable error.
27956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27957$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27958      has_space=`$ECHO "$complete" | $GREP " "`
27959      if test "x$has_space" != x; then
27960        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27961$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27962      fi
27963      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27964    fi
27965  fi
27966
27967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27970  # "foo.exe" is OK but "foo" is an error.
27971  #
27972  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27973  # It is also a way to make sure we got the proper file name for the real test later on.
27974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27975  if test "x$test_shortpath" = x; then
27976    # Short path failed, file does not exist as specified.
27977    # Try adding .exe or .cmd
27978    if test -f "${new_path}.exe"; then
27979       input_to_shortpath="${new_path}.exe"
27980    elif test -f "${new_path}.cmd"; then
27981       input_to_shortpath="${new_path}.cmd"
27982    else
27983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27984$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27985      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27986$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27987      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27988    fi
27989  else
27990    input_to_shortpath="$new_path"
27991  fi
27992
27993  # Call helper function which possibly converts this using DOS-style short mode.
27994  # If so, the updated path is stored in $new_path.
27995  new_path="$input_to_shortpath"
27996
27997  input_path="$input_to_shortpath"
27998  # Check if we need to convert this using DOS-style short mode. If the path
27999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28000  # take no chances and rewrite it.
28001  # Note: m4 eats our [], so we need to use [ and ] instead.
28002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28003  if test "x$has_forbidden_chars" != x; then
28004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28008      # Going to short mode and back again did indeed matter. Since short mode is
28009      # case insensitive, let's make it lowercase to improve readability.
28010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28011      # Now convert it back to Unix-stile (cygpath)
28012      input_path=`$CYGPATH -u "$shortmode_path"`
28013      new_path="$input_path"
28014    fi
28015  fi
28016
28017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28018  if test "x$test_cygdrive_prefix" = x; then
28019    # As a simple fix, exclude /usr/bin since it's not a real path.
28020    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28022      # a path prefixed by /cygdrive for fixpath to work.
28023      new_path="$CYGWIN_ROOT_PATH$input_path"
28024    fi
28025  fi
28026
28027  # remove trailing .exe if any
28028  new_path="${new_path/%.exe/}"
28029
28030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28031
28032  # First separate the path from the arguments. This will split at the first
28033  # space.
28034  complete="$OBJDUMP"
28035  path="${complete%% *}"
28036  tmp="$complete EOL"
28037  arguments="${tmp#* }"
28038
28039  # Input might be given as Windows format, start by converting to
28040  # unix format.
28041  new_path="$path"
28042
28043  windows_path="$new_path"
28044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28045    unix_path=`$CYGPATH -u "$windows_path"`
28046    new_path="$unix_path"
28047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28049    new_path="$unix_path"
28050  fi
28051
28052
28053  # Now try to locate executable using which
28054  new_path=`$WHICH "$new_path" 2> /dev/null`
28055
28056  if test "x$new_path" = x; then
28057    # Oops. Which didn't find the executable.
28058    # The splitting of arguments from the executable at a space might have been incorrect,
28059    # since paths with space are more likely in Windows. Give it another try with the whole
28060    # argument.
28061    path="$complete"
28062    arguments="EOL"
28063    new_path="$path"
28064
28065  windows_path="$new_path"
28066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28067    unix_path=`$CYGPATH -u "$windows_path"`
28068    new_path="$unix_path"
28069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28071    new_path="$unix_path"
28072  fi
28073
28074
28075    new_path=`$WHICH "$new_path" 2> /dev/null`
28076
28077    if test "x$new_path" = x; then
28078      # It's still not found. Now this is an unrecoverable error.
28079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28080$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28081      has_space=`$ECHO "$complete" | $GREP " "`
28082      if test "x$has_space" != x; then
28083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28085      fi
28086      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28087    fi
28088  fi
28089
28090  # Now new_path has a complete unix path to the binary
28091  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28092    # Keep paths in /bin as-is, but remove trailing .exe if any
28093    new_path="${new_path/%.exe/}"
28094    # Do not save /bin paths to all_fixpath_prefixes!
28095  else
28096    # Not in mixed or Windows style, start by that.
28097    new_path=`cmd //c echo $new_path`
28098
28099  input_path="$new_path"
28100  # Check if we need to convert this using DOS-style short mode. If the path
28101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28102  # take no chances and rewrite it.
28103  # Note: m4 eats our [], so we need to use [ and ] instead.
28104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28105  if test "x$has_forbidden_chars" != x; then
28106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28108  fi
28109
28110    # Output is in $new_path
28111
28112  windows_path="$new_path"
28113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28114    unix_path=`$CYGPATH -u "$windows_path"`
28115    new_path="$unix_path"
28116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28118    new_path="$unix_path"
28119  fi
28120
28121    # remove trailing .exe if any
28122    new_path="${new_path/%.exe/}"
28123
28124    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28125    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28126  fi
28127
28128  else
28129    # We're on a posix platform. Hooray! :)
28130    # First separate the path from the arguments. This will split at the first
28131    # space.
28132    complete="$OBJDUMP"
28133    path="${complete%% *}"
28134    tmp="$complete EOL"
28135    arguments="${tmp#* }"
28136
28137    # Cannot rely on the command "which" here since it doesn't always work.
28138    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28139    if test -z "$is_absolute_path"; then
28140      # Path to executable is not absolute. Find it.
28141      IFS_save="$IFS"
28142      IFS=:
28143      for p in $PATH; do
28144        if test -f "$p/$path" && test -x "$p/$path"; then
28145          new_path="$p/$path"
28146          break
28147        fi
28148      done
28149      IFS="$IFS_save"
28150    else
28151      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28152$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28153      new_path="$path"
28154    fi
28155
28156    if test "x$new_path" = x; then
28157        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28158$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28159        has_space=`$ECHO "$complete" | $GREP " "`
28160        if test "x$has_space" != x; then
28161          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28162$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28163        fi
28164        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28165      fi
28166  fi
28167
28168      # Now join together the path and the arguments once again
28169      if test "x$arguments" != xEOL; then
28170        new_complete="$new_path ${arguments% *}"
28171      else
28172        new_complete="$new_path"
28173      fi
28174
28175  if test "x$complete" != "x$new_complete"; then
28176      OBJDUMP="$new_complete"
28177      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28178$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28179    fi
28180
28181fi
28182
28183if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28184   # Extract the first word of "lipo", so it can be a program name with args.
28185set dummy lipo; ac_word=$2
28186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28187$as_echo_n "checking for $ac_word... " >&6; }
28188if test "${ac_cv_path_LIPO+set}" = set; then :
28189  $as_echo_n "(cached) " >&6
28190else
28191  case $LIPO in
28192  [\\/]* | ?:[\\/]*)
28193  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28194  ;;
28195  *)
28196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28197for as_dir in $PATH
28198do
28199  IFS=$as_save_IFS
28200  test -z "$as_dir" && as_dir=.
28201    for ac_exec_ext in '' $ac_executable_extensions; do
28202  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28203    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28205    break 2
28206  fi
28207done
28208  done
28209IFS=$as_save_IFS
28210
28211  ;;
28212esac
28213fi
28214LIPO=$ac_cv_path_LIPO
28215if test -n "$LIPO"; then
28216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28217$as_echo "$LIPO" >&6; }
28218else
28219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28220$as_echo "no" >&6; }
28221fi
28222
28223
28224
28225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28226
28227  # First separate the path from the arguments. This will split at the first
28228  # space.
28229  complete="$LIPO"
28230  path="${complete%% *}"
28231  tmp="$complete EOL"
28232  arguments="${tmp#* }"
28233
28234  # Input might be given as Windows format, start by converting to
28235  # unix format.
28236  new_path=`$CYGPATH -u "$path"`
28237
28238  # Now try to locate executable using which
28239  new_path=`$WHICH "$new_path" 2> /dev/null`
28240  # bat and cmd files are not always considered executable in cygwin causing which
28241  # to not find them
28242  if test "x$new_path" = x \
28243           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28244           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28245    new_path=`$CYGPATH -u "$path"`
28246  fi
28247  if test "x$new_path" = x; then
28248    # Oops. Which didn't find the executable.
28249    # The splitting of arguments from the executable at a space might have been incorrect,
28250    # since paths with space are more likely in Windows. Give it another try with the whole
28251    # argument.
28252    path="$complete"
28253    arguments="EOL"
28254    new_path=`$CYGPATH -u "$path"`
28255    new_path=`$WHICH "$new_path" 2> /dev/null`
28256    # bat and cmd files are not always considered executable in cygwin causing which
28257    # to not find them
28258    if test "x$new_path" = x \
28259             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28260             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28261      new_path=`$CYGPATH -u "$path"`
28262    fi
28263    if test "x$new_path" = x; then
28264      # It's still not found. Now this is an unrecoverable error.
28265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28266$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28267      has_space=`$ECHO "$complete" | $GREP " "`
28268      if test "x$has_space" != x; then
28269        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28270$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28271      fi
28272      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28273    fi
28274  fi
28275
28276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28279  # "foo.exe" is OK but "foo" is an error.
28280  #
28281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28282  # It is also a way to make sure we got the proper file name for the real test later on.
28283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28284  if test "x$test_shortpath" = x; then
28285    # Short path failed, file does not exist as specified.
28286    # Try adding .exe or .cmd
28287    if test -f "${new_path}.exe"; then
28288       input_to_shortpath="${new_path}.exe"
28289    elif test -f "${new_path}.cmd"; then
28290       input_to_shortpath="${new_path}.cmd"
28291    else
28292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28293$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28294      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28295$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28296      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28297    fi
28298  else
28299    input_to_shortpath="$new_path"
28300  fi
28301
28302  # Call helper function which possibly converts this using DOS-style short mode.
28303  # If so, the updated path is stored in $new_path.
28304  new_path="$input_to_shortpath"
28305
28306  input_path="$input_to_shortpath"
28307  # Check if we need to convert this using DOS-style short mode. If the path
28308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28309  # take no chances and rewrite it.
28310  # Note: m4 eats our [], so we need to use [ and ] instead.
28311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28312  if test "x$has_forbidden_chars" != x; then
28313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28317      # Going to short mode and back again did indeed matter. Since short mode is
28318      # case insensitive, let's make it lowercase to improve readability.
28319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28320      # Now convert it back to Unix-stile (cygpath)
28321      input_path=`$CYGPATH -u "$shortmode_path"`
28322      new_path="$input_path"
28323    fi
28324  fi
28325
28326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28327  if test "x$test_cygdrive_prefix" = x; then
28328    # As a simple fix, exclude /usr/bin since it's not a real path.
28329    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28331      # a path prefixed by /cygdrive for fixpath to work.
28332      new_path="$CYGWIN_ROOT_PATH$input_path"
28333    fi
28334  fi
28335
28336  # remove trailing .exe if any
28337  new_path="${new_path/%.exe/}"
28338
28339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28340
28341  # First separate the path from the arguments. This will split at the first
28342  # space.
28343  complete="$LIPO"
28344  path="${complete%% *}"
28345  tmp="$complete EOL"
28346  arguments="${tmp#* }"
28347
28348  # Input might be given as Windows format, start by converting to
28349  # unix format.
28350  new_path="$path"
28351
28352  windows_path="$new_path"
28353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28354    unix_path=`$CYGPATH -u "$windows_path"`
28355    new_path="$unix_path"
28356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28358    new_path="$unix_path"
28359  fi
28360
28361
28362  # Now try to locate executable using which
28363  new_path=`$WHICH "$new_path" 2> /dev/null`
28364
28365  if test "x$new_path" = x; then
28366    # Oops. Which didn't find the executable.
28367    # The splitting of arguments from the executable at a space might have been incorrect,
28368    # since paths with space are more likely in Windows. Give it another try with the whole
28369    # argument.
28370    path="$complete"
28371    arguments="EOL"
28372    new_path="$path"
28373
28374  windows_path="$new_path"
28375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28376    unix_path=`$CYGPATH -u "$windows_path"`
28377    new_path="$unix_path"
28378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28380    new_path="$unix_path"
28381  fi
28382
28383
28384    new_path=`$WHICH "$new_path" 2> /dev/null`
28385
28386    if test "x$new_path" = x; then
28387      # It's still not found. Now this is an unrecoverable error.
28388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28389$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28390      has_space=`$ECHO "$complete" | $GREP " "`
28391      if test "x$has_space" != x; then
28392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28394      fi
28395      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28396    fi
28397  fi
28398
28399  # Now new_path has a complete unix path to the binary
28400  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28401    # Keep paths in /bin as-is, but remove trailing .exe if any
28402    new_path="${new_path/%.exe/}"
28403    # Do not save /bin paths to all_fixpath_prefixes!
28404  else
28405    # Not in mixed or Windows style, start by that.
28406    new_path=`cmd //c echo $new_path`
28407
28408  input_path="$new_path"
28409  # Check if we need to convert this using DOS-style short mode. If the path
28410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28411  # take no chances and rewrite it.
28412  # Note: m4 eats our [], so we need to use [ and ] instead.
28413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28414  if test "x$has_forbidden_chars" != x; then
28415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28417  fi
28418
28419    # Output is in $new_path
28420
28421  windows_path="$new_path"
28422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28423    unix_path=`$CYGPATH -u "$windows_path"`
28424    new_path="$unix_path"
28425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28427    new_path="$unix_path"
28428  fi
28429
28430    # remove trailing .exe if any
28431    new_path="${new_path/%.exe/}"
28432
28433    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28434    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28435  fi
28436
28437  else
28438    # We're on a posix platform. Hooray! :)
28439    # First separate the path from the arguments. This will split at the first
28440    # space.
28441    complete="$LIPO"
28442    path="${complete%% *}"
28443    tmp="$complete EOL"
28444    arguments="${tmp#* }"
28445
28446    # Cannot rely on the command "which" here since it doesn't always work.
28447    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28448    if test -z "$is_absolute_path"; then
28449      # Path to executable is not absolute. Find it.
28450      IFS_save="$IFS"
28451      IFS=:
28452      for p in $PATH; do
28453        if test -f "$p/$path" && test -x "$p/$path"; then
28454          new_path="$p/$path"
28455          break
28456        fi
28457      done
28458      IFS="$IFS_save"
28459    else
28460      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28461$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28462      new_path="$path"
28463    fi
28464
28465    if test "x$new_path" = x; then
28466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28467$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28468        has_space=`$ECHO "$complete" | $GREP " "`
28469        if test "x$has_space" != x; then
28470          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28471$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28472        fi
28473        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28474      fi
28475  fi
28476
28477      # Now join together the path and the arguments once again
28478      if test "x$arguments" != xEOL; then
28479        new_complete="$new_path ${arguments% *}"
28480      else
28481        new_complete="$new_path"
28482      fi
28483
28484  if test "x$complete" != "x$new_complete"; then
28485      LIPO="$new_complete"
28486      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28487$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28488    fi
28489
28490fi
28491
28492
28493
28494# Restore old path without tools dir
28495PATH="$OLD_PATH"
28496
28497
28498# FIXME: Currently we must test this after paths but before flags. Fix!
28499
28500# And we can test some aspects on the target using configure macros.
28501
28502
28503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28504$as_echo_n "checking for ANSI C header files... " >&6; }
28505if test "${ac_cv_header_stdc+set}" = set; then :
28506  $as_echo_n "(cached) " >&6
28507else
28508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28509/* end confdefs.h.  */
28510#include <stdlib.h>
28511#include <stdarg.h>
28512#include <string.h>
28513#include <float.h>
28514
28515int
28516main ()
28517{
28518
28519  ;
28520  return 0;
28521}
28522_ACEOF
28523if ac_fn_cxx_try_compile "$LINENO"; then :
28524  ac_cv_header_stdc=yes
28525else
28526  ac_cv_header_stdc=no
28527fi
28528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28529
28530if test $ac_cv_header_stdc = yes; then
28531  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28533/* end confdefs.h.  */
28534#include <string.h>
28535
28536_ACEOF
28537if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28538  $EGREP "memchr" >/dev/null 2>&1; then :
28539
28540else
28541  ac_cv_header_stdc=no
28542fi
28543rm -f conftest*
28544
28545fi
28546
28547if test $ac_cv_header_stdc = yes; then
28548  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28549  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28550/* end confdefs.h.  */
28551#include <stdlib.h>
28552
28553_ACEOF
28554if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28555  $EGREP "free" >/dev/null 2>&1; then :
28556
28557else
28558  ac_cv_header_stdc=no
28559fi
28560rm -f conftest*
28561
28562fi
28563
28564if test $ac_cv_header_stdc = yes; then
28565  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28566  if test "$cross_compiling" = yes; then :
28567  :
28568else
28569  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28570/* end confdefs.h.  */
28571#include <ctype.h>
28572#include <stdlib.h>
28573#if ((' ' & 0x0FF) == 0x020)
28574# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28575# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28576#else
28577# define ISLOWER(c) \
28578		   (('a' <= (c) && (c) <= 'i') \
28579		     || ('j' <= (c) && (c) <= 'r') \
28580		     || ('s' <= (c) && (c) <= 'z'))
28581# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28582#endif
28583
28584#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28585int
28586main ()
28587{
28588  int i;
28589  for (i = 0; i < 256; i++)
28590    if (XOR (islower (i), ISLOWER (i))
28591	|| toupper (i) != TOUPPER (i))
28592      return 2;
28593  return 0;
28594}
28595_ACEOF
28596if ac_fn_cxx_try_run "$LINENO"; then :
28597
28598else
28599  ac_cv_header_stdc=no
28600fi
28601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28602  conftest.$ac_objext conftest.beam conftest.$ac_ext
28603fi
28604
28605fi
28606fi
28607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28608$as_echo "$ac_cv_header_stdc" >&6; }
28609if test $ac_cv_header_stdc = yes; then
28610
28611$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28612
28613fi
28614
28615# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28616for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28617		  inttypes.h stdint.h unistd.h
28618do :
28619  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28620ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28621"
28622if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28623  cat >>confdefs.h <<_ACEOF
28624#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28625_ACEOF
28626
28627fi
28628
28629done
28630
28631
28632
28633###############################################################################
28634#
28635# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28636# (The JVM can use 32 or 64 bit Java pointers but that decision
28637# is made at runtime.)
28638#
28639
28640if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28641  # Always specify -m flags on Solaris
28642
28643  # keep track of c/cxx flags that we added outselves...
28644  #   to prevent emitting warning...
28645  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28646  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28647  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28648
28649  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28650  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28651  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28652
28653  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28654  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28655  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28656
28657elif test "x$COMPILE_TYPE" = xreduced; then
28658  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28659    # Specify -m if running reduced on other Posix platforms
28660
28661  # keep track of c/cxx flags that we added outselves...
28662  #   to prevent emitting warning...
28663  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28664  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28665  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28666
28667  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28668  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28669  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28670
28671  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28672  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28673  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28674
28675  fi
28676fi
28677
28678# Make compilation sanity check
28679for ac_header in stdio.h
28680do :
28681  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28682if test "x$ac_cv_header_stdio_h" = x""yes; then :
28683  cat >>confdefs.h <<_ACEOF
28684#define HAVE_STDIO_H 1
28685_ACEOF
28686
28687else
28688
28689  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28690$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28691  if test "x$COMPILE_TYPE" = xreduced; then
28692    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28693$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28694  elif test "x$COMPILE_TYPE" = xcross; then
28695    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28696$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28697  fi
28698  as_fn_error $? "Cannot continue." "$LINENO" 5
28699
28700fi
28701
28702done
28703
28704
28705# The cast to long int works around a bug in the HP C Compiler
28706# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28707# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28708# This bug is HP SR number 8606223364.
28709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28710$as_echo_n "checking size of int *... " >&6; }
28711if test "${ac_cv_sizeof_int_p+set}" = set; then :
28712  $as_echo_n "(cached) " >&6
28713else
28714  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28715
28716else
28717  if test "$ac_cv_type_int_p" = yes; then
28718     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28719$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28720as_fn_error 77 "cannot compute sizeof (int *)
28721See \`config.log' for more details" "$LINENO" 5 ; }
28722   else
28723     ac_cv_sizeof_int_p=0
28724   fi
28725fi
28726
28727fi
28728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28729$as_echo "$ac_cv_sizeof_int_p" >&6; }
28730
28731
28732
28733cat >>confdefs.h <<_ACEOF
28734#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28735_ACEOF
28736
28737
28738
28739if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28740  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28741  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28742fi
28743
28744if test "x$SIZEOF_INT_P" = x; then
28745    # The test failed, lets stick to the assumed value.
28746    { $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
28747$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28748else
28749    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28750
28751    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28752        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
28753    fi
28754fi
28755
28756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28757$as_echo_n "checking for target address size... " >&6; }
28758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28759$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28760
28761
28762###############################################################################
28763#
28764# Is the target little of big endian?
28765#
28766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28767$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28768if test "${ac_cv_c_bigendian+set}" = set; then :
28769  $as_echo_n "(cached) " >&6
28770else
28771  ac_cv_c_bigendian=unknown
28772    # See if we're dealing with a universal compiler.
28773    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28774/* end confdefs.h.  */
28775#ifndef __APPLE_CC__
28776	       not a universal capable compiler
28777	     #endif
28778	     typedef int dummy;
28779
28780_ACEOF
28781if ac_fn_cxx_try_compile "$LINENO"; then :
28782
28783	# Check for potential -arch flags.  It is not universal unless
28784	# there are at least two -arch flags with different values.
28785	ac_arch=
28786	ac_prev=
28787	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28788	 if test -n "$ac_prev"; then
28789	   case $ac_word in
28790	     i?86 | x86_64 | ppc | ppc64)
28791	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28792		 ac_arch=$ac_word
28793	       else
28794		 ac_cv_c_bigendian=universal
28795		 break
28796	       fi
28797	       ;;
28798	   esac
28799	   ac_prev=
28800	 elif test "x$ac_word" = "x-arch"; then
28801	   ac_prev=arch
28802	 fi
28803       done
28804fi
28805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28806    if test $ac_cv_c_bigendian = unknown; then
28807      # See if sys/param.h defines the BYTE_ORDER macro.
28808      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28809/* end confdefs.h.  */
28810#include <sys/types.h>
28811	     #include <sys/param.h>
28812
28813int
28814main ()
28815{
28816#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28817		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28818		     && LITTLE_ENDIAN)
28819	      bogus endian macros
28820	     #endif
28821
28822  ;
28823  return 0;
28824}
28825_ACEOF
28826if ac_fn_cxx_try_compile "$LINENO"; then :
28827  # It does; now see whether it defined to BIG_ENDIAN or not.
28828	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28829/* end confdefs.h.  */
28830#include <sys/types.h>
28831		#include <sys/param.h>
28832
28833int
28834main ()
28835{
28836#if BYTE_ORDER != BIG_ENDIAN
28837		 not big endian
28838		#endif
28839
28840  ;
28841  return 0;
28842}
28843_ACEOF
28844if ac_fn_cxx_try_compile "$LINENO"; then :
28845  ac_cv_c_bigendian=yes
28846else
28847  ac_cv_c_bigendian=no
28848fi
28849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28850fi
28851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28852    fi
28853    if test $ac_cv_c_bigendian = unknown; then
28854      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28855      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28856/* end confdefs.h.  */
28857#include <limits.h>
28858
28859int
28860main ()
28861{
28862#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28863	      bogus endian macros
28864	     #endif
28865
28866  ;
28867  return 0;
28868}
28869_ACEOF
28870if ac_fn_cxx_try_compile "$LINENO"; then :
28871  # It does; now see whether it defined to _BIG_ENDIAN or not.
28872	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28873/* end confdefs.h.  */
28874#include <limits.h>
28875
28876int
28877main ()
28878{
28879#ifndef _BIG_ENDIAN
28880		 not big endian
28881		#endif
28882
28883  ;
28884  return 0;
28885}
28886_ACEOF
28887if ac_fn_cxx_try_compile "$LINENO"; then :
28888  ac_cv_c_bigendian=yes
28889else
28890  ac_cv_c_bigendian=no
28891fi
28892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28893fi
28894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28895    fi
28896    if test $ac_cv_c_bigendian = unknown; then
28897      # Compile a test program.
28898      if test "$cross_compiling" = yes; then :
28899  # Try to guess by grepping values from an object file.
28900	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28901/* end confdefs.h.  */
28902short int ascii_mm[] =
28903		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28904		short int ascii_ii[] =
28905		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28906		int use_ascii (int i) {
28907		  return ascii_mm[i] + ascii_ii[i];
28908		}
28909		short int ebcdic_ii[] =
28910		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28911		short int ebcdic_mm[] =
28912		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28913		int use_ebcdic (int i) {
28914		  return ebcdic_mm[i] + ebcdic_ii[i];
28915		}
28916		extern int foo;
28917
28918int
28919main ()
28920{
28921return use_ascii (foo) == use_ebcdic (foo);
28922  ;
28923  return 0;
28924}
28925_ACEOF
28926if ac_fn_cxx_try_compile "$LINENO"; then :
28927  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28928	      ac_cv_c_bigendian=yes
28929	    fi
28930	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28931	      if test "$ac_cv_c_bigendian" = unknown; then
28932		ac_cv_c_bigendian=no
28933	      else
28934		# finding both strings is unlikely to happen, but who knows?
28935		ac_cv_c_bigendian=unknown
28936	      fi
28937	    fi
28938fi
28939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28940else
28941  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28942/* end confdefs.h.  */
28943$ac_includes_default
28944int
28945main ()
28946{
28947
28948	     /* Are we little or big endian?  From Harbison&Steele.  */
28949	     union
28950	     {
28951	       long int l;
28952	       char c[sizeof (long int)];
28953	     } u;
28954	     u.l = 1;
28955	     return u.c[sizeof (long int) - 1] == 1;
28956
28957  ;
28958  return 0;
28959}
28960_ACEOF
28961if ac_fn_cxx_try_run "$LINENO"; then :
28962  ac_cv_c_bigendian=no
28963else
28964  ac_cv_c_bigendian=yes
28965fi
28966rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28967  conftest.$ac_objext conftest.beam conftest.$ac_ext
28968fi
28969
28970    fi
28971fi
28972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28973$as_echo "$ac_cv_c_bigendian" >&6; }
28974 case $ac_cv_c_bigendian in #(
28975   yes)
28976     ENDIAN="big";; #(
28977   no)
28978     ENDIAN="little" ;; #(
28979   universal)
28980     ENDIAN="universal_endianness"
28981     ;; #(
28982   *)
28983     ENDIAN="unknown" ;;
28984 esac
28985
28986
28987if test "x$ENDIAN" = xuniversal_endianness; then
28988    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28989fi
28990if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28991    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
28992fi
28993
28994
28995# Configure flags for the tools
28996
28997
28998###############################################################################
28999#
29000# How to compile shared libraries.
29001#
29002
29003if test "x$GCC" = xyes; then
29004    COMPILER_NAME=gcc
29005    PICFLAG="-fPIC"
29006    LIBRARY_PREFIX=lib
29007    SHARED_LIBRARY='lib$1.so'
29008    STATIC_LIBRARY='lib$1.a'
29009    SHARED_LIBRARY_FLAGS="-shared"
29010    SHARED_LIBRARY_SUFFIX='.so'
29011    STATIC_LIBRARY_SUFFIX='.a'
29012    OBJ_SUFFIX='.o'
29013    EXE_SUFFIX=''
29014    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29015    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29016    C_FLAG_REORDER=''
29017    CXX_FLAG_REORDER=''
29018    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29019    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29020    LD="$CC"
29021    LDEXE="$CC"
29022    LDCXX="$CXX"
29023    LDEXECXX="$CXX"
29024    POST_STRIP_CMD="$STRIP -g"
29025
29026    # Linking is different on MacOSX
29027    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29028        # Might change in the future to clang.
29029        COMPILER_NAME=gcc
29030        SHARED_LIBRARY='lib$1.dylib'
29031        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29032        SHARED_LIBRARY_SUFFIX='.dylib'
29033        EXE_SUFFIX=''
29034        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29035        SET_SHARED_LIBRARY_MAPFILE=''
29036        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29037        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29038        POST_STRIP_CMD="$STRIP -S"
29039    fi
29040else
29041    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29042        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29043        COMPILER_NAME=ossc
29044        PICFLAG="-KPIC"
29045        LIBRARY_PREFIX=lib
29046        SHARED_LIBRARY='lib$1.so'
29047        STATIC_LIBRARY='lib$1.a'
29048        SHARED_LIBRARY_FLAGS="-G"
29049        SHARED_LIBRARY_SUFFIX='.so'
29050        STATIC_LIBRARY_SUFFIX='.a'
29051        OBJ_SUFFIX='.o'
29052        EXE_SUFFIX=''
29053        SET_SHARED_LIBRARY_NAME=''
29054        SET_SHARED_LIBRARY_MAPFILE='-M$1'
29055	C_FLAG_REORDER='-xF'
29056	CXX_FLAG_REORDER='-xF'
29057        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29058        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29059        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29060        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29061        CFLAGS_JDKLIB_EXTRA='-xstrconst'
29062        POST_STRIP_CMD="$STRIP -x"
29063        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29064    fi
29065    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29066        # If it is not gcc, then assume it is the MS Visual Studio compiler
29067        COMPILER_NAME=cl
29068        PICFLAG=""
29069        LIBRARY_PREFIX=
29070        SHARED_LIBRARY='$1.dll'
29071        STATIC_LIBRARY='$1.lib'
29072        SHARED_LIBRARY_FLAGS="-LD"
29073        SHARED_LIBRARY_SUFFIX='.dll'
29074        STATIC_LIBRARY_SUFFIX='.lib'
29075        OBJ_SUFFIX='.obj'
29076        EXE_SUFFIX='.exe'
29077        SET_SHARED_LIBRARY_NAME=''
29078        SET_SHARED_LIBRARY_MAPFILE=''
29079        SET_SHARED_LIBRARY_ORIGIN=''
29080        SET_EXECUTABLE_ORIGIN=''
29081    fi
29082fi
29083
29084
29085
29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102# The (cross) compiler is now configured, we can now test capabilities
29103# of the target platform.
29104
29105
29106
29107###############################################################################
29108#
29109# Setup the opt flags for different compilers
29110# and different operating systems.
29111#
29112
29113#
29114# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29115#
29116if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29117    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29118    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29119    CFLAGS="$CFLAGS -mstackrealign"
29120    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29121$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29122    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29123/* end confdefs.h.  */
29124int main() { return 0; }
29125_ACEOF
29126if ac_fn_cxx_try_link "$LINENO"; then :
29127
29128		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29129$as_echo "yes" >&6; }
29130
29131else
29132
29133		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29134$as_echo "no" >&6; }
29135	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29136
29137fi
29138rm -f core conftest.err conftest.$ac_objext \
29139    conftest$ac_exeext conftest.$ac_ext
29140fi
29141
29142C_FLAG_DEPS="-MMD -MF"
29143CXX_FLAG_DEPS="-MMD -MF"
29144
29145case $COMPILER_TYPE in
29146  CC )
29147    D_FLAG="-g"
29148    case $COMPILER_NAME in
29149      gcc )
29150      	case $OPENJDK_TARGET_OS in
29151	  macosx )
29152	    # On MacOSX we optimize for size, something
29153	    # we should do for all platforms?
29154	    C_O_FLAG_HI="-Os"
29155	    C_O_FLAG_NORM="-Os"
29156	    C_O_FLAG_NONE=""
29157	    ;;
29158	  *)
29159	    C_O_FLAG_HI="-O3"
29160	    C_O_FLAG_NORM="-O2"
29161	    C_O_FLAG_NONE="-O0"
29162	    CFLAGS_DEBUG_SYMBOLS="-g"
29163	    CXXFLAGS_DEBUG_SYMBOLS="-g"
29164	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29165	       CFLAGS_DEBUG_SYMBOLS="-g1"
29166	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
29167	    fi
29168	    ;;
29169	esac
29170        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29171        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29172        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29173        ;;
29174      ossc )
29175        #
29176        # Forte has different names for this with their C++ compiler...
29177        #
29178        C_FLAG_DEPS="-xMMD -xMF"
29179        CXX_FLAG_DEPS="-xMMD -xMF"
29180
29181        # Extra options used with HIGHEST
29182        #
29183        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29184        #          done with care, there are some assumptions below that need to
29185        #          be understood about the use of pointers, and IEEE behavior.
29186        #
29187        # Use non-standard floating point mode (not IEEE 754)
29188        CC_HIGHEST="$CC_HIGHEST -fns"
29189        # Do some simplification of floating point arithmetic (not IEEE 754)
29190        CC_HIGHEST="$CC_HIGHEST -fsimple"
29191        # Use single precision floating point with 'float'
29192        CC_HIGHEST="$CC_HIGHEST -fsingle"
29193        # Assume memory references via basic pointer types do not alias
29194        #   (Source with excessing pointer casting and data access with mixed
29195        #    pointer types are not recommended)
29196        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29197        # Use intrinsic or inline versions for math/std functions
29198        #   (If you expect perfect errno behavior, do not use this)
29199        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29200        # Loop data dependency optimizations (need -xO3 or higher)
29201        CC_HIGHEST="$CC_HIGHEST -xdepend"
29202        # Pointer parameters to functions do not overlap
29203        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29204        #    If you pass in multiple pointers to the same data, do not use this)
29205        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29206        # Inline some library routines
29207        #   (If you expect perfect errno behavior, do not use this)
29208        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29209        # Use optimized math routines
29210        #   (If you expect perfect errno behavior, do not use this)
29211        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29212        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29213
29214        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29215          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29216          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29217        fi
29218
29219        case $OPENJDK_TARGET_CPU_ARCH in
29220          x86)
29221            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29222            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29223            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29224            C_O_FLAG_NONE="-xregs=no%frameptr"
29225            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29226            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29227            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29228            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29229            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29230               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29231               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29232            fi
29233            ;;
29234          sparc)
29235            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29236            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29237            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29238            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29239            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29240            C_O_FLAG_NONE=""
29241            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29242            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29243            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29244            CXX_O_FLAG_NONE=""
29245            ;;
29246        esac
29247
29248    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29249    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29250    esac
29251    ;;
29252  CL )
29253    D_FLAG=
29254    C_O_FLAG_HIGHEST="-O2"
29255    C_O_FLAG_HI="-O1"
29256    C_O_FLAG_NORM="-O1"
29257    C_O_FLAG_NONE="-Od"
29258    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29259    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29260    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29261    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29262    ;;
29263esac
29264
29265if test -z "$C_O_FLAG_HIGHEST"; then
29266   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29267fi
29268
29269if test -z "$CXX_O_FLAG_HIGHEST"; then
29270   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29271fi
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29287   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29288$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29289fi
29290
29291if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29292   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29293$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29294fi
29295
29296if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29297   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29298$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29299fi
29300
29301
29302# Check whether --with-extra-cflags was given.
29303if test "${with_extra_cflags+set}" = set; then :
29304  withval=$with_extra_cflags;
29305fi
29306
29307
29308
29309# Check whether --with-extra-cxxflags was given.
29310if test "${with_extra_cxxflags+set}" = set; then :
29311  withval=$with_extra_cxxflags;
29312fi
29313
29314
29315
29316# Check whether --with-extra-ldflags was given.
29317if test "${with_extra_ldflags+set}" = set; then :
29318  withval=$with_extra_ldflags;
29319fi
29320
29321
29322CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29323CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29324LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29325
29326# Hotspot needs these set in their legacy form
29327LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29328LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29329LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29330
29331
29332
29333
29334
29335###############################################################################
29336#
29337# Now setup the CFLAGS and LDFLAGS for the JDK build.
29338# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29339#
29340case $COMPILER_NAME in
29341      gcc )
29342      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29343                          -pipe \
29344                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29345	  case $OPENJDK_TARGET_CPU_ARCH in
29346	  arm )
29347            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29348	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29349	  ;;
29350	  ppc )
29351            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29352	  ;;
29353	  * )
29354	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29355	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29356          ;;
29357	  esac
29358          ;;
29359      ossc )
29360          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29361          case $OPENJDK_TARGET_CPU_ARCH in
29362          x86 )
29363            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29364       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29365          ;;
29366          esac
29367
29368      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29369      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29370
29371          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29372          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29373          ;;
29374      cl )
29375          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29376               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29377	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29378	       -DWIN32 -DIAL"
29379          case $OPENJDK_TARGET_CPU in
29380              x86 )
29381                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29382                  ;;
29383              x86_64 )
29384                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29385                  ;;
29386          esac
29387          ;;
29388esac
29389
29390###############################################################################
29391
29392CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29393
29394# The package path is used only on macosx?
29395PACKAGE_PATH=/opt/local
29396
29397
29398if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29399    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29400    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29401    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29402    #   Note: -Dmacro         is the same as    #define macro 1
29403    #         -Dmacro=	    is the same as    #define macro
29404    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29405        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29406    else
29407        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29408    fi
29409else
29410    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29411fi
29412if test "x$OPENJDK_TARGET_OS" = xlinux; then
29413    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29414fi
29415if test "x$OPENJDK_TARGET_OS" = xwindows; then
29416    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29417fi
29418if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29419    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29420fi
29421if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29422    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29423    # Setting these parameters makes it an error to link to macosx APIs that are
29424    # newer than the given OS version and makes the linked binaries compatible even
29425    # if built on a newer version of the OS.
29426    # The expected format is X.Y.Z
29427    MACOSX_VERSION_MIN=10.7.0
29428
29429    # The macro takes the version with no dots, ex: 1070
29430    # Let the flags variables get resolved in make for easier override on make
29431    # command line.
29432    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29433    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29434fi
29435if test "x$OPENJDK_TARGET_OS" = xbsd; then
29436    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29437fi
29438if test "x$DEBUG_LEVEL" = xrelease; then
29439    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29440    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29441        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29442    fi
29443else
29444    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29445fi
29446
29447CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29448CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29449
29450CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29451        -I${JDK_OUTPUTDIR}/include \
29452        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29453        -I${JDK_TOPDIR}/src/share/javavm/export \
29454        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29455        -I${JDK_TOPDIR}/src/share/native/common \
29456        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29457
29458# The shared libraries are compiled using the picflag.
29459CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29460CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29461
29462# Executable flags
29463CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29464CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29465
29466# Now this is odd. The JDK native libraries have to link against libjvm.so
29467# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29468# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29469# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29470# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29471# libraries will link to whatever is in memory. Yuck.
29472#
29473# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29474if test "x$COMPILER_NAME" = xcl; then
29475    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29476    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29477        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29478    fi
29479    # TODO: make -debug optional "--disable-full-debug-symbols"
29480    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29481    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29482    LDFLAGS_JDKLIB_SUFFIX=""
29483    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29484        LDFLAGS_STACK_SIZE=1048576
29485    else
29486        LDFLAGS_STACK_SIZE=327680
29487    fi
29488    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29489else
29490    if test "x$COMPILER_NAME" = xgcc; then
29491        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29492        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29493        if test -n "$HAS_GNU_HASH"; then
29494            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29495        fi
29496        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29497          # And since we now know that the linker is gnu, then add -z defs, to forbid
29498          # undefined symbols in object files.
29499          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29500          if test "x$DEBUG_LEVEL" = "xrelease"; then
29501              # When building release libraries, tell the linker optimize them.
29502              # Should this be supplied to the OSS linker as well?
29503              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29504          fi
29505        fi
29506    fi
29507    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29508                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29509
29510    # On some platforms (mac) the linker warns about non existing -L dirs.
29511    # Add server first if available. Linking aginst client does not always produce the same results.
29512    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29513    # Default to server for other variants.
29514    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29515        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29516    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29517        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29518    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29519        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29520    else
29521        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29522    fi
29523
29524    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29525    if test "x$COMPILER_NAME" = xossc; then
29526        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29527    fi
29528
29529    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29530    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29531        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29532    fi
29533fi
29534
29535# Adjust flags according to debug level.
29536case $DEBUG_LEVEL in
29537      fastdebug )
29538              CFLAGS="$CFLAGS $D_FLAG"
29539              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29540              ;;
29541      slowdebug )
29542              CFLAGS="$CFLAGS $D_FLAG"
29543	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29544	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29545	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29546	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29547              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29548              ;;
29549esac
29550
29551
29552
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564
29565
29566  # Some Zero and Shark settings.
29567  # ZERO_ARCHFLAG tells the compiler which mode to build for
29568  case "${OPENJDK_TARGET_CPU}" in
29569    s390)
29570      ZERO_ARCHFLAG="-m31"
29571      ;;
29572    *)
29573      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29574  esac
29575
29576  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29577$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29578  supports=yes
29579
29580  saved_cflags="$CFLAGS"
29581  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29582  ac_ext=c
29583ac_cpp='$CPP $CPPFLAGS'
29584ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29585ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29586ac_compiler_gnu=$ac_cv_c_compiler_gnu
29587
29588  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29589/* end confdefs.h.  */
29590
29591    int i;
29592
29593_ACEOF
29594if ac_fn_c_try_compile "$LINENO"; then :
29595
29596else
29597  supports=no
29598fi
29599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29600  ac_ext=cpp
29601ac_cpp='$CXXCPP $CPPFLAGS'
29602ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29603ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29604ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29605
29606  CFLAGS="$saved_cflags"
29607
29608  saved_cxxflags="$CXXFLAGS"
29609  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29610  ac_ext=cpp
29611ac_cpp='$CXXCPP $CPPFLAGS'
29612ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29613ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29614ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29615
29616  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29617/* end confdefs.h.  */
29618
29619    int i;
29620
29621_ACEOF
29622if ac_fn_cxx_try_compile "$LINENO"; then :
29623
29624else
29625  supports=no
29626fi
29627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29628  ac_ext=cpp
29629ac_cpp='$CXXCPP $CPPFLAGS'
29630ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29631ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29632ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29633
29634  CXXFLAGS="$saved_cxxflags"
29635
29636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29637$as_echo "$supports" >&6; }
29638  if test "x$supports" = "xyes" ; then
29639    :
29640  else
29641    ZERO_ARCHFLAG=""
29642  fi
29643
29644
29645
29646  # Check that the compiler supports -mX flags
29647  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29648
29649  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29650$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29651  supports=yes
29652
29653  saved_cflags="$CFLAGS"
29654  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29655  ac_ext=c
29656ac_cpp='$CPP $CPPFLAGS'
29657ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29658ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29659ac_compiler_gnu=$ac_cv_c_compiler_gnu
29660
29661  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29662/* end confdefs.h.  */
29663
29664    int i;
29665
29666_ACEOF
29667if ac_fn_c_try_compile "$LINENO"; then :
29668
29669else
29670  supports=no
29671fi
29672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29673  ac_ext=cpp
29674ac_cpp='$CXXCPP $CPPFLAGS'
29675ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29676ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29677ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29678
29679  CFLAGS="$saved_cflags"
29680
29681  saved_cxxflags="$CXXFLAGS"
29682  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29683  ac_ext=cpp
29684ac_cpp='$CXXCPP $CPPFLAGS'
29685ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29686ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29687ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29688
29689  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29690/* end confdefs.h.  */
29691
29692    int i;
29693
29694_ACEOF
29695if ac_fn_cxx_try_compile "$LINENO"; then :
29696
29697else
29698  supports=no
29699fi
29700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29701  ac_ext=cpp
29702ac_cpp='$CXXCPP $CPPFLAGS'
29703ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29704ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29705ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29706
29707  CXXFLAGS="$saved_cxxflags"
29708
29709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29710$as_echo "$supports" >&6; }
29711  if test "x$supports" = "xyes" ; then
29712    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29713  else
29714    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29715  fi
29716
29717
29718
29719
29720# Setup debug symbols (need objcopy from the toolchain for that)
29721
29722#
29723# ENABLE_DEBUG_SYMBOLS
29724# This must be done after the toolchain is setup, since we're looking at objcopy.
29725#
29726# Check whether --enable-debug-symbols was given.
29727if test "${enable_debug_symbols+set}" = set; then :
29728  enableval=$enable_debug_symbols;
29729fi
29730
29731
29732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29733$as_echo_n "checking if we should generate debug symbols... " >&6; }
29734
29735if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29736   # explicit enabling of enable-debug-symbols and can't find objcopy
29737   #   this is an error
29738   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29739fi
29740
29741if test "x$enable_debug_symbols" = "xyes"; then
29742  ENABLE_DEBUG_SYMBOLS=true
29743elif test "x$enable_debug_symbols" = "xno"; then
29744  ENABLE_DEBUG_SYMBOLS=false
29745else
29746  # default on macosx is false
29747  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29748    ENABLE_DEBUG_SYMBOLS=false
29749  # Default is on if objcopy is found, otherwise off
29750  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29751    ENABLE_DEBUG_SYMBOLS=true
29752  else
29753    ENABLE_DEBUG_SYMBOLS=false
29754  fi
29755fi
29756
29757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29758$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29759
29760#
29761# ZIP_DEBUGINFO_FILES
29762#
29763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29764$as_echo_n "checking if we should zip debug-info files... " >&6; }
29765# Check whether --enable-zip-debug-info was given.
29766if test "${enable_zip_debug_info+set}" = set; then :
29767  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29768else
29769  enable_zip_debug_info="yes"
29770fi
29771
29772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29773$as_echo "${enable_zip_debug_info}" >&6; }
29774
29775if test "x${enable_zip_debug_info}" = "xno"; then
29776   ZIP_DEBUGINFO_FILES=false
29777else
29778   ZIP_DEBUGINFO_FILES=true
29779fi
29780
29781
29782
29783
29784
29785
29786
29787###############################################################################
29788#
29789# Check dependencies for external and internal libraries.
29790#
29791###############################################################################
29792
29793
29794
29795###############################################################################
29796#
29797# OS specific settings that we never will need to probe.
29798#
29799if test "x$OPENJDK_TARGET_OS" = xlinux; then
29800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29801$as_echo_n "checking what is not needed on Linux?... " >&6; }
29802    PULSE_NOT_NEEDED=yes
29803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29804$as_echo "pulse" >&6; }
29805fi
29806
29807if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29809$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29810    ALSA_NOT_NEEDED=yes
29811    PULSE_NOT_NEEDED=yes
29812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29813$as_echo "alsa pulse" >&6; }
29814fi
29815
29816if test "x$OPENJDK_TARGET_OS" = xwindows; then
29817    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29818$as_echo_n "checking what is not needed on Windows?... " >&6; }
29819    CUPS_NOT_NEEDED=yes
29820    ALSA_NOT_NEEDED=yes
29821    PULSE_NOT_NEEDED=yes
29822    X11_NOT_NEEDED=yes
29823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29824$as_echo "alsa cups pulse x11" >&6; }
29825fi
29826
29827if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29828    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29829$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29830    ALSA_NOT_NEEDED=yes
29831    PULSE_NOT_NEEDED=yes
29832    X11_NOT_NEEDED=yes
29833    FREETYPE2_NOT_NEEDED=yes
29834    # If the java runtime framework is disabled, then we need X11.
29835    # This will be adjusted below.
29836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29837$as_echo "alsa pulse x11" >&6; }
29838fi
29839
29840if test "x$OPENJDK_TARGET_OS" = xbsd; then
29841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29842$as_echo_n "checking what is not needed on bsd?... " >&6; }
29843    ALSA_NOT_NEEDED=yes
29844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29845$as_echo "alsa" >&6; }
29846fi
29847
29848if test "x$OPENJDK" = "xfalse"; then
29849    FREETYPE2_NOT_NEEDED=yes
29850fi
29851
29852if test "x$SUPPORT_HEADFUL" = xno; then
29853    X11_NOT_NEEDED=yes
29854fi
29855
29856###############################################################################
29857#
29858# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29859# that uses this API.
29860#
29861# Check whether --enable-macosx-runtime-support was given.
29862if test "${enable_macosx_runtime_support+set}" = set; then :
29863  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29864else
29865  MACOSX_RUNTIME_SUPPORT="no"
29866fi
29867
29868
29869USE_MACOSX_RUNTIME_SUPPORT=no
29870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29871$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29872if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29873    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29874        MACOSX_RUNTIME_SUPPORT=yes
29875        USE_MACOSX_RUNTIME_SUPPORT=yes
29876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29877$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29878    else
29879        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29880$as_echo "yes, but explicitly disabled." >&6; }
29881    fi
29882else
29883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29884$as_echo "no" >&6; }
29885fi
29886
29887if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29889$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29890    X11_NOT_NEEDED=
29891    FREETYPE2_NOT_NEEDED=
29892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29893$as_echo "alsa pulse" >&6; }
29894fi
29895
29896
29897
29898###############################################################################
29899#
29900# Check for X Windows
29901#
29902
29903# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29904# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29905# --x-libraries for the sysroot, if that seems to be correct.
29906if test "x$SYS_ROOT" != "x/"; then
29907  if test "x$x_includes" = xNONE; then
29908    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29909      x_includes="$SYS_ROOT/usr/X11R6/include"
29910    fi
29911  fi
29912  if test "x$x_libraries" = xNONE; then
29913    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29914      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29915    fi
29916  fi
29917fi
29918
29919# Now let autoconf do it's magic
29920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29921$as_echo_n "checking for X... " >&6; }
29922
29923
29924# Check whether --with-x was given.
29925if test "${with_x+set}" = set; then :
29926  withval=$with_x;
29927fi
29928
29929# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29930if test "x$with_x" = xno; then
29931  # The user explicitly disabled X.
29932  have_x=disabled
29933else
29934  case $x_includes,$x_libraries in #(
29935    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
29936    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
29937  $as_echo_n "(cached) " >&6
29938else
29939  # One or both of the vars are not set, and there is no cached value.
29940ac_x_includes=no ac_x_libraries=no
29941rm -f -r conftest.dir
29942if mkdir conftest.dir; then
29943  cd conftest.dir
29944  cat >Imakefile <<'_ACEOF'
29945incroot:
29946	@echo incroot='${INCROOT}'
29947usrlibdir:
29948	@echo usrlibdir='${USRLIBDIR}'
29949libdir:
29950	@echo libdir='${LIBDIR}'
29951_ACEOF
29952  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29953    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29954    for ac_var in incroot usrlibdir libdir; do
29955      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29956    done
29957    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29958    for ac_extension in a so sl dylib la dll; do
29959      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29960	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29961	ac_im_usrlibdir=$ac_im_libdir; break
29962      fi
29963    done
29964    # Screen out bogus values from the imake configuration.  They are
29965    # bogus both because they are the default anyway, and because
29966    # using them would break gcc on systems where it needs fixed includes.
29967    case $ac_im_incroot in
29968	/usr/include) ac_x_includes= ;;
29969	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29970    esac
29971    case $ac_im_usrlibdir in
29972	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29973	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29974    esac
29975  fi
29976  cd ..
29977  rm -f -r conftest.dir
29978fi
29979
29980# Standard set of common directories for X headers.
29981# Check X11 before X11Rn because it is often a symlink to the current release.
29982ac_x_header_dirs='
29983/usr/X11/include
29984/usr/X11R7/include
29985/usr/X11R6/include
29986/usr/X11R5/include
29987/usr/X11R4/include
29988
29989/usr/include/X11
29990/usr/include/X11R7
29991/usr/include/X11R6
29992/usr/include/X11R5
29993/usr/include/X11R4
29994
29995/usr/local/X11/include
29996/usr/local/X11R7/include
29997/usr/local/X11R6/include
29998/usr/local/X11R5/include
29999/usr/local/X11R4/include
30000
30001/usr/local/include/X11
30002/usr/local/include/X11R7
30003/usr/local/include/X11R6
30004/usr/local/include/X11R5
30005/usr/local/include/X11R4
30006
30007/usr/X386/include
30008/usr/x386/include
30009/usr/XFree86/include/X11
30010
30011/usr/include
30012/usr/local/include
30013/usr/unsupported/include
30014/usr/athena/include
30015/usr/local/x11r5/include
30016/usr/lpp/Xamples/include
30017
30018/usr/openwin/include
30019/usr/openwin/share/include'
30020
30021if test "$ac_x_includes" = no; then
30022  # Guess where to find include files, by looking for Xlib.h.
30023  # First, try using that file with no special directory specified.
30024  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30025/* end confdefs.h.  */
30026#include <X11/Xlib.h>
30027_ACEOF
30028if ac_fn_cxx_try_cpp "$LINENO"; then :
30029  # We can compile using X headers with no special include directory.
30030ac_x_includes=
30031else
30032  for ac_dir in $ac_x_header_dirs; do
30033  if test -r "$ac_dir/X11/Xlib.h"; then
30034    ac_x_includes=$ac_dir
30035    break
30036  fi
30037done
30038fi
30039rm -f conftest.err conftest.i conftest.$ac_ext
30040fi # $ac_x_includes = no
30041
30042if test "$ac_x_libraries" = no; then
30043  # Check for the libraries.
30044  # See if we find them without any special options.
30045  # Don't add to $LIBS permanently.
30046  ac_save_LIBS=$LIBS
30047  LIBS="-lX11 $LIBS"
30048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30049/* end confdefs.h.  */
30050#include <X11/Xlib.h>
30051int
30052main ()
30053{
30054XrmInitialize ()
30055  ;
30056  return 0;
30057}
30058_ACEOF
30059if ac_fn_cxx_try_link "$LINENO"; then :
30060  LIBS=$ac_save_LIBS
30061# We can link X programs with no special library path.
30062ac_x_libraries=
30063else
30064  LIBS=$ac_save_LIBS
30065for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30066do
30067  # Don't even attempt the hair of trying to link an X program!
30068  for ac_extension in a so sl dylib la dll; do
30069    if test -r "$ac_dir/libX11.$ac_extension"; then
30070      ac_x_libraries=$ac_dir
30071      break 2
30072    fi
30073  done
30074done
30075fi
30076rm -f core conftest.err conftest.$ac_objext \
30077    conftest$ac_exeext conftest.$ac_ext
30078fi # $ac_x_libraries = no
30079
30080case $ac_x_includes,$ac_x_libraries in #(
30081  no,* | *,no | *\'*)
30082    # Didn't find X, or a directory has "'" in its name.
30083    ac_cv_have_x="have_x=no";; #(
30084  *)
30085    # Record where we found X for the cache.
30086    ac_cv_have_x="have_x=yes\
30087	ac_x_includes='$ac_x_includes'\
30088	ac_x_libraries='$ac_x_libraries'"
30089esac
30090fi
30091;; #(
30092    *) have_x=yes;;
30093  esac
30094  eval "$ac_cv_have_x"
30095fi # $with_x != no
30096
30097if test "$have_x" != yes; then
30098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30099$as_echo "$have_x" >&6; }
30100  no_x=yes
30101else
30102  # If each of the values was on the command line, it overrides each guess.
30103  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30104  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30105  # Update the cache value to reflect the command line values.
30106  ac_cv_have_x="have_x=yes\
30107	ac_x_includes='$x_includes'\
30108	ac_x_libraries='$x_libraries'"
30109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30110$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30111fi
30112
30113if test "$no_x" = yes; then
30114  # Not all programs may use this symbol, but it does not hurt to define it.
30115
30116$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30117
30118  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30119else
30120  if test -n "$x_includes"; then
30121    X_CFLAGS="$X_CFLAGS -I$x_includes"
30122  fi
30123
30124  # It would also be nice to do this for all -L options, not just this one.
30125  if test -n "$x_libraries"; then
30126    X_LIBS="$X_LIBS -L$x_libraries"
30127    # For Solaris; some versions of Sun CC require a space after -R and
30128    # others require no space.  Words are not sufficient . . . .
30129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30130$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30131    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30132    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30133    ac_cxx_werror_flag=yes
30134    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30135/* end confdefs.h.  */
30136
30137int
30138main ()
30139{
30140
30141  ;
30142  return 0;
30143}
30144_ACEOF
30145if ac_fn_cxx_try_link "$LINENO"; then :
30146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30147$as_echo "no" >&6; }
30148       X_LIBS="$X_LIBS -R$x_libraries"
30149else
30150  LIBS="$ac_xsave_LIBS -R $x_libraries"
30151       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30152/* end confdefs.h.  */
30153
30154int
30155main ()
30156{
30157
30158  ;
30159  return 0;
30160}
30161_ACEOF
30162if ac_fn_cxx_try_link "$LINENO"; then :
30163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30164$as_echo "yes" >&6; }
30165	  X_LIBS="$X_LIBS -R $x_libraries"
30166else
30167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30168$as_echo "neither works" >&6; }
30169fi
30170rm -f core conftest.err conftest.$ac_objext \
30171    conftest$ac_exeext conftest.$ac_ext
30172fi
30173rm -f core conftest.err conftest.$ac_objext \
30174    conftest$ac_exeext conftest.$ac_ext
30175    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30176    LIBS=$ac_xsave_LIBS
30177  fi
30178
30179  # Check for system-dependent libraries X programs must link with.
30180  # Do this before checking for the system-independent R6 libraries
30181  # (-lICE), since we may need -lsocket or whatever for X linking.
30182
30183  if test "$ISC" = yes; then
30184    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30185  else
30186    # Martyn Johnson says this is needed for Ultrix, if the X
30187    # libraries were built with DECnet support.  And Karl Berry says
30188    # the Alpha needs dnet_stub (dnet does not exist).
30189    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30190    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30191/* end confdefs.h.  */
30192
30193/* Override any GCC internal prototype to avoid an error.
30194   Use char because int might match the return type of a GCC
30195   builtin and then its argument prototype would still apply.  */
30196#ifdef __cplusplus
30197extern "C"
30198#endif
30199char XOpenDisplay ();
30200int
30201main ()
30202{
30203return XOpenDisplay ();
30204  ;
30205  return 0;
30206}
30207_ACEOF
30208if ac_fn_cxx_try_link "$LINENO"; then :
30209
30210else
30211  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30212$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30213if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
30214  $as_echo_n "(cached) " >&6
30215else
30216  ac_check_lib_save_LIBS=$LIBS
30217LIBS="-ldnet  $LIBS"
30218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30219/* end confdefs.h.  */
30220
30221/* Override any GCC internal prototype to avoid an error.
30222   Use char because int might match the return type of a GCC
30223   builtin and then its argument prototype would still apply.  */
30224#ifdef __cplusplus
30225extern "C"
30226#endif
30227char dnet_ntoa ();
30228int
30229main ()
30230{
30231return dnet_ntoa ();
30232  ;
30233  return 0;
30234}
30235_ACEOF
30236if ac_fn_cxx_try_link "$LINENO"; then :
30237  ac_cv_lib_dnet_dnet_ntoa=yes
30238else
30239  ac_cv_lib_dnet_dnet_ntoa=no
30240fi
30241rm -f core conftest.err conftest.$ac_objext \
30242    conftest$ac_exeext conftest.$ac_ext
30243LIBS=$ac_check_lib_save_LIBS
30244fi
30245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30246$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30247if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
30248  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30249fi
30250
30251    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30252      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30253$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30254if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
30255  $as_echo_n "(cached) " >&6
30256else
30257  ac_check_lib_save_LIBS=$LIBS
30258LIBS="-ldnet_stub  $LIBS"
30259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30260/* end confdefs.h.  */
30261
30262/* Override any GCC internal prototype to avoid an error.
30263   Use char because int might match the return type of a GCC
30264   builtin and then its argument prototype would still apply.  */
30265#ifdef __cplusplus
30266extern "C"
30267#endif
30268char dnet_ntoa ();
30269int
30270main ()
30271{
30272return dnet_ntoa ();
30273  ;
30274  return 0;
30275}
30276_ACEOF
30277if ac_fn_cxx_try_link "$LINENO"; then :
30278  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30279else
30280  ac_cv_lib_dnet_stub_dnet_ntoa=no
30281fi
30282rm -f core conftest.err conftest.$ac_objext \
30283    conftest$ac_exeext conftest.$ac_ext
30284LIBS=$ac_check_lib_save_LIBS
30285fi
30286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30287$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30288if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
30289  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30290fi
30291
30292    fi
30293fi
30294rm -f core conftest.err conftest.$ac_objext \
30295    conftest$ac_exeext conftest.$ac_ext
30296    LIBS="$ac_xsave_LIBS"
30297
30298    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30299    # to get the SysV transport functions.
30300    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30301    # needs -lnsl.
30302    # The nsl library prevents programs from opening the X display
30303    # on Irix 5.2, according to T.E. Dickey.
30304    # The functions gethostbyname, getservbyname, and inet_addr are
30305    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30306    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30307if test "x$ac_cv_func_gethostbyname" = x""yes; then :
30308
30309fi
30310
30311    if test $ac_cv_func_gethostbyname = no; then
30312      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30313$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30314if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
30315  $as_echo_n "(cached) " >&6
30316else
30317  ac_check_lib_save_LIBS=$LIBS
30318LIBS="-lnsl  $LIBS"
30319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30320/* end confdefs.h.  */
30321
30322/* Override any GCC internal prototype to avoid an error.
30323   Use char because int might match the return type of a GCC
30324   builtin and then its argument prototype would still apply.  */
30325#ifdef __cplusplus
30326extern "C"
30327#endif
30328char gethostbyname ();
30329int
30330main ()
30331{
30332return gethostbyname ();
30333  ;
30334  return 0;
30335}
30336_ACEOF
30337if ac_fn_cxx_try_link "$LINENO"; then :
30338  ac_cv_lib_nsl_gethostbyname=yes
30339else
30340  ac_cv_lib_nsl_gethostbyname=no
30341fi
30342rm -f core conftest.err conftest.$ac_objext \
30343    conftest$ac_exeext conftest.$ac_ext
30344LIBS=$ac_check_lib_save_LIBS
30345fi
30346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30347$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30348if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
30349  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30350fi
30351
30352      if test $ac_cv_lib_nsl_gethostbyname = no; then
30353	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30354$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30355if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
30356  $as_echo_n "(cached) " >&6
30357else
30358  ac_check_lib_save_LIBS=$LIBS
30359LIBS="-lbsd  $LIBS"
30360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30361/* end confdefs.h.  */
30362
30363/* Override any GCC internal prototype to avoid an error.
30364   Use char because int might match the return type of a GCC
30365   builtin and then its argument prototype would still apply.  */
30366#ifdef __cplusplus
30367extern "C"
30368#endif
30369char gethostbyname ();
30370int
30371main ()
30372{
30373return gethostbyname ();
30374  ;
30375  return 0;
30376}
30377_ACEOF
30378if ac_fn_cxx_try_link "$LINENO"; then :
30379  ac_cv_lib_bsd_gethostbyname=yes
30380else
30381  ac_cv_lib_bsd_gethostbyname=no
30382fi
30383rm -f core conftest.err conftest.$ac_objext \
30384    conftest$ac_exeext conftest.$ac_ext
30385LIBS=$ac_check_lib_save_LIBS
30386fi
30387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30388$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30389if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
30390  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30391fi
30392
30393      fi
30394    fi
30395
30396    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30397    # socket/setsockopt and other routines are undefined under SCO ODT
30398    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30399    # on later versions), says Simon Leinen: it contains gethostby*
30400    # variants that don't use the name server (or something).  -lsocket
30401    # must be given before -lnsl if both are needed.  We assume that
30402    # if connect needs -lnsl, so does gethostbyname.
30403    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30404if test "x$ac_cv_func_connect" = x""yes; then :
30405
30406fi
30407
30408    if test $ac_cv_func_connect = no; then
30409      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30410$as_echo_n "checking for connect in -lsocket... " >&6; }
30411if test "${ac_cv_lib_socket_connect+set}" = set; then :
30412  $as_echo_n "(cached) " >&6
30413else
30414  ac_check_lib_save_LIBS=$LIBS
30415LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30417/* end confdefs.h.  */
30418
30419/* Override any GCC internal prototype to avoid an error.
30420   Use char because int might match the return type of a GCC
30421   builtin and then its argument prototype would still apply.  */
30422#ifdef __cplusplus
30423extern "C"
30424#endif
30425char connect ();
30426int
30427main ()
30428{
30429return connect ();
30430  ;
30431  return 0;
30432}
30433_ACEOF
30434if ac_fn_cxx_try_link "$LINENO"; then :
30435  ac_cv_lib_socket_connect=yes
30436else
30437  ac_cv_lib_socket_connect=no
30438fi
30439rm -f core conftest.err conftest.$ac_objext \
30440    conftest$ac_exeext conftest.$ac_ext
30441LIBS=$ac_check_lib_save_LIBS
30442fi
30443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30444$as_echo "$ac_cv_lib_socket_connect" >&6; }
30445if test "x$ac_cv_lib_socket_connect" = x""yes; then :
30446  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30447fi
30448
30449    fi
30450
30451    # Guillermo Gomez says -lposix is necessary on A/UX.
30452    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30453if test "x$ac_cv_func_remove" = x""yes; then :
30454
30455fi
30456
30457    if test $ac_cv_func_remove = no; then
30458      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30459$as_echo_n "checking for remove in -lposix... " >&6; }
30460if test "${ac_cv_lib_posix_remove+set}" = set; then :
30461  $as_echo_n "(cached) " >&6
30462else
30463  ac_check_lib_save_LIBS=$LIBS
30464LIBS="-lposix  $LIBS"
30465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30466/* end confdefs.h.  */
30467
30468/* Override any GCC internal prototype to avoid an error.
30469   Use char because int might match the return type of a GCC
30470   builtin and then its argument prototype would still apply.  */
30471#ifdef __cplusplus
30472extern "C"
30473#endif
30474char remove ();
30475int
30476main ()
30477{
30478return remove ();
30479  ;
30480  return 0;
30481}
30482_ACEOF
30483if ac_fn_cxx_try_link "$LINENO"; then :
30484  ac_cv_lib_posix_remove=yes
30485else
30486  ac_cv_lib_posix_remove=no
30487fi
30488rm -f core conftest.err conftest.$ac_objext \
30489    conftest$ac_exeext conftest.$ac_ext
30490LIBS=$ac_check_lib_save_LIBS
30491fi
30492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30493$as_echo "$ac_cv_lib_posix_remove" >&6; }
30494if test "x$ac_cv_lib_posix_remove" = x""yes; then :
30495  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30496fi
30497
30498    fi
30499
30500    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30501    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30502if test "x$ac_cv_func_shmat" = x""yes; then :
30503
30504fi
30505
30506    if test $ac_cv_func_shmat = no; then
30507      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30508$as_echo_n "checking for shmat in -lipc... " >&6; }
30509if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
30510  $as_echo_n "(cached) " >&6
30511else
30512  ac_check_lib_save_LIBS=$LIBS
30513LIBS="-lipc  $LIBS"
30514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30515/* end confdefs.h.  */
30516
30517/* Override any GCC internal prototype to avoid an error.
30518   Use char because int might match the return type of a GCC
30519   builtin and then its argument prototype would still apply.  */
30520#ifdef __cplusplus
30521extern "C"
30522#endif
30523char shmat ();
30524int
30525main ()
30526{
30527return shmat ();
30528  ;
30529  return 0;
30530}
30531_ACEOF
30532if ac_fn_cxx_try_link "$LINENO"; then :
30533  ac_cv_lib_ipc_shmat=yes
30534else
30535  ac_cv_lib_ipc_shmat=no
30536fi
30537rm -f core conftest.err conftest.$ac_objext \
30538    conftest$ac_exeext conftest.$ac_ext
30539LIBS=$ac_check_lib_save_LIBS
30540fi
30541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30542$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30543if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
30544  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30545fi
30546
30547    fi
30548  fi
30549
30550  # Check for libraries that X11R6 Xt/Xaw programs need.
30551  ac_save_LDFLAGS=$LDFLAGS
30552  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30553  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30554  # check for ICE first), but we must link in the order -lSM -lICE or
30555  # we get undefined symbols.  So assume we have SM if we have ICE.
30556  # These have to be linked with before -lX11, unlike the other
30557  # libraries we check for below, so use a different variable.
30558  # John Interrante, Karl Berry
30559  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30560$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30561if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
30562  $as_echo_n "(cached) " >&6
30563else
30564  ac_check_lib_save_LIBS=$LIBS
30565LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30567/* end confdefs.h.  */
30568
30569/* Override any GCC internal prototype to avoid an error.
30570   Use char because int might match the return type of a GCC
30571   builtin and then its argument prototype would still apply.  */
30572#ifdef __cplusplus
30573extern "C"
30574#endif
30575char IceConnectionNumber ();
30576int
30577main ()
30578{
30579return IceConnectionNumber ();
30580  ;
30581  return 0;
30582}
30583_ACEOF
30584if ac_fn_cxx_try_link "$LINENO"; then :
30585  ac_cv_lib_ICE_IceConnectionNumber=yes
30586else
30587  ac_cv_lib_ICE_IceConnectionNumber=no
30588fi
30589rm -f core conftest.err conftest.$ac_objext \
30590    conftest$ac_exeext conftest.$ac_ext
30591LIBS=$ac_check_lib_save_LIBS
30592fi
30593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30594$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30595if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
30596  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30597fi
30598
30599  LDFLAGS=$ac_save_LDFLAGS
30600
30601fi
30602
30603
30604# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30605# this doesn't make sense so we remove it.
30606if test "x$COMPILE_TYPE" = xcross; then
30607  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30608fi
30609
30610if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30611
30612    # Print a helpful message on how to acquire the necessary build dependency.
30613    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30614    MISSING_DEPENDENCY=x11
30615    PKGHANDLER_COMMAND=
30616
30617    case $PKGHANDLER in
30618	apt-get)
30619                apt_help     $MISSING_DEPENDENCY ;;
30620    yum)
30621                yum_help     $MISSING_DEPENDENCY ;;
30622	port)
30623                port_help    $MISSING_DEPENDENCY ;;
30624	pkgutil)
30625                pkgutil_help $MISSING_DEPENDENCY ;;
30626	pkgadd)
30627                pkgadd_help  $MISSING_DEPENDENCY ;;
30628    * )
30629      break ;;
30630    esac
30631
30632    if test "x$PKGHANDLER_COMMAND" != x; then
30633        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30634    fi
30635
30636    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30637fi
30638
30639# Some of the old makefiles require a setting of OPENWIN_HOME
30640# Since the X11R6 directory has disappeared on later Linuxes,
30641# we need to probe for it.
30642if test "x$OPENJDK_TARGET_OS" = xlinux; then
30643    if test -d "$SYS_ROOT/usr/X11R6"; then
30644        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30645    fi
30646    if test -d "$SYS_ROOT/usr/include/X11"; then
30647        OPENWIN_HOME="$SYS_ROOT/usr"
30648    fi
30649fi
30650if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30651    OPENWIN_HOME="/usr/openwin"
30652fi
30653
30654
30655
30656#
30657# Weird Sol10 something check...TODO change to try compile
30658#
30659if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30660  if test "`uname -r`" = "5.10"; then
30661     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30662     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30663     fi
30664  fi
30665fi
30666
30667ac_ext=c
30668ac_cpp='$CPP $CPPFLAGS'
30669ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30670ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30671ac_compiler_gnu=$ac_cv_c_compiler_gnu
30672
30673OLD_CFLAGS="$CFLAGS"
30674CFLAGS="$CFLAGS $X_CFLAGS"
30675
30676# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30677for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30678do :
30679  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30680ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30681                   # include <X11/Xutil.h>
30682
30683"
30684if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30685  cat >>confdefs.h <<_ACEOF
30686#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30687_ACEOF
30688 X11_A_OK=yes
30689else
30690  X11_A_OK=no; break
30691fi
30692
30693done
30694
30695
30696CFLAGS="$OLD_CFLAGS"
30697ac_ext=cpp
30698ac_cpp='$CXXCPP $CPPFLAGS'
30699ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30700ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30701ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30702
30703
30704if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30705
30706    # Print a helpful message on how to acquire the necessary build dependency.
30707    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30708    MISSING_DEPENDENCY=x11
30709    PKGHANDLER_COMMAND=
30710
30711    case $PKGHANDLER in
30712	apt-get)
30713                apt_help     $MISSING_DEPENDENCY ;;
30714    yum)
30715                yum_help     $MISSING_DEPENDENCY ;;
30716	port)
30717                port_help    $MISSING_DEPENDENCY ;;
30718	pkgutil)
30719                pkgutil_help $MISSING_DEPENDENCY ;;
30720	pkgadd)
30721                pkgadd_help  $MISSING_DEPENDENCY ;;
30722    * )
30723      break ;;
30724    esac
30725
30726    if test "x$PKGHANDLER_COMMAND" != x; then
30727        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30728    fi
30729
30730    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30731fi
30732
30733
30734
30735
30736
30737
30738###############################################################################
30739#
30740# The common unix printing system cups is used to print from java.
30741#
30742
30743# Check whether --with-cups was given.
30744if test "${with_cups+set}" = set; then :
30745  withval=$with_cups;
30746fi
30747
30748
30749# Check whether --with-cups-include was given.
30750if test "${with_cups_include+set}" = set; then :
30751  withval=$with_cups_include;
30752fi
30753
30754
30755if test "x$CUPS_NOT_NEEDED" = xyes; then
30756	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30757		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30758$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30759	fi
30760	CUPS_CFLAGS=
30761else
30762	CUPS_FOUND=no
30763
30764	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30765	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30766	fi
30767
30768	if test "x${with_cups}" != x; then
30769	    CUPS_CFLAGS="-I${with_cups}/include"
30770	    CUPS_FOUND=yes
30771	fi
30772	if test "x${with_cups_include}" != x; then
30773	    CUPS_CFLAGS="-I${with_cups_include}"
30774	    CUPS_FOUND=yes
30775	fi
30776	if test "x$CUPS_FOUND" = xno; then
30777
30778
30779    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30780        # Source the builddeps file again, to make sure it uses the latest variables!
30781        . $builddepsfile
30782        # Look for a target and build machine specific resource!
30783        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30784        if test "x$resource" = x; then
30785            # Ok, lets instead look for a target specific resource
30786            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30787        fi
30788        if test "x$resource" = x; then
30789            # Ok, lets instead look for a build specific resource
30790            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30791        fi
30792        if test "x$resource" = x; then
30793            # Ok, lets instead look for a generic resource
30794            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30795            resource=${builddep_cups}
30796        fi
30797        if test "x$resource" != x; then
30798            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30799$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30800	    # If the resource in the builddeps.conf file is an existing directory,
30801	    # for example /java/linux/cups
30802	    if test -d ${resource}; then
30803	       depdir=${resource}
30804	    else
30805
30806# cups is for example mymodule
30807# $resource is for example libs/general/libmymod_1_2_3.zip
30808# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30809# $with_builddeps_dir is for example /localhome/builddeps
30810# depdir is the name of the variable into which we store the depdir, eg MYMOD
30811# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30812# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30813    filename=`basename $resource`
30814    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30815    filebase=${filename%%.*}
30816    extension=${filename#*.}
30817    installdir=$with_builddeps_dir/$filebase
30818    if test ! -f $installdir/$filename.unpacked; then
30819        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30820$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30821        if test ! -d $installdir; then
30822            mkdir -p $installdir
30823        fi
30824        if test ! -d $installdir; then
30825            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30826        fi
30827        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30828        touch $tmpfile
30829        if test ! -f $tmpfile; then
30830            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30831        fi
30832
30833    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30834    # $tmpfile is the local file name for the downloaded file.
30835    VALID_TOOL=no
30836    if test "x$BDEPS_FTP" = xwget; then
30837       VALID_TOOL=yes
30838       wget -O $tmpfile $with_builddeps_server/$resource
30839    fi
30840    if test "x$BDEPS_FTP" = xlftp; then
30841       VALID_TOOL=yes
30842       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30843    fi
30844    if test "x$BDEPS_FTP" = xftp; then
30845        VALID_TOOL=yes
30846        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30847        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30848        FTPUSERPWD=${FTPSERVER%%@*}
30849        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30850            FTPUSER=${userpwd%%:*}
30851            FTPPWD=${userpwd#*@}
30852            FTPSERVER=${FTPSERVER#*@}
30853        else
30854            FTPUSER=ftp
30855            FTPPWD=ftp
30856        fi
30857        # the "pass" command does not work on some
30858        # ftp clients (read ftp.exe) but if it works,
30859        # passive mode is better!
30860        (\
30861            echo "user $FTPUSER $FTPPWD"        ;\
30862            echo "pass"                         ;\
30863            echo "bin"                          ;\
30864            echo "get $FTPPATH $tmpfile"              ;\
30865        ) | ftp -in $FTPSERVER
30866    fi
30867    if test "x$VALID_TOOL" != xyes; then
30868       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30869    fi
30870
30871        mv $tmpfile $installdir/$filename
30872        if test ! -s $installdir/$filename; then
30873            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30874        fi
30875        case "$extension" in
30876            zip)  echo "Unzipping $installdir/$filename..."
30877               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30878            ;;
30879            tar.gz) echo "Untaring $installdir/$filename..."
30880               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30881            ;;
30882            tgz) echo "Untaring $installdir/$filename..."
30883               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30884            ;;
30885            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30886            ;;
30887        esac
30888    fi
30889    if test -f $installdir/$filename.unpacked; then
30890        depdir=$installdir
30891    fi
30892
30893	    fi
30894            # Source the builddeps file again, because in the previous command, the depdir
30895            # was updated to point at the current build dependency install directory.
30896            . $builddepsfile
30897            # Now extract variables from the builddeps.conf files.
30898            theroot=${builddep_cups_ROOT}
30899            thecflags=${builddep_cups_CFLAGS}
30900            thelibs=${builddep_cups_LIBS}
30901            if test "x$depdir" = x; then
30902                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30903            fi
30904            CUPS=$depdir
30905            if test "x$theroot" != x; then
30906               CUPS="$theroot"
30907            fi
30908            if test "x$thecflags" != x; then
30909               CUPS_CFLAGS="$thecflags"
30910            fi
30911            if test "x$thelibs" != x; then
30912               CUPS_LIBS="$thelibs"
30913            fi
30914            CUPS_FOUND=yes
30915
30916        fi
30917
30918    fi
30919
30920	fi
30921	if test "x$CUPS_FOUND" = xno; then
30922	    # Are the cups headers installed in the default /usr/include location?
30923	    for ac_header in cups/cups.h cups/ppd.h
30924do :
30925  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30926ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30927if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30928  cat >>confdefs.h <<_ACEOF
30929#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30930_ACEOF
30931 CUPS_FOUND=yes
30932	                      CUPS_CFLAGS=
30933	                      DEFAULT_CUPS=yes
30934fi
30935
30936done
30937
30938	fi
30939	if test "x$CUPS_FOUND" = xno; then
30940	    # Getting nervous now? Lets poke around for standard Solaris third-party
30941	    # package installation locations.
30942	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30943$as_echo_n "checking for cups headers... " >&6; }
30944	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30945	       # An SFW package seems to be installed!
30946	       CUPS_FOUND=yes
30947	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30948	    elif test -s /opt/csw/include/cups/cups.h; then
30949	       # A CSW package seems to be installed!
30950	       CUPS_FOUND=yes
30951	       CUPS_CFLAGS="-I/opt/csw/include"
30952	    fi
30953	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30954$as_echo "$CUPS_FOUND" >&6; }
30955	fi
30956	if test "x$CUPS_FOUND" = xno; then
30957
30958    # Print a helpful message on how to acquire the necessary build dependency.
30959    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30960    MISSING_DEPENDENCY=cups
30961    PKGHANDLER_COMMAND=
30962
30963    case $PKGHANDLER in
30964	apt-get)
30965                apt_help     $MISSING_DEPENDENCY ;;
30966    yum)
30967                yum_help     $MISSING_DEPENDENCY ;;
30968	port)
30969                port_help    $MISSING_DEPENDENCY ;;
30970	pkgutil)
30971                pkgutil_help $MISSING_DEPENDENCY ;;
30972	pkgadd)
30973                pkgadd_help  $MISSING_DEPENDENCY ;;
30974    * )
30975      break ;;
30976    esac
30977
30978    if test "x$PKGHANDLER_COMMAND" != x; then
30979        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30980    fi
30981
30982	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30983	fi
30984fi
30985
30986
30987
30988
30989
30990
30991###############################################################################
30992#
30993# The ubiquitous freetype2 library is used to render fonts.
30994#
30995
30996# Check whether --with-freetype was given.
30997if test "${with_freetype+set}" = set; then :
30998  withval=$with_freetype;
30999fi
31000
31001
31002# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31003USING_SYSTEM_FT_LIB=false
31004
31005if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31006	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31007		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31008$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31009	fi
31010	FREETYPE2_CFLAGS=
31011	FREETYPE2_LIBS=
31012        FREETYPE2_LIB_PATH=
31013else
31014	FREETYPE2_FOUND=no
31015
31016	if test "x$with_freetype" != x; then
31017
31018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31019
31020  # Input might be given as Windows format, start by converting to
31021  # unix format.
31022  path="$with_freetype"
31023  new_path=`$CYGPATH -u "$path"`
31024
31025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31028  # "foo.exe" is OK but "foo" is an error.
31029  #
31030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31031  # It is also a way to make sure we got the proper file name for the real test later on.
31032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31033  if test "x$test_shortpath" = x; then
31034    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31035$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31036    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31037  fi
31038
31039  # Call helper function which possibly converts this using DOS-style short mode.
31040  # If so, the updated path is stored in $new_path.
31041
31042  input_path="$new_path"
31043  # Check if we need to convert this using DOS-style short mode. If the path
31044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31045  # take no chances and rewrite it.
31046  # Note: m4 eats our [], so we need to use [ and ] instead.
31047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31048  if test "x$has_forbidden_chars" != x; then
31049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31053      # Going to short mode and back again did indeed matter. Since short mode is
31054      # case insensitive, let's make it lowercase to improve readability.
31055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31056      # Now convert it back to Unix-stile (cygpath)
31057      input_path=`$CYGPATH -u "$shortmode_path"`
31058      new_path="$input_path"
31059    fi
31060  fi
31061
31062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31063  if test "x$test_cygdrive_prefix" = x; then
31064    # As a simple fix, exclude /usr/bin since it's not a real path.
31065    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31067      # a path prefixed by /cygdrive for fixpath to work.
31068      new_path="$CYGWIN_ROOT_PATH$input_path"
31069    fi
31070  fi
31071
31072
31073  if test "x$path" != "x$new_path"; then
31074    with_freetype="$new_path"
31075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31076$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31077  fi
31078
31079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31080
31081  path="$with_freetype"
31082  has_colon=`$ECHO $path | $GREP ^.:`
31083  new_path="$path"
31084  if test "x$has_colon" = x; then
31085    # Not in mixed or Windows style, start by that.
31086    new_path=`cmd //c echo $path`
31087  fi
31088
31089
31090  input_path="$new_path"
31091  # Check if we need to convert this using DOS-style short mode. If the path
31092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31093  # take no chances and rewrite it.
31094  # Note: m4 eats our [], so we need to use [ and ] instead.
31095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31096  if test "x$has_forbidden_chars" != x; then
31097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31099  fi
31100
31101
31102  windows_path="$new_path"
31103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31104    unix_path=`$CYGPATH -u "$windows_path"`
31105    new_path="$unix_path"
31106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31108    new_path="$unix_path"
31109  fi
31110
31111  if test "x$path" != "x$new_path"; then
31112    with_freetype="$new_path"
31113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31114$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31115  fi
31116
31117  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31118  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31119
31120  else
31121    # We're on a posix platform. Hooray! :)
31122    path="$with_freetype"
31123    has_space=`$ECHO "$path" | $GREP " "`
31124    if test "x$has_space" != x; then
31125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31126$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31127      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31128    fi
31129
31130    # Use eval to expand a potential ~
31131    eval path="$path"
31132    if test ! -f "$path" && test ! -d "$path"; then
31133      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31134    fi
31135
31136    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31137  fi
31138
31139	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31140            FREETYPE2_LIB_PATH="$with_freetype/lib"
31141            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31142                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31143                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31144            fi
31145            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31146                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31147            fi
31148	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31149            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31150                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31151            fi
31152 	    FREETYPE2_FOUND=yes
31153   	    if test "x$FREETYPE2_FOUND" = xyes; then
31154	        # Verify that the directories exist
31155                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31156		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31157		fi
31158	        # List the contents of the lib.
31159		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31160                if test "x$FREETYPELIB" = x; then
31161		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31162		fi
31163	        # Check one h-file
31164                if ! test -s "$with_freetype/include/ft2build.h"; then
31165		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31166		fi
31167            fi
31168        fi
31169	if test "x$FREETYPE2_FOUND" = xno; then
31170
31171
31172    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31173        # Source the builddeps file again, to make sure it uses the latest variables!
31174        . $builddepsfile
31175        # Look for a target and build machine specific resource!
31176        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31177        if test "x$resource" = x; then
31178            # Ok, lets instead look for a target specific resource
31179            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31180        fi
31181        if test "x$resource" = x; then
31182            # Ok, lets instead look for a build specific resource
31183            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31184        fi
31185        if test "x$resource" = x; then
31186            # Ok, lets instead look for a generic resource
31187            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31188            resource=${builddep_freetype2}
31189        fi
31190        if test "x$resource" != x; then
31191            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31192$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31193	    # If the resource in the builddeps.conf file is an existing directory,
31194	    # for example /java/linux/cups
31195	    if test -d ${resource}; then
31196	       depdir=${resource}
31197	    else
31198
31199# freetype2 is for example mymodule
31200# $resource is for example libs/general/libmymod_1_2_3.zip
31201# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31202# $with_builddeps_dir is for example /localhome/builddeps
31203# depdir is the name of the variable into which we store the depdir, eg MYMOD
31204# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31205# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31206    filename=`basename $resource`
31207    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31208    filebase=${filename%%.*}
31209    extension=${filename#*.}
31210    installdir=$with_builddeps_dir/$filebase
31211    if test ! -f $installdir/$filename.unpacked; then
31212        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31213$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31214        if test ! -d $installdir; then
31215            mkdir -p $installdir
31216        fi
31217        if test ! -d $installdir; then
31218            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31219        fi
31220        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31221        touch $tmpfile
31222        if test ! -f $tmpfile; then
31223            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31224        fi
31225
31226    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31227    # $tmpfile is the local file name for the downloaded file.
31228    VALID_TOOL=no
31229    if test "x$BDEPS_FTP" = xwget; then
31230       VALID_TOOL=yes
31231       wget -O $tmpfile $with_builddeps_server/$resource
31232    fi
31233    if test "x$BDEPS_FTP" = xlftp; then
31234       VALID_TOOL=yes
31235       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31236    fi
31237    if test "x$BDEPS_FTP" = xftp; then
31238        VALID_TOOL=yes
31239        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31240        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31241        FTPUSERPWD=${FTPSERVER%%@*}
31242        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31243            FTPUSER=${userpwd%%:*}
31244            FTPPWD=${userpwd#*@}
31245            FTPSERVER=${FTPSERVER#*@}
31246        else
31247            FTPUSER=ftp
31248            FTPPWD=ftp
31249        fi
31250        # the "pass" command does not work on some
31251        # ftp clients (read ftp.exe) but if it works,
31252        # passive mode is better!
31253        (\
31254            echo "user $FTPUSER $FTPPWD"        ;\
31255            echo "pass"                         ;\
31256            echo "bin"                          ;\
31257            echo "get $FTPPATH $tmpfile"              ;\
31258        ) | ftp -in $FTPSERVER
31259    fi
31260    if test "x$VALID_TOOL" != xyes; then
31261       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31262    fi
31263
31264        mv $tmpfile $installdir/$filename
31265        if test ! -s $installdir/$filename; then
31266            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31267        fi
31268        case "$extension" in
31269            zip)  echo "Unzipping $installdir/$filename..."
31270               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31271            ;;
31272            tar.gz) echo "Untaring $installdir/$filename..."
31273               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31274            ;;
31275            tgz) echo "Untaring $installdir/$filename..."
31276               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31277            ;;
31278            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31279            ;;
31280        esac
31281    fi
31282    if test -f $installdir/$filename.unpacked; then
31283        depdir=$installdir
31284    fi
31285
31286	    fi
31287            # Source the builddeps file again, because in the previous command, the depdir
31288            # was updated to point at the current build dependency install directory.
31289            . $builddepsfile
31290            # Now extract variables from the builddeps.conf files.
31291            theroot=${builddep_freetype2_ROOT}
31292            thecflags=${builddep_freetype2_CFLAGS}
31293            thelibs=${builddep_freetype2_LIBS}
31294            if test "x$depdir" = x; then
31295                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31296            fi
31297            FREETYPE2=$depdir
31298            if test "x$theroot" != x; then
31299               FREETYPE2="$theroot"
31300            fi
31301            if test "x$thecflags" != x; then
31302               FREETYPE2_CFLAGS="$thecflags"
31303            fi
31304            if test "x$thelibs" != x; then
31305               FREETYPE2_LIBS="$thelibs"
31306            fi
31307            FREETYPE2_FOUND=yes
31308            else FREETYPE2_FOUND=no
31309
31310        fi
31311        else FREETYPE2_FOUND=no
31312
31313    fi
31314
31315            USING_SYSTEM_FT_LIB=true
31316	fi
31317	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31318            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31319
31320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31321
31322  # Input might be given as Windows format, start by converting to
31323  # unix format.
31324  path="$FREETYPELOCATION"
31325  new_path=`$CYGPATH -u "$path"`
31326
31327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31330  # "foo.exe" is OK but "foo" is an error.
31331  #
31332  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31333  # It is also a way to make sure we got the proper file name for the real test later on.
31334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31335  if test "x$test_shortpath" = x; then
31336    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31337$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31338    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31339  fi
31340
31341  # Call helper function which possibly converts this using DOS-style short mode.
31342  # If so, the updated path is stored in $new_path.
31343
31344  input_path="$new_path"
31345  # Check if we need to convert this using DOS-style short mode. If the path
31346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31347  # take no chances and rewrite it.
31348  # Note: m4 eats our [], so we need to use [ and ] instead.
31349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31350  if test "x$has_forbidden_chars" != x; then
31351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31355      # Going to short mode and back again did indeed matter. Since short mode is
31356      # case insensitive, let's make it lowercase to improve readability.
31357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31358      # Now convert it back to Unix-stile (cygpath)
31359      input_path=`$CYGPATH -u "$shortmode_path"`
31360      new_path="$input_path"
31361    fi
31362  fi
31363
31364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31365  if test "x$test_cygdrive_prefix" = x; then
31366    # As a simple fix, exclude /usr/bin since it's not a real path.
31367    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31369      # a path prefixed by /cygdrive for fixpath to work.
31370      new_path="$CYGWIN_ROOT_PATH$input_path"
31371    fi
31372  fi
31373
31374
31375  if test "x$path" != "x$new_path"; then
31376    FREETYPELOCATION="$new_path"
31377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31378$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31379  fi
31380
31381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31382
31383  path="$FREETYPELOCATION"
31384  has_colon=`$ECHO $path | $GREP ^.:`
31385  new_path="$path"
31386  if test "x$has_colon" = x; then
31387    # Not in mixed or Windows style, start by that.
31388    new_path=`cmd //c echo $path`
31389  fi
31390
31391
31392  input_path="$new_path"
31393  # Check if we need to convert this using DOS-style short mode. If the path
31394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31395  # take no chances and rewrite it.
31396  # Note: m4 eats our [], so we need to use [ and ] instead.
31397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31398  if test "x$has_forbidden_chars" != x; then
31399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31401  fi
31402
31403
31404  windows_path="$new_path"
31405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31406    unix_path=`$CYGPATH -u "$windows_path"`
31407    new_path="$unix_path"
31408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31410    new_path="$unix_path"
31411  fi
31412
31413  if test "x$path" != "x$new_path"; then
31414    FREETYPELOCATION="$new_path"
31415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31416$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31417  fi
31418
31419  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31420  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31421
31422  else
31423    # We're on a posix platform. Hooray! :)
31424    path="$FREETYPELOCATION"
31425    has_space=`$ECHO "$path" | $GREP " "`
31426    if test "x$has_space" != x; then
31427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31428$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31429      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31430    fi
31431
31432    # Use eval to expand a potential ~
31433    eval path="$path"
31434    if test ! -f "$path" && test ! -d "$path"; then
31435      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31436    fi
31437
31438    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31439  fi
31440
31441	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31442$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31443	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31444	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31445	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31446 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31447                if ! test -s "$FREETYPE2_LIBS"; then
31448		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31449		fi
31450                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31451		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31452		fi
31453                USING_SYSTEM_FT_LIB=true
31454                FREETYPE2_FOUND=yes
31455	    fi
31456	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31457$as_echo "$FREETYPE2_FOUND" >&6; }
31458        fi
31459	if test "x$FREETYPE2_FOUND" = xno; then
31460
31461pkg_failed=no
31462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31463$as_echo_n "checking for FREETYPE2... " >&6; }
31464
31465if test -n "$FREETYPE2_CFLAGS"; then
31466    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31467 elif test -n "$PKG_CONFIG"; then
31468    if test -n "$PKG_CONFIG" && \
31469    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31470  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31471  ac_status=$?
31472  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31473  test $ac_status = 0; }; then
31474  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31475else
31476  pkg_failed=yes
31477fi
31478 else
31479    pkg_failed=untried
31480fi
31481if test -n "$FREETYPE2_LIBS"; then
31482    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31483 elif test -n "$PKG_CONFIG"; then
31484    if test -n "$PKG_CONFIG" && \
31485    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31486  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31487  ac_status=$?
31488  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31489  test $ac_status = 0; }; then
31490  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31491else
31492  pkg_failed=yes
31493fi
31494 else
31495    pkg_failed=untried
31496fi
31497
31498
31499
31500if test $pkg_failed = yes; then
31501
31502if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31503        _pkg_short_errors_supported=yes
31504else
31505        _pkg_short_errors_supported=no
31506fi
31507        if test $_pkg_short_errors_supported = yes; then
31508	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31509        else
31510	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31511        fi
31512	# Put the nasty error message in config.log where it belongs
31513	echo "$FREETYPE2_PKG_ERRORS" >&5
31514
31515	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31516$as_echo "no" >&6; }
31517                FREETYPE2_FOUND=no
31518elif test $pkg_failed = untried; then
31519	FREETYPE2_FOUND=no
31520else
31521	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31522	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31524$as_echo "yes" >&6; }
31525	FREETYPE2_FOUND=yes
31526fi
31527            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31528            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31529            USING_SYSTEM_FT_LIB=true
31530            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31531            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31532              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31533            fi
31534	fi
31535	if test "x$FREETYPE2_FOUND" = xno; then
31536	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31537$as_echo_n "checking for freetype in some standard locations... " >&6; }
31538
31539	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
31540	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
31541	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
31542	    fi
31543	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
31544	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
31545	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31546	    fi
31547
31548	    PREV_CXXCFLAGS="$CXXFLAGS"
31549	    PREV_LDFLAGS="$LDFLAGS"
31550	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31551	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31552	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31553/* end confdefs.h.  */
31554#include<ft2build.h>
31555	                    #include FT_FREETYPE_H
31556	                   int main() { return 0; }
31557
31558_ACEOF
31559if ac_fn_cxx_try_link "$LINENO"; then :
31560
31561	                      # Yes, the default cflags and libs did the trick.
31562	                      FREETYPE2_FOUND=yes
31563	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31564	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31565
31566else
31567
31568	                      FREETYPE2_FOUND=no
31569
31570fi
31571rm -f core conftest.err conftest.$ac_objext \
31572    conftest$ac_exeext conftest.$ac_ext
31573            CXXCFLAGS="$PREV_CXXFLAGS"
31574	    LDFLAGS="$PREV_LDFLAGS"
31575	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31576$as_echo "$FREETYPE2_FOUND" >&6; }
31577            USING_SYSTEM_FT_LIB=true
31578	fi
31579	if test "x$FREETYPE2_FOUND" = xno; then
31580
31581    # Print a helpful message on how to acquire the necessary build dependency.
31582    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31583    MISSING_DEPENDENCY=freetype2
31584    PKGHANDLER_COMMAND=
31585
31586    case $PKGHANDLER in
31587	apt-get)
31588                apt_help     $MISSING_DEPENDENCY ;;
31589    yum)
31590                yum_help     $MISSING_DEPENDENCY ;;
31591	port)
31592                port_help    $MISSING_DEPENDENCY ;;
31593	pkgutil)
31594                pkgutil_help $MISSING_DEPENDENCY ;;
31595	pkgadd)
31596                pkgadd_help  $MISSING_DEPENDENCY ;;
31597    * )
31598      break ;;
31599    esac
31600
31601    if test "x$PKGHANDLER_COMMAND" != x; then
31602        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31603    fi
31604
31605		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31606	fi
31607
31608        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31609            # AC_CHECK_LIB does not support use of cl.exe
31610            PREV_LDFLAGS="$LDFLAGS"
31611            LDFLAGS="$FREETYPE2_LIBS"
31612            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31613$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31614if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
31615  $as_echo_n "(cached) " >&6
31616else
31617  ac_check_lib_save_LIBS=$LIBS
31618LIBS="-lfreetype  $LIBS"
31619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31620/* end confdefs.h.  */
31621
31622/* Override any GCC internal prototype to avoid an error.
31623   Use char because int might match the return type of a GCC
31624   builtin and then its argument prototype would still apply.  */
31625#ifdef __cplusplus
31626extern "C"
31627#endif
31628char FT_Init_FreeType ();
31629int
31630main ()
31631{
31632return FT_Init_FreeType ();
31633  ;
31634  return 0;
31635}
31636_ACEOF
31637if ac_fn_cxx_try_link "$LINENO"; then :
31638  ac_cv_lib_freetype_FT_Init_FreeType=yes
31639else
31640  ac_cv_lib_freetype_FT_Init_FreeType=no
31641fi
31642rm -f core conftest.err conftest.$ac_objext \
31643    conftest$ac_exeext conftest.$ac_ext
31644LIBS=$ac_check_lib_save_LIBS
31645fi
31646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31647$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31648if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
31649  FREETYPE2_FOUND=true
31650else
31651  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31652fi
31653
31654            LDFLAGS="$PREV_LDFLAGS"
31655        fi
31656fi
31657
31658
31659
31660
31661
31662
31663
31664
31665
31666###############################################################################
31667#
31668# Check for alsa headers and libraries. Used on Linux/GNU systems.
31669#
31670
31671# Check whether --with-alsa was given.
31672if test "${with_alsa+set}" = set; then :
31673  withval=$with_alsa;
31674fi
31675
31676
31677# Check whether --with-alsa-include was given.
31678if test "${with_alsa_include+set}" = set; then :
31679  withval=$with_alsa_include;
31680fi
31681
31682
31683# Check whether --with-alsa-lib was given.
31684if test "${with_alsa_lib+set}" = set; then :
31685  withval=$with_alsa_lib;
31686fi
31687
31688
31689if test "x$ALSA_NOT_NEEDED" = xyes; then
31690	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31691		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31692$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31693	fi
31694	ALSA_CFLAGS=
31695	ALSA_LIBS=
31696else
31697	ALSA_FOUND=no
31698
31699	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31700	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31701	fi
31702
31703	if test "x${with_alsa}" != x; then
31704	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31705	    ALSA_CFLAGS="-I${with_alsa}/include"
31706	    ALSA_FOUND=yes
31707	fi
31708	if test "x${with_alsa_include}" != x; then
31709	    ALSA_CFLAGS="-I${with_alsa_include}"
31710	    ALSA_FOUND=yes
31711	fi
31712	if test "x${with_alsa_lib}" != x; then
31713	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31714	    ALSA_FOUND=yes
31715	fi
31716	if test "x$ALSA_FOUND" = xno; then
31717
31718
31719    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31720        # Source the builddeps file again, to make sure it uses the latest variables!
31721        . $builddepsfile
31722        # Look for a target and build machine specific resource!
31723        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31724        if test "x$resource" = x; then
31725            # Ok, lets instead look for a target specific resource
31726            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31727        fi
31728        if test "x$resource" = x; then
31729            # Ok, lets instead look for a build specific resource
31730            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31731        fi
31732        if test "x$resource" = x; then
31733            # Ok, lets instead look for a generic resource
31734            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31735            resource=${builddep_alsa}
31736        fi
31737        if test "x$resource" != x; then
31738            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31739$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31740	    # If the resource in the builddeps.conf file is an existing directory,
31741	    # for example /java/linux/cups
31742	    if test -d ${resource}; then
31743	       depdir=${resource}
31744	    else
31745
31746# alsa is for example mymodule
31747# $resource is for example libs/general/libmymod_1_2_3.zip
31748# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31749# $with_builddeps_dir is for example /localhome/builddeps
31750# depdir is the name of the variable into which we store the depdir, eg MYMOD
31751# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31752# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31753    filename=`basename $resource`
31754    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31755    filebase=${filename%%.*}
31756    extension=${filename#*.}
31757    installdir=$with_builddeps_dir/$filebase
31758    if test ! -f $installdir/$filename.unpacked; then
31759        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31760$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31761        if test ! -d $installdir; then
31762            mkdir -p $installdir
31763        fi
31764        if test ! -d $installdir; then
31765            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31766        fi
31767        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31768        touch $tmpfile
31769        if test ! -f $tmpfile; then
31770            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31771        fi
31772
31773    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31774    # $tmpfile is the local file name for the downloaded file.
31775    VALID_TOOL=no
31776    if test "x$BDEPS_FTP" = xwget; then
31777       VALID_TOOL=yes
31778       wget -O $tmpfile $with_builddeps_server/$resource
31779    fi
31780    if test "x$BDEPS_FTP" = xlftp; then
31781       VALID_TOOL=yes
31782       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31783    fi
31784    if test "x$BDEPS_FTP" = xftp; then
31785        VALID_TOOL=yes
31786        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31787        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31788        FTPUSERPWD=${FTPSERVER%%@*}
31789        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31790            FTPUSER=${userpwd%%:*}
31791            FTPPWD=${userpwd#*@}
31792            FTPSERVER=${FTPSERVER#*@}
31793        else
31794            FTPUSER=ftp
31795            FTPPWD=ftp
31796        fi
31797        # the "pass" command does not work on some
31798        # ftp clients (read ftp.exe) but if it works,
31799        # passive mode is better!
31800        (\
31801            echo "user $FTPUSER $FTPPWD"        ;\
31802            echo "pass"                         ;\
31803            echo "bin"                          ;\
31804            echo "get $FTPPATH $tmpfile"              ;\
31805        ) | ftp -in $FTPSERVER
31806    fi
31807    if test "x$VALID_TOOL" != xyes; then
31808       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31809    fi
31810
31811        mv $tmpfile $installdir/$filename
31812        if test ! -s $installdir/$filename; then
31813            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31814        fi
31815        case "$extension" in
31816            zip)  echo "Unzipping $installdir/$filename..."
31817               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31818            ;;
31819            tar.gz) echo "Untaring $installdir/$filename..."
31820               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31821            ;;
31822            tgz) echo "Untaring $installdir/$filename..."
31823               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31824            ;;
31825            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31826            ;;
31827        esac
31828    fi
31829    if test -f $installdir/$filename.unpacked; then
31830        depdir=$installdir
31831    fi
31832
31833	    fi
31834            # Source the builddeps file again, because in the previous command, the depdir
31835            # was updated to point at the current build dependency install directory.
31836            . $builddepsfile
31837            # Now extract variables from the builddeps.conf files.
31838            theroot=${builddep_alsa_ROOT}
31839            thecflags=${builddep_alsa_CFLAGS}
31840            thelibs=${builddep_alsa_LIBS}
31841            if test "x$depdir" = x; then
31842                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31843            fi
31844            ALSA=$depdir
31845            if test "x$theroot" != x; then
31846               ALSA="$theroot"
31847            fi
31848            if test "x$thecflags" != x; then
31849               ALSA_CFLAGS="$thecflags"
31850            fi
31851            if test "x$thelibs" != x; then
31852               ALSA_LIBS="$thelibs"
31853            fi
31854            ALSA_FOUND=yes
31855            else ALSA_FOUND=no
31856
31857        fi
31858        else ALSA_FOUND=no
31859
31860    fi
31861
31862	fi
31863	if test "x$ALSA_FOUND" = xno; then
31864
31865pkg_failed=no
31866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31867$as_echo_n "checking for ALSA... " >&6; }
31868
31869if test -n "$ALSA_CFLAGS"; then
31870    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31871 elif test -n "$PKG_CONFIG"; then
31872    if test -n "$PKG_CONFIG" && \
31873    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31874  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31875  ac_status=$?
31876  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31877  test $ac_status = 0; }; then
31878  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31879else
31880  pkg_failed=yes
31881fi
31882 else
31883    pkg_failed=untried
31884fi
31885if test -n "$ALSA_LIBS"; then
31886    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31887 elif test -n "$PKG_CONFIG"; then
31888    if test -n "$PKG_CONFIG" && \
31889    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31890  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31891  ac_status=$?
31892  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31893  test $ac_status = 0; }; then
31894  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31895else
31896  pkg_failed=yes
31897fi
31898 else
31899    pkg_failed=untried
31900fi
31901
31902
31903
31904if test $pkg_failed = yes; then
31905
31906if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31907        _pkg_short_errors_supported=yes
31908else
31909        _pkg_short_errors_supported=no
31910fi
31911        if test $_pkg_short_errors_supported = yes; then
31912	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31913        else
31914	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31915        fi
31916	# Put the nasty error message in config.log where it belongs
31917	echo "$ALSA_PKG_ERRORS" >&5
31918
31919	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31920$as_echo "no" >&6; }
31921                ALSA_FOUND=no
31922elif test $pkg_failed = untried; then
31923	ALSA_FOUND=no
31924else
31925	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31926	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31928$as_echo "yes" >&6; }
31929	ALSA_FOUND=yes
31930fi
31931	fi
31932	if test "x$ALSA_FOUND" = xno; then
31933	    for ac_header in alsa/asoundlib.h
31934do :
31935  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31936if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
31937  cat >>confdefs.h <<_ACEOF
31938#define HAVE_ALSA_ASOUNDLIB_H 1
31939_ACEOF
31940 ALSA_FOUND=yes
31941	                      ALSA_CFLAGS=-Iignoreme
31942	                      ALSA_LIBS=-lasound
31943	                      DEFAULT_ALSA=yes
31944else
31945  ALSA_FOUND=no
31946fi
31947
31948done
31949
31950	fi
31951	if test "x$ALSA_FOUND" = xno; then
31952
31953    # Print a helpful message on how to acquire the necessary build dependency.
31954    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31955    MISSING_DEPENDENCY=alsa
31956    PKGHANDLER_COMMAND=
31957
31958    case $PKGHANDLER in
31959	apt-get)
31960                apt_help     $MISSING_DEPENDENCY ;;
31961    yum)
31962                yum_help     $MISSING_DEPENDENCY ;;
31963	port)
31964                port_help    $MISSING_DEPENDENCY ;;
31965	pkgutil)
31966                pkgutil_help $MISSING_DEPENDENCY ;;
31967	pkgadd)
31968                pkgadd_help  $MISSING_DEPENDENCY ;;
31969    * )
31970      break ;;
31971    esac
31972
31973    if test "x$PKGHANDLER_COMMAND" != x; then
31974        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31975    fi
31976
31977	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31978	fi
31979fi
31980
31981
31982
31983
31984
31985
31986
31987###############################################################################
31988#
31989# Check for the jpeg library
31990#
31991
31992USE_EXTERNAL_LIBJPEG=true
31993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31994$as_echo_n "checking for main in -ljpeg... " >&6; }
31995if test "${ac_cv_lib_jpeg_main+set}" = set; then :
31996  $as_echo_n "(cached) " >&6
31997else
31998  ac_check_lib_save_LIBS=$LIBS
31999LIBS="-ljpeg  $LIBS"
32000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32001/* end confdefs.h.  */
32002
32003
32004int
32005main ()
32006{
32007return main ();
32008  ;
32009  return 0;
32010}
32011_ACEOF
32012if ac_fn_cxx_try_link "$LINENO"; then :
32013  ac_cv_lib_jpeg_main=yes
32014else
32015  ac_cv_lib_jpeg_main=no
32016fi
32017rm -f core conftest.err conftest.$ac_objext \
32018    conftest$ac_exeext conftest.$ac_ext
32019LIBS=$ac_check_lib_save_LIBS
32020fi
32021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32022$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32023if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
32024  cat >>confdefs.h <<_ACEOF
32025#define HAVE_LIBJPEG 1
32026_ACEOF
32027
32028  LIBS="-ljpeg $LIBS"
32029
32030else
32031   USE_EXTERNAL_LIBJPEG=false
32032               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32033$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32034
32035fi
32036
32037
32038
32039###############################################################################
32040#
32041# Check for the gif library
32042#
32043
32044
32045# Check whether --with-giflib was given.
32046if test "${with_giflib+set}" = set; then :
32047  withval=$with_giflib;
32048fi
32049
32050
32051
32052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32053$as_echo_n "checking for which giflib to use... " >&6; }
32054
32055# default is bundled
32056DEFAULT_GIFLIB=bundled
32057
32058#
32059# if user didn't specify, use DEFAULT_GIFLIB
32060#
32061if test "x${with_giflib}" = "x"; then
32062    with_giflib=${DEFAULT_GIFLIB}
32063fi
32064
32065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32066$as_echo "${with_giflib}" >&6; }
32067
32068if test "x${with_giflib}" = "xbundled"; then
32069    USE_EXTERNAL_LIBGIF=false
32070elif test "x${with_giflib}" = "xsystem"; then
32071    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32072if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
32073
32074else
32075   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32076fi
32077
32078
32079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32080$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32081if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
32082  $as_echo_n "(cached) " >&6
32083else
32084  ac_check_lib_save_LIBS=$LIBS
32085LIBS="-lgif  $LIBS"
32086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32087/* end confdefs.h.  */
32088
32089/* Override any GCC internal prototype to avoid an error.
32090   Use char because int might match the return type of a GCC
32091   builtin and then its argument prototype would still apply.  */
32092#ifdef __cplusplus
32093extern "C"
32094#endif
32095char DGifGetCode ();
32096int
32097main ()
32098{
32099return DGifGetCode ();
32100  ;
32101  return 0;
32102}
32103_ACEOF
32104if ac_fn_cxx_try_link "$LINENO"; then :
32105  ac_cv_lib_gif_DGifGetCode=yes
32106else
32107  ac_cv_lib_gif_DGifGetCode=no
32108fi
32109rm -f core conftest.err conftest.$ac_objext \
32110    conftest$ac_exeext conftest.$ac_ext
32111LIBS=$ac_check_lib_save_LIBS
32112fi
32113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32114$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32115if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
32116  cat >>confdefs.h <<_ACEOF
32117#define HAVE_LIBGIF 1
32118_ACEOF
32119
32120  LIBS="-lgif $LIBS"
32121
32122else
32123   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32124fi
32125
32126
32127    USE_EXTERNAL_LIBGIF=true
32128else
32129    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32130fi
32131
32132
32133###############################################################################
32134#
32135# Check for the zlib library
32136#
32137
32138
32139# Check whether --with-zlib was given.
32140if test "${with_zlib+set}" = set; then :
32141  withval=$with_zlib;
32142fi
32143
32144
32145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32146$as_echo_n "checking for compress in -lz... " >&6; }
32147if test "${ac_cv_lib_z_compress+set}" = set; then :
32148  $as_echo_n "(cached) " >&6
32149else
32150  ac_check_lib_save_LIBS=$LIBS
32151LIBS="-lz  $LIBS"
32152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32153/* end confdefs.h.  */
32154
32155/* Override any GCC internal prototype to avoid an error.
32156   Use char because int might match the return type of a GCC
32157   builtin and then its argument prototype would still apply.  */
32158#ifdef __cplusplus
32159extern "C"
32160#endif
32161char compress ();
32162int
32163main ()
32164{
32165return compress ();
32166  ;
32167  return 0;
32168}
32169_ACEOF
32170if ac_fn_cxx_try_link "$LINENO"; then :
32171  ac_cv_lib_z_compress=yes
32172else
32173  ac_cv_lib_z_compress=no
32174fi
32175rm -f core conftest.err conftest.$ac_objext \
32176    conftest$ac_exeext conftest.$ac_ext
32177LIBS=$ac_check_lib_save_LIBS
32178fi
32179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32180$as_echo "$ac_cv_lib_z_compress" >&6; }
32181if test "x$ac_cv_lib_z_compress" = x""yes; then :
32182   ZLIB_FOUND=yes
32183else
32184   ZLIB_FOUND=no
32185fi
32186
32187
32188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32189$as_echo_n "checking for which zlib to use... " >&6; }
32190
32191DEFAULT_ZLIB=bundled
32192if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32193#
32194# On macosx default is system...on others default is
32195#
32196    DEFAULT_ZLIB=system
32197fi
32198
32199if test "x${ZLIB_FOUND}" != "xyes"; then
32200#
32201# If we don't find any system...set default to bundled
32202#
32203    DEFAULT_ZLIB=bundled
32204fi
32205
32206#
32207# If user didn't specify, use DEFAULT_ZLIB
32208#
32209if test "x${with_zlib}" = "x"; then
32210    with_zlib=${DEFAULT_ZLIB}
32211fi
32212
32213if test "x${with_zlib}" = "xbundled"; then
32214    USE_EXTERNAL_LIBZ=false
32215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32216$as_echo "bundled" >&6; }
32217elif test "x${with_zlib}" = "xsystem"; then
32218    if test "x${ZLIB_FOUND}" = "xyes"; then
32219        USE_EXTERNAL_LIBZ=true
32220        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32221$as_echo "system" >&6; }
32222    else
32223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32224$as_echo "system not found" >&6; }
32225        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32226    fi
32227else
32228    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32229fi
32230
32231
32232
32233###############################################################################
32234LIBZIP_CAN_USE_MMAP=true
32235
32236
32237
32238###############################################################################
32239#
32240# Check if altzone exists in time.h
32241#
32242
32243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32244/* end confdefs.h.  */
32245#include <time.h>
32246int
32247main ()
32248{
32249return (int)altzone;
32250  ;
32251  return 0;
32252}
32253_ACEOF
32254if ac_fn_cxx_try_link "$LINENO"; then :
32255  has_altzone=yes
32256else
32257  has_altzone=no
32258fi
32259rm -f core conftest.err conftest.$ac_objext \
32260    conftest$ac_exeext conftest.$ac_ext
32261if test "x$has_altzone" = xyes; then
32262
32263$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32264
32265fi
32266
32267###############################################################################
32268#
32269# Check the maths library
32270#
32271
32272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32273$as_echo_n "checking for cos in -lm... " >&6; }
32274if test "${ac_cv_lib_m_cos+set}" = set; then :
32275  $as_echo_n "(cached) " >&6
32276else
32277  ac_check_lib_save_LIBS=$LIBS
32278LIBS="-lm  $LIBS"
32279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32280/* end confdefs.h.  */
32281
32282/* Override any GCC internal prototype to avoid an error.
32283   Use char because int might match the return type of a GCC
32284   builtin and then its argument prototype would still apply.  */
32285#ifdef __cplusplus
32286extern "C"
32287#endif
32288char cos ();
32289int
32290main ()
32291{
32292return cos ();
32293  ;
32294  return 0;
32295}
32296_ACEOF
32297if ac_fn_cxx_try_link "$LINENO"; then :
32298  ac_cv_lib_m_cos=yes
32299else
32300  ac_cv_lib_m_cos=no
32301fi
32302rm -f core conftest.err conftest.$ac_objext \
32303    conftest$ac_exeext conftest.$ac_ext
32304LIBS=$ac_check_lib_save_LIBS
32305fi
32306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32307$as_echo "$ac_cv_lib_m_cos" >&6; }
32308if test "x$ac_cv_lib_m_cos" = x""yes; then :
32309  cat >>confdefs.h <<_ACEOF
32310#define HAVE_LIBM 1
32311_ACEOF
32312
32313  LIBS="-lm $LIBS"
32314
32315else
32316
32317                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32318$as_echo "$as_me: Maths library was not found" >&6;}
32319
32320fi
32321
32322
32323
32324###############################################################################
32325#
32326# Check for libdl.so
32327
32328save_LIBS="$LIBS"
32329LIBS=""
32330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32331$as_echo_n "checking for dlopen in -ldl... " >&6; }
32332if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
32333  $as_echo_n "(cached) " >&6
32334else
32335  ac_check_lib_save_LIBS=$LIBS
32336LIBS="-ldl  $LIBS"
32337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32338/* end confdefs.h.  */
32339
32340/* Override any GCC internal prototype to avoid an error.
32341   Use char because int might match the return type of a GCC
32342   builtin and then its argument prototype would still apply.  */
32343#ifdef __cplusplus
32344extern "C"
32345#endif
32346char dlopen ();
32347int
32348main ()
32349{
32350return dlopen ();
32351  ;
32352  return 0;
32353}
32354_ACEOF
32355if ac_fn_cxx_try_link "$LINENO"; then :
32356  ac_cv_lib_dl_dlopen=yes
32357else
32358  ac_cv_lib_dl_dlopen=no
32359fi
32360rm -f core conftest.err conftest.$ac_objext \
32361    conftest$ac_exeext conftest.$ac_ext
32362LIBS=$ac_check_lib_save_LIBS
32363fi
32364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32365$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32366if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
32367  cat >>confdefs.h <<_ACEOF
32368#define HAVE_LIBDL 1
32369_ACEOF
32370
32371  LIBS="-ldl $LIBS"
32372
32373fi
32374
32375LIBDL="$LIBS"
32376
32377LIBS="$save_LIBS"
32378
32379
32380
32381###############################################################################
32382#
32383# statically link libstdc++ before C++ ABI is stablized on Linux unless
32384# dynamic build is configured on command line.
32385#
32386
32387# Check whether --with-stdc++lib was given.
32388if test "${with_stdc__lib+set}" = set; then :
32389  withval=$with_stdc__lib;
32390    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32391        && test "x$with_stdc__lib" != xdefault; then
32392      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32393    fi
32394
32395else
32396  with_stdc__lib=default
32397
32398fi
32399
32400
32401if test "x$OPENJDK_TARGET_OS" = xlinux; then
32402    # Test if -lstdc++ works.
32403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32404$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32405    ac_ext=cpp
32406ac_cpp='$CXXCPP $CPPFLAGS'
32407ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32408ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32409ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32410
32411    OLD_CXXFLAGS="$CXXFLAGS"
32412    CXXFLAGS="$CXXFLAGS -lstdc++"
32413    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32414/* end confdefs.h.  */
32415
32416int
32417main ()
32418{
32419return 0;
32420  ;
32421  return 0;
32422}
32423_ACEOF
32424if ac_fn_cxx_try_link "$LINENO"; then :
32425  has_dynamic_libstdcxx=yes
32426else
32427  has_dynamic_libstdcxx=no
32428fi
32429rm -f core conftest.err conftest.$ac_objext \
32430    conftest$ac_exeext conftest.$ac_ext
32431    CXXFLAGS="$OLD_CXXFLAGS"
32432    ac_ext=cpp
32433ac_cpp='$CXXCPP $CPPFLAGS'
32434ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32435ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32436ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32437
32438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32439$as_echo "$has_dynamic_libstdcxx" >&6; }
32440
32441    # Test if stdc++ can be linked statically.
32442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32443$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32444    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32445    ac_ext=cpp
32446ac_cpp='$CXXCPP $CPPFLAGS'
32447ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32448ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32449ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32450
32451    OLD_LIBS="$LIBS"
32452    OLD_CXX="$CXX"
32453    LIBS="$STATIC_STDCXX_FLAGS"
32454    CXX="$CC"
32455    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32456/* end confdefs.h.  */
32457
32458int
32459main ()
32460{
32461return 0;
32462  ;
32463  return 0;
32464}
32465_ACEOF
32466if ac_fn_cxx_try_link "$LINENO"; then :
32467  has_static_libstdcxx=yes
32468else
32469  has_static_libstdcxx=no
32470fi
32471rm -f core conftest.err conftest.$ac_objext \
32472    conftest$ac_exeext conftest.$ac_ext
32473    LIBS="$OLD_LIBS"
32474    CXX="$OLD_CXX"
32475    ac_ext=cpp
32476ac_cpp='$CXXCPP $CPPFLAGS'
32477ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32478ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32479ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32480
32481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32482$as_echo "$has_static_libstdcxx" >&6; }
32483
32484    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32485        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32486    fi
32487
32488    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32489        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32490    fi
32491
32492    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32493        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32494    fi
32495
32496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32497$as_echo_n "checking how to link with libstdc++... " >&6; }
32498    # If dynamic was requested, it's available since it would fail above otherwise.
32499    # If dynamic wasn't requested, go with static unless it isn't available.
32500    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32501        LIBCXX="$LIBCXX -lstdc++"
32502        LDCXX="$CXX"
32503        STATIC_CXX_SETTING="STATIC_CXX=false"
32504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32505$as_echo "dynamic" >&6; }
32506    else
32507        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32508        LDCXX="$CC"
32509        STATIC_CXX_SETTING="STATIC_CXX=true"
32510        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32511$as_echo "static" >&6; }
32512    fi
32513fi
32514
32515
32516if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32517    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32518
32519pkg_failed=no
32520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32521$as_echo_n "checking for LIBFFI... " >&6; }
32522
32523if test -n "$LIBFFI_CFLAGS"; then
32524    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32525 elif test -n "$PKG_CONFIG"; then
32526    if test -n "$PKG_CONFIG" && \
32527    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32528  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32529  ac_status=$?
32530  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32531  test $ac_status = 0; }; then
32532  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32533else
32534  pkg_failed=yes
32535fi
32536 else
32537    pkg_failed=untried
32538fi
32539if test -n "$LIBFFI_LIBS"; then
32540    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32541 elif test -n "$PKG_CONFIG"; then
32542    if test -n "$PKG_CONFIG" && \
32543    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32544  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32545  ac_status=$?
32546  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32547  test $ac_status = 0; }; then
32548  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32549else
32550  pkg_failed=yes
32551fi
32552 else
32553    pkg_failed=untried
32554fi
32555
32556
32557
32558if test $pkg_failed = yes; then
32559
32560if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32561        _pkg_short_errors_supported=yes
32562else
32563        _pkg_short_errors_supported=no
32564fi
32565        if test $_pkg_short_errors_supported = yes; then
32566	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32567        else
32568	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32569        fi
32570	# Put the nasty error message in config.log where it belongs
32571	echo "$LIBFFI_PKG_ERRORS" >&5
32572
32573	as_fn_error $? "Package requirements (libffi) were not met:
32574
32575$LIBFFI_PKG_ERRORS
32576
32577Consider adjusting the PKG_CONFIG_PATH environment variable if you
32578installed software in a non-standard prefix.
32579
32580Alternatively, you may set the environment variables LIBFFI_CFLAGS
32581and LIBFFI_LIBS to avoid the need to call pkg-config.
32582See the pkg-config man page for more details.
32583" "$LINENO" 5
32584elif test $pkg_failed = untried; then
32585	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32586$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32587as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32588is in your PATH or set the PKG_CONFIG environment variable to the full
32589path to pkg-config.
32590
32591Alternatively, you may set the environment variables LIBFFI_CFLAGS
32592and LIBFFI_LIBS to avoid the need to call pkg-config.
32593See the pkg-config man page for more details.
32594
32595To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32596See \`config.log' for more details" "$LINENO" 5 ; }
32597else
32598	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32599	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32601$as_echo "yes" >&6; }
32602	:
32603fi
32604
32605fi
32606
32607if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32608    # Extract the first word of "llvm-config", so it can be a program name with args.
32609set dummy llvm-config; ac_word=$2
32610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32611$as_echo_n "checking for $ac_word... " >&6; }
32612if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
32613  $as_echo_n "(cached) " >&6
32614else
32615  if test -n "$LLVM_CONFIG"; then
32616  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32617else
32618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32619for as_dir in $PATH
32620do
32621  IFS=$as_save_IFS
32622  test -z "$as_dir" && as_dir=.
32623    for ac_exec_ext in '' $ac_executable_extensions; do
32624  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32625    ac_cv_prog_LLVM_CONFIG="llvm-config"
32626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32627    break 2
32628  fi
32629done
32630  done
32631IFS=$as_save_IFS
32632
32633fi
32634fi
32635LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32636if test -n "$LLVM_CONFIG"; then
32637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32638$as_echo "$LLVM_CONFIG" >&6; }
32639else
32640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32641$as_echo "no" >&6; }
32642fi
32643
32644
32645
32646    if test "x$LLVM_CONFIG" != xllvm-config; then
32647        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32648    fi
32649
32650    llvm_components="jit mcjit engine nativecodegen native"
32651    unset LLVM_CFLAGS
32652    for flag in $("$LLVM_CONFIG" --cxxflags); do
32653      if echo "${flag}" | grep -q '^-[ID]'; then
32654        if test "${flag}" != "-D_DEBUG" ; then
32655          if test "${LLVM_CFLAGS}" != "" ; then
32656            LLVM_CFLAGS="${LLVM_CFLAGS} "
32657          fi
32658          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32659        fi
32660      fi
32661    done
32662    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32663    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32664
32665    unset LLVM_LDFLAGS
32666    for flag in $("${LLVM_CONFIG}" --ldflags); do
32667      if echo "${flag}" | grep -q '^-L'; then
32668        if test "${LLVM_LDFLAGS}" != ""; then
32669          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32670        fi
32671        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32672      fi
32673    done
32674
32675    unset LLVM_LIBS
32676    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32677      if echo "${flag}" | grep -q '^-l'; then
32678        if test "${LLVM_LIBS}" != ""; then
32679          LLVM_LIBS="${LLVM_LIBS} "
32680        fi
32681        LLVM_LIBS="${LLVM_LIBS}${flag}"
32682      fi
32683    done
32684
32685
32686
32687
32688fi
32689
32690# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32691if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32692    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32693fi
32694
32695# TODO better (platform agnostic) test
32696if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32697    LIBCXX="-lstdc++"
32698fi
32699
32700
32701
32702
32703
32704# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32705
32706# When using cygwin or msys, we need a wrapper binary that renames
32707# /cygdrive/c/ arguments into c:/ arguments and peeks into
32708# @files and rewrites these too! This wrapper binary is
32709# called fixpath.
32710FIXPATH=
32711if test "x$OPENJDK_BUILD_OS" = xwindows; then
32712    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32713$as_echo_n "checking if fixpath can be created... " >&6; }
32714    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32715    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32716    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32717      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32718      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32719      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32720      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32721    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32722      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32723      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32724
32725      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32726      # @ was chosen as separator to minimize risk of other tools messing around with it
32727      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32728      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32729
32730      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32731    fi
32732    rm -f $OUTPUT_ROOT/fixpath*
32733    cd $OUTPUT_ROOT
32734    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32735    cd $CURDIR
32736
32737    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32738        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32739$as_echo "no" >&6; }
32740        cat $OUTPUT_ROOT/fixpath1.log
32741        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32742    fi
32743    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32744$as_echo "yes" >&6; }
32745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32746$as_echo_n "checking if fixpath.exe works... " >&6; }
32747    cd $OUTPUT_ROOT
32748    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32749    cd $CURDIR
32750    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32752$as_echo "no" >&6; }
32753        cat $OUTPUT_ROOT/fixpath2.log
32754        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32755    fi
32756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32757$as_echo "yes" >&6; }
32758    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32759fi
32760
32761
32762
32763
32764###############################################################################
32765#
32766# We need to do some final tweaking, when everything else is done.
32767#
32768###############################################################################
32769
32770
32771HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32772
32773
32774# The name of the Service Agent jar.
32775SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32776if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32777  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32778fi
32779
32780
32781
32782
32783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32784$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32785
32786if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32787    ENABLE_INTREE_EC=yes
32788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32789$as_echo "yes" >&6; }
32790else
32791    ENABLE_INTREE_EC=no
32792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32793$as_echo "no" >&6; }
32794fi
32795
32796
32797
32798
32799###############################################################################
32800#
32801# Configure parts of the build that only affect the build performance,
32802# not the result.
32803#
32804###############################################################################
32805
32806
32807  # How many cores do we have on this build system?
32808
32809# Check whether --with-num-cores was given.
32810if test "${with_num_cores+set}" = set; then :
32811  withval=$with_num_cores;
32812fi
32813
32814  if test "x$with_num_cores" = x; then
32815    # The number of cores were not specified, try to probe them.
32816
32817    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32818$as_echo_n "checking for number of cores... " >&6; }
32819    NUM_CORES=1
32820    FOUND_CORES=no
32821
32822    if test -f /proc/cpuinfo; then
32823        # Looks like a Linux (or cygwin) system
32824        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32825        FOUND_CORES=yes
32826    elif test -x /usr/sbin/psrinfo; then
32827        # Looks like a Solaris system
32828        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32829        FOUND_CORES=yes
32830    elif test -x /usr/sbin/system_profiler; then
32831        # Looks like a MacOSX system
32832        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32833        FOUND_CORES=yes
32834    elif test -n "$NUMBER_OF_PROCESSORS"; then
32835        # On windows, look in the env
32836        NUM_CORES=$NUMBER_OF_PROCESSORS
32837        FOUND_CORES=yes
32838    fi
32839
32840    if test "x$FOUND_CORES" = xyes; then
32841        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32842$as_echo "$NUM_CORES" >&6; }
32843    else
32844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32845$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32846        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32847$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32848    fi
32849
32850
32851  else
32852    NUM_CORES=$with_num_cores
32853  fi
32854
32855
32856
32857  # How much memory do we have on this build system?
32858
32859# Check whether --with-memory-size was given.
32860if test "${with_memory_size+set}" = set; then :
32861  withval=$with_memory_size;
32862fi
32863
32864  if test "x$with_memory_size" = x; then
32865    # The memory size was not specified, try to probe it.
32866
32867    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32868$as_echo_n "checking for memory size... " >&6; }
32869    # Default to 1024 MB
32870    MEMORY_SIZE=1024
32871    FOUND_MEM=no
32872
32873    if test -f /proc/meminfo; then
32874        # Looks like a Linux (or cygwin) system
32875        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32876        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32877        FOUND_MEM=yes
32878    elif test -x /usr/sbin/prtconf; then
32879        # Looks like a Solaris system
32880        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32881        FOUND_MEM=yes
32882    elif test -x /usr/sbin/system_profiler; then
32883        # Looks like a MacOSX system
32884        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32885        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32886        FOUND_MEM=yes
32887    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32888        # Windows, but without cygwin
32889        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32890        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32891        FOUND_MEM=yes
32892    fi
32893
32894    if test "x$FOUND_MEM" = xyes; then
32895        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32896$as_echo "$MEMORY_SIZE MB" >&6; }
32897    else
32898        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32899$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32900        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32901$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32902    fi
32903
32904  else
32905    MEMORY_SIZE=$with_memory_size
32906  fi
32907
32908
32909
32910  # Provide a decent default number of parallel jobs for make depending on
32911  # number of cores, amount of memory and machine architecture.
32912
32913# Check whether --with-jobs was given.
32914if test "${with_jobs+set}" = set; then :
32915  withval=$with_jobs;
32916fi
32917
32918  if test "x$with_jobs" = x; then
32919    # Number of jobs was not specified, calculate.
32920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32921$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32922    # Approximate memory in GB, rounding up a bit.
32923    memory_gb=`expr $MEMORY_SIZE / 1100`
32924    # Pick the lowest of memory in gb and number of cores.
32925    if test "$memory_gb" -lt "$NUM_CORES"; then
32926      JOBS="$memory_gb"
32927    else
32928      JOBS="$NUM_CORES"
32929      # On bigger machines, leave some room for other processes to run
32930      if test "$JOBS" -gt "4"; then
32931        JOBS=`expr $JOBS '*' 90 / 100`
32932      fi
32933    fi
32934    # Cap number of jobs to 16
32935    if test "$JOBS" -gt "16"; then
32936      JOBS=16
32937    fi
32938    if test "$JOBS" -eq "0"; then
32939      JOBS=1
32940    fi
32941    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32942$as_echo "$JOBS" >&6; }
32943  else
32944    JOBS=$with_jobs
32945  fi
32946
32947
32948
32949# Setup smart javac (after cores and memory have been setup)
32950
32951
32952# Check whether --with-sjavac-server-java was given.
32953if test "${with_sjavac_server_java+set}" = set; then :
32954  withval=$with_sjavac_server_java;
32955fi
32956
32957
32958if test "x$with_sjavac_server_java" != x; then
32959    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32960    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32961    if test "x$FOUND_VERSION" = x; then
32962        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32963    fi
32964else
32965    SJAVAC_SERVER_JAVA=""
32966    # Hotspot specific options.
32967
32968    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
32969    $ECHO "Command: $JAVA -verbosegc -version" >&5
32970    OUTPUT=`$JAVA -verbosegc -version 2>&1`
32971    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32972    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32973    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32974        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32975	JVM_ARG_OK=true
32976    else
32977	$ECHO "Arg failed:" >&5
32978	$ECHO "$OUTPUT" >&5
32979	JVM_ARG_OK=false
32980    fi
32981
32982    # JRockit specific options.
32983
32984    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
32985    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
32986    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
32987    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32988    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32989    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32990        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32991	JVM_ARG_OK=true
32992    else
32993	$ECHO "Arg failed:" >&5
32994	$ECHO "$OUTPUT" >&5
32995	JVM_ARG_OK=false
32996    fi
32997
32998    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32999fi
33000
33001
33002if test "$MEMORY_SIZE" -gt "2500"; then
33003
33004    $ECHO "Check if jvm arg is ok: -d64" >&5
33005    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33006    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33007    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33008    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33009    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33010        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33011	JVM_ARG_OK=true
33012    else
33013	$ECHO "Arg failed:" >&5
33014	$ECHO "$OUTPUT" >&5
33015	JVM_ARG_OK=false
33016    fi
33017
33018    if test "$JVM_ARG_OK" = true; then
33019        JVM_64BIT=true
33020	JVM_ARG_OK=false
33021    fi
33022    fi
33023
33024if test "$JVM_64BIT" = true; then
33025    if test "$MEMORY_SIZE" -gt "17000"; then
33026
33027    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33028    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33029    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33030    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33031    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33032    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33033        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33034	JVM_ARG_OK=true
33035    else
33036	$ECHO "Arg failed:" >&5
33037	$ECHO "$OUTPUT" >&5
33038	JVM_ARG_OK=false
33039    fi
33040
33041    fi
33042    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33043
33044    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33045    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33046    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33047    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33048    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33049    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33050        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33051	JVM_ARG_OK=true
33052    else
33053	$ECHO "Arg failed:" >&5
33054	$ECHO "$OUTPUT" >&5
33055	JVM_ARG_OK=false
33056    fi
33057
33058    fi
33059    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33060
33061    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33062    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33063    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33064    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33065    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33066    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33067        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33068	JVM_ARG_OK=true
33069    else
33070	$ECHO "Arg failed:" >&5
33071	$ECHO "$OUTPUT" >&5
33072	JVM_ARG_OK=false
33073    fi
33074
33075    fi
33076    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33077
33078    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33079    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33080    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33081    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33082    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33083    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33084        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33085	JVM_ARG_OK=true
33086    else
33087	$ECHO "Arg failed:" >&5
33088	$ECHO "$OUTPUT" >&5
33089	JVM_ARG_OK=false
33090    fi
33091
33092    fi
33093fi
33094if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33095
33096    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33097    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33098    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33099    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33100    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33101    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33102        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33103	JVM_ARG_OK=true
33104    else
33105	$ECHO "Arg failed:" >&5
33106	$ECHO "$OUTPUT" >&5
33107	JVM_ARG_OK=false
33108    fi
33109
33110fi
33111if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33112
33113    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33114    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33115    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33116    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33117    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33118    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33119        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33120	JVM_ARG_OK=true
33121    else
33122	$ECHO "Arg failed:" >&5
33123	$ECHO "$OUTPUT" >&5
33124	JVM_ARG_OK=false
33125    fi
33126
33127fi
33128if test "$JVM_ARG_OK" = false; then
33129
33130    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33131    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33132    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33133    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33134    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33135    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33136        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33137	JVM_ARG_OK=true
33138    else
33139	$ECHO "Arg failed:" >&5
33140	$ECHO "$OUTPUT" >&5
33141	JVM_ARG_OK=false
33142    fi
33143
33144fi
33145
33146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33147$as_echo_n "checking whether to use sjavac... " >&6; }
33148# Check whether --enable-sjavac was given.
33149if test "${enable_sjavac+set}" = set; then :
33150  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33151else
33152  ENABLE_SJAVAC='no'
33153fi
33154
33155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33156$as_echo "$ENABLE_SJAVAC" >&6; }
33157
33158
33159if test "x$ENABLE_SJAVAC" = xyes; then
33160    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33161else
33162    SJAVAC_SERVER_DIR=
33163fi
33164
33165
33166
33167
33168# Can the C/C++ compiler use precompiled headers?
33169
33170
33171###############################################################################
33172#
33173# Can the C/C++ compiler use precompiled headers?
33174#
33175# Check whether --enable-precompiled-headers was given.
33176if test "${enable_precompiled_headers+set}" = set; then :
33177  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33178else
33179  ENABLE_PRECOMPH=yes
33180fi
33181
33182
33183USE_PRECOMPILED_HEADER=1
33184if test "x$ENABLE_PRECOMPH" = xno; then
33185    USE_PRECOMPILED_HEADER=0
33186fi
33187
33188if test "x$ENABLE_PRECOMPH" = xyes; then
33189    # Check that the compiler actually supports precomp headers.
33190    if test "x$GCC" = xyes; then
33191         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33192$as_echo_n "checking that precompiled headers work... " >&6; }
33193         echo "int alfa();" > conftest.h
33194         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33195         if test ! -f conftest.hpp.gch; then
33196             USE_PRECOMPILED_HEADER=0
33197             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33198$as_echo "no" >&6; }
33199         else
33200             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33201$as_echo "yes" >&6; }
33202         fi
33203         rm -f conftest.h conftest.hpp.gch
33204    fi
33205fi
33206
33207
33208
33209
33210# Setup use of ccache, if available
33211
33212    # Check whether --enable-ccache was given.
33213if test "${enable_ccache+set}" = set; then :
33214  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33215else
33216  ENABLE_CCACHE=yes
33217fi
33218
33219    if test "x$ENABLE_CCACHE" = xyes; then
33220        # Extract the first word of "ccache", so it can be a program name with args.
33221set dummy ccache; ac_word=$2
33222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33223$as_echo_n "checking for $ac_word... " >&6; }
33224if test "${ac_cv_path_CCACHE+set}" = set; then :
33225  $as_echo_n "(cached) " >&6
33226else
33227  case $CCACHE in
33228  [\\/]* | ?:[\\/]*)
33229  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33230  ;;
33231  *)
33232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33233for as_dir in $PATH
33234do
33235  IFS=$as_save_IFS
33236  test -z "$as_dir" && as_dir=.
33237    for ac_exec_ext in '' $ac_executable_extensions; do
33238  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33239    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33241    break 2
33242  fi
33243done
33244  done
33245IFS=$as_save_IFS
33246
33247  ;;
33248esac
33249fi
33250CCACHE=$ac_cv_path_CCACHE
33251if test -n "$CCACHE"; then
33252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33253$as_echo "$CCACHE" >&6; }
33254else
33255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33256$as_echo "no" >&6; }
33257fi
33258
33259
33260    else
33261        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33262$as_echo_n "checking for ccache... " >&6; }
33263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33264$as_echo "explicitly disabled" >&6; }
33265        CCACHE=
33266    fi
33267
33268
33269
33270# Check whether --with-ccache-dir was given.
33271if test "${with_ccache_dir+set}" = set; then :
33272  withval=$with_ccache_dir;
33273fi
33274
33275
33276    if test "x$with_ccache_dir" != x; then
33277        # When using a non home ccache directory, assume the use is to share ccache files
33278        # with other users. Thus change the umask.
33279        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33280    fi
33281    CCACHE_FOUND=""
33282    if test "x$CCACHE" != x; then
33283
33284    if test "x$CCACHE" != x; then
33285        CCACHE_FOUND="true"
33286        # Only use ccache if it is 3.1.4 or later, which supports
33287        # precompiled headers.
33288        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33289$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33290        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33291        if test "x$HAS_GOOD_CCACHE" = x; then
33292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33293$as_echo "no, disabling ccache" >&6; }
33294            CCACHE=
33295        else
33296            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33297$as_echo "yes" >&6; }
33298            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33299$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33300            PUSHED_FLAGS="$CXXFLAGS"
33301            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33302            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33303/* end confdefs.h.  */
33304
33305int
33306main ()
33307{
33308
33309  ;
33310  return 0;
33311}
33312_ACEOF
33313if ac_fn_cxx_try_compile "$LINENO"; then :
33314  CC_KNOWS_CCACHE_TRICK=yes
33315else
33316  CC_KNOWS_CCACHE_TRICK=no
33317fi
33318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33319            CXXFLAGS="$PUSHED_FLAGS"
33320            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33321                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33322$as_echo "yes" >&6; }
33323            else
33324                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33325$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33326                CCACHE=
33327            fi
33328        fi
33329    fi
33330
33331    if test "x$CCACHE" != x; then
33332        CCACHE_SLOPPINESS=time_macros
33333        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33334        CCACHE_FLAGS=-fpch-preprocess
33335
33336        if test "x$SET_CCACHE_DIR" != x; then
33337            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33338	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33339        fi
33340    fi
33341
33342    fi
33343
33344
33345###############################################################################
33346#
33347# And now the finish...
33348#
33349###############################################################################
33350
33351# Check for some common pitfalls
33352
33353  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33354    file_to_test="$SRC_ROOT/LICENSE"
33355    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33356      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
33357    fi
33358  fi
33359
33360
33361
33362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33363$as_echo_n "checking if build directory is on local disk... " >&6; }
33364
33365	# df -l lists only local disks; if the given directory is not found then
33366	# a non-zero exit code is given
33367  if test "x$DF" = x; then
33368    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33369      # msys does not have df; use Windows "net use" instead.
33370      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33371      if test "x$IS_NETWORK_DISK" = x; then
33372        OUTPUT_DIR_IS_LOCAL="yes"
33373      else
33374        OUTPUT_DIR_IS_LOCAL="no"
33375      fi
33376    else
33377      # No df here, say it's local
33378      OUTPUT_DIR_IS_LOCAL="yes"
33379    fi
33380  else
33381    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33382      OUTPUT_DIR_IS_LOCAL="yes"
33383    else
33384      OUTPUT_DIR_IS_LOCAL="no"
33385    fi
33386  fi
33387
33388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33389$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33390
33391
33392
33393# Check if the user has any old-style ALT_ variables set.
33394FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33395
33396# Before generating output files, test if they exist. If they do, this is a reconfigure.
33397# Since we can't properly handle the dependencies for this, warn the user about the situation
33398if test -e $OUTPUT_ROOT/spec.gmk; then
33399  IS_RECONFIGURE=yes
33400else
33401  IS_RECONFIGURE=no
33402fi
33403
33404if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33405  HIDE_PERFORMANCE_HINTS=yes
33406else
33407  HIDE_PERFORMANCE_HINTS=no
33408  # Hide it the next time around...
33409  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33410fi
33411
33412
33413
33414# At the end, call the custom hook. (Dummy macro if no custom sources available)
33415
33416
33417# We're messing a bit with internal autoconf variables to put the config.status
33418# in the output directory instead of the current directory.
33419CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33420# Create the actual output files. Now the main work of configure is done.
33421cat >confcache <<\_ACEOF
33422# This file is a shell script that caches the results of configure
33423# tests run on this system so they can be shared between configure
33424# scripts and configure runs, see configure's option --config-cache.
33425# It is not useful on other systems.  If it contains results you don't
33426# want to keep, you may remove or edit it.
33427#
33428# config.status only pays attention to the cache file if you give it
33429# the --recheck option to rerun configure.
33430#
33431# `ac_cv_env_foo' variables (set or unset) will be overridden when
33432# loading this file, other *unset* `ac_cv_foo' will be assigned the
33433# following values.
33434
33435_ACEOF
33436
33437# The following way of writing the cache mishandles newlines in values,
33438# but we know of no workaround that is simple, portable, and efficient.
33439# So, we kill variables containing newlines.
33440# Ultrix sh set writes to stderr and can't be redirected directly,
33441# and sets the high bit in the cache file unless we assign to the vars.
33442(
33443  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33444    eval ac_val=\$$ac_var
33445    case $ac_val in #(
33446    *${as_nl}*)
33447      case $ac_var in #(
33448      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33449$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33450      esac
33451      case $ac_var in #(
33452      _ | IFS | as_nl) ;; #(
33453      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33454      *) { eval $ac_var=; unset $ac_var;} ;;
33455      esac ;;
33456    esac
33457  done
33458
33459  (set) 2>&1 |
33460    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33461    *${as_nl}ac_space=\ *)
33462      # `set' does not quote correctly, so add quotes: double-quote
33463      # substitution turns \\\\ into \\, and sed turns \\ into \.
33464      sed -n \
33465	"s/'/'\\\\''/g;
33466	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33467      ;; #(
33468    *)
33469      # `set' quotes correctly as required by POSIX, so do not add quotes.
33470      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33471      ;;
33472    esac |
33473    sort
33474) |
33475  sed '
33476     /^ac_cv_env_/b end
33477     t clear
33478     :clear
33479     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33480     t end
33481     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33482     :end' >>confcache
33483if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33484  if test -w "$cache_file"; then
33485    test "x$cache_file" != "x/dev/null" &&
33486      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33487$as_echo "$as_me: updating cache $cache_file" >&6;}
33488    cat confcache >$cache_file
33489  else
33490    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33491$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33492  fi
33493fi
33494rm -f confcache
33495
33496test "x$prefix" = xNONE && prefix=$ac_default_prefix
33497# Let make expand exec_prefix.
33498test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33499
33500DEFS=-DHAVE_CONFIG_H
33501
33502ac_libobjs=
33503ac_ltlibobjs=
33504U=
33505for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33506  # 1. Remove the extension, and $U if already installed.
33507  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33508  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33509  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33510  #    will be set to the directory where LIBOBJS objects are built.
33511  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33512  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33513done
33514LIBOBJS=$ac_libobjs
33515
33516LTLIBOBJS=$ac_ltlibobjs
33517
33518
33519
33520: ${CONFIG_STATUS=./config.status}
33521ac_write_fail=0
33522ac_clean_files_save=$ac_clean_files
33523ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33524{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33525$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33526as_write_fail=0
33527cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33528#! $SHELL
33529# Generated by $as_me.
33530# Run this file to recreate the current configuration.
33531# Compiler output produced by configure, useful for debugging
33532# configure, is in config.log if it exists.
33533
33534debug=false
33535ac_cs_recheck=false
33536ac_cs_silent=false
33537
33538SHELL=\${CONFIG_SHELL-$SHELL}
33539export SHELL
33540_ASEOF
33541cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33542## -------------------- ##
33543## M4sh Initialization. ##
33544## -------------------- ##
33545
33546# Be more Bourne compatible
33547DUALCASE=1; export DUALCASE # for MKS sh
33548if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33549  emulate sh
33550  NULLCMD=:
33551  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33552  # is contrary to our usage.  Disable this feature.
33553  alias -g '${1+"$@"}'='"$@"'
33554  setopt NO_GLOB_SUBST
33555else
33556  case `(set -o) 2>/dev/null` in #(
33557  *posix*) :
33558    set -o posix ;; #(
33559  *) :
33560     ;;
33561esac
33562fi
33563
33564
33565as_nl='
33566'
33567export as_nl
33568# Printing a long string crashes Solaris 7 /usr/bin/printf.
33569as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33570as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33571as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33572# Prefer a ksh shell builtin over an external printf program on Solaris,
33573# but without wasting forks for bash or zsh.
33574if test -z "$BASH_VERSION$ZSH_VERSION" \
33575    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33576  as_echo='print -r --'
33577  as_echo_n='print -rn --'
33578elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33579  as_echo='printf %s\n'
33580  as_echo_n='printf %s'
33581else
33582  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33583    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33584    as_echo_n='/usr/ucb/echo -n'
33585  else
33586    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33587    as_echo_n_body='eval
33588      arg=$1;
33589      case $arg in #(
33590      *"$as_nl"*)
33591	expr "X$arg" : "X\\(.*\\)$as_nl";
33592	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33593      esac;
33594      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33595    '
33596    export as_echo_n_body
33597    as_echo_n='sh -c $as_echo_n_body as_echo'
33598  fi
33599  export as_echo_body
33600  as_echo='sh -c $as_echo_body as_echo'
33601fi
33602
33603# The user is always right.
33604if test "${PATH_SEPARATOR+set}" != set; then
33605  PATH_SEPARATOR=:
33606  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33607    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33608      PATH_SEPARATOR=';'
33609  }
33610fi
33611
33612
33613# IFS
33614# We need space, tab and new line, in precisely that order.  Quoting is
33615# there to prevent editors from complaining about space-tab.
33616# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33617# splitting by setting IFS to empty value.)
33618IFS=" ""	$as_nl"
33619
33620# Find who we are.  Look in the path if we contain no directory separator.
33621case $0 in #((
33622  *[\\/]* ) as_myself=$0 ;;
33623  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33624for as_dir in $PATH
33625do
33626  IFS=$as_save_IFS
33627  test -z "$as_dir" && as_dir=.
33628    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33629  done
33630IFS=$as_save_IFS
33631
33632     ;;
33633esac
33634# We did not find ourselves, most probably we were run as `sh COMMAND'
33635# in which case we are not to be found in the path.
33636if test "x$as_myself" = x; then
33637  as_myself=$0
33638fi
33639if test ! -f "$as_myself"; then
33640  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33641  exit 1
33642fi
33643
33644# Unset variables that we do not need and which cause bugs (e.g. in
33645# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33646# suppresses any "Segmentation fault" message there.  '((' could
33647# trigger a bug in pdksh 5.2.14.
33648for as_var in BASH_ENV ENV MAIL MAILPATH
33649do eval test x\${$as_var+set} = xset \
33650  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33651done
33652PS1='$ '
33653PS2='> '
33654PS4='+ '
33655
33656# NLS nuisances.
33657LC_ALL=C
33658export LC_ALL
33659LANGUAGE=C
33660export LANGUAGE
33661
33662# CDPATH.
33663(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33664
33665
33666# as_fn_error STATUS ERROR [LINENO LOG_FD]
33667# ----------------------------------------
33668# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33669# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33670# script with STATUS, using 1 if that was 0.
33671as_fn_error ()
33672{
33673  as_status=$1; test $as_status -eq 0 && as_status=1
33674  if test "$4"; then
33675    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33676    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33677  fi
33678  $as_echo "$as_me: error: $2" >&2
33679  as_fn_exit $as_status
33680} # as_fn_error
33681
33682
33683# as_fn_set_status STATUS
33684# -----------------------
33685# Set $? to STATUS, without forking.
33686as_fn_set_status ()
33687{
33688  return $1
33689} # as_fn_set_status
33690
33691# as_fn_exit STATUS
33692# -----------------
33693# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33694as_fn_exit ()
33695{
33696  set +e
33697  as_fn_set_status $1
33698  exit $1
33699} # as_fn_exit
33700
33701# as_fn_unset VAR
33702# ---------------
33703# Portably unset VAR.
33704as_fn_unset ()
33705{
33706  { eval $1=; unset $1;}
33707}
33708as_unset=as_fn_unset
33709# as_fn_append VAR VALUE
33710# ----------------------
33711# Append the text in VALUE to the end of the definition contained in VAR. Take
33712# advantage of any shell optimizations that allow amortized linear growth over
33713# repeated appends, instead of the typical quadratic growth present in naive
33714# implementations.
33715if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33716  eval 'as_fn_append ()
33717  {
33718    eval $1+=\$2
33719  }'
33720else
33721  as_fn_append ()
33722  {
33723    eval $1=\$$1\$2
33724  }
33725fi # as_fn_append
33726
33727# as_fn_arith ARG...
33728# ------------------
33729# Perform arithmetic evaluation on the ARGs, and store the result in the
33730# global $as_val. Take advantage of shells that can avoid forks. The arguments
33731# must be portable across $(()) and expr.
33732if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33733  eval 'as_fn_arith ()
33734  {
33735    as_val=$(( $* ))
33736  }'
33737else
33738  as_fn_arith ()
33739  {
33740    as_val=`expr "$@" || test $? -eq 1`
33741  }
33742fi # as_fn_arith
33743
33744
33745if expr a : '\(a\)' >/dev/null 2>&1 &&
33746   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33747  as_expr=expr
33748else
33749  as_expr=false
33750fi
33751
33752if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33753  as_basename=basename
33754else
33755  as_basename=false
33756fi
33757
33758if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33759  as_dirname=dirname
33760else
33761  as_dirname=false
33762fi
33763
33764as_me=`$as_basename -- "$0" ||
33765$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33766	 X"$0" : 'X\(//\)$' \| \
33767	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33768$as_echo X/"$0" |
33769    sed '/^.*\/\([^/][^/]*\)\/*$/{
33770	    s//\1/
33771	    q
33772	  }
33773	  /^X\/\(\/\/\)$/{
33774	    s//\1/
33775	    q
33776	  }
33777	  /^X\/\(\/\).*/{
33778	    s//\1/
33779	    q
33780	  }
33781	  s/.*/./; q'`
33782
33783# Avoid depending upon Character Ranges.
33784as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33785as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33786as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33787as_cr_digits='0123456789'
33788as_cr_alnum=$as_cr_Letters$as_cr_digits
33789
33790ECHO_C= ECHO_N= ECHO_T=
33791case `echo -n x` in #(((((
33792-n*)
33793  case `echo 'xy\c'` in
33794  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33795  xy)  ECHO_C='\c';;
33796  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33797       ECHO_T='	';;
33798  esac;;
33799*)
33800  ECHO_N='-n';;
33801esac
33802
33803rm -f conf$$ conf$$.exe conf$$.file
33804if test -d conf$$.dir; then
33805  rm -f conf$$.dir/conf$$.file
33806else
33807  rm -f conf$$.dir
33808  mkdir conf$$.dir 2>/dev/null
33809fi
33810if (echo >conf$$.file) 2>/dev/null; then
33811  if ln -s conf$$.file conf$$ 2>/dev/null; then
33812    as_ln_s='ln -s'
33813    # ... but there are two gotchas:
33814    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33815    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33816    # In both cases, we have to default to `cp -p'.
33817    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33818      as_ln_s='cp -p'
33819  elif ln conf$$.file conf$$ 2>/dev/null; then
33820    as_ln_s=ln
33821  else
33822    as_ln_s='cp -p'
33823  fi
33824else
33825  as_ln_s='cp -p'
33826fi
33827rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33828rmdir conf$$.dir 2>/dev/null
33829
33830
33831# as_fn_mkdir_p
33832# -------------
33833# Create "$as_dir" as a directory, including parents if necessary.
33834as_fn_mkdir_p ()
33835{
33836
33837  case $as_dir in #(
33838  -*) as_dir=./$as_dir;;
33839  esac
33840  test -d "$as_dir" || eval $as_mkdir_p || {
33841    as_dirs=
33842    while :; do
33843      case $as_dir in #(
33844      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33845      *) as_qdir=$as_dir;;
33846      esac
33847      as_dirs="'$as_qdir' $as_dirs"
33848      as_dir=`$as_dirname -- "$as_dir" ||
33849$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33850	 X"$as_dir" : 'X\(//\)[^/]' \| \
33851	 X"$as_dir" : 'X\(//\)$' \| \
33852	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33853$as_echo X"$as_dir" |
33854    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33855	    s//\1/
33856	    q
33857	  }
33858	  /^X\(\/\/\)[^/].*/{
33859	    s//\1/
33860	    q
33861	  }
33862	  /^X\(\/\/\)$/{
33863	    s//\1/
33864	    q
33865	  }
33866	  /^X\(\/\).*/{
33867	    s//\1/
33868	    q
33869	  }
33870	  s/.*/./; q'`
33871      test -d "$as_dir" && break
33872    done
33873    test -z "$as_dirs" || eval "mkdir $as_dirs"
33874  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33875
33876
33877} # as_fn_mkdir_p
33878if mkdir -p . 2>/dev/null; then
33879  as_mkdir_p='mkdir -p "$as_dir"'
33880else
33881  test -d ./-p && rmdir ./-p
33882  as_mkdir_p=false
33883fi
33884
33885if test -x / >/dev/null 2>&1; then
33886  as_test_x='test -x'
33887else
33888  if ls -dL / >/dev/null 2>&1; then
33889    as_ls_L_option=L
33890  else
33891    as_ls_L_option=
33892  fi
33893  as_test_x='
33894    eval sh -c '\''
33895      if test -d "$1"; then
33896	test -d "$1/.";
33897      else
33898	case $1 in #(
33899	-*)set "./$1";;
33900	esac;
33901	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
33902	???[sx]*):;;*)false;;esac;fi
33903    '\'' sh
33904  '
33905fi
33906as_executable_p=$as_test_x
33907
33908# Sed expression to map a string onto a valid CPP name.
33909as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33910
33911# Sed expression to map a string onto a valid variable name.
33912as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33913
33914
33915exec 6>&1
33916## ----------------------------------- ##
33917## Main body of $CONFIG_STATUS script. ##
33918## ----------------------------------- ##
33919_ASEOF
33920test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33921
33922cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33923# Save the log message, to keep $0 and so on meaningful, and to
33924# report actual input values of CONFIG_FILES etc. instead of their
33925# values after options handling.
33926ac_log="
33927This file was extended by OpenJDK $as_me jdk8, which was
33928generated by GNU Autoconf 2.67.  Invocation command line was
33929
33930  CONFIG_FILES    = $CONFIG_FILES
33931  CONFIG_HEADERS  = $CONFIG_HEADERS
33932  CONFIG_LINKS    = $CONFIG_LINKS
33933  CONFIG_COMMANDS = $CONFIG_COMMANDS
33934  $ $0 $@
33935
33936on `(hostname || uname -n) 2>/dev/null | sed 1q`
33937"
33938
33939_ACEOF
33940
33941case $ac_config_files in *"
33942"*) set x $ac_config_files; shift; ac_config_files=$*;;
33943esac
33944
33945case $ac_config_headers in *"
33946"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33947esac
33948
33949
33950cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33951# Files that config.status was made for.
33952config_files="$ac_config_files"
33953config_headers="$ac_config_headers"
33954
33955_ACEOF
33956
33957cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33958ac_cs_usage="\
33959\`$as_me' instantiates files and other configuration actions
33960from templates according to the current configuration.  Unless the files
33961and actions are specified as TAGs, all are instantiated by default.
33962
33963Usage: $0 [OPTION]... [TAG]...
33964
33965  -h, --help       print this help, then exit
33966  -V, --version    print version number and configuration settings, then exit
33967      --config     print configuration, then exit
33968  -q, --quiet, --silent
33969                   do not print progress messages
33970  -d, --debug      don't remove temporary files
33971      --recheck    update $as_me by reconfiguring in the same conditions
33972      --file=FILE[:TEMPLATE]
33973                   instantiate the configuration file FILE
33974      --header=FILE[:TEMPLATE]
33975                   instantiate the configuration header FILE
33976
33977Configuration files:
33978$config_files
33979
33980Configuration headers:
33981$config_headers
33982
33983Report bugs to <build-dev@openjdk.java.net>.
33984OpenJDK home page: <http://openjdk.java.net>."
33985
33986_ACEOF
33987cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33988ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33989ac_cs_version="\\
33990OpenJDK config.status jdk8
33991configured by $0, generated by GNU Autoconf 2.67,
33992  with options \\"\$ac_cs_config\\"
33993
33994Copyright (C) 2010 Free Software Foundation, Inc.
33995This config.status script is free software; the Free Software Foundation
33996gives unlimited permission to copy, distribute and modify it."
33997
33998ac_pwd='$ac_pwd'
33999srcdir='$srcdir'
34000AWK='$AWK'
34001test -n "\$AWK" || AWK=awk
34002_ACEOF
34003
34004cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34005# The default lists apply if the user does not specify any file.
34006ac_need_defaults=:
34007while test $# != 0
34008do
34009  case $1 in
34010  --*=?*)
34011    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34012    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34013    ac_shift=:
34014    ;;
34015  --*=)
34016    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34017    ac_optarg=
34018    ac_shift=:
34019    ;;
34020  *)
34021    ac_option=$1
34022    ac_optarg=$2
34023    ac_shift=shift
34024    ;;
34025  esac
34026
34027  case $ac_option in
34028  # Handling of the options.
34029  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34030    ac_cs_recheck=: ;;
34031  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34032    $as_echo "$ac_cs_version"; exit ;;
34033  --config | --confi | --conf | --con | --co | --c )
34034    $as_echo "$ac_cs_config"; exit ;;
34035  --debug | --debu | --deb | --de | --d | -d )
34036    debug=: ;;
34037  --file | --fil | --fi | --f )
34038    $ac_shift
34039    case $ac_optarg in
34040    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34041    '') as_fn_error $? "missing file argument" ;;
34042    esac
34043    as_fn_append CONFIG_FILES " '$ac_optarg'"
34044    ac_need_defaults=false;;
34045  --header | --heade | --head | --hea )
34046    $ac_shift
34047    case $ac_optarg in
34048    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34049    esac
34050    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34051    ac_need_defaults=false;;
34052  --he | --h)
34053    # Conflict between --help and --header
34054    as_fn_error $? "ambiguous option: \`$1'
34055Try \`$0 --help' for more information.";;
34056  --help | --hel | -h )
34057    $as_echo "$ac_cs_usage"; exit ;;
34058  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34059  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34060    ac_cs_silent=: ;;
34061
34062  # This is an error.
34063  -*) as_fn_error $? "unrecognized option: \`$1'
34064Try \`$0 --help' for more information." ;;
34065
34066  *) as_fn_append ac_config_targets " $1"
34067     ac_need_defaults=false ;;
34068
34069  esac
34070  shift
34071done
34072
34073ac_configure_extra_args=
34074
34075if $ac_cs_silent; then
34076  exec 6>/dev/null
34077  ac_configure_extra_args="$ac_configure_extra_args --silent"
34078fi
34079
34080_ACEOF
34081cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34082if \$ac_cs_recheck; then
34083  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34084  shift
34085  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34086  CONFIG_SHELL='$SHELL'
34087  export CONFIG_SHELL
34088  exec "\$@"
34089fi
34090
34091_ACEOF
34092cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34093exec 5>>config.log
34094{
34095  echo
34096  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34097## Running $as_me. ##
34098_ASBOX
34099  $as_echo "$ac_log"
34100} >&5
34101
34102_ACEOF
34103cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34104_ACEOF
34105
34106cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34107
34108# Handling of arguments.
34109for ac_config_target in $ac_config_targets
34110do
34111  case $ac_config_target in
34112    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34113    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34114    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34115    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34116    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34117    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34118    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34119
34120  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
34121  esac
34122done
34123
34124
34125# If the user did not use the arguments to specify the items to instantiate,
34126# then the envvar interface is used.  Set only those that are not.
34127# We use the long form for the default assignment because of an extremely
34128# bizarre bug on SunOS 4.1.3.
34129if $ac_need_defaults; then
34130  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34131  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34132fi
34133
34134# Have a temporary directory for convenience.  Make it in the build tree
34135# simply because there is no reason against having it here, and in addition,
34136# creating and moving files from /tmp can sometimes cause problems.
34137# Hook for its removal unless debugging.
34138# Note that there is a small window in which the directory will not be cleaned:
34139# after its creation but before its name has been assigned to `$tmp'.
34140$debug ||
34141{
34142  tmp=
34143  trap 'exit_status=$?
34144  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34145' 0
34146  trap 'as_fn_exit 1' 1 2 13 15
34147}
34148# Create a (secure) tmp directory for tmp files.
34149
34150{
34151  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34152  test -n "$tmp" && test -d "$tmp"
34153}  ||
34154{
34155  tmp=./conf$$-$RANDOM
34156  (umask 077 && mkdir "$tmp")
34157} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34158
34159# Set up the scripts for CONFIG_FILES section.
34160# No need to generate them if there are no CONFIG_FILES.
34161# This happens for instance with `./config.status config.h'.
34162if test -n "$CONFIG_FILES"; then
34163
34164
34165ac_cr=`echo X | tr X '\015'`
34166# On cygwin, bash can eat \r inside `` if the user requested igncr.
34167# But we know of no other shell where ac_cr would be empty at this
34168# point, so we can use a bashism as a fallback.
34169if test "x$ac_cr" = x; then
34170  eval ac_cr=\$\'\\r\'
34171fi
34172ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34173if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34174  ac_cs_awk_cr='\\r'
34175else
34176  ac_cs_awk_cr=$ac_cr
34177fi
34178
34179echo 'BEGIN {' >"$tmp/subs1.awk" &&
34180_ACEOF
34181
34182
34183{
34184  echo "cat >conf$$subs.awk <<_ACEOF" &&
34185  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34186  echo "_ACEOF"
34187} >conf$$subs.sh ||
34188  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34189ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34190ac_delim='%!_!# '
34191for ac_last_try in false false false false false :; do
34192  . ./conf$$subs.sh ||
34193    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34194
34195  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34196  if test $ac_delim_n = $ac_delim_num; then
34197    break
34198  elif $ac_last_try; then
34199    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34200  else
34201    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34202  fi
34203done
34204rm -f conf$$subs.sh
34205
34206cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34207cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34208_ACEOF
34209sed -n '
34210h
34211s/^/S["/; s/!.*/"]=/
34212p
34213g
34214s/^[^!]*!//
34215:repl
34216t repl
34217s/'"$ac_delim"'$//
34218t delim
34219:nl
34220h
34221s/\(.\{148\}\)..*/\1/
34222t more1
34223s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34224p
34225n
34226b repl
34227:more1
34228s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34229p
34230g
34231s/.\{148\}//
34232t nl
34233:delim
34234h
34235s/\(.\{148\}\)..*/\1/
34236t more2
34237s/["\\]/\\&/g; s/^/"/; s/$/"/
34238p
34239b
34240:more2
34241s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34242p
34243g
34244s/.\{148\}//
34245t delim
34246' <conf$$subs.awk | sed '
34247/^[^""]/{
34248  N
34249  s/\n//
34250}
34251' >>$CONFIG_STATUS || ac_write_fail=1
34252rm -f conf$$subs.awk
34253cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34254_ACAWK
34255cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34256  for (key in S) S_is_set[key] = 1
34257  FS = ""
34258
34259}
34260{
34261  line = $ 0
34262  nfields = split(line, field, "@")
34263  substed = 0
34264  len = length(field[1])
34265  for (i = 2; i < nfields; i++) {
34266    key = field[i]
34267    keylen = length(key)
34268    if (S_is_set[key]) {
34269      value = S[key]
34270      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34271      len += length(value) + length(field[++i])
34272      substed = 1
34273    } else
34274      len += 1 + keylen
34275  }
34276
34277  print line
34278}
34279
34280_ACAWK
34281_ACEOF
34282cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34283if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34284  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34285else
34286  cat
34287fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34288  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34289_ACEOF
34290
34291# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34292# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34293# trailing colons and then remove the whole line if VPATH becomes empty
34294# (actually we leave an empty line to preserve line numbers).
34295if test "x$srcdir" = x.; then
34296  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34297h
34298s///
34299s/^/:/
34300s/[	 ]*$/:/
34301s/:\$(srcdir):/:/g
34302s/:\${srcdir}:/:/g
34303s/:@srcdir@:/:/g
34304s/^:*//
34305s/:*$//
34306x
34307s/\(=[	 ]*\).*/\1/
34308G
34309s/\n//
34310s/^[^=]*=[	 ]*$//
34311}'
34312fi
34313
34314cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34315fi # test -n "$CONFIG_FILES"
34316
34317# Set up the scripts for CONFIG_HEADERS section.
34318# No need to generate them if there are no CONFIG_HEADERS.
34319# This happens for instance with `./config.status Makefile'.
34320if test -n "$CONFIG_HEADERS"; then
34321cat >"$tmp/defines.awk" <<\_ACAWK ||
34322BEGIN {
34323_ACEOF
34324
34325# Transform confdefs.h into an awk script `defines.awk', embedded as
34326# here-document in config.status, that substitutes the proper values into
34327# config.h.in to produce config.h.
34328
34329# Create a delimiter string that does not exist in confdefs.h, to ease
34330# handling of long lines.
34331ac_delim='%!_!# '
34332for ac_last_try in false false :; do
34333  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34334  if test -z "$ac_t"; then
34335    break
34336  elif $ac_last_try; then
34337    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34338  else
34339    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34340  fi
34341done
34342
34343# For the awk script, D is an array of macro values keyed by name,
34344# likewise P contains macro parameters if any.  Preserve backslash
34345# newline sequences.
34346
34347ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34348sed -n '
34349s/.\{148\}/&'"$ac_delim"'/g
34350t rset
34351:rset
34352s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34353t def
34354d
34355:def
34356s/\\$//
34357t bsnl
34358s/["\\]/\\&/g
34359s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34360D["\1"]=" \3"/p
34361s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34362d
34363:bsnl
34364s/["\\]/\\&/g
34365s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34366D["\1"]=" \3\\\\\\n"\\/p
34367t cont
34368s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34369t cont
34370d
34371:cont
34372n
34373s/.\{148\}/&'"$ac_delim"'/g
34374t clear
34375:clear
34376s/\\$//
34377t bsnlc
34378s/["\\]/\\&/g; s/^/"/; s/$/"/p
34379d
34380:bsnlc
34381s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34382b cont
34383' <confdefs.h | sed '
34384s/'"$ac_delim"'/"\\\
34385"/g' >>$CONFIG_STATUS || ac_write_fail=1
34386
34387cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34388  for (key in D) D_is_set[key] = 1
34389  FS = ""
34390}
34391/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34392  line = \$ 0
34393  split(line, arg, " ")
34394  if (arg[1] == "#") {
34395    defundef = arg[2]
34396    mac1 = arg[3]
34397  } else {
34398    defundef = substr(arg[1], 2)
34399    mac1 = arg[2]
34400  }
34401  split(mac1, mac2, "(") #)
34402  macro = mac2[1]
34403  prefix = substr(line, 1, index(line, defundef) - 1)
34404  if (D_is_set[macro]) {
34405    # Preserve the white space surrounding the "#".
34406    print prefix "define", macro P[macro] D[macro]
34407    next
34408  } else {
34409    # Replace #undef with comments.  This is necessary, for example,
34410    # in the case of _POSIX_SOURCE, which is predefined and required
34411    # on some systems where configure will not decide to define it.
34412    if (defundef == "undef") {
34413      print "/*", prefix defundef, macro, "*/"
34414      next
34415    }
34416  }
34417}
34418{ print }
34419_ACAWK
34420_ACEOF
34421cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34422  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34423fi # test -n "$CONFIG_HEADERS"
34424
34425
34426eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34427shift
34428for ac_tag
34429do
34430  case $ac_tag in
34431  :[FHLC]) ac_mode=$ac_tag; continue;;
34432  esac
34433  case $ac_mode$ac_tag in
34434  :[FHL]*:*);;
34435  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
34436  :[FH]-) ac_tag=-:-;;
34437  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34438  esac
34439  ac_save_IFS=$IFS
34440  IFS=:
34441  set x $ac_tag
34442  IFS=$ac_save_IFS
34443  shift
34444  ac_file=$1
34445  shift
34446
34447  case $ac_mode in
34448  :L) ac_source=$1;;
34449  :[FH])
34450    ac_file_inputs=
34451    for ac_f
34452    do
34453      case $ac_f in
34454      -) ac_f="$tmp/stdin";;
34455      *) # Look for the file first in the build tree, then in the source tree
34456	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34457	 # because $ac_f cannot contain `:'.
34458	 test -f "$ac_f" ||
34459	   case $ac_f in
34460	   [\\/$]*) false;;
34461	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34462	   esac ||
34463	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
34464      esac
34465      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34466      as_fn_append ac_file_inputs " '$ac_f'"
34467    done
34468
34469    # Let's still pretend it is `configure' which instantiates (i.e., don't
34470    # use $as_me), people would be surprised to read:
34471    #    /* config.h.  Generated by config.status.  */
34472    configure_input='Generated from '`
34473	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34474	`' by configure.'
34475    if test x"$ac_file" != x-; then
34476      configure_input="$ac_file.  $configure_input"
34477      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34478$as_echo "$as_me: creating $ac_file" >&6;}
34479    fi
34480    # Neutralize special characters interpreted by sed in replacement strings.
34481    case $configure_input in #(
34482    *\&* | *\|* | *\\* )
34483       ac_sed_conf_input=`$as_echo "$configure_input" |
34484       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34485    *) ac_sed_conf_input=$configure_input;;
34486    esac
34487
34488    case $ac_tag in
34489    *:-:* | *:-) cat >"$tmp/stdin" \
34490      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
34491    esac
34492    ;;
34493  esac
34494
34495  ac_dir=`$as_dirname -- "$ac_file" ||
34496$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34497	 X"$ac_file" : 'X\(//\)[^/]' \| \
34498	 X"$ac_file" : 'X\(//\)$' \| \
34499	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34500$as_echo X"$ac_file" |
34501    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34502	    s//\1/
34503	    q
34504	  }
34505	  /^X\(\/\/\)[^/].*/{
34506	    s//\1/
34507	    q
34508	  }
34509	  /^X\(\/\/\)$/{
34510	    s//\1/
34511	    q
34512	  }
34513	  /^X\(\/\).*/{
34514	    s//\1/
34515	    q
34516	  }
34517	  s/.*/./; q'`
34518  as_dir="$ac_dir"; as_fn_mkdir_p
34519  ac_builddir=.
34520
34521case "$ac_dir" in
34522.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34523*)
34524  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34525  # A ".." for each directory in $ac_dir_suffix.
34526  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34527  case $ac_top_builddir_sub in
34528  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34529  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34530  esac ;;
34531esac
34532ac_abs_top_builddir=$ac_pwd
34533ac_abs_builddir=$ac_pwd$ac_dir_suffix
34534# for backward compatibility:
34535ac_top_builddir=$ac_top_build_prefix
34536
34537case $srcdir in
34538  .)  # We are building in place.
34539    ac_srcdir=.
34540    ac_top_srcdir=$ac_top_builddir_sub
34541    ac_abs_top_srcdir=$ac_pwd ;;
34542  [\\/]* | ?:[\\/]* )  # Absolute name.
34543    ac_srcdir=$srcdir$ac_dir_suffix;
34544    ac_top_srcdir=$srcdir
34545    ac_abs_top_srcdir=$srcdir ;;
34546  *) # Relative name.
34547    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34548    ac_top_srcdir=$ac_top_build_prefix$srcdir
34549    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34550esac
34551ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34552
34553
34554  case $ac_mode in
34555  :F)
34556  #
34557  # CONFIG_FILE
34558  #
34559
34560_ACEOF
34561
34562cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34563# If the template does not know about datarootdir, expand it.
34564# FIXME: This hack should be removed a few years after 2.60.
34565ac_datarootdir_hack=; ac_datarootdir_seen=
34566ac_sed_dataroot='
34567/datarootdir/ {
34568  p
34569  q
34570}
34571/@datadir@/p
34572/@docdir@/p
34573/@infodir@/p
34574/@localedir@/p
34575/@mandir@/p'
34576case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34577*datarootdir*) ac_datarootdir_seen=yes;;
34578*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34579  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34580$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34581_ACEOF
34582cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34583  ac_datarootdir_hack='
34584  s&@datadir@&$datadir&g
34585  s&@docdir@&$docdir&g
34586  s&@infodir@&$infodir&g
34587  s&@localedir@&$localedir&g
34588  s&@mandir@&$mandir&g
34589  s&\\\${datarootdir}&$datarootdir&g' ;;
34590esac
34591_ACEOF
34592
34593# Neutralize VPATH when `$srcdir' = `.'.
34594# Shell code in configure.ac might set extrasub.
34595# FIXME: do we really want to maintain this feature?
34596cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34597ac_sed_extra="$ac_vpsub
34598$extrasub
34599_ACEOF
34600cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34601:t
34602/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34603s|@configure_input@|$ac_sed_conf_input|;t t
34604s&@top_builddir@&$ac_top_builddir_sub&;t t
34605s&@top_build_prefix@&$ac_top_build_prefix&;t t
34606s&@srcdir@&$ac_srcdir&;t t
34607s&@abs_srcdir@&$ac_abs_srcdir&;t t
34608s&@top_srcdir@&$ac_top_srcdir&;t t
34609s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34610s&@builddir@&$ac_builddir&;t t
34611s&@abs_builddir@&$ac_abs_builddir&;t t
34612s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34613$ac_datarootdir_hack
34614"
34615eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
34616  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34617
34618test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34619  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
34620  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
34621  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34622which seems to be undefined.  Please make sure it is defined" >&5
34623$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34624which seems to be undefined.  Please make sure it is defined" >&2;}
34625
34626  rm -f "$tmp/stdin"
34627  case $ac_file in
34628  -) cat "$tmp/out" && rm -f "$tmp/out";;
34629  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
34630  esac \
34631  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34632 ;;
34633  :H)
34634  #
34635  # CONFIG_HEADER
34636  #
34637  if test x"$ac_file" != x-; then
34638    {
34639      $as_echo "/* $configure_input  */" \
34640      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
34641    } >"$tmp/config.h" \
34642      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34643    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
34644      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34645$as_echo "$as_me: $ac_file is unchanged" >&6;}
34646    else
34647      rm -f "$ac_file"
34648      mv "$tmp/config.h" "$ac_file" \
34649	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34650    fi
34651  else
34652    $as_echo "/* $configure_input  */" \
34653      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
34654      || as_fn_error $? "could not create -" "$LINENO" 5
34655  fi
34656 ;;
34657
34658
34659  esac
34660
34661done # for ac_tag
34662
34663
34664as_fn_exit 0
34665_ACEOF
34666ac_clean_files=$ac_clean_files_save
34667
34668test $ac_write_fail = 0 ||
34669  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34670
34671
34672# configure is writing to config.log, and then calls config.status.
34673# config.status does its own redirection, appending to config.log.
34674# Unfortunately, on DOS this fails, as config.log is still kept open
34675# by configure, so config.status won't be able to write to it; its
34676# output is simply discarded.  So we exec the FD to /dev/null,
34677# effectively closing config.log, so it can be properly (re)opened and
34678# appended to by config.status.  When coming back to configure, we
34679# need to make the FD available again.
34680if test "$no_create" != yes; then
34681  ac_cs_success=:
34682  ac_config_status_args=
34683  test "$silent" = yes &&
34684    ac_config_status_args="$ac_config_status_args --quiet"
34685  exec 5>/dev/null
34686  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34687  exec 5>>config.log
34688  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34689  # would make configure fail if this is the last instruction.
34690  $ac_cs_success || as_fn_exit 1
34691fi
34692if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34693  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34694$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34695fi
34696
34697
34698# Make the compare script executable
34699$CHMOD +x $OUTPUT_ROOT/compare.sh
34700
34701# Finally output some useful information to the user
34702
34703# Finally output some useful information to the user
34704
34705if test "x$CCACHE_FOUND" != x; then
34706	if  test "x$HAS_GOOD_CCACHE" = x; then
34707		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34708		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34709	else
34710		CCACHE_STATUS="installed and in use"
34711	fi
34712else
34713	if test "x$GCC" = xyes; then
34714		CCACHE_STATUS="not installed (consider installing)"
34715		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34716	else
34717		CCACHE_STATUS="not available for your system"
34718	fi
34719fi
34720
34721printf "\n"
34722printf "====================================================\n"
34723printf "A new configuration has been successfully created in\n"
34724printf "$OUTPUT_ROOT\n"
34725if test "x$CONFIGURE_COMMAND_LINE" != x; then
34726	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34727else
34728	printf "using default settings.\n"
34729fi
34730
34731printf "\n"
34732printf "Configuration summary:\n"
34733printf "* Debug level:    $DEBUG_LEVEL\n"
34734printf "* JDK variant:    $JDK_VARIANT\n"
34735printf "* JVM variants:   $with_jvm_variants\n"
34736printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34737
34738printf "\n"
34739printf "Tools summary:\n"
34740if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34741  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34742fi
34743printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34744printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34745printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34746
34747printf "\n"
34748printf "Build performance summary:\n"
34749printf "* Cores to use:   $JOBS\n"
34750printf "* Memory limit:   $MEMORY_SIZE MB\n"
34751printf "* ccache status:  $CCACHE_STATUS\n"
34752printf "\n"
34753
34754if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34755	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34756	printf "$CCACHE_HELP_MSG\n"
34757
34758    # Print a helpful message on how to acquire the necessary build dependency.
34759    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34760    MISSING_DEPENDENCY=ccache
34761    PKGHANDLER_COMMAND=
34762
34763    case $PKGHANDLER in
34764	apt-get)
34765                apt_help     $MISSING_DEPENDENCY ;;
34766    yum)
34767                yum_help     $MISSING_DEPENDENCY ;;
34768	port)
34769                port_help    $MISSING_DEPENDENCY ;;
34770	pkgutil)
34771                pkgutil_help $MISSING_DEPENDENCY ;;
34772	pkgadd)
34773                pkgadd_help  $MISSING_DEPENDENCY ;;
34774    * )
34775      break ;;
34776    esac
34777
34778    if test "x$PKGHANDLER_COMMAND" != x; then
34779        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34780    fi
34781
34782	printf "$HELP_MSG\n"
34783	printf "\n"
34784fi
34785
34786if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34787	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34788	printf "will result in longer build times.\n"
34789	printf "\n"
34790fi
34791
34792if test "x$FOUND_ALT_VARIABLES" != "x"; then
34793	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34794	printf "These are not respected, and will be ignored. It is recommended\n"
34795	printf "that you clean your environment. The following variables are set:\n"
34796	printf "$FOUND_ALT_VARIABLES\n"
34797	printf "\n"
34798fi
34799
34800if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34801	printf "WARNING: Your build output directory is not on a local disk.\n"
34802	printf "This will severely degrade build performance!\n"
34803	printf "It is recommended that you create an output directory on a local disk,\n"
34804	printf "and run the configure script again from that directory.\n"
34805	printf "\n"
34806fi
34807
34808if test "x$IS_RECONFIGURE" = "xyes"; then
34809	printf "WARNING: The result of this configuration has overridden an older\n"
34810	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34811	printf "proper build. Failure to do so might result in strange build problems.\n"
34812	printf "\n"
34813fi
34814
34815