generated-configure.sh revision 748:f5eb23490e6a
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# Appends a string to a path variable, only adding the : when needed.
3087
3088
3089# This will make sure the given variable points to a full and proper
3090# path. This means:
3091# 1) There will be no spaces in the path. On posix platforms,
3092#    spaces in the path will result in an error. On Windows,
3093#    the path will be rewritten using short-style to be space-free.
3094# 2) The path will be absolute, and it will be in unix-style (on
3095#     cygwin).
3096# $1: The name of the variable to fix
3097
3098
3099# This will make sure the given variable points to a executable
3100# with a full and proper path. This means:
3101# 1) There will be no spaces in the path. On posix platforms,
3102#    spaces in the path will result in an error. On Windows,
3103#    the path will be rewritten using short-style to be space-free.
3104# 2) The path will be absolute, and it will be in unix-style (on
3105#     cygwin).
3106# Any arguments given to the executable is preserved.
3107# If the input variable does not have a directory specification, then
3108# it need to be in the PATH.
3109# $1: The name of the variable to fix
3110
3111
3112
3113
3114
3115
3116# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3117# $1: variable to check
3118# $2: executable name to print in warning (optional)
3119
3120
3121# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3122# Arguments as AC_PATH_PROG:
3123# $1: variable to set
3124# $2: executable name to look for
3125
3126
3127# Setup the most fundamental tools that relies on not much else to set up,
3128# but is used by much of the early bootstrap code.
3129
3130
3131# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3132
3133
3134
3135
3136
3137
3138
3139#%%% Simple tools %%%
3140
3141# Check if we have found a usable version of make
3142# $1: the path to a potential make binary (or empty)
3143# $2: the description on how we found this
3144
3145
3146# Goes looking for a usable version of GNU make.
3147
3148
3149
3150
3151
3152
3153# Check if build directory is on local disk. If not possible to determine,
3154# we prefer to claim it's local.
3155# Argument 1: directory to test
3156# Argument 2: what to do if it is on local disk
3157# Argument 3: what to do otherwise (remote disk or failure)
3158
3159
3160# Check that source files have basic read permissions set. This might
3161# not be the case in cygwin in certain conditions.
3162
3163
3164
3165
3166#
3167# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3168# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3169#
3170# This code is free software; you can redistribute it and/or modify it
3171# under the terms of the GNU General Public License version 2 only, as
3172# published by the Free Software Foundation.  Oracle designates this
3173# particular file as subject to the "Classpath" exception as provided
3174# by Oracle in the LICENSE file that accompanied this code.
3175#
3176# This code is distributed in the hope that it will be useful, but WITHOUT
3177# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3178# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3179# version 2 for more details (a copy is included in the LICENSE file that
3180# accompanied this code).
3181#
3182# You should have received a copy of the GNU General Public License version
3183# 2 along with this work; if not, write to the Free Software Foundation,
3184# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3185#
3186# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3187# or visit www.oracle.com if you need additional information or have any
3188# questions.
3189#
3190
3191
3192
3193
3194
3195# Helper function which possibly converts a path using DOS-style short mode.
3196# If so, the updated path is stored in $new_path.
3197# $1: The path to check
3198
3199
3200# Helper function which possibly converts a path using DOS-style short mode.
3201# If so, the updated path is stored in $new_path.
3202# $1: The path to check
3203
3204
3205# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3206# and could probably be heavily simplified. However, all changes in this
3207# area tend to need lot of testing in different scenarios, and in lack of
3208# proper unit testing, cleaning this up has not been deemed worth the effort
3209# at the moment.
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3220
3221
3222
3223
3224#
3225# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3226# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3227#
3228# This code is free software; you can redistribute it and/or modify it
3229# under the terms of the GNU General Public License version 2 only, as
3230# published by the Free Software Foundation.  Oracle designates this
3231# particular file as subject to the "Classpath" exception as provided
3232# by Oracle in the LICENSE file that accompanied this code.
3233#
3234# This code is distributed in the hope that it will be useful, but WITHOUT
3235# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3236# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3237# version 2 for more details (a copy is included in the LICENSE file that
3238# accompanied this code).
3239#
3240# You should have received a copy of the GNU General Public License version
3241# 2 along with this work; if not, write to the Free Software Foundation,
3242# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3243#
3244# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3245# or visit www.oracle.com if you need additional information or have any
3246# questions.
3247#
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259# ... then the rest
3260#
3261# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3262# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3263#
3264# This code is free software; you can redistribute it and/or modify it
3265# under the terms of the GNU General Public License version 2 only, as
3266# published by the Free Software Foundation.  Oracle designates this
3267# particular file as subject to the "Classpath" exception as provided
3268# by Oracle in the LICENSE file that accompanied this code.
3269#
3270# This code is distributed in the hope that it will be useful, but WITHOUT
3271# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3272# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3273# version 2 for more details (a copy is included in the LICENSE file that
3274# accompanied this code).
3275#
3276# You should have received a copy of the GNU General Public License version
3277# 2 along with this work; if not, write to the Free Software Foundation,
3278# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3279#
3280# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3281# or visit www.oracle.com if you need additional information or have any
3282# questions.
3283#
3284
3285# Execute the check given as argument, and verify the result
3286# If the Boot JDK was previously found, do nothing
3287# $1 A command line (typically autoconf macro) to execute
3288
3289
3290# Test: Is bootjdk explicitely set by command line arguments?
3291
3292
3293# Test: Is bootjdk available from builddeps?
3294
3295
3296# Test: Is $JAVA_HOME set?
3297
3298
3299# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3300
3301
3302# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3303
3304
3305# Look for a jdk in the given path. If there are multiple, try to select the newest.
3306# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3307# $1 = Path to directory containing jdk installations.
3308# $2 = String to append to the found JDK directory to get the proper JDK home
3309
3310
3311# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3312# environmental variable as base for where to look.
3313# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3314
3315
3316# Test: Is there a JDK installed in default, well-known locations?
3317
3318
3319# Check that a command-line tool in the Boot JDK is correct
3320# $1 = name of variable to assign
3321# $2 = name of binary
3322
3323
3324###############################################################################
3325#
3326# We need a Boot JDK to bootstrap the build.
3327#
3328
3329
3330
3331
3332
3333#
3334# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3335# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3336#
3337# This code is free software; you can redistribute it and/or modify it
3338# under the terms of the GNU General Public License version 2 only, as
3339# published by the Free Software Foundation.  Oracle designates this
3340# particular file as subject to the "Classpath" exception as provided
3341# by Oracle in the LICENSE file that accompanied this code.
3342#
3343# This code is distributed in the hope that it will be useful, but WITHOUT
3344# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3345# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3346# version 2 for more details (a copy is included in the LICENSE file that
3347# accompanied this code).
3348#
3349# You should have received a copy of the GNU General Public License version
3350# 2 along with this work; if not, write to the Free Software Foundation,
3351# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3352#
3353# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3354# or visit www.oracle.com if you need additional information or have any
3355# questions.
3356#
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377#
3378# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3379# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3380#
3381# This code is free software; you can redistribute it and/or modify it
3382# under the terms of the GNU General Public License version 2 only, as
3383# published by the Free Software Foundation.  Oracle designates this
3384# particular file as subject to the "Classpath" exception as provided
3385# by Oracle in the LICENSE file that accompanied this code.
3386#
3387# This code is distributed in the hope that it will be useful, but WITHOUT
3388# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3389# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3390# version 2 for more details (a copy is included in the LICENSE file that
3391# accompanied this code).
3392#
3393# You should have received a copy of the GNU General Public License version
3394# 2 along with this work; if not, write to the Free Software Foundation,
3395# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3396#
3397# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3398# or visit www.oracle.com if you need additional information or have any
3399# questions.
3400#
3401
3402
3403
3404
3405
3406cygwin_help() {
3407    case $1 in
3408    unzip)
3409        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3410    zip)
3411        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3412    make)
3413        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3414    * )
3415       break ;;
3416    esac
3417}
3418
3419apt_help() {
3420    case $1 in
3421    devkit)
3422        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3423    openjdk)
3424        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3425    alsa)
3426        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3427    cups)
3428        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3429    freetype2)
3430        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3431    pulse)
3432        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3433    x11)
3434        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3435    ccache)
3436        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3437    * )
3438       break ;;
3439    esac
3440}
3441
3442yum_help() {
3443    case $1 in
3444    devkit)
3445        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3446    openjdk)
3447        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3448    alsa)
3449        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3450    cups)
3451        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3452    freetype2)
3453        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3454    pulse)
3455        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3456    x11)
3457        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3458    ccache)
3459        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3460    * )
3461       break ;;
3462    esac
3463}
3464
3465port_help() {
3466    PKGHANDLER_COMMAND=""
3467}
3468
3469pkgutil_help() {
3470    PKGHANDLER_COMMAND=""
3471}
3472
3473pkgadd_help() {
3474    PKGHANDLER_COMMAND=""
3475}
3476
3477
3478
3479#
3480# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3481# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3482#
3483# This code is free software; you can redistribute it and/or modify it
3484# under the terms of the GNU General Public License version 2 only, as
3485# published by the Free Software Foundation.  Oracle designates this
3486# particular file as subject to the "Classpath" exception as provided
3487# by Oracle in the LICENSE file that accompanied this code.
3488#
3489# This code is distributed in the hope that it will be useful, but WITHOUT
3490# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3491# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3492# version 2 for more details (a copy is included in the LICENSE file that
3493# accompanied this code).
3494#
3495# You should have received a copy of the GNU General Public License version
3496# 2 along with this work; if not, write to the Free Software Foundation,
3497# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3498#
3499# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3500# or visit www.oracle.com if you need additional information or have any
3501# questions.
3502#
3503
3504
3505
3506
3507
3508
3509
3510
3511###############################################################################
3512#
3513# Should we build only OpenJDK even if closed sources are present?
3514#
3515
3516
3517
3518
3519###############################################################################
3520#
3521# Setup version numbers
3522#
3523
3524
3525
3526
3527
3528
3529# Support for customization of the build process. Some build files
3530# will include counterparts from this location, if they exist. This allows
3531# for a degree of customization of the build targets and the rules/recipes
3532# to create them
3533
3534# Check whether --with-custom-make-dir was given.
3535if test "${with_custom_make_dir+set}" = set; then :
3536  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3537fi
3538
3539
3540
3541#
3542# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3543# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3544#
3545# This code is free software; you can redistribute it and/or modify it
3546# under the terms of the GNU General Public License version 2 only, as
3547# published by the Free Software Foundation.  Oracle designates this
3548# particular file as subject to the "Classpath" exception as provided
3549# by Oracle in the LICENSE file that accompanied this code.
3550#
3551# This code is distributed in the hope that it will be useful, but WITHOUT
3552# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3553# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3554# version 2 for more details (a copy is included in the LICENSE file that
3555# accompanied this code).
3556#
3557# You should have received a copy of the GNU General Public License version
3558# 2 along with this work; if not, write to the Free Software Foundation,
3559# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3560#
3561# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3562# or visit www.oracle.com if you need additional information or have any
3563# questions.
3564#
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580#
3581# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3582# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3583#
3584# This code is free software; you can redistribute it and/or modify it
3585# under the terms of the GNU General Public License version 2 only, as
3586# published by the Free Software Foundation.  Oracle designates this
3587# particular file as subject to the "Classpath" exception as provided
3588# by Oracle in the LICENSE file that accompanied this code.
3589#
3590# This code is distributed in the hope that it will be useful, but WITHOUT
3591# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3592# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3593# version 2 for more details (a copy is included in the LICENSE file that
3594# accompanied this code).
3595#
3596# You should have received a copy of the GNU General Public License version
3597# 2 along with this work; if not, write to the Free Software Foundation,
3598# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3599#
3600# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3601# or visit www.oracle.com if you need additional information or have any
3602# questions.
3603#
3604
3605# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3606# Converts autoconf style CPU name to OpenJDK style, into
3607# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3608
3609
3610# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3611# Converts autoconf style OS name to OpenJDK style, into
3612# VAR_OS and VAR_OS_API.
3613
3614
3615# Expects $host_os $host_cpu $build_os and $build_cpu
3616# and $with_target_bits to have been setup!
3617#
3618# Translate the standard triplet(quadruplet) definition
3619# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3620# OPENJDK_BUILD_OS, etc.
3621
3622
3623# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3624# accordingly. Must be done after setting up build and target system, but before
3625# doing anything else with these values.
3626
3627
3628    # Setup the legacy variables, for controlling the old makefiles.
3629    #
3630
3631
3632
3633
3634#%%% Build and target systems %%%
3635
3636
3637
3638
3639# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3640# Add -mX to various FLAGS variables.
3641
3642
3643
3644
3645
3646
3647#
3648# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3649# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3650#
3651# This code is free software; you can redistribute it and/or modify it
3652# under the terms of the GNU General Public License version 2 only, as
3653# published by the Free Software Foundation.  Oracle designates this
3654# particular file as subject to the "Classpath" exception as provided
3655# by Oracle in the LICENSE file that accompanied this code.
3656#
3657# This code is distributed in the hope that it will be useful, but WITHOUT
3658# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3659# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3660# version 2 for more details (a copy is included in the LICENSE file that
3661# accompanied this code).
3662#
3663# You should have received a copy of the GNU General Public License version
3664# 2 along with this work; if not, write to the Free Software Foundation,
3665# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3666#
3667# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3668# or visit www.oracle.com if you need additional information or have any
3669# questions.
3670#
3671
3672
3673
3674
3675
3676
3677
3678
3679#
3680# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3681# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3682#
3683# This code is free software; you can redistribute it and/or modify it
3684# under the terms of the GNU General Public License version 2 only, as
3685# published by the Free Software Foundation.  Oracle designates this
3686# particular file as subject to the "Classpath" exception as provided
3687# by Oracle in the LICENSE file that accompanied this code.
3688#
3689# This code is distributed in the hope that it will be useful, but WITHOUT
3690# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3691# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3692# version 2 for more details (a copy is included in the LICENSE file that
3693# accompanied this code).
3694#
3695# You should have received a copy of the GNU General Public License version
3696# 2 along with this work; if not, write to the Free Software Foundation,
3697# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3698#
3699# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3700# or visit www.oracle.com if you need additional information or have any
3701# questions.
3702#
3703
3704# $1 = compiler to test (CC or CXX)
3705# $2 = human readable name of compiler (C or C++)
3706
3707
3708
3709
3710
3711# $1 = compiler to test (CC or CXX)
3712# $2 = human readable name of compiler (C or C++)
3713# $3 = list of compiler names to search for
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3728#                                   [RUN-IF-FALSE])
3729# ------------------------------------------------------------
3730# Check that the c and c++ compilers support an argument
3731
3732
3733
3734
3735# Setup the JTREG paths
3736
3737
3738#
3739# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3740# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3741#
3742# This code is free software; you can redistribute it and/or modify it
3743# under the terms of the GNU General Public License version 2 only, as
3744# published by the Free Software Foundation.  Oracle designates this
3745# particular file as subject to the "Classpath" exception as provided
3746# by Oracle in the LICENSE file that accompanied this code.
3747#
3748# This code is distributed in the hope that it will be useful, but WITHOUT
3749# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3750# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3751# version 2 for more details (a copy is included in the LICENSE file that
3752# accompanied this code).
3753#
3754# You should have received a copy of the GNU General Public License version
3755# 2 along with this work; if not, write to the Free Software Foundation,
3756# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3757#
3758# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3759# or visit www.oracle.com if you need additional information or have any
3760# questions.
3761#
3762
3763
3764
3765
3766
3767
3768
3769# Check if the VS env variables were setup prior to running configure.
3770# If not, then find vcvarsall.bat and run it automatically, and integrate
3771# the set env variables into the spec file.
3772
3773
3774
3775# Setup the DXSDK paths
3776
3777
3778
3779
3780
3781
3782# This line needs to be here, verbatim, after all includes and the dummy hook
3783# definitions. It is replaced with custom functionality when building
3784# custom sources.
3785#CUSTOM_AUTOCONF_INCLUDE
3786
3787# Do not change or remove the following line, it is needed for consistency checks:
3788DATE_WHEN_GENERATED=1372317997
3789
3790###############################################################################
3791#
3792# Initialization / Boot-strapping
3793#
3794# The bootstrapping process needs to solve the "chicken or the egg" problem,
3795# thus it jumps back and forth, each time gaining something needed later on.
3796#
3797###############################################################################
3798
3799# Basic initialization that must happen first of all
3800
3801# Save the original command line. This is passed to us by the wrapper configure script.
3802
3803DATE_WHEN_CONFIGURED=`LANG=C date`
3804
3805{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3806$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3807{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3808$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3809
3810
3811
3812# Start with tools that do not need have cross compilation support
3813# and can be expected to be found in the default PATH. These tools are
3814# used by configure. Nor are these tools expected to be found in the
3815# devkit from the builddeps server either, since they are
3816# needed to download the devkit.
3817
3818# First are all the simple required tools.
3819
3820    for ac_prog in basename
3821do
3822  # Extract the first word of "$ac_prog", so it can be a program name with args.
3823set dummy $ac_prog; ac_word=$2
3824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3825$as_echo_n "checking for $ac_word... " >&6; }
3826if test "${ac_cv_path_BASENAME+set}" = set; then :
3827  $as_echo_n "(cached) " >&6
3828else
3829  case $BASENAME in
3830  [\\/]* | ?:[\\/]*)
3831  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3832  ;;
3833  *)
3834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3835for as_dir in $PATH
3836do
3837  IFS=$as_save_IFS
3838  test -z "$as_dir" && as_dir=.
3839    for ac_exec_ext in '' $ac_executable_extensions; do
3840  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3841    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3843    break 2
3844  fi
3845done
3846  done
3847IFS=$as_save_IFS
3848
3849  ;;
3850esac
3851fi
3852BASENAME=$ac_cv_path_BASENAME
3853if test -n "$BASENAME"; then
3854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3855$as_echo "$BASENAME" >&6; }
3856else
3857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3858$as_echo "no" >&6; }
3859fi
3860
3861
3862  test -n "$BASENAME" && break
3863done
3864
3865
3866    if test "x$BASENAME" = x; then
3867        if test "xbasename" = x; then
3868          PROG_NAME=basename
3869        else
3870          PROG_NAME=basename
3871        fi
3872        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3873$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3874        as_fn_error $? "Cannot continue" "$LINENO" 5
3875    fi
3876
3877
3878
3879    for ac_prog in bash
3880do
3881  # Extract the first word of "$ac_prog", so it can be a program name with args.
3882set dummy $ac_prog; ac_word=$2
3883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3884$as_echo_n "checking for $ac_word... " >&6; }
3885if test "${ac_cv_path_BASH+set}" = set; then :
3886  $as_echo_n "(cached) " >&6
3887else
3888  case $BASH in
3889  [\\/]* | ?:[\\/]*)
3890  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3891  ;;
3892  *)
3893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3894for as_dir in $PATH
3895do
3896  IFS=$as_save_IFS
3897  test -z "$as_dir" && as_dir=.
3898    for ac_exec_ext in '' $ac_executable_extensions; do
3899  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3900    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3902    break 2
3903  fi
3904done
3905  done
3906IFS=$as_save_IFS
3907
3908  ;;
3909esac
3910fi
3911BASH=$ac_cv_path_BASH
3912if test -n "$BASH"; then
3913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3914$as_echo "$BASH" >&6; }
3915else
3916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3917$as_echo "no" >&6; }
3918fi
3919
3920
3921  test -n "$BASH" && break
3922done
3923
3924
3925    if test "x$BASH" = x; then
3926        if test "xbash" = x; then
3927          PROG_NAME=bash
3928        else
3929          PROG_NAME=bash
3930        fi
3931        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3932$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3933        as_fn_error $? "Cannot continue" "$LINENO" 5
3934    fi
3935
3936
3937
3938    for ac_prog in cat
3939do
3940  # Extract the first word of "$ac_prog", so it can be a program name with args.
3941set dummy $ac_prog; ac_word=$2
3942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3943$as_echo_n "checking for $ac_word... " >&6; }
3944if test "${ac_cv_path_CAT+set}" = set; then :
3945  $as_echo_n "(cached) " >&6
3946else
3947  case $CAT in
3948  [\\/]* | ?:[\\/]*)
3949  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3950  ;;
3951  *)
3952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3953for as_dir in $PATH
3954do
3955  IFS=$as_save_IFS
3956  test -z "$as_dir" && as_dir=.
3957    for ac_exec_ext in '' $ac_executable_extensions; do
3958  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3959    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3961    break 2
3962  fi
3963done
3964  done
3965IFS=$as_save_IFS
3966
3967  ;;
3968esac
3969fi
3970CAT=$ac_cv_path_CAT
3971if test -n "$CAT"; then
3972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3973$as_echo "$CAT" >&6; }
3974else
3975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3976$as_echo "no" >&6; }
3977fi
3978
3979
3980  test -n "$CAT" && break
3981done
3982
3983
3984    if test "x$CAT" = x; then
3985        if test "xcat" = x; then
3986          PROG_NAME=cat
3987        else
3988          PROG_NAME=cat
3989        fi
3990        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3991$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3992        as_fn_error $? "Cannot continue" "$LINENO" 5
3993    fi
3994
3995
3996
3997    for ac_prog in chmod
3998do
3999  # Extract the first word of "$ac_prog", so it can be a program name with args.
4000set dummy $ac_prog; ac_word=$2
4001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4002$as_echo_n "checking for $ac_word... " >&6; }
4003if test "${ac_cv_path_CHMOD+set}" = set; then :
4004  $as_echo_n "(cached) " >&6
4005else
4006  case $CHMOD in
4007  [\\/]* | ?:[\\/]*)
4008  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4009  ;;
4010  *)
4011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4012for as_dir in $PATH
4013do
4014  IFS=$as_save_IFS
4015  test -z "$as_dir" && as_dir=.
4016    for ac_exec_ext in '' $ac_executable_extensions; do
4017  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4018    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4020    break 2
4021  fi
4022done
4023  done
4024IFS=$as_save_IFS
4025
4026  ;;
4027esac
4028fi
4029CHMOD=$ac_cv_path_CHMOD
4030if test -n "$CHMOD"; then
4031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4032$as_echo "$CHMOD" >&6; }
4033else
4034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4035$as_echo "no" >&6; }
4036fi
4037
4038
4039  test -n "$CHMOD" && break
4040done
4041
4042
4043    if test "x$CHMOD" = x; then
4044        if test "xchmod" = x; then
4045          PROG_NAME=chmod
4046        else
4047          PROG_NAME=chmod
4048        fi
4049        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4050$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4051        as_fn_error $? "Cannot continue" "$LINENO" 5
4052    fi
4053
4054
4055
4056    for ac_prog in cmp
4057do
4058  # Extract the first word of "$ac_prog", so it can be a program name with args.
4059set dummy $ac_prog; ac_word=$2
4060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4061$as_echo_n "checking for $ac_word... " >&6; }
4062if test "${ac_cv_path_CMP+set}" = set; then :
4063  $as_echo_n "(cached) " >&6
4064else
4065  case $CMP in
4066  [\\/]* | ?:[\\/]*)
4067  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4068  ;;
4069  *)
4070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4071for as_dir in $PATH
4072do
4073  IFS=$as_save_IFS
4074  test -z "$as_dir" && as_dir=.
4075    for ac_exec_ext in '' $ac_executable_extensions; do
4076  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4077    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4079    break 2
4080  fi
4081done
4082  done
4083IFS=$as_save_IFS
4084
4085  ;;
4086esac
4087fi
4088CMP=$ac_cv_path_CMP
4089if test -n "$CMP"; then
4090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4091$as_echo "$CMP" >&6; }
4092else
4093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4094$as_echo "no" >&6; }
4095fi
4096
4097
4098  test -n "$CMP" && break
4099done
4100
4101
4102    if test "x$CMP" = x; then
4103        if test "xcmp" = x; then
4104          PROG_NAME=cmp
4105        else
4106          PROG_NAME=cmp
4107        fi
4108        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4109$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4110        as_fn_error $? "Cannot continue" "$LINENO" 5
4111    fi
4112
4113
4114
4115    for ac_prog in comm
4116do
4117  # Extract the first word of "$ac_prog", so it can be a program name with args.
4118set dummy $ac_prog; ac_word=$2
4119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4120$as_echo_n "checking for $ac_word... " >&6; }
4121if test "${ac_cv_path_COMM+set}" = set; then :
4122  $as_echo_n "(cached) " >&6
4123else
4124  case $COMM in
4125  [\\/]* | ?:[\\/]*)
4126  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4127  ;;
4128  *)
4129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4130for as_dir in $PATH
4131do
4132  IFS=$as_save_IFS
4133  test -z "$as_dir" && as_dir=.
4134    for ac_exec_ext in '' $ac_executable_extensions; do
4135  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4136    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4138    break 2
4139  fi
4140done
4141  done
4142IFS=$as_save_IFS
4143
4144  ;;
4145esac
4146fi
4147COMM=$ac_cv_path_COMM
4148if test -n "$COMM"; then
4149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4150$as_echo "$COMM" >&6; }
4151else
4152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4153$as_echo "no" >&6; }
4154fi
4155
4156
4157  test -n "$COMM" && break
4158done
4159
4160
4161    if test "x$COMM" = x; then
4162        if test "xcomm" = x; then
4163          PROG_NAME=comm
4164        else
4165          PROG_NAME=comm
4166        fi
4167        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4168$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4169        as_fn_error $? "Cannot continue" "$LINENO" 5
4170    fi
4171
4172
4173
4174    for ac_prog in cp
4175do
4176  # Extract the first word of "$ac_prog", so it can be a program name with args.
4177set dummy $ac_prog; ac_word=$2
4178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4179$as_echo_n "checking for $ac_word... " >&6; }
4180if test "${ac_cv_path_CP+set}" = set; then :
4181  $as_echo_n "(cached) " >&6
4182else
4183  case $CP in
4184  [\\/]* | ?:[\\/]*)
4185  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4186  ;;
4187  *)
4188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4189for as_dir in $PATH
4190do
4191  IFS=$as_save_IFS
4192  test -z "$as_dir" && as_dir=.
4193    for ac_exec_ext in '' $ac_executable_extensions; do
4194  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4195    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4197    break 2
4198  fi
4199done
4200  done
4201IFS=$as_save_IFS
4202
4203  ;;
4204esac
4205fi
4206CP=$ac_cv_path_CP
4207if test -n "$CP"; then
4208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4209$as_echo "$CP" >&6; }
4210else
4211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4212$as_echo "no" >&6; }
4213fi
4214
4215
4216  test -n "$CP" && break
4217done
4218
4219
4220    if test "x$CP" = x; then
4221        if test "xcp" = x; then
4222          PROG_NAME=cp
4223        else
4224          PROG_NAME=cp
4225        fi
4226        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4227$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4228        as_fn_error $? "Cannot continue" "$LINENO" 5
4229    fi
4230
4231
4232
4233    for ac_prog in cpio
4234do
4235  # Extract the first word of "$ac_prog", so it can be a program name with args.
4236set dummy $ac_prog; ac_word=$2
4237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4238$as_echo_n "checking for $ac_word... " >&6; }
4239if test "${ac_cv_path_CPIO+set}" = set; then :
4240  $as_echo_n "(cached) " >&6
4241else
4242  case $CPIO in
4243  [\\/]* | ?:[\\/]*)
4244  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4245  ;;
4246  *)
4247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4248for as_dir in $PATH
4249do
4250  IFS=$as_save_IFS
4251  test -z "$as_dir" && as_dir=.
4252    for ac_exec_ext in '' $ac_executable_extensions; do
4253  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4254    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4256    break 2
4257  fi
4258done
4259  done
4260IFS=$as_save_IFS
4261
4262  ;;
4263esac
4264fi
4265CPIO=$ac_cv_path_CPIO
4266if test -n "$CPIO"; then
4267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4268$as_echo "$CPIO" >&6; }
4269else
4270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4271$as_echo "no" >&6; }
4272fi
4273
4274
4275  test -n "$CPIO" && break
4276done
4277
4278
4279    if test "x$CPIO" = x; then
4280        if test "xcpio" = x; then
4281          PROG_NAME=cpio
4282        else
4283          PROG_NAME=cpio
4284        fi
4285        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4286$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4287        as_fn_error $? "Cannot continue" "$LINENO" 5
4288    fi
4289
4290
4291
4292    for ac_prog in cut
4293do
4294  # Extract the first word of "$ac_prog", so it can be a program name with args.
4295set dummy $ac_prog; ac_word=$2
4296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4297$as_echo_n "checking for $ac_word... " >&6; }
4298if test "${ac_cv_path_CUT+set}" = set; then :
4299  $as_echo_n "(cached) " >&6
4300else
4301  case $CUT in
4302  [\\/]* | ?:[\\/]*)
4303  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4304  ;;
4305  *)
4306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4307for as_dir in $PATH
4308do
4309  IFS=$as_save_IFS
4310  test -z "$as_dir" && as_dir=.
4311    for ac_exec_ext in '' $ac_executable_extensions; do
4312  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4313    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4315    break 2
4316  fi
4317done
4318  done
4319IFS=$as_save_IFS
4320
4321  ;;
4322esac
4323fi
4324CUT=$ac_cv_path_CUT
4325if test -n "$CUT"; then
4326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4327$as_echo "$CUT" >&6; }
4328else
4329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4330$as_echo "no" >&6; }
4331fi
4332
4333
4334  test -n "$CUT" && break
4335done
4336
4337
4338    if test "x$CUT" = x; then
4339        if test "xcut" = x; then
4340          PROG_NAME=cut
4341        else
4342          PROG_NAME=cut
4343        fi
4344        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4345$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4346        as_fn_error $? "Cannot continue" "$LINENO" 5
4347    fi
4348
4349
4350
4351    for ac_prog in date
4352do
4353  # Extract the first word of "$ac_prog", so it can be a program name with args.
4354set dummy $ac_prog; ac_word=$2
4355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4356$as_echo_n "checking for $ac_word... " >&6; }
4357if test "${ac_cv_path_DATE+set}" = set; then :
4358  $as_echo_n "(cached) " >&6
4359else
4360  case $DATE in
4361  [\\/]* | ?:[\\/]*)
4362  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4363  ;;
4364  *)
4365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4366for as_dir in $PATH
4367do
4368  IFS=$as_save_IFS
4369  test -z "$as_dir" && as_dir=.
4370    for ac_exec_ext in '' $ac_executable_extensions; do
4371  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4372    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4374    break 2
4375  fi
4376done
4377  done
4378IFS=$as_save_IFS
4379
4380  ;;
4381esac
4382fi
4383DATE=$ac_cv_path_DATE
4384if test -n "$DATE"; then
4385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4386$as_echo "$DATE" >&6; }
4387else
4388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4389$as_echo "no" >&6; }
4390fi
4391
4392
4393  test -n "$DATE" && break
4394done
4395
4396
4397    if test "x$DATE" = x; then
4398        if test "xdate" = x; then
4399          PROG_NAME=date
4400        else
4401          PROG_NAME=date
4402        fi
4403        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4404$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4405        as_fn_error $? "Cannot continue" "$LINENO" 5
4406    fi
4407
4408
4409
4410    for ac_prog in gdiff diff
4411do
4412  # Extract the first word of "$ac_prog", so it can be a program name with args.
4413set dummy $ac_prog; ac_word=$2
4414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4415$as_echo_n "checking for $ac_word... " >&6; }
4416if test "${ac_cv_path_DIFF+set}" = set; then :
4417  $as_echo_n "(cached) " >&6
4418else
4419  case $DIFF in
4420  [\\/]* | ?:[\\/]*)
4421  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4422  ;;
4423  *)
4424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4425for as_dir in $PATH
4426do
4427  IFS=$as_save_IFS
4428  test -z "$as_dir" && as_dir=.
4429    for ac_exec_ext in '' $ac_executable_extensions; do
4430  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4431    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4433    break 2
4434  fi
4435done
4436  done
4437IFS=$as_save_IFS
4438
4439  ;;
4440esac
4441fi
4442DIFF=$ac_cv_path_DIFF
4443if test -n "$DIFF"; then
4444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4445$as_echo "$DIFF" >&6; }
4446else
4447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4448$as_echo "no" >&6; }
4449fi
4450
4451
4452  test -n "$DIFF" && break
4453done
4454
4455
4456    if test "x$DIFF" = x; then
4457        if test "xgdiff diff" = x; then
4458          PROG_NAME=diff
4459        else
4460          PROG_NAME=gdiff diff
4461        fi
4462        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4463$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4464        as_fn_error $? "Cannot continue" "$LINENO" 5
4465    fi
4466
4467
4468
4469    for ac_prog in dirname
4470do
4471  # Extract the first word of "$ac_prog", so it can be a program name with args.
4472set dummy $ac_prog; ac_word=$2
4473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4474$as_echo_n "checking for $ac_word... " >&6; }
4475if test "${ac_cv_path_DIRNAME+set}" = set; then :
4476  $as_echo_n "(cached) " >&6
4477else
4478  case $DIRNAME in
4479  [\\/]* | ?:[\\/]*)
4480  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4481  ;;
4482  *)
4483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4484for as_dir in $PATH
4485do
4486  IFS=$as_save_IFS
4487  test -z "$as_dir" && as_dir=.
4488    for ac_exec_ext in '' $ac_executable_extensions; do
4489  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4490    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4492    break 2
4493  fi
4494done
4495  done
4496IFS=$as_save_IFS
4497
4498  ;;
4499esac
4500fi
4501DIRNAME=$ac_cv_path_DIRNAME
4502if test -n "$DIRNAME"; then
4503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4504$as_echo "$DIRNAME" >&6; }
4505else
4506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4507$as_echo "no" >&6; }
4508fi
4509
4510
4511  test -n "$DIRNAME" && break
4512done
4513
4514
4515    if test "x$DIRNAME" = x; then
4516        if test "xdirname" = x; then
4517          PROG_NAME=dirname
4518        else
4519          PROG_NAME=dirname
4520        fi
4521        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4522$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4523        as_fn_error $? "Cannot continue" "$LINENO" 5
4524    fi
4525
4526
4527
4528    for ac_prog in echo
4529do
4530  # Extract the first word of "$ac_prog", so it can be a program name with args.
4531set dummy $ac_prog; ac_word=$2
4532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4533$as_echo_n "checking for $ac_word... " >&6; }
4534if test "${ac_cv_path_ECHO+set}" = set; then :
4535  $as_echo_n "(cached) " >&6
4536else
4537  case $ECHO in
4538  [\\/]* | ?:[\\/]*)
4539  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4540  ;;
4541  *)
4542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4543for as_dir in $PATH
4544do
4545  IFS=$as_save_IFS
4546  test -z "$as_dir" && as_dir=.
4547    for ac_exec_ext in '' $ac_executable_extensions; do
4548  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4549    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4551    break 2
4552  fi
4553done
4554  done
4555IFS=$as_save_IFS
4556
4557  ;;
4558esac
4559fi
4560ECHO=$ac_cv_path_ECHO
4561if test -n "$ECHO"; then
4562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4563$as_echo "$ECHO" >&6; }
4564else
4565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4566$as_echo "no" >&6; }
4567fi
4568
4569
4570  test -n "$ECHO" && break
4571done
4572
4573
4574    if test "x$ECHO" = x; then
4575        if test "xecho" = x; then
4576          PROG_NAME=echo
4577        else
4578          PROG_NAME=echo
4579        fi
4580        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4581$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4582        as_fn_error $? "Cannot continue" "$LINENO" 5
4583    fi
4584
4585
4586
4587    for ac_prog in expr
4588do
4589  # Extract the first word of "$ac_prog", so it can be a program name with args.
4590set dummy $ac_prog; ac_word=$2
4591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4592$as_echo_n "checking for $ac_word... " >&6; }
4593if test "${ac_cv_path_EXPR+set}" = set; then :
4594  $as_echo_n "(cached) " >&6
4595else
4596  case $EXPR in
4597  [\\/]* | ?:[\\/]*)
4598  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4599  ;;
4600  *)
4601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4602for as_dir in $PATH
4603do
4604  IFS=$as_save_IFS
4605  test -z "$as_dir" && as_dir=.
4606    for ac_exec_ext in '' $ac_executable_extensions; do
4607  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4608    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4610    break 2
4611  fi
4612done
4613  done
4614IFS=$as_save_IFS
4615
4616  ;;
4617esac
4618fi
4619EXPR=$ac_cv_path_EXPR
4620if test -n "$EXPR"; then
4621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4622$as_echo "$EXPR" >&6; }
4623else
4624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4625$as_echo "no" >&6; }
4626fi
4627
4628
4629  test -n "$EXPR" && break
4630done
4631
4632
4633    if test "x$EXPR" = x; then
4634        if test "xexpr" = x; then
4635          PROG_NAME=expr
4636        else
4637          PROG_NAME=expr
4638        fi
4639        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4640$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4641        as_fn_error $? "Cannot continue" "$LINENO" 5
4642    fi
4643
4644
4645
4646    for ac_prog in file
4647do
4648  # Extract the first word of "$ac_prog", so it can be a program name with args.
4649set dummy $ac_prog; ac_word=$2
4650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4651$as_echo_n "checking for $ac_word... " >&6; }
4652if test "${ac_cv_path_FILE+set}" = set; then :
4653  $as_echo_n "(cached) " >&6
4654else
4655  case $FILE in
4656  [\\/]* | ?:[\\/]*)
4657  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4658  ;;
4659  *)
4660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4661for as_dir in $PATH
4662do
4663  IFS=$as_save_IFS
4664  test -z "$as_dir" && as_dir=.
4665    for ac_exec_ext in '' $ac_executable_extensions; do
4666  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4667    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4669    break 2
4670  fi
4671done
4672  done
4673IFS=$as_save_IFS
4674
4675  ;;
4676esac
4677fi
4678FILE=$ac_cv_path_FILE
4679if test -n "$FILE"; then
4680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4681$as_echo "$FILE" >&6; }
4682else
4683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4684$as_echo "no" >&6; }
4685fi
4686
4687
4688  test -n "$FILE" && break
4689done
4690
4691
4692    if test "x$FILE" = x; then
4693        if test "xfile" = x; then
4694          PROG_NAME=file
4695        else
4696          PROG_NAME=file
4697        fi
4698        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4699$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4700        as_fn_error $? "Cannot continue" "$LINENO" 5
4701    fi
4702
4703
4704
4705    for ac_prog in find
4706do
4707  # Extract the first word of "$ac_prog", so it can be a program name with args.
4708set dummy $ac_prog; ac_word=$2
4709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4710$as_echo_n "checking for $ac_word... " >&6; }
4711if test "${ac_cv_path_FIND+set}" = set; then :
4712  $as_echo_n "(cached) " >&6
4713else
4714  case $FIND in
4715  [\\/]* | ?:[\\/]*)
4716  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4717  ;;
4718  *)
4719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4720for as_dir in $PATH
4721do
4722  IFS=$as_save_IFS
4723  test -z "$as_dir" && as_dir=.
4724    for ac_exec_ext in '' $ac_executable_extensions; do
4725  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4726    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4728    break 2
4729  fi
4730done
4731  done
4732IFS=$as_save_IFS
4733
4734  ;;
4735esac
4736fi
4737FIND=$ac_cv_path_FIND
4738if test -n "$FIND"; then
4739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4740$as_echo "$FIND" >&6; }
4741else
4742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4743$as_echo "no" >&6; }
4744fi
4745
4746
4747  test -n "$FIND" && break
4748done
4749
4750
4751    if test "x$FIND" = x; then
4752        if test "xfind" = x; then
4753          PROG_NAME=find
4754        else
4755          PROG_NAME=find
4756        fi
4757        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4758$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4759        as_fn_error $? "Cannot continue" "$LINENO" 5
4760    fi
4761
4762
4763
4764    for ac_prog in head
4765do
4766  # Extract the first word of "$ac_prog", so it can be a program name with args.
4767set dummy $ac_prog; ac_word=$2
4768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4769$as_echo_n "checking for $ac_word... " >&6; }
4770if test "${ac_cv_path_HEAD+set}" = set; then :
4771  $as_echo_n "(cached) " >&6
4772else
4773  case $HEAD in
4774  [\\/]* | ?:[\\/]*)
4775  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4776  ;;
4777  *)
4778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4779for as_dir in $PATH
4780do
4781  IFS=$as_save_IFS
4782  test -z "$as_dir" && as_dir=.
4783    for ac_exec_ext in '' $ac_executable_extensions; do
4784  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4785    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4787    break 2
4788  fi
4789done
4790  done
4791IFS=$as_save_IFS
4792
4793  ;;
4794esac
4795fi
4796HEAD=$ac_cv_path_HEAD
4797if test -n "$HEAD"; then
4798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4799$as_echo "$HEAD" >&6; }
4800else
4801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4802$as_echo "no" >&6; }
4803fi
4804
4805
4806  test -n "$HEAD" && break
4807done
4808
4809
4810    if test "x$HEAD" = x; then
4811        if test "xhead" = x; then
4812          PROG_NAME=head
4813        else
4814          PROG_NAME=head
4815        fi
4816        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4817$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4818        as_fn_error $? "Cannot continue" "$LINENO" 5
4819    fi
4820
4821
4822
4823    for ac_prog in ln
4824do
4825  # Extract the first word of "$ac_prog", so it can be a program name with args.
4826set dummy $ac_prog; ac_word=$2
4827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4828$as_echo_n "checking for $ac_word... " >&6; }
4829if test "${ac_cv_path_LN+set}" = set; then :
4830  $as_echo_n "(cached) " >&6
4831else
4832  case $LN in
4833  [\\/]* | ?:[\\/]*)
4834  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4835  ;;
4836  *)
4837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4838for as_dir in $PATH
4839do
4840  IFS=$as_save_IFS
4841  test -z "$as_dir" && as_dir=.
4842    for ac_exec_ext in '' $ac_executable_extensions; do
4843  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4844    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4846    break 2
4847  fi
4848done
4849  done
4850IFS=$as_save_IFS
4851
4852  ;;
4853esac
4854fi
4855LN=$ac_cv_path_LN
4856if test -n "$LN"; then
4857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4858$as_echo "$LN" >&6; }
4859else
4860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4861$as_echo "no" >&6; }
4862fi
4863
4864
4865  test -n "$LN" && break
4866done
4867
4868
4869    if test "x$LN" = x; then
4870        if test "xln" = x; then
4871          PROG_NAME=ln
4872        else
4873          PROG_NAME=ln
4874        fi
4875        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4876$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4877        as_fn_error $? "Cannot continue" "$LINENO" 5
4878    fi
4879
4880
4881
4882    for ac_prog in ls
4883do
4884  # Extract the first word of "$ac_prog", so it can be a program name with args.
4885set dummy $ac_prog; ac_word=$2
4886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4887$as_echo_n "checking for $ac_word... " >&6; }
4888if test "${ac_cv_path_LS+set}" = set; then :
4889  $as_echo_n "(cached) " >&6
4890else
4891  case $LS in
4892  [\\/]* | ?:[\\/]*)
4893  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4894  ;;
4895  *)
4896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4897for as_dir in $PATH
4898do
4899  IFS=$as_save_IFS
4900  test -z "$as_dir" && as_dir=.
4901    for ac_exec_ext in '' $ac_executable_extensions; do
4902  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4903    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4905    break 2
4906  fi
4907done
4908  done
4909IFS=$as_save_IFS
4910
4911  ;;
4912esac
4913fi
4914LS=$ac_cv_path_LS
4915if test -n "$LS"; then
4916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4917$as_echo "$LS" >&6; }
4918else
4919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4920$as_echo "no" >&6; }
4921fi
4922
4923
4924  test -n "$LS" && break
4925done
4926
4927
4928    if test "x$LS" = x; then
4929        if test "xls" = x; then
4930          PROG_NAME=ls
4931        else
4932          PROG_NAME=ls
4933        fi
4934        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4935$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4936        as_fn_error $? "Cannot continue" "$LINENO" 5
4937    fi
4938
4939
4940
4941    for ac_prog in mkdir
4942do
4943  # Extract the first word of "$ac_prog", so it can be a program name with args.
4944set dummy $ac_prog; ac_word=$2
4945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4946$as_echo_n "checking for $ac_word... " >&6; }
4947if test "${ac_cv_path_MKDIR+set}" = set; then :
4948  $as_echo_n "(cached) " >&6
4949else
4950  case $MKDIR in
4951  [\\/]* | ?:[\\/]*)
4952  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4953  ;;
4954  *)
4955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4956for as_dir in $PATH
4957do
4958  IFS=$as_save_IFS
4959  test -z "$as_dir" && as_dir=.
4960    for ac_exec_ext in '' $ac_executable_extensions; do
4961  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4962    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4964    break 2
4965  fi
4966done
4967  done
4968IFS=$as_save_IFS
4969
4970  ;;
4971esac
4972fi
4973MKDIR=$ac_cv_path_MKDIR
4974if test -n "$MKDIR"; then
4975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4976$as_echo "$MKDIR" >&6; }
4977else
4978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4979$as_echo "no" >&6; }
4980fi
4981
4982
4983  test -n "$MKDIR" && break
4984done
4985
4986
4987    if test "x$MKDIR" = x; then
4988        if test "xmkdir" = x; then
4989          PROG_NAME=mkdir
4990        else
4991          PROG_NAME=mkdir
4992        fi
4993        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4994$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4995        as_fn_error $? "Cannot continue" "$LINENO" 5
4996    fi
4997
4998
4999
5000    for ac_prog in mktemp
5001do
5002  # Extract the first word of "$ac_prog", so it can be a program name with args.
5003set dummy $ac_prog; ac_word=$2
5004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5005$as_echo_n "checking for $ac_word... " >&6; }
5006if test "${ac_cv_path_MKTEMP+set}" = set; then :
5007  $as_echo_n "(cached) " >&6
5008else
5009  case $MKTEMP in
5010  [\\/]* | ?:[\\/]*)
5011  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5012  ;;
5013  *)
5014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5015for as_dir in $PATH
5016do
5017  IFS=$as_save_IFS
5018  test -z "$as_dir" && as_dir=.
5019    for ac_exec_ext in '' $ac_executable_extensions; do
5020  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5021    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5023    break 2
5024  fi
5025done
5026  done
5027IFS=$as_save_IFS
5028
5029  ;;
5030esac
5031fi
5032MKTEMP=$ac_cv_path_MKTEMP
5033if test -n "$MKTEMP"; then
5034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5035$as_echo "$MKTEMP" >&6; }
5036else
5037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5038$as_echo "no" >&6; }
5039fi
5040
5041
5042  test -n "$MKTEMP" && break
5043done
5044
5045
5046    if test "x$MKTEMP" = x; then
5047        if test "xmktemp" = x; then
5048          PROG_NAME=mktemp
5049        else
5050          PROG_NAME=mktemp
5051        fi
5052        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5053$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5054        as_fn_error $? "Cannot continue" "$LINENO" 5
5055    fi
5056
5057
5058
5059    for ac_prog in mv
5060do
5061  # Extract the first word of "$ac_prog", so it can be a program name with args.
5062set dummy $ac_prog; ac_word=$2
5063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5064$as_echo_n "checking for $ac_word... " >&6; }
5065if test "${ac_cv_path_MV+set}" = set; then :
5066  $as_echo_n "(cached) " >&6
5067else
5068  case $MV in
5069  [\\/]* | ?:[\\/]*)
5070  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5071  ;;
5072  *)
5073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5074for as_dir in $PATH
5075do
5076  IFS=$as_save_IFS
5077  test -z "$as_dir" && as_dir=.
5078    for ac_exec_ext in '' $ac_executable_extensions; do
5079  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5080    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5082    break 2
5083  fi
5084done
5085  done
5086IFS=$as_save_IFS
5087
5088  ;;
5089esac
5090fi
5091MV=$ac_cv_path_MV
5092if test -n "$MV"; then
5093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5094$as_echo "$MV" >&6; }
5095else
5096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5097$as_echo "no" >&6; }
5098fi
5099
5100
5101  test -n "$MV" && break
5102done
5103
5104
5105    if test "x$MV" = x; then
5106        if test "xmv" = x; then
5107          PROG_NAME=mv
5108        else
5109          PROG_NAME=mv
5110        fi
5111        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5112$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5113        as_fn_error $? "Cannot continue" "$LINENO" 5
5114    fi
5115
5116
5117
5118    for ac_prog in printf
5119do
5120  # Extract the first word of "$ac_prog", so it can be a program name with args.
5121set dummy $ac_prog; ac_word=$2
5122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5123$as_echo_n "checking for $ac_word... " >&6; }
5124if test "${ac_cv_path_PRINTF+set}" = set; then :
5125  $as_echo_n "(cached) " >&6
5126else
5127  case $PRINTF in
5128  [\\/]* | ?:[\\/]*)
5129  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5130  ;;
5131  *)
5132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5133for as_dir in $PATH
5134do
5135  IFS=$as_save_IFS
5136  test -z "$as_dir" && as_dir=.
5137    for ac_exec_ext in '' $ac_executable_extensions; do
5138  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5139    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5141    break 2
5142  fi
5143done
5144  done
5145IFS=$as_save_IFS
5146
5147  ;;
5148esac
5149fi
5150PRINTF=$ac_cv_path_PRINTF
5151if test -n "$PRINTF"; then
5152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5153$as_echo "$PRINTF" >&6; }
5154else
5155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5156$as_echo "no" >&6; }
5157fi
5158
5159
5160  test -n "$PRINTF" && break
5161done
5162
5163
5164    if test "x$PRINTF" = x; then
5165        if test "xprintf" = x; then
5166          PROG_NAME=printf
5167        else
5168          PROG_NAME=printf
5169        fi
5170        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5171$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5172        as_fn_error $? "Cannot continue" "$LINENO" 5
5173    fi
5174
5175
5176
5177    for ac_prog in rm
5178do
5179  # Extract the first word of "$ac_prog", so it can be a program name with args.
5180set dummy $ac_prog; ac_word=$2
5181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5182$as_echo_n "checking for $ac_word... " >&6; }
5183if test "${ac_cv_path_RM+set}" = set; then :
5184  $as_echo_n "(cached) " >&6
5185else
5186  case $RM in
5187  [\\/]* | ?:[\\/]*)
5188  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5189  ;;
5190  *)
5191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5192for as_dir in $PATH
5193do
5194  IFS=$as_save_IFS
5195  test -z "$as_dir" && as_dir=.
5196    for ac_exec_ext in '' $ac_executable_extensions; do
5197  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5198    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5200    break 2
5201  fi
5202done
5203  done
5204IFS=$as_save_IFS
5205
5206  ;;
5207esac
5208fi
5209RM=$ac_cv_path_RM
5210if test -n "$RM"; then
5211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5212$as_echo "$RM" >&6; }
5213else
5214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5215$as_echo "no" >&6; }
5216fi
5217
5218
5219  test -n "$RM" && break
5220done
5221
5222
5223    if test "x$RM" = x; then
5224        if test "xrm" = x; then
5225          PROG_NAME=rm
5226        else
5227          PROG_NAME=rm
5228        fi
5229        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5230$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5231        as_fn_error $? "Cannot continue" "$LINENO" 5
5232    fi
5233
5234
5235
5236    for ac_prog in sh
5237do
5238  # Extract the first word of "$ac_prog", so it can be a program name with args.
5239set dummy $ac_prog; ac_word=$2
5240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5241$as_echo_n "checking for $ac_word... " >&6; }
5242if test "${ac_cv_path_SH+set}" = set; then :
5243  $as_echo_n "(cached) " >&6
5244else
5245  case $SH in
5246  [\\/]* | ?:[\\/]*)
5247  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5248  ;;
5249  *)
5250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5251for as_dir in $PATH
5252do
5253  IFS=$as_save_IFS
5254  test -z "$as_dir" && as_dir=.
5255    for ac_exec_ext in '' $ac_executable_extensions; do
5256  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5257    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5259    break 2
5260  fi
5261done
5262  done
5263IFS=$as_save_IFS
5264
5265  ;;
5266esac
5267fi
5268SH=$ac_cv_path_SH
5269if test -n "$SH"; then
5270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5271$as_echo "$SH" >&6; }
5272else
5273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5274$as_echo "no" >&6; }
5275fi
5276
5277
5278  test -n "$SH" && break
5279done
5280
5281
5282    if test "x$SH" = x; then
5283        if test "xsh" = x; then
5284          PROG_NAME=sh
5285        else
5286          PROG_NAME=sh
5287        fi
5288        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5289$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5290        as_fn_error $? "Cannot continue" "$LINENO" 5
5291    fi
5292
5293
5294
5295    for ac_prog in sort
5296do
5297  # Extract the first word of "$ac_prog", so it can be a program name with args.
5298set dummy $ac_prog; ac_word=$2
5299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5300$as_echo_n "checking for $ac_word... " >&6; }
5301if test "${ac_cv_path_SORT+set}" = set; then :
5302  $as_echo_n "(cached) " >&6
5303else
5304  case $SORT in
5305  [\\/]* | ?:[\\/]*)
5306  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5307  ;;
5308  *)
5309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5310for as_dir in $PATH
5311do
5312  IFS=$as_save_IFS
5313  test -z "$as_dir" && as_dir=.
5314    for ac_exec_ext in '' $ac_executable_extensions; do
5315  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5316    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5318    break 2
5319  fi
5320done
5321  done
5322IFS=$as_save_IFS
5323
5324  ;;
5325esac
5326fi
5327SORT=$ac_cv_path_SORT
5328if test -n "$SORT"; then
5329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5330$as_echo "$SORT" >&6; }
5331else
5332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5333$as_echo "no" >&6; }
5334fi
5335
5336
5337  test -n "$SORT" && break
5338done
5339
5340
5341    if test "x$SORT" = x; then
5342        if test "xsort" = x; then
5343          PROG_NAME=sort
5344        else
5345          PROG_NAME=sort
5346        fi
5347        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5348$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5349        as_fn_error $? "Cannot continue" "$LINENO" 5
5350    fi
5351
5352
5353
5354    for ac_prog in tail
5355do
5356  # Extract the first word of "$ac_prog", so it can be a program name with args.
5357set dummy $ac_prog; ac_word=$2
5358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5359$as_echo_n "checking for $ac_word... " >&6; }
5360if test "${ac_cv_path_TAIL+set}" = set; then :
5361  $as_echo_n "(cached) " >&6
5362else
5363  case $TAIL in
5364  [\\/]* | ?:[\\/]*)
5365  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5366  ;;
5367  *)
5368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5369for as_dir in $PATH
5370do
5371  IFS=$as_save_IFS
5372  test -z "$as_dir" && as_dir=.
5373    for ac_exec_ext in '' $ac_executable_extensions; do
5374  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5375    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5377    break 2
5378  fi
5379done
5380  done
5381IFS=$as_save_IFS
5382
5383  ;;
5384esac
5385fi
5386TAIL=$ac_cv_path_TAIL
5387if test -n "$TAIL"; then
5388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5389$as_echo "$TAIL" >&6; }
5390else
5391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5392$as_echo "no" >&6; }
5393fi
5394
5395
5396  test -n "$TAIL" && break
5397done
5398
5399
5400    if test "x$TAIL" = x; then
5401        if test "xtail" = x; then
5402          PROG_NAME=tail
5403        else
5404          PROG_NAME=tail
5405        fi
5406        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5407$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5408        as_fn_error $? "Cannot continue" "$LINENO" 5
5409    fi
5410
5411
5412
5413    for ac_prog in tar
5414do
5415  # Extract the first word of "$ac_prog", so it can be a program name with args.
5416set dummy $ac_prog; ac_word=$2
5417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5418$as_echo_n "checking for $ac_word... " >&6; }
5419if test "${ac_cv_path_TAR+set}" = set; then :
5420  $as_echo_n "(cached) " >&6
5421else
5422  case $TAR in
5423  [\\/]* | ?:[\\/]*)
5424  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5425  ;;
5426  *)
5427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5428for as_dir in $PATH
5429do
5430  IFS=$as_save_IFS
5431  test -z "$as_dir" && as_dir=.
5432    for ac_exec_ext in '' $ac_executable_extensions; do
5433  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5434    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5436    break 2
5437  fi
5438done
5439  done
5440IFS=$as_save_IFS
5441
5442  ;;
5443esac
5444fi
5445TAR=$ac_cv_path_TAR
5446if test -n "$TAR"; then
5447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5448$as_echo "$TAR" >&6; }
5449else
5450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5451$as_echo "no" >&6; }
5452fi
5453
5454
5455  test -n "$TAR" && break
5456done
5457
5458
5459    if test "x$TAR" = x; then
5460        if test "xtar" = x; then
5461          PROG_NAME=tar
5462        else
5463          PROG_NAME=tar
5464        fi
5465        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5466$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5467        as_fn_error $? "Cannot continue" "$LINENO" 5
5468    fi
5469
5470
5471
5472    for ac_prog in tee
5473do
5474  # Extract the first word of "$ac_prog", so it can be a program name with args.
5475set dummy $ac_prog; ac_word=$2
5476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5477$as_echo_n "checking for $ac_word... " >&6; }
5478if test "${ac_cv_path_TEE+set}" = set; then :
5479  $as_echo_n "(cached) " >&6
5480else
5481  case $TEE in
5482  [\\/]* | ?:[\\/]*)
5483  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5484  ;;
5485  *)
5486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5487for as_dir in $PATH
5488do
5489  IFS=$as_save_IFS
5490  test -z "$as_dir" && as_dir=.
5491    for ac_exec_ext in '' $ac_executable_extensions; do
5492  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5493    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5495    break 2
5496  fi
5497done
5498  done
5499IFS=$as_save_IFS
5500
5501  ;;
5502esac
5503fi
5504TEE=$ac_cv_path_TEE
5505if test -n "$TEE"; then
5506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5507$as_echo "$TEE" >&6; }
5508else
5509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5510$as_echo "no" >&6; }
5511fi
5512
5513
5514  test -n "$TEE" && break
5515done
5516
5517
5518    if test "x$TEE" = x; then
5519        if test "xtee" = x; then
5520          PROG_NAME=tee
5521        else
5522          PROG_NAME=tee
5523        fi
5524        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5525$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5526        as_fn_error $? "Cannot continue" "$LINENO" 5
5527    fi
5528
5529
5530
5531    for ac_prog in touch
5532do
5533  # Extract the first word of "$ac_prog", so it can be a program name with args.
5534set dummy $ac_prog; ac_word=$2
5535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5536$as_echo_n "checking for $ac_word... " >&6; }
5537if test "${ac_cv_path_TOUCH+set}" = set; then :
5538  $as_echo_n "(cached) " >&6
5539else
5540  case $TOUCH in
5541  [\\/]* | ?:[\\/]*)
5542  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5543  ;;
5544  *)
5545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5546for as_dir in $PATH
5547do
5548  IFS=$as_save_IFS
5549  test -z "$as_dir" && as_dir=.
5550    for ac_exec_ext in '' $ac_executable_extensions; do
5551  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5552    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5554    break 2
5555  fi
5556done
5557  done
5558IFS=$as_save_IFS
5559
5560  ;;
5561esac
5562fi
5563TOUCH=$ac_cv_path_TOUCH
5564if test -n "$TOUCH"; then
5565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5566$as_echo "$TOUCH" >&6; }
5567else
5568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5569$as_echo "no" >&6; }
5570fi
5571
5572
5573  test -n "$TOUCH" && break
5574done
5575
5576
5577    if test "x$TOUCH" = x; then
5578        if test "xtouch" = x; then
5579          PROG_NAME=touch
5580        else
5581          PROG_NAME=touch
5582        fi
5583        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5584$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5585        as_fn_error $? "Cannot continue" "$LINENO" 5
5586    fi
5587
5588
5589
5590    for ac_prog in tr
5591do
5592  # Extract the first word of "$ac_prog", so it can be a program name with args.
5593set dummy $ac_prog; ac_word=$2
5594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5595$as_echo_n "checking for $ac_word... " >&6; }
5596if test "${ac_cv_path_TR+set}" = set; then :
5597  $as_echo_n "(cached) " >&6
5598else
5599  case $TR in
5600  [\\/]* | ?:[\\/]*)
5601  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5602  ;;
5603  *)
5604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5605for as_dir in $PATH
5606do
5607  IFS=$as_save_IFS
5608  test -z "$as_dir" && as_dir=.
5609    for ac_exec_ext in '' $ac_executable_extensions; do
5610  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5611    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5613    break 2
5614  fi
5615done
5616  done
5617IFS=$as_save_IFS
5618
5619  ;;
5620esac
5621fi
5622TR=$ac_cv_path_TR
5623if test -n "$TR"; then
5624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5625$as_echo "$TR" >&6; }
5626else
5627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5628$as_echo "no" >&6; }
5629fi
5630
5631
5632  test -n "$TR" && break
5633done
5634
5635
5636    if test "x$TR" = x; then
5637        if test "xtr" = x; then
5638          PROG_NAME=tr
5639        else
5640          PROG_NAME=tr
5641        fi
5642        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5643$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5644        as_fn_error $? "Cannot continue" "$LINENO" 5
5645    fi
5646
5647
5648
5649    for ac_prog in uname
5650do
5651  # Extract the first word of "$ac_prog", so it can be a program name with args.
5652set dummy $ac_prog; ac_word=$2
5653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5654$as_echo_n "checking for $ac_word... " >&6; }
5655if test "${ac_cv_path_UNAME+set}" = set; then :
5656  $as_echo_n "(cached) " >&6
5657else
5658  case $UNAME in
5659  [\\/]* | ?:[\\/]*)
5660  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5661  ;;
5662  *)
5663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5664for as_dir in $PATH
5665do
5666  IFS=$as_save_IFS
5667  test -z "$as_dir" && as_dir=.
5668    for ac_exec_ext in '' $ac_executable_extensions; do
5669  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5670    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5672    break 2
5673  fi
5674done
5675  done
5676IFS=$as_save_IFS
5677
5678  ;;
5679esac
5680fi
5681UNAME=$ac_cv_path_UNAME
5682if test -n "$UNAME"; then
5683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5684$as_echo "$UNAME" >&6; }
5685else
5686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5687$as_echo "no" >&6; }
5688fi
5689
5690
5691  test -n "$UNAME" && break
5692done
5693
5694
5695    if test "x$UNAME" = x; then
5696        if test "xuname" = x; then
5697          PROG_NAME=uname
5698        else
5699          PROG_NAME=uname
5700        fi
5701        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5702$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5703        as_fn_error $? "Cannot continue" "$LINENO" 5
5704    fi
5705
5706
5707
5708    for ac_prog in uniq
5709do
5710  # Extract the first word of "$ac_prog", so it can be a program name with args.
5711set dummy $ac_prog; ac_word=$2
5712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5713$as_echo_n "checking for $ac_word... " >&6; }
5714if test "${ac_cv_path_UNIQ+set}" = set; then :
5715  $as_echo_n "(cached) " >&6
5716else
5717  case $UNIQ in
5718  [\\/]* | ?:[\\/]*)
5719  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5720  ;;
5721  *)
5722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5723for as_dir in $PATH
5724do
5725  IFS=$as_save_IFS
5726  test -z "$as_dir" && as_dir=.
5727    for ac_exec_ext in '' $ac_executable_extensions; do
5728  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5729    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5731    break 2
5732  fi
5733done
5734  done
5735IFS=$as_save_IFS
5736
5737  ;;
5738esac
5739fi
5740UNIQ=$ac_cv_path_UNIQ
5741if test -n "$UNIQ"; then
5742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5743$as_echo "$UNIQ" >&6; }
5744else
5745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5746$as_echo "no" >&6; }
5747fi
5748
5749
5750  test -n "$UNIQ" && break
5751done
5752
5753
5754    if test "x$UNIQ" = x; then
5755        if test "xuniq" = x; then
5756          PROG_NAME=uniq
5757        else
5758          PROG_NAME=uniq
5759        fi
5760        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5761$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5762        as_fn_error $? "Cannot continue" "$LINENO" 5
5763    fi
5764
5765
5766
5767    for ac_prog in wc
5768do
5769  # Extract the first word of "$ac_prog", so it can be a program name with args.
5770set dummy $ac_prog; ac_word=$2
5771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5772$as_echo_n "checking for $ac_word... " >&6; }
5773if test "${ac_cv_path_WC+set}" = set; then :
5774  $as_echo_n "(cached) " >&6
5775else
5776  case $WC in
5777  [\\/]* | ?:[\\/]*)
5778  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5779  ;;
5780  *)
5781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5782for as_dir in $PATH
5783do
5784  IFS=$as_save_IFS
5785  test -z "$as_dir" && as_dir=.
5786    for ac_exec_ext in '' $ac_executable_extensions; do
5787  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5788    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5790    break 2
5791  fi
5792done
5793  done
5794IFS=$as_save_IFS
5795
5796  ;;
5797esac
5798fi
5799WC=$ac_cv_path_WC
5800if test -n "$WC"; then
5801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5802$as_echo "$WC" >&6; }
5803else
5804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5805$as_echo "no" >&6; }
5806fi
5807
5808
5809  test -n "$WC" && break
5810done
5811
5812
5813    if test "x$WC" = x; then
5814        if test "xwc" = x; then
5815          PROG_NAME=wc
5816        else
5817          PROG_NAME=wc
5818        fi
5819        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5820$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5821        as_fn_error $? "Cannot continue" "$LINENO" 5
5822    fi
5823
5824
5825
5826    for ac_prog in which
5827do
5828  # Extract the first word of "$ac_prog", so it can be a program name with args.
5829set dummy $ac_prog; ac_word=$2
5830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5831$as_echo_n "checking for $ac_word... " >&6; }
5832if test "${ac_cv_path_WHICH+set}" = set; then :
5833  $as_echo_n "(cached) " >&6
5834else
5835  case $WHICH in
5836  [\\/]* | ?:[\\/]*)
5837  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5838  ;;
5839  *)
5840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5841for as_dir in $PATH
5842do
5843  IFS=$as_save_IFS
5844  test -z "$as_dir" && as_dir=.
5845    for ac_exec_ext in '' $ac_executable_extensions; do
5846  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5847    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5849    break 2
5850  fi
5851done
5852  done
5853IFS=$as_save_IFS
5854
5855  ;;
5856esac
5857fi
5858WHICH=$ac_cv_path_WHICH
5859if test -n "$WHICH"; then
5860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5861$as_echo "$WHICH" >&6; }
5862else
5863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5864$as_echo "no" >&6; }
5865fi
5866
5867
5868  test -n "$WHICH" && break
5869done
5870
5871
5872    if test "x$WHICH" = x; then
5873        if test "xwhich" = x; then
5874          PROG_NAME=which
5875        else
5876          PROG_NAME=which
5877        fi
5878        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5879$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5880        as_fn_error $? "Cannot continue" "$LINENO" 5
5881    fi
5882
5883
5884
5885    for ac_prog in xargs
5886do
5887  # Extract the first word of "$ac_prog", so it can be a program name with args.
5888set dummy $ac_prog; ac_word=$2
5889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5890$as_echo_n "checking for $ac_word... " >&6; }
5891if test "${ac_cv_path_XARGS+set}" = set; then :
5892  $as_echo_n "(cached) " >&6
5893else
5894  case $XARGS in
5895  [\\/]* | ?:[\\/]*)
5896  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5897  ;;
5898  *)
5899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5900for as_dir in $PATH
5901do
5902  IFS=$as_save_IFS
5903  test -z "$as_dir" && as_dir=.
5904    for ac_exec_ext in '' $ac_executable_extensions; do
5905  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5906    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5908    break 2
5909  fi
5910done
5911  done
5912IFS=$as_save_IFS
5913
5914  ;;
5915esac
5916fi
5917XARGS=$ac_cv_path_XARGS
5918if test -n "$XARGS"; then
5919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5920$as_echo "$XARGS" >&6; }
5921else
5922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5923$as_echo "no" >&6; }
5924fi
5925
5926
5927  test -n "$XARGS" && break
5928done
5929
5930
5931    if test "x$XARGS" = x; then
5932        if test "xxargs" = x; then
5933          PROG_NAME=xargs
5934        else
5935          PROG_NAME=xargs
5936        fi
5937        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5938$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5939        as_fn_error $? "Cannot continue" "$LINENO" 5
5940    fi
5941
5942
5943
5944# Then required tools that require some special treatment.
5945for ac_prog in gawk mawk nawk awk
5946do
5947  # Extract the first word of "$ac_prog", so it can be a program name with args.
5948set dummy $ac_prog; ac_word=$2
5949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5950$as_echo_n "checking for $ac_word... " >&6; }
5951if test "${ac_cv_prog_AWK+set}" = set; then :
5952  $as_echo_n "(cached) " >&6
5953else
5954  if test -n "$AWK"; then
5955  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5956else
5957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5958for as_dir in $PATH
5959do
5960  IFS=$as_save_IFS
5961  test -z "$as_dir" && as_dir=.
5962    for ac_exec_ext in '' $ac_executable_extensions; do
5963  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5964    ac_cv_prog_AWK="$ac_prog"
5965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5966    break 2
5967  fi
5968done
5969  done
5970IFS=$as_save_IFS
5971
5972fi
5973fi
5974AWK=$ac_cv_prog_AWK
5975if test -n "$AWK"; then
5976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5977$as_echo "$AWK" >&6; }
5978else
5979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5980$as_echo "no" >&6; }
5981fi
5982
5983
5984  test -n "$AWK" && break
5985done
5986
5987
5988    if test "x$AWK" = x; then
5989        if test "x" = x; then
5990          PROG_NAME=awk
5991        else
5992          PROG_NAME=
5993        fi
5994        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5995$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5996        as_fn_error $? "Cannot continue" "$LINENO" 5
5997    fi
5998
5999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6000$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6001if test "${ac_cv_path_GREP+set}" = set; then :
6002  $as_echo_n "(cached) " >&6
6003else
6004  if test -z "$GREP"; then
6005  ac_path_GREP_found=false
6006  # Loop through the user's path and test for each of PROGNAME-LIST
6007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6008for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6009do
6010  IFS=$as_save_IFS
6011  test -z "$as_dir" && as_dir=.
6012    for ac_prog in grep ggrep; do
6013    for ac_exec_ext in '' $ac_executable_extensions; do
6014      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6015      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6016# Check for GNU ac_path_GREP and select it if it is found.
6017  # Check for GNU $ac_path_GREP
6018case `"$ac_path_GREP" --version 2>&1` in
6019*GNU*)
6020  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6021*)
6022  ac_count=0
6023  $as_echo_n 0123456789 >"conftest.in"
6024  while :
6025  do
6026    cat "conftest.in" "conftest.in" >"conftest.tmp"
6027    mv "conftest.tmp" "conftest.in"
6028    cp "conftest.in" "conftest.nl"
6029    $as_echo 'GREP' >> "conftest.nl"
6030    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6031    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6032    as_fn_arith $ac_count + 1 && ac_count=$as_val
6033    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6034      # Best one so far, save it but keep looking for a better one
6035      ac_cv_path_GREP="$ac_path_GREP"
6036      ac_path_GREP_max=$ac_count
6037    fi
6038    # 10*(2^10) chars as input seems more than enough
6039    test $ac_count -gt 10 && break
6040  done
6041  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6042esac
6043
6044      $ac_path_GREP_found && break 3
6045    done
6046  done
6047  done
6048IFS=$as_save_IFS
6049  if test -z "$ac_cv_path_GREP"; then
6050    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6051  fi
6052else
6053  ac_cv_path_GREP=$GREP
6054fi
6055
6056fi
6057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6058$as_echo "$ac_cv_path_GREP" >&6; }
6059 GREP="$ac_cv_path_GREP"
6060
6061
6062
6063    if test "x$GREP" = x; then
6064        if test "x" = x; then
6065          PROG_NAME=grep
6066        else
6067          PROG_NAME=
6068        fi
6069        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6070$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6071        as_fn_error $? "Cannot continue" "$LINENO" 5
6072    fi
6073
6074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6075$as_echo_n "checking for egrep... " >&6; }
6076if test "${ac_cv_path_EGREP+set}" = set; then :
6077  $as_echo_n "(cached) " >&6
6078else
6079  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6080   then ac_cv_path_EGREP="$GREP -E"
6081   else
6082     if test -z "$EGREP"; then
6083  ac_path_EGREP_found=false
6084  # Loop through the user's path and test for each of PROGNAME-LIST
6085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6086for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6087do
6088  IFS=$as_save_IFS
6089  test -z "$as_dir" && as_dir=.
6090    for ac_prog in egrep; do
6091    for ac_exec_ext in '' $ac_executable_extensions; do
6092      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6093      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6094# Check for GNU ac_path_EGREP and select it if it is found.
6095  # Check for GNU $ac_path_EGREP
6096case `"$ac_path_EGREP" --version 2>&1` in
6097*GNU*)
6098  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6099*)
6100  ac_count=0
6101  $as_echo_n 0123456789 >"conftest.in"
6102  while :
6103  do
6104    cat "conftest.in" "conftest.in" >"conftest.tmp"
6105    mv "conftest.tmp" "conftest.in"
6106    cp "conftest.in" "conftest.nl"
6107    $as_echo 'EGREP' >> "conftest.nl"
6108    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6109    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6110    as_fn_arith $ac_count + 1 && ac_count=$as_val
6111    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6112      # Best one so far, save it but keep looking for a better one
6113      ac_cv_path_EGREP="$ac_path_EGREP"
6114      ac_path_EGREP_max=$ac_count
6115    fi
6116    # 10*(2^10) chars as input seems more than enough
6117    test $ac_count -gt 10 && break
6118  done
6119  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6120esac
6121
6122      $ac_path_EGREP_found && break 3
6123    done
6124  done
6125  done
6126IFS=$as_save_IFS
6127  if test -z "$ac_cv_path_EGREP"; then
6128    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6129  fi
6130else
6131  ac_cv_path_EGREP=$EGREP
6132fi
6133
6134   fi
6135fi
6136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6137$as_echo "$ac_cv_path_EGREP" >&6; }
6138 EGREP="$ac_cv_path_EGREP"
6139
6140
6141
6142    if test "x$EGREP" = x; then
6143        if test "x" = x; then
6144          PROG_NAME=egrep
6145        else
6146          PROG_NAME=
6147        fi
6148        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6149$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6150        as_fn_error $? "Cannot continue" "$LINENO" 5
6151    fi
6152
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6154$as_echo_n "checking for fgrep... " >&6; }
6155if test "${ac_cv_path_FGREP+set}" = set; then :
6156  $as_echo_n "(cached) " >&6
6157else
6158  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6159   then ac_cv_path_FGREP="$GREP -F"
6160   else
6161     if test -z "$FGREP"; then
6162  ac_path_FGREP_found=false
6163  # Loop through the user's path and test for each of PROGNAME-LIST
6164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6165for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6166do
6167  IFS=$as_save_IFS
6168  test -z "$as_dir" && as_dir=.
6169    for ac_prog in fgrep; do
6170    for ac_exec_ext in '' $ac_executable_extensions; do
6171      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6172      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6173# Check for GNU ac_path_FGREP and select it if it is found.
6174  # Check for GNU $ac_path_FGREP
6175case `"$ac_path_FGREP" --version 2>&1` in
6176*GNU*)
6177  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6178*)
6179  ac_count=0
6180  $as_echo_n 0123456789 >"conftest.in"
6181  while :
6182  do
6183    cat "conftest.in" "conftest.in" >"conftest.tmp"
6184    mv "conftest.tmp" "conftest.in"
6185    cp "conftest.in" "conftest.nl"
6186    $as_echo 'FGREP' >> "conftest.nl"
6187    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6188    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6189    as_fn_arith $ac_count + 1 && ac_count=$as_val
6190    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6191      # Best one so far, save it but keep looking for a better one
6192      ac_cv_path_FGREP="$ac_path_FGREP"
6193      ac_path_FGREP_max=$ac_count
6194    fi
6195    # 10*(2^10) chars as input seems more than enough
6196    test $ac_count -gt 10 && break
6197  done
6198  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6199esac
6200
6201      $ac_path_FGREP_found && break 3
6202    done
6203  done
6204  done
6205IFS=$as_save_IFS
6206  if test -z "$ac_cv_path_FGREP"; then
6207    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6208  fi
6209else
6210  ac_cv_path_FGREP=$FGREP
6211fi
6212
6213   fi
6214fi
6215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6216$as_echo "$ac_cv_path_FGREP" >&6; }
6217 FGREP="$ac_cv_path_FGREP"
6218
6219
6220
6221    if test "x$FGREP" = x; then
6222        if test "x" = x; then
6223          PROG_NAME=fgrep
6224        else
6225          PROG_NAME=
6226        fi
6227        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6228$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6229        as_fn_error $? "Cannot continue" "$LINENO" 5
6230    fi
6231
6232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6233$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6234if test "${ac_cv_path_SED+set}" = set; then :
6235  $as_echo_n "(cached) " >&6
6236else
6237            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6238     for ac_i in 1 2 3 4 5 6 7; do
6239       ac_script="$ac_script$as_nl$ac_script"
6240     done
6241     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6242     { ac_script=; unset ac_script;}
6243     if test -z "$SED"; then
6244  ac_path_SED_found=false
6245  # Loop through the user's path and test for each of PROGNAME-LIST
6246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6247for as_dir in $PATH
6248do
6249  IFS=$as_save_IFS
6250  test -z "$as_dir" && as_dir=.
6251    for ac_prog in sed gsed; do
6252    for ac_exec_ext in '' $ac_executable_extensions; do
6253      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6254      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6255# Check for GNU ac_path_SED and select it if it is found.
6256  # Check for GNU $ac_path_SED
6257case `"$ac_path_SED" --version 2>&1` in
6258*GNU*)
6259  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6260*)
6261  ac_count=0
6262  $as_echo_n 0123456789 >"conftest.in"
6263  while :
6264  do
6265    cat "conftest.in" "conftest.in" >"conftest.tmp"
6266    mv "conftest.tmp" "conftest.in"
6267    cp "conftest.in" "conftest.nl"
6268    $as_echo '' >> "conftest.nl"
6269    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6270    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6271    as_fn_arith $ac_count + 1 && ac_count=$as_val
6272    if test $ac_count -gt ${ac_path_SED_max-0}; then
6273      # Best one so far, save it but keep looking for a better one
6274      ac_cv_path_SED="$ac_path_SED"
6275      ac_path_SED_max=$ac_count
6276    fi
6277    # 10*(2^10) chars as input seems more than enough
6278    test $ac_count -gt 10 && break
6279  done
6280  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6281esac
6282
6283      $ac_path_SED_found && break 3
6284    done
6285  done
6286  done
6287IFS=$as_save_IFS
6288  if test -z "$ac_cv_path_SED"; then
6289    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6290  fi
6291else
6292  ac_cv_path_SED=$SED
6293fi
6294
6295fi
6296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6297$as_echo "$ac_cv_path_SED" >&6; }
6298 SED="$ac_cv_path_SED"
6299  rm -f conftest.sed
6300
6301
6302    if test "x$SED" = x; then
6303        if test "x" = x; then
6304          PROG_NAME=sed
6305        else
6306          PROG_NAME=
6307        fi
6308        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6309$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6310        as_fn_error $? "Cannot continue" "$LINENO" 5
6311    fi
6312
6313
6314for ac_prog in nawk gawk awk
6315do
6316  # Extract the first word of "$ac_prog", so it can be a program name with args.
6317set dummy $ac_prog; ac_word=$2
6318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6319$as_echo_n "checking for $ac_word... " >&6; }
6320if test "${ac_cv_path_NAWK+set}" = set; then :
6321  $as_echo_n "(cached) " >&6
6322else
6323  case $NAWK in
6324  [\\/]* | ?:[\\/]*)
6325  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6326  ;;
6327  *)
6328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6329for as_dir in $PATH
6330do
6331  IFS=$as_save_IFS
6332  test -z "$as_dir" && as_dir=.
6333    for ac_exec_ext in '' $ac_executable_extensions; do
6334  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6335    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6337    break 2
6338  fi
6339done
6340  done
6341IFS=$as_save_IFS
6342
6343  ;;
6344esac
6345fi
6346NAWK=$ac_cv_path_NAWK
6347if test -n "$NAWK"; then
6348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6349$as_echo "$NAWK" >&6; }
6350else
6351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6352$as_echo "no" >&6; }
6353fi
6354
6355
6356  test -n "$NAWK" && break
6357done
6358
6359
6360    if test "x$NAWK" = x; then
6361        if test "x" = x; then
6362          PROG_NAME=nawk
6363        else
6364          PROG_NAME=
6365        fi
6366        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6367$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6368        as_fn_error $? "Cannot continue" "$LINENO" 5
6369    fi
6370
6371
6372# Always force rm.
6373RM="$RM -f"
6374
6375# pwd behaves differently on various platforms and some don't support the -L flag.
6376# Always use the bash builtin pwd to get uniform behavior.
6377THEPWDCMD=pwd
6378
6379# These are not required on all platforms
6380# Extract the first word of "cygpath", so it can be a program name with args.
6381set dummy cygpath; ac_word=$2
6382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6383$as_echo_n "checking for $ac_word... " >&6; }
6384if test "${ac_cv_path_CYGPATH+set}" = set; then :
6385  $as_echo_n "(cached) " >&6
6386else
6387  case $CYGPATH in
6388  [\\/]* | ?:[\\/]*)
6389  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6390  ;;
6391  *)
6392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6393for as_dir in $PATH
6394do
6395  IFS=$as_save_IFS
6396  test -z "$as_dir" && as_dir=.
6397    for ac_exec_ext in '' $ac_executable_extensions; do
6398  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6399    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6401    break 2
6402  fi
6403done
6404  done
6405IFS=$as_save_IFS
6406
6407  ;;
6408esac
6409fi
6410CYGPATH=$ac_cv_path_CYGPATH
6411if test -n "$CYGPATH"; then
6412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6413$as_echo "$CYGPATH" >&6; }
6414else
6415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6416$as_echo "no" >&6; }
6417fi
6418
6419
6420# Extract the first word of "readlink", so it can be a program name with args.
6421set dummy readlink; ac_word=$2
6422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6423$as_echo_n "checking for $ac_word... " >&6; }
6424if test "${ac_cv_path_READLINK+set}" = set; then :
6425  $as_echo_n "(cached) " >&6
6426else
6427  case $READLINK in
6428  [\\/]* | ?:[\\/]*)
6429  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6430  ;;
6431  *)
6432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6433for as_dir in $PATH
6434do
6435  IFS=$as_save_IFS
6436  test -z "$as_dir" && as_dir=.
6437    for ac_exec_ext in '' $ac_executable_extensions; do
6438  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6439    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6441    break 2
6442  fi
6443done
6444  done
6445IFS=$as_save_IFS
6446
6447  ;;
6448esac
6449fi
6450READLINK=$ac_cv_path_READLINK
6451if test -n "$READLINK"; then
6452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6453$as_echo "$READLINK" >&6; }
6454else
6455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6456$as_echo "no" >&6; }
6457fi
6458
6459
6460# Extract the first word of "df", so it can be a program name with args.
6461set dummy df; ac_word=$2
6462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6463$as_echo_n "checking for $ac_word... " >&6; }
6464if test "${ac_cv_path_DF+set}" = set; then :
6465  $as_echo_n "(cached) " >&6
6466else
6467  case $DF in
6468  [\\/]* | ?:[\\/]*)
6469  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6470  ;;
6471  *)
6472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6473for as_dir in $PATH
6474do
6475  IFS=$as_save_IFS
6476  test -z "$as_dir" && as_dir=.
6477    for ac_exec_ext in '' $ac_executable_extensions; do
6478  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6479    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6481    break 2
6482  fi
6483done
6484  done
6485IFS=$as_save_IFS
6486
6487  ;;
6488esac
6489fi
6490DF=$ac_cv_path_DF
6491if test -n "$DF"; then
6492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6493$as_echo "$DF" >&6; }
6494else
6495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6496$as_echo "no" >&6; }
6497fi
6498
6499
6500# Extract the first word of "SetFile", so it can be a program name with args.
6501set dummy SetFile; ac_word=$2
6502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6503$as_echo_n "checking for $ac_word... " >&6; }
6504if test "${ac_cv_path_SETFILE+set}" = set; then :
6505  $as_echo_n "(cached) " >&6
6506else
6507  case $SETFILE in
6508  [\\/]* | ?:[\\/]*)
6509  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6510  ;;
6511  *)
6512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6513for as_dir in $PATH
6514do
6515  IFS=$as_save_IFS
6516  test -z "$as_dir" && as_dir=.
6517    for ac_exec_ext in '' $ac_executable_extensions; do
6518  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6519    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6521    break 2
6522  fi
6523done
6524  done
6525IFS=$as_save_IFS
6526
6527  ;;
6528esac
6529fi
6530SETFILE=$ac_cv_path_SETFILE
6531if test -n "$SETFILE"; then
6532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6533$as_echo "$SETFILE" >&6; }
6534else
6535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6536$as_echo "no" >&6; }
6537fi
6538
6539
6540
6541
6542# Now we can determine OpenJDK build and target platforms. This is required to
6543# have early on.
6544# Make sure we can run config.sub.
6545$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6546  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6547
6548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6549$as_echo_n "checking build system type... " >&6; }
6550if test "${ac_cv_build+set}" = set; then :
6551  $as_echo_n "(cached) " >&6
6552else
6553  ac_build_alias=$build_alias
6554test "x$ac_build_alias" = x &&
6555  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6556test "x$ac_build_alias" = x &&
6557  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6558ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6559  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6560
6561fi
6562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6563$as_echo "$ac_cv_build" >&6; }
6564case $ac_cv_build in
6565*-*-*) ;;
6566*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6567esac
6568build=$ac_cv_build
6569ac_save_IFS=$IFS; IFS='-'
6570set x $ac_cv_build
6571shift
6572build_cpu=$1
6573build_vendor=$2
6574shift; shift
6575# Remember, the first character of IFS is used to create $*,
6576# except with old shells:
6577build_os=$*
6578IFS=$ac_save_IFS
6579case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6580
6581
6582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6583$as_echo_n "checking host system type... " >&6; }
6584if test "${ac_cv_host+set}" = set; then :
6585  $as_echo_n "(cached) " >&6
6586else
6587  if test "x$host_alias" = x; then
6588  ac_cv_host=$ac_cv_build
6589else
6590  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6591    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6592fi
6593
6594fi
6595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6596$as_echo "$ac_cv_host" >&6; }
6597case $ac_cv_host in
6598*-*-*) ;;
6599*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6600esac
6601host=$ac_cv_host
6602ac_save_IFS=$IFS; IFS='-'
6603set x $ac_cv_host
6604shift
6605host_cpu=$1
6606host_vendor=$2
6607shift; shift
6608# Remember, the first character of IFS is used to create $*,
6609# except with old shells:
6610host_os=$*
6611IFS=$ac_save_IFS
6612case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6613
6614
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6616$as_echo_n "checking target system type... " >&6; }
6617if test "${ac_cv_target+set}" = set; then :
6618  $as_echo_n "(cached) " >&6
6619else
6620  if test "x$target_alias" = x; then
6621  ac_cv_target=$ac_cv_host
6622else
6623  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6624    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6625fi
6626
6627fi
6628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6629$as_echo "$ac_cv_target" >&6; }
6630case $ac_cv_target in
6631*-*-*) ;;
6632*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6633esac
6634target=$ac_cv_target
6635ac_save_IFS=$IFS; IFS='-'
6636set x $ac_cv_target
6637shift
6638target_cpu=$1
6639target_vendor=$2
6640shift; shift
6641# Remember, the first character of IFS is used to create $*,
6642# except with old shells:
6643target_os=$*
6644IFS=$ac_save_IFS
6645case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6646
6647
6648# The aliases save the names the user supplied, while $host etc.
6649# will get canonicalized.
6650test -n "$target_alias" &&
6651  test "$program_prefix$program_suffix$program_transform_name" = \
6652    NONENONEs,x,x, &&
6653  program_prefix=${target_alias}-
6654
6655# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6656# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6657# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6658# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6659# to use the configure naming style.
6660
6661
6662
6663
6664
6665    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6666    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6667    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6668    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6669    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6670    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6671
6672
6673
6674    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6675
6676  case "$build_os" in
6677    *linux*)
6678      VAR_OS=linux
6679      VAR_OS_API=posix
6680      VAR_OS_ENV=linux
6681      ;;
6682    *solaris*)
6683      VAR_OS=solaris
6684      VAR_OS_API=posix
6685      VAR_OS_ENV=solaris
6686      ;;
6687    *darwin*)
6688      VAR_OS=macosx
6689      VAR_OS_API=posix
6690      VAR_OS_ENV=macosx
6691      ;;
6692    *bsd*)
6693      VAR_OS=bsd
6694      VAR_OS_API=posix
6695      VAR_OS_ENV=bsd
6696      ;;
6697    *cygwin*)
6698      VAR_OS=windows
6699      VAR_OS_API=winapi
6700      VAR_OS_ENV=windows.cygwin
6701      ;;
6702    *mingw*)
6703      VAR_OS=windows
6704      VAR_OS_API=winapi
6705      VAR_OS_ENV=windows.msys
6706      ;;
6707    *)
6708      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6709      ;;
6710  esac
6711
6712
6713  # First argument is the cpu name from the trip/quad
6714  case "$build_cpu" in
6715    x86_64)
6716      VAR_CPU=x86_64
6717      VAR_CPU_ARCH=x86
6718      VAR_CPU_BITS=64
6719      VAR_CPU_ENDIAN=little
6720      ;;
6721    i?86)
6722      VAR_CPU=x86
6723      VAR_CPU_ARCH=x86
6724      VAR_CPU_BITS=32
6725      VAR_CPU_ENDIAN=little
6726      ;;
6727    arm*)
6728      VAR_CPU=arm
6729      VAR_CPU_ARCH=arm
6730      VAR_CPU_BITS=32
6731      VAR_CPU_ENDIAN=little
6732      ;;
6733    powerpc)
6734      VAR_CPU=ppc
6735      VAR_CPU_ARCH=ppc
6736      VAR_CPU_BITS=32
6737      VAR_CPU_ENDIAN=big
6738       ;;
6739    powerpc64)
6740      VAR_CPU=ppc64
6741      VAR_CPU_ARCH=ppc
6742      VAR_CPU_BITS=64
6743      VAR_CPU_ENDIAN=big
6744       ;;
6745    sparc)
6746      VAR_CPU=sparc
6747      VAR_CPU_ARCH=sparc
6748      VAR_CPU_BITS=32
6749      VAR_CPU_ENDIAN=big
6750       ;;
6751    sparcv9)
6752      VAR_CPU=sparcv9
6753      VAR_CPU_ARCH=sparc
6754      VAR_CPU_BITS=64
6755      VAR_CPU_ENDIAN=big
6756       ;;
6757    *)
6758      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6759      ;;
6760  esac
6761
6762    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6763    OPENJDK_BUILD_OS="$VAR_OS"
6764    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6765    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6766    OPENJDK_BUILD_CPU="$VAR_CPU"
6767    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6768    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6769    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6770
6771
6772
6773
6774
6775
6776
6777    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6778$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6780$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6781
6782    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6783
6784  case "$host_os" in
6785    *linux*)
6786      VAR_OS=linux
6787      VAR_OS_API=posix
6788      VAR_OS_ENV=linux
6789      ;;
6790    *solaris*)
6791      VAR_OS=solaris
6792      VAR_OS_API=posix
6793      VAR_OS_ENV=solaris
6794      ;;
6795    *darwin*)
6796      VAR_OS=macosx
6797      VAR_OS_API=posix
6798      VAR_OS_ENV=macosx
6799      ;;
6800    *bsd*)
6801      VAR_OS=bsd
6802      VAR_OS_API=posix
6803      VAR_OS_ENV=bsd
6804      ;;
6805    *cygwin*)
6806      VAR_OS=windows
6807      VAR_OS_API=winapi
6808      VAR_OS_ENV=windows.cygwin
6809      ;;
6810    *mingw*)
6811      VAR_OS=windows
6812      VAR_OS_API=winapi
6813      VAR_OS_ENV=windows.msys
6814      ;;
6815    *)
6816      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6817      ;;
6818  esac
6819
6820
6821  # First argument is the cpu name from the trip/quad
6822  case "$host_cpu" in
6823    x86_64)
6824      VAR_CPU=x86_64
6825      VAR_CPU_ARCH=x86
6826      VAR_CPU_BITS=64
6827      VAR_CPU_ENDIAN=little
6828      ;;
6829    i?86)
6830      VAR_CPU=x86
6831      VAR_CPU_ARCH=x86
6832      VAR_CPU_BITS=32
6833      VAR_CPU_ENDIAN=little
6834      ;;
6835    arm*)
6836      VAR_CPU=arm
6837      VAR_CPU_ARCH=arm
6838      VAR_CPU_BITS=32
6839      VAR_CPU_ENDIAN=little
6840      ;;
6841    powerpc)
6842      VAR_CPU=ppc
6843      VAR_CPU_ARCH=ppc
6844      VAR_CPU_BITS=32
6845      VAR_CPU_ENDIAN=big
6846       ;;
6847    powerpc64)
6848      VAR_CPU=ppc64
6849      VAR_CPU_ARCH=ppc
6850      VAR_CPU_BITS=64
6851      VAR_CPU_ENDIAN=big
6852       ;;
6853    sparc)
6854      VAR_CPU=sparc
6855      VAR_CPU_ARCH=sparc
6856      VAR_CPU_BITS=32
6857      VAR_CPU_ENDIAN=big
6858       ;;
6859    sparcv9)
6860      VAR_CPU=sparcv9
6861      VAR_CPU_ARCH=sparc
6862      VAR_CPU_BITS=64
6863      VAR_CPU_ENDIAN=big
6864       ;;
6865    *)
6866      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6867      ;;
6868  esac
6869
6870    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6871    OPENJDK_TARGET_OS="$VAR_OS"
6872    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6873    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6874    OPENJDK_TARGET_CPU="$VAR_CPU"
6875    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6876    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6877    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6878
6879
6880
6881
6882
6883
6884
6885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6886$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6888$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6889
6890
6891
6892# Check whether --with-target-bits was given.
6893if test "${with_target_bits+set}" = set; then :
6894  withval=$with_target_bits;
6895fi
6896
6897
6898  # We have three types of compiles:
6899  # native  == normal compilation, target system == build system
6900  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6901  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6902  #
6903  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6904    # We're doing a proper cross-compilation
6905    COMPILE_TYPE="cross"
6906  else
6907    COMPILE_TYPE="native"
6908  fi
6909
6910  if test "x$with_target_bits" != x; then
6911    if test "x$COMPILE_TYPE" = "xcross"; then
6912      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6913    fi
6914
6915    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6916      # A reduced build is requested
6917      COMPILE_TYPE="reduced"
6918      OPENJDK_TARGET_CPU_BITS=32
6919      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6920        OPENJDK_TARGET_CPU=x86
6921      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6922        OPENJDK_TARGET_CPU=sparc
6923      else
6924        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6925      fi
6926    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6927      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
6928    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6929      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6930$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6931    else
6932      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6933    fi
6934  fi
6935
6936
6937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6938$as_echo_n "checking compilation type... " >&6; }
6939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6940$as_echo "$COMPILE_TYPE" >&6; }
6941
6942
6943    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6944       REQUIRED_OS_NAME=SunOS
6945       REQUIRED_OS_VERSION=5.10
6946    fi
6947    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6948       REQUIRED_OS_NAME=Linux
6949       REQUIRED_OS_VERSION=2.6
6950    fi
6951    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6952        REQUIRED_OS_NAME=Windows
6953        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6954            REQUIRED_OS_VERSION=5.2
6955        else
6956            REQUIRED_OS_VERSION=5.1
6957        fi
6958    fi
6959    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6960        REQUIRED_OS_NAME=Darwin
6961        REQUIRED_OS_VERSION=11.2
6962    fi
6963
6964
6965
6966
6967
6968    # Also store the legacy naming of the cpu.
6969    # Ie i586 and amd64 instead of x86 and x86_64
6970    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6971    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6972      OPENJDK_TARGET_CPU_LEGACY="i586"
6973    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6974      # On all platforms except MacOSX replace x86_64 with amd64.
6975      OPENJDK_TARGET_CPU_LEGACY="amd64"
6976    fi
6977
6978
6979    # And the second legacy naming of the cpu.
6980    # Ie i386 and amd64 instead of x86 and x86_64.
6981    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6982    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6983      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6984    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6985      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6986    fi
6987
6988
6989    # This is the name of the cpu (but using i386 and amd64 instead of
6990    # x86 and x86_64, respectively), preceeded by a /, to be used when
6991    # locating libraries. On macosx, it's empty, though.
6992    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6993    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6994        OPENJDK_TARGET_CPU_LIBDIR=""
6995    fi
6996
6997
6998    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6999    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7000    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7001    OPENJDK_TARGET_CPU_ISADIR=""
7002    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7003      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7004          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7005      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7006          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7007      fi
7008    fi
7009
7010
7011    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7012    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7013    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7014      # On linux only, we replace x86 with i386.
7015      OPENJDK_TARGET_CPU_OSARCH="i386"
7016    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7017      # On all platforms except macosx, we replace x86_64 with amd64.
7018      OPENJDK_TARGET_CPU_OSARCH="amd64"
7019    fi
7020
7021
7022    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7023    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7024      OPENJDK_TARGET_CPU_JLI="i386"
7025    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7026      # On all platforms except macosx, we replace x86_64 with amd64.
7027      OPENJDK_TARGET_CPU_JLI="amd64"
7028    fi
7029    # Now setup the -D flags for building libjli.
7030    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7031    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7032      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7033        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7034      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7035        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7036      fi
7037    fi
7038
7039
7040    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7041    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7042        OPENJDK_TARGET_OS_API_DIR="solaris"
7043    fi
7044    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7045        OPENJDK_TARGET_OS_API_DIR="windows"
7046    fi
7047
7048
7049    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7050        A_LP64="LP64:="
7051        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7052        # unpack200.exe
7053        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7054            ADD_LP64="-D_LP64=1"
7055        fi
7056    fi
7057    LP64=$A_LP64
7058
7059
7060    if test "x$COMPILE_TYPE" = "xcross"; then
7061      # FIXME: ... or should this include reduced builds..?
7062      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7063    else
7064      DEFINE_CROSS_COMPILE_ARCH=""
7065    fi
7066
7067
7068    # ZERO_ARCHDEF is used to enable architecture-specific code
7069    case "${OPENJDK_TARGET_CPU}" in
7070      ppc*)    ZERO_ARCHDEF=PPC   ;;
7071      s390*)   ZERO_ARCHDEF=S390  ;;
7072      sparc*)  ZERO_ARCHDEF=SPARC ;;
7073      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7074      x86)     ZERO_ARCHDEF=IA32  ;;
7075      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7076    esac
7077
7078
7079
7080
7081
7082# Continue setting up basic stuff. Most remaining code require fundamental tools.
7083
7084# Locate the directory of this script.
7085SCRIPT="$0"
7086AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7087
7088# Where is the source? It is located two levels above the configure script.
7089CURDIR="$PWD"
7090cd "$AUTOCONF_DIR/../.."
7091SRC_ROOT="`$THEPWDCMD -L`"
7092
7093if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7094  PATH_SEP=";"
7095
7096  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7097  if test $SRC_ROOT_LENGTH -gt 100; then
7098      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7099  fi
7100
7101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7103$as_echo_n "checking cygwin release... " >&6; }
7104    CYGWIN_VERSION=`$UNAME -r`
7105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7106$as_echo "$CYGWIN_VERSION" >&6; }
7107    WINDOWS_ENV_VENDOR='cygwin'
7108    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7109
7110    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7111    if test "x$CYGWIN_VERSION_OK" = x; then
7112      { $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
7113$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;}
7114      as_fn_error $? "Cannot continue" "$LINENO" 5
7115    fi
7116    if test "x$CYGPATH" = x; then
7117        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7118    fi
7119    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7120$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7121    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7122    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7123    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7124    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7126$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7127    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7128    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7129    if test "x$test_cygdrive_prefix" = x; then
7130        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7131    fi
7132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7134$as_echo_n "checking msys release... " >&6; }
7135    MSYS_VERSION=`$UNAME -r`
7136    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7137$as_echo "$MSYS_VERSION" >&6; }
7138
7139    WINDOWS_ENV_VENDOR='msys'
7140    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7141
7142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7143$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7144    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7145    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7146
7147  windows_path="$MSYS_ROOT_PATH"
7148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7149    unix_path=`$CYGPATH -u "$windows_path"`
7150    MSYS_ROOT_PATH="$unix_path"
7151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7153    MSYS_ROOT_PATH="$unix_path"
7154  fi
7155
7156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7157$as_echo "$MSYS_ROOT_PATH" >&6; }
7158    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7159  else
7160    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7161  fi
7162
7163  # Test if windows or unix (cygwin/msys) find is first in path.
7164  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7165$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7166  FIND_BINARY_OUTPUT=`find --version 2>&1`
7167  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7169$as_echo "unix style" >&6; }
7170  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7172$as_echo "Windows" >&6; }
7173    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7174$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7175    { $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
7176$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7177    as_fn_error $? "Cannot continue" "$LINENO" 5
7178  else
7179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7180$as_echo "unknown" >&6; }
7181    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7182$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7183  fi
7184
7185else
7186  PATH_SEP=":"
7187fi
7188
7189
7190
7191cd "$CURDIR"
7192
7193
7194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7195
7196  # Input might be given as Windows format, start by converting to
7197  # unix format.
7198  path="$SRC_ROOT"
7199  new_path=`$CYGPATH -u "$path"`
7200
7201  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7202  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7203  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7204  # "foo.exe" is OK but "foo" is an error.
7205  #
7206  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7207  # It is also a way to make sure we got the proper file name for the real test later on.
7208  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7209  if test "x$test_shortpath" = x; then
7210    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7211$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7212    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7213  fi
7214
7215  # Call helper function which possibly converts this using DOS-style short mode.
7216  # If so, the updated path is stored in $new_path.
7217
7218  input_path="$new_path"
7219  # Check if we need to convert this using DOS-style short mode. If the path
7220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7221  # take no chances and rewrite it.
7222  # Note: m4 eats our [], so we need to use [ and ] instead.
7223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7224  if test "x$has_forbidden_chars" != x; then
7225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7229      # Going to short mode and back again did indeed matter. Since short mode is
7230      # case insensitive, let's make it lowercase to improve readability.
7231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7232      # Now convert it back to Unix-stile (cygpath)
7233      input_path=`$CYGPATH -u "$shortmode_path"`
7234      new_path="$input_path"
7235    fi
7236  fi
7237
7238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7239  if test "x$test_cygdrive_prefix" = x; then
7240    # As a simple fix, exclude /usr/bin since it's not a real path.
7241    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7243      # a path prefixed by /cygdrive for fixpath to work.
7244      new_path="$CYGWIN_ROOT_PATH$input_path"
7245    fi
7246  fi
7247
7248
7249  if test "x$path" != "x$new_path"; then
7250    SRC_ROOT="$new_path"
7251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7252$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7253  fi
7254
7255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7256
7257  path="$SRC_ROOT"
7258  has_colon=`$ECHO $path | $GREP ^.:`
7259  new_path="$path"
7260  if test "x$has_colon" = x; then
7261    # Not in mixed or Windows style, start by that.
7262    new_path=`cmd //c echo $path`
7263  fi
7264
7265
7266  input_path="$new_path"
7267  # Check if we need to convert this using DOS-style short mode. If the path
7268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7269  # take no chances and rewrite it.
7270  # Note: m4 eats our [], so we need to use [ and ] instead.
7271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7272  if test "x$has_forbidden_chars" != x; then
7273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7274    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7275  fi
7276
7277
7278  windows_path="$new_path"
7279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7280    unix_path=`$CYGPATH -u "$windows_path"`
7281    new_path="$unix_path"
7282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7284    new_path="$unix_path"
7285  fi
7286
7287  if test "x$path" != "x$new_path"; then
7288    SRC_ROOT="$new_path"
7289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7290$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7291  fi
7292
7293  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7294  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7295
7296  else
7297    # We're on a posix platform. Hooray! :)
7298    path="$SRC_ROOT"
7299    has_space=`$ECHO "$path" | $GREP " "`
7300    if test "x$has_space" != x; then
7301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7302$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7303      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7304    fi
7305
7306    # Use eval to expand a potential ~
7307    eval path="$path"
7308    if test ! -f "$path" && test ! -d "$path"; then
7309      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7310    fi
7311
7312    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7313  fi
7314
7315
7316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7317
7318  # Input might be given as Windows format, start by converting to
7319  # unix format.
7320  path="$CURDIR"
7321  new_path=`$CYGPATH -u "$path"`
7322
7323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7326  # "foo.exe" is OK but "foo" is an error.
7327  #
7328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7329  # It is also a way to make sure we got the proper file name for the real test later on.
7330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7331  if test "x$test_shortpath" = x; then
7332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7333$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7334    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7335  fi
7336
7337  # Call helper function which possibly converts this using DOS-style short mode.
7338  # If so, the updated path is stored in $new_path.
7339
7340  input_path="$new_path"
7341  # Check if we need to convert this using DOS-style short mode. If the path
7342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7343  # take no chances and rewrite it.
7344  # Note: m4 eats our [], so we need to use [ and ] instead.
7345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7346  if test "x$has_forbidden_chars" != x; then
7347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7351      # Going to short mode and back again did indeed matter. Since short mode is
7352      # case insensitive, let's make it lowercase to improve readability.
7353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7354      # Now convert it back to Unix-stile (cygpath)
7355      input_path=`$CYGPATH -u "$shortmode_path"`
7356      new_path="$input_path"
7357    fi
7358  fi
7359
7360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7361  if test "x$test_cygdrive_prefix" = x; then
7362    # As a simple fix, exclude /usr/bin since it's not a real path.
7363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7365      # a path prefixed by /cygdrive for fixpath to work.
7366      new_path="$CYGWIN_ROOT_PATH$input_path"
7367    fi
7368  fi
7369
7370
7371  if test "x$path" != "x$new_path"; then
7372    CURDIR="$new_path"
7373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7374$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7375  fi
7376
7377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7378
7379  path="$CURDIR"
7380  has_colon=`$ECHO $path | $GREP ^.:`
7381  new_path="$path"
7382  if test "x$has_colon" = x; then
7383    # Not in mixed or Windows style, start by that.
7384    new_path=`cmd //c echo $path`
7385  fi
7386
7387
7388  input_path="$new_path"
7389  # Check if we need to convert this using DOS-style short mode. If the path
7390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7391  # take no chances and rewrite it.
7392  # Note: m4 eats our [], so we need to use [ and ] instead.
7393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7394  if test "x$has_forbidden_chars" != x; then
7395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7397  fi
7398
7399
7400  windows_path="$new_path"
7401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7402    unix_path=`$CYGPATH -u "$windows_path"`
7403    new_path="$unix_path"
7404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7406    new_path="$unix_path"
7407  fi
7408
7409  if test "x$path" != "x$new_path"; then
7410    CURDIR="$new_path"
7411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7412$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7413  fi
7414
7415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7417
7418  else
7419    # We're on a posix platform. Hooray! :)
7420    path="$CURDIR"
7421    has_space=`$ECHO "$path" | $GREP " "`
7422    if test "x$has_space" != x; then
7423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7424$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7425      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7426    fi
7427
7428    # Use eval to expand a potential ~
7429    eval path="$path"
7430    if test ! -f "$path" && test ! -d "$path"; then
7431      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7432    fi
7433
7434    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7435  fi
7436
7437
7438if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7439    # Add extra search paths on solaris for utilities like ar and as etc...
7440    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7441fi
7442
7443# You can force the sys-root if the sys-root encoded into the cross compiler tools
7444# is not correct.
7445
7446# Check whether --with-sys-root was given.
7447if test "${with_sys_root+set}" = set; then :
7448  withval=$with_sys_root;
7449fi
7450
7451
7452if test "x$with_sys_root" != x; then
7453  SYS_ROOT=$with_sys_root
7454else
7455  SYS_ROOT=/
7456fi
7457
7458
7459
7460# Check whether --with-tools-dir was given.
7461if test "${with_tools_dir+set}" = set; then :
7462  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7463
7464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7465
7466  # Input might be given as Windows format, start by converting to
7467  # unix format.
7468  path="$TOOLS_DIR"
7469  new_path=`$CYGPATH -u "$path"`
7470
7471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7474  # "foo.exe" is OK but "foo" is an error.
7475  #
7476  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7477  # It is also a way to make sure we got the proper file name for the real test later on.
7478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7479  if test "x$test_shortpath" = x; then
7480    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOOLS_DIR, which resolves as \"$path\", is invalid." >&5
7481$as_echo "$as_me: The path of TOOLS_DIR, which resolves as \"$path\", is invalid." >&6;}
7482    as_fn_error $? "Cannot locate the the path of TOOLS_DIR" "$LINENO" 5
7483  fi
7484
7485  # Call helper function which possibly converts this using DOS-style short mode.
7486  # If so, the updated path is stored in $new_path.
7487
7488  input_path="$new_path"
7489  # Check if we need to convert this using DOS-style short mode. If the path
7490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7491  # take no chances and rewrite it.
7492  # Note: m4 eats our [], so we need to use [ and ] instead.
7493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7494  if test "x$has_forbidden_chars" != x; then
7495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7499      # Going to short mode and back again did indeed matter. Since short mode is
7500      # case insensitive, let's make it lowercase to improve readability.
7501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7502      # Now convert it back to Unix-stile (cygpath)
7503      input_path=`$CYGPATH -u "$shortmode_path"`
7504      new_path="$input_path"
7505    fi
7506  fi
7507
7508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7509  if test "x$test_cygdrive_prefix" = x; then
7510    # As a simple fix, exclude /usr/bin since it's not a real path.
7511    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7513      # a path prefixed by /cygdrive for fixpath to work.
7514      new_path="$CYGWIN_ROOT_PATH$input_path"
7515    fi
7516  fi
7517
7518
7519  if test "x$path" != "x$new_path"; then
7520    TOOLS_DIR="$new_path"
7521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOOLS_DIR to \"$new_path\"" >&5
7522$as_echo "$as_me: Rewriting TOOLS_DIR to \"$new_path\"" >&6;}
7523  fi
7524
7525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7526
7527  path="$TOOLS_DIR"
7528  has_colon=`$ECHO $path | $GREP ^.:`
7529  new_path="$path"
7530  if test "x$has_colon" = x; then
7531    # Not in mixed or Windows style, start by that.
7532    new_path=`cmd //c echo $path`
7533  fi
7534
7535
7536  input_path="$new_path"
7537  # Check if we need to convert this using DOS-style short mode. If the path
7538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7539  # take no chances and rewrite it.
7540  # Note: m4 eats our [], so we need to use [ and ] instead.
7541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7542  if test "x$has_forbidden_chars" != x; then
7543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7545  fi
7546
7547
7548  windows_path="$new_path"
7549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7550    unix_path=`$CYGPATH -u "$windows_path"`
7551    new_path="$unix_path"
7552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7554    new_path="$unix_path"
7555  fi
7556
7557  if test "x$path" != "x$new_path"; then
7558    TOOLS_DIR="$new_path"
7559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOOLS_DIR to \"$new_path\"" >&5
7560$as_echo "$as_me: Rewriting TOOLS_DIR to \"$new_path\"" >&6;}
7561  fi
7562
7563  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7564  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7565
7566  else
7567    # We're on a posix platform. Hooray! :)
7568    path="$TOOLS_DIR"
7569    has_space=`$ECHO "$path" | $GREP " "`
7570    if test "x$has_space" != x; then
7571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOOLS_DIR, which resolves as \"$path\", is invalid." >&5
7572$as_echo "$as_me: The path of TOOLS_DIR, which resolves as \"$path\", is invalid." >&6;}
7573      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7574    fi
7575
7576    # Use eval to expand a potential ~
7577    eval path="$path"
7578    if test ! -f "$path" && test ! -d "$path"; then
7579      as_fn_error $? "The path of TOOLS_DIR, which resolves as \"$path\", is not found." "$LINENO" 5
7580    fi
7581
7582    TOOLS_DIR="`cd "$path"; $THEPWDCMD -L`"
7583  fi
7584
7585
7586fi
7587
7588
7589
7590# Check whether --with-devkit was given.
7591if test "${with_devkit+set}" = set; then :
7592  withval=$with_devkit;
7593    if test "x$with_sys_root" != x; then
7594      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7595    fi
7596
7597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7598
7599  # Input might be given as Windows format, start by converting to
7600  # unix format.
7601  path="$with_devkit"
7602  new_path=`$CYGPATH -u "$path"`
7603
7604  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7605  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7606  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7607  # "foo.exe" is OK but "foo" is an error.
7608  #
7609  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7610  # It is also a way to make sure we got the proper file name for the real test later on.
7611  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7612  if test "x$test_shortpath" = x; then
7613    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7614$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7615    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7616  fi
7617
7618  # Call helper function which possibly converts this using DOS-style short mode.
7619  # If so, the updated path is stored in $new_path.
7620
7621  input_path="$new_path"
7622  # Check if we need to convert this using DOS-style short mode. If the path
7623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7624  # take no chances and rewrite it.
7625  # Note: m4 eats our [], so we need to use [ and ] instead.
7626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7627  if test "x$has_forbidden_chars" != x; then
7628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7629    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7630    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7631    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7632      # Going to short mode and back again did indeed matter. Since short mode is
7633      # case insensitive, let's make it lowercase to improve readability.
7634      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7635      # Now convert it back to Unix-stile (cygpath)
7636      input_path=`$CYGPATH -u "$shortmode_path"`
7637      new_path="$input_path"
7638    fi
7639  fi
7640
7641  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7642  if test "x$test_cygdrive_prefix" = x; then
7643    # As a simple fix, exclude /usr/bin since it's not a real path.
7644    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7645      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7646      # a path prefixed by /cygdrive for fixpath to work.
7647      new_path="$CYGWIN_ROOT_PATH$input_path"
7648    fi
7649  fi
7650
7651
7652  if test "x$path" != "x$new_path"; then
7653    with_devkit="$new_path"
7654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7655$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7656  fi
7657
7658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7659
7660  path="$with_devkit"
7661  has_colon=`$ECHO $path | $GREP ^.:`
7662  new_path="$path"
7663  if test "x$has_colon" = x; then
7664    # Not in mixed or Windows style, start by that.
7665    new_path=`cmd //c echo $path`
7666  fi
7667
7668
7669  input_path="$new_path"
7670  # Check if we need to convert this using DOS-style short mode. If the path
7671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7672  # take no chances and rewrite it.
7673  # Note: m4 eats our [], so we need to use [ and ] instead.
7674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7675  if test "x$has_forbidden_chars" != x; then
7676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7677    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7678  fi
7679
7680
7681  windows_path="$new_path"
7682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7683    unix_path=`$CYGPATH -u "$windows_path"`
7684    new_path="$unix_path"
7685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7687    new_path="$unix_path"
7688  fi
7689
7690  if test "x$path" != "x$new_path"; then
7691    with_devkit="$new_path"
7692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7693$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7694  fi
7695
7696  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7697  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7698
7699  else
7700    # We're on a posix platform. Hooray! :)
7701    path="$with_devkit"
7702    has_space=`$ECHO "$path" | $GREP " "`
7703    if test "x$has_space" != x; then
7704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7705$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7706      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7707    fi
7708
7709    # Use eval to expand a potential ~
7710    eval path="$path"
7711    if test ! -f "$path" && test ! -d "$path"; then
7712      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7713    fi
7714
7715    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7716  fi
7717
7718
7719  if test "x$TOOLS_DIR" = x; then
7720    TOOLS_DIR="$with_devkit/bin"
7721  else
7722    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7723  fi
7724
7725    if test -d "$with_devkit/$host_alias/libc"; then
7726      SYS_ROOT=$with_devkit/$host_alias/libc
7727    elif test -d "$with_devkit/$host/sys-root"; then
7728      SYS_ROOT=$with_devkit/$host/sys-root
7729    fi
7730
7731fi
7732
7733
7734
7735# Setup default logging of stdout and stderr to build.log in the output root.
7736BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7737BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7738BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7739
7740
7741
7742
7743
7744# Check if it's a pure open build or if custom sources are to be used.
7745
7746  # Check whether --enable-openjdk-only was given.
7747if test "${enable_openjdk_only+set}" = set; then :
7748  enableval=$enable_openjdk_only;
7749else
7750  enable_openjdk_only="no"
7751fi
7752
7753
7754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7755$as_echo_n "checking for presence of closed sources... " >&6; }
7756  if test -d "$SRC_ROOT/jdk/src/closed"; then
7757    CLOSED_SOURCE_PRESENT=yes
7758  else
7759    CLOSED_SOURCE_PRESENT=no
7760  fi
7761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7762$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7763
7764  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7765$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7766  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7768$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7769
7770  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7771    OPENJDK=true
7772    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7773      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7774$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7775    fi
7776  else
7777    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7778      OPENJDK=true
7779    else
7780      OPENJDK=false
7781    fi
7782  fi
7783
7784  if test "x$OPENJDK" = "xtrue"; then
7785    SET_OPENJDK="OPENJDK=true"
7786  fi
7787
7788
7789
7790
7791# These are needed to be able to create a configuration name (and thus the output directory)
7792
7793###############################################################################
7794#
7795# Check which variant of the JDK that we want to build.
7796# Currently we have:
7797#    normal:   standard edition
7798# but the custom make system may add other variants
7799#
7800# Effectively the JDK variant gives a name to a specific set of
7801# modules to compile into the JDK. In the future, these modules
7802# might even be Jigsaw modules.
7803#
7804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7805$as_echo_n "checking which variant of the JDK to build... " >&6; }
7806
7807# Check whether --with-jdk-variant was given.
7808if test "${with_jdk_variant+set}" = set; then :
7809  withval=$with_jdk_variant;
7810fi
7811
7812
7813if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7814    JDK_VARIANT="normal"
7815else
7816    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7817fi
7818
7819
7820
7821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7822$as_echo "$JDK_VARIANT" >&6; }
7823
7824
7825
7826###############################################################################
7827#
7828# Check which variants of the JVM that we want to build.
7829# Currently we have:
7830#    server: normal interpreter and a tiered C1/C2 compiler
7831#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7832#    minimal1: reduced form of client with optional VM services and features stripped out
7833#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7834#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7835#    zero: no machine code interpreter, no compiler
7836#    zeroshark: zero interpreter and shark/llvm compiler backend
7837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7838$as_echo_n "checking which variants of the JVM to build... " >&6; }
7839
7840# Check whether --with-jvm-variants was given.
7841if test "${with_jvm_variants+set}" = set; then :
7842  withval=$with_jvm_variants;
7843fi
7844
7845
7846if test "x$with_jvm_variants" = x; then
7847     with_jvm_variants="server"
7848fi
7849
7850JVM_VARIANTS=",$with_jvm_variants,"
7851TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7852
7853if test "x$TEST_VARIANTS" != "x,"; then
7854   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7855fi
7856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7857$as_echo "$with_jvm_variants" >&6; }
7858
7859JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7860JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7861JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7862JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7863JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7864JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7865
7866if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7867    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7868        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7869    fi
7870fi
7871if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7872    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7873        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7874    fi
7875fi
7876if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7877    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7878        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7879    fi
7880fi
7881
7882# Replace the commas with AND for use in the build directory name.
7883ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7884COUNT_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/'`
7885if test "x$COUNT_VARIANTS" != "x,1"; then
7886    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7887else
7888    BUILDING_MULTIPLE_JVM_VARIANTS=no
7889fi
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899INCLUDE_SA=true
7900if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7901    INCLUDE_SA=false
7902fi
7903if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7904    INCLUDE_SA=false
7905fi
7906
7907
7908if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7909   MACOSX_UNIVERSAL="true"
7910fi
7911
7912
7913
7914
7915
7916###############################################################################
7917#
7918# Set the debug level
7919#    release: no debug information, all optimizations, no asserts.
7920#    fastdebug: debug information (-g), all optimizations, all asserts
7921#    slowdebug: debug information (-g), no optimizations, all asserts
7922#
7923DEBUG_LEVEL="release"
7924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7925$as_echo_n "checking which debug level to use... " >&6; }
7926# Check whether --enable-debug was given.
7927if test "${enable_debug+set}" = set; then :
7928  enableval=$enable_debug;
7929        ENABLE_DEBUG="${enableval}"
7930        DEBUG_LEVEL="fastdebug"
7931
7932else
7933  ENABLE_DEBUG="no"
7934fi
7935
7936
7937
7938# Check whether --with-debug-level was given.
7939if test "${with_debug_level+set}" = set; then :
7940  withval=$with_debug_level;
7941        DEBUG_LEVEL="${withval}"
7942        if test "x$ENABLE_DEBUG" = xyes; then
7943			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7944        fi
7945
7946fi
7947
7948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7949$as_echo "$DEBUG_LEVEL" >&6; }
7950
7951if test "x$DEBUG_LEVEL" != xrelease && \
7952   test "x$DEBUG_LEVEL" != xfastdebug && \
7953   test "x$DEBUG_LEVEL" != xslowdebug; then
7954   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7955fi
7956
7957
7958###############################################################################
7959#
7960# Setup legacy vars/targets and new vars to deal with different debug levels.
7961#
7962
7963case $DEBUG_LEVEL in
7964      release )
7965          VARIANT="OPT"
7966          FASTDEBUG="false"
7967          DEBUG_CLASSFILES="false"
7968          BUILD_VARIANT_RELEASE=""
7969          HOTSPOT_DEBUG_LEVEL="product"
7970          HOTSPOT_EXPORT="product"
7971           ;;
7972      fastdebug )
7973          VARIANT="DBG"
7974          FASTDEBUG="true"
7975          DEBUG_CLASSFILES="true"
7976          BUILD_VARIANT_RELEASE="-fastdebug"
7977          HOTSPOT_DEBUG_LEVEL="fastdebug"
7978          HOTSPOT_EXPORT="fastdebug"
7979           ;;
7980      slowdebug )
7981          VARIANT="DBG"
7982          FASTDEBUG="false"
7983          DEBUG_CLASSFILES="true"
7984          BUILD_VARIANT_RELEASE="-debug"
7985          HOTSPOT_DEBUG_LEVEL="jvmg"
7986          HOTSPOT_EXPORT="debug"
7987           ;;
7988esac
7989
7990#####
7991# Generate the legacy makefile targets for hotspot.
7992# The hotspot api for selecting the build artifacts, really, needs to be improved.
7993# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7994# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7995# But until then ...
7996HOTSPOT_TARGET=""
7997
7998if test "x$JVM_VARIANT_SERVER" = xtrue; then
7999    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
8000fi
8001
8002if test "x$JVM_VARIANT_CLIENT" = xtrue; then
8003    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
8004fi
8005
8006if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
8007    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
8008fi
8009
8010if test "x$JVM_VARIANT_KERNEL" = xtrue; then
8011    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
8012fi
8013
8014if test "x$JVM_VARIANT_ZERO" = xtrue; then
8015    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
8016fi
8017
8018if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8019    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
8020fi
8021
8022HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8023
8024# On Macosx universal binaries are produced, but they only contain
8025# 64 bit intel. This invalidates control of which jvms are built
8026# from configure, but only server is valid anyway. Fix this
8027# when hotspot makefiles are rewritten.
8028if test "x$MACOSX_UNIVERSAL" = xtrue; then
8029    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
8030fi
8031
8032#####
8033
8034
8035
8036
8037
8038
8039
8040
8041# With basic setup done, call the custom early hook.
8042
8043
8044# To properly create a configuration name, we need to have the OpenJDK target
8045# and options (variants and debug level) parsed.
8046
8047
8048
8049# Check whether --with-conf-name was given.
8050if test "${with_conf_name+set}" = set; then :
8051  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8052fi
8053
8054
8055# Test from where we are running configure, in or outside of src root.
8056if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8057        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8058        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
8059    # We are running configure from the src root.
8060    # Create a default ./build/target-variant-debuglevel output root.
8061    if test "x${CONF_NAME}" = x; then
8062        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8063    fi
8064    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8065    $MKDIR -p "$OUTPUT_ROOT"
8066    if test ! -d "$OUTPUT_ROOT"; then
8067        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8068    fi
8069else
8070    # We are running configure from outside of the src dir.
8071    # Then use the current directory as output dir!
8072    # If configuration is situated in normal build directory, just use the build
8073    # directory name as configuration name, otherwise use the complete path.
8074    if test "x${CONF_NAME}" = x; then
8075        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8076    fi
8077    OUTPUT_ROOT="$CURDIR"
8078
8079    # WARNING: This might be a bad thing to do. You need to be sure you want to
8080    # have a configuration in this directory. Do some sanity checks!
8081
8082    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8083      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8084      # other files
8085      files_present=`$LS $OUTPUT_ROOT`
8086      # Configure has already touched config.log and confdefs.h in the current dir when this check
8087      # is performed.
8088      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8089                                             | $TR -d '\n'`
8090      if test "x$filtered_files" != x; then
8091        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8092$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8093        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8094$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8095        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8096$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8097        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8098$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8099        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8100$as_echo "$as_me: seriously mess up just about everything." >&6;}
8101        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8102$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8103        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8104$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8105        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8106      fi
8107    fi
8108fi
8109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8110$as_echo_n "checking what configuration name to use... " >&6; }
8111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8112$as_echo "$CONF_NAME" >&6; }
8113
8114
8115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8116
8117  # Input might be given as Windows format, start by converting to
8118  # unix format.
8119  path="$OUTPUT_ROOT"
8120  new_path=`$CYGPATH -u "$path"`
8121
8122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8125  # "foo.exe" is OK but "foo" is an error.
8126  #
8127  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8128  # It is also a way to make sure we got the proper file name for the real test later on.
8129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8130  if test "x$test_shortpath" = x; then
8131    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8132$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8133    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8134  fi
8135
8136  # Call helper function which possibly converts this using DOS-style short mode.
8137  # If so, the updated path is stored in $new_path.
8138
8139  input_path="$new_path"
8140  # Check if we need to convert this using DOS-style short mode. If the path
8141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8142  # take no chances and rewrite it.
8143  # Note: m4 eats our [], so we need to use [ and ] instead.
8144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8145  if test "x$has_forbidden_chars" != x; then
8146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8150      # Going to short mode and back again did indeed matter. Since short mode is
8151      # case insensitive, let's make it lowercase to improve readability.
8152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8153      # Now convert it back to Unix-stile (cygpath)
8154      input_path=`$CYGPATH -u "$shortmode_path"`
8155      new_path="$input_path"
8156    fi
8157  fi
8158
8159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8160  if test "x$test_cygdrive_prefix" = x; then
8161    # As a simple fix, exclude /usr/bin since it's not a real path.
8162    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8164      # a path prefixed by /cygdrive for fixpath to work.
8165      new_path="$CYGWIN_ROOT_PATH$input_path"
8166    fi
8167  fi
8168
8169
8170  if test "x$path" != "x$new_path"; then
8171    OUTPUT_ROOT="$new_path"
8172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8173$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8174  fi
8175
8176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8177
8178  path="$OUTPUT_ROOT"
8179  has_colon=`$ECHO $path | $GREP ^.:`
8180  new_path="$path"
8181  if test "x$has_colon" = x; then
8182    # Not in mixed or Windows style, start by that.
8183    new_path=`cmd //c echo $path`
8184  fi
8185
8186
8187  input_path="$new_path"
8188  # Check if we need to convert this using DOS-style short mode. If the path
8189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8190  # take no chances and rewrite it.
8191  # Note: m4 eats our [], so we need to use [ and ] instead.
8192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8193  if test "x$has_forbidden_chars" != x; then
8194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8195    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8196  fi
8197
8198
8199  windows_path="$new_path"
8200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8201    unix_path=`$CYGPATH -u "$windows_path"`
8202    new_path="$unix_path"
8203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8205    new_path="$unix_path"
8206  fi
8207
8208  if test "x$path" != "x$new_path"; then
8209    OUTPUT_ROOT="$new_path"
8210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8211$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8212  fi
8213
8214  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8215  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8216
8217  else
8218    # We're on a posix platform. Hooray! :)
8219    path="$OUTPUT_ROOT"
8220    has_space=`$ECHO "$path" | $GREP " "`
8221    if test "x$has_space" != x; then
8222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8223$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8224      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8225    fi
8226
8227    # Use eval to expand a potential ~
8228    eval path="$path"
8229    if test ! -f "$path" && test ! -d "$path"; then
8230      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8231    fi
8232
8233    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8234  fi
8235
8236
8237SPEC=$OUTPUT_ROOT/spec.gmk
8238
8239CONF_NAME=$CONF_NAME
8240
8241OUTPUT_ROOT=$OUTPUT_ROOT
8242
8243
8244# Most of the probed defines are put into config.h
8245ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8246
8247# The spec.gmk file contains all variables for the make system.
8248ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8249
8250# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8251ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8252
8253# The bootcycle-spec.gmk file contains support for boot cycle builds.
8254ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8255
8256# The compare.sh is used to compare the build output to other builds.
8257ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8258
8259# Spec.sh is currently used by compare-objects.sh
8260ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8261
8262# The generated Makefile knows where the spec.gmk is and where the source is.
8263# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8264# which will look for generated configurations
8265ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8266
8267
8268# Save the arguments given to us
8269echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8270
8271
8272# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8273
8274    for ac_prog in apt-get yum port pkgutil pkgadd
8275do
8276  # Extract the first word of "$ac_prog", so it can be a program name with args.
8277set dummy $ac_prog; ac_word=$2
8278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8279$as_echo_n "checking for $ac_word... " >&6; }
8280if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8281  $as_echo_n "(cached) " >&6
8282else
8283  if test -n "$PKGHANDLER"; then
8284  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8285else
8286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8287for as_dir in $PATH
8288do
8289  IFS=$as_save_IFS
8290  test -z "$as_dir" && as_dir=.
8291    for ac_exec_ext in '' $ac_executable_extensions; do
8292  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8293    ac_cv_prog_PKGHANDLER="$ac_prog"
8294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8295    break 2
8296  fi
8297done
8298  done
8299IFS=$as_save_IFS
8300
8301fi
8302fi
8303PKGHANDLER=$ac_cv_prog_PKGHANDLER
8304if test -n "$PKGHANDLER"; then
8305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8306$as_echo "$PKGHANDLER" >&6; }
8307else
8308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8309$as_echo "no" >&6; }
8310fi
8311
8312
8313  test -n "$PKGHANDLER" && break
8314done
8315
8316
8317
8318# Setup tools that requires more complex handling, or that is not needed by the configure script.
8319
8320
8321  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8322  if test "x$MAKE" != x; then
8323    # User has supplied a make, test it.
8324    if test ! -f "$MAKE"; then
8325      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8326    fi
8327
8328  MAKE_CANDIDATE=""$MAKE""
8329  DESCRIPTION="user supplied MAKE=$MAKE"
8330  if test "x$MAKE_CANDIDATE" != x; then
8331    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8332$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8333    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8334    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8335    if test "x$IS_GNU_MAKE" = x; then
8336      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8337$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8338    else
8339      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8340      if test "x$IS_MODERN_MAKE" = x; then
8341        { $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
8342$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;}
8343      else
8344        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8345          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8346            MAKE_EXPECTED_ENV='cygwin'
8347          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8348            MAKE_EXPECTED_ENV='msys'
8349          else
8350            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8351          fi
8352          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8353          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8354        else
8355          # Not relevant for non-Windows
8356          IS_MAKE_CORRECT_ENV=true
8357        fi
8358        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8359          { $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
8360$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;}
8361        else
8362          FOUND_MAKE=$MAKE_CANDIDATE
8363
8364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8365
8366  # First separate the path from the arguments. This will split at the first
8367  # space.
8368  complete="$FOUND_MAKE"
8369  path="${complete%% *}"
8370  tmp="$complete EOL"
8371  arguments="${tmp#* }"
8372
8373  # Input might be given as Windows format, start by converting to
8374  # unix format.
8375  new_path=`$CYGPATH -u "$path"`
8376
8377  # Now try to locate executable using which
8378  new_path=`$WHICH "$new_path" 2> /dev/null`
8379  # bat and cmd files are not always considered executable in cygwin causing which
8380  # to not find them
8381  if test "x$new_path" = x \
8382           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8383           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8384    new_path=`$CYGPATH -u "$path"`
8385  fi
8386  if test "x$new_path" = x; then
8387    # Oops. Which didn't find the executable.
8388    # The splitting of arguments from the executable at a space might have been incorrect,
8389    # since paths with space are more likely in Windows. Give it another try with the whole
8390    # argument.
8391    path="$complete"
8392    arguments="EOL"
8393    new_path=`$CYGPATH -u "$path"`
8394    new_path=`$WHICH "$new_path" 2> /dev/null`
8395    # bat and cmd files are not always considered executable in cygwin causing which
8396    # to not find them
8397    if test "x$new_path" = x \
8398             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8399             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8400      new_path=`$CYGPATH -u "$path"`
8401    fi
8402    if test "x$new_path" = x; then
8403      # It's still not found. Now this is an unrecoverable error.
8404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8405$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8406      has_space=`$ECHO "$complete" | $GREP " "`
8407      if test "x$has_space" != x; then
8408        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8409$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8410      fi
8411      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8412    fi
8413  fi
8414
8415  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8416  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8417  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8418  # "foo.exe" is OK but "foo" is an error.
8419  #
8420  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8421  # It is also a way to make sure we got the proper file name for the real test later on.
8422  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8423  if test "x$test_shortpath" = x; then
8424    # Short path failed, file does not exist as specified.
8425    # Try adding .exe or .cmd
8426    if test -f "${new_path}.exe"; then
8427       input_to_shortpath="${new_path}.exe"
8428    elif test -f "${new_path}.cmd"; then
8429       input_to_shortpath="${new_path}.cmd"
8430    else
8431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8432$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8433      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8434$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8435      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8436    fi
8437  else
8438    input_to_shortpath="$new_path"
8439  fi
8440
8441  # Call helper function which possibly converts this using DOS-style short mode.
8442  # If so, the updated path is stored in $new_path.
8443  new_path="$input_to_shortpath"
8444
8445  input_path="$input_to_shortpath"
8446  # Check if we need to convert this using DOS-style short mode. If the path
8447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8448  # take no chances and rewrite it.
8449  # Note: m4 eats our [], so we need to use [ and ] instead.
8450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8451  if test "x$has_forbidden_chars" != x; then
8452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8456      # Going to short mode and back again did indeed matter. Since short mode is
8457      # case insensitive, let's make it lowercase to improve readability.
8458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8459      # Now convert it back to Unix-stile (cygpath)
8460      input_path=`$CYGPATH -u "$shortmode_path"`
8461      new_path="$input_path"
8462    fi
8463  fi
8464
8465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8466  if test "x$test_cygdrive_prefix" = x; then
8467    # As a simple fix, exclude /usr/bin since it's not a real path.
8468    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8470      # a path prefixed by /cygdrive for fixpath to work.
8471      new_path="$CYGWIN_ROOT_PATH$input_path"
8472    fi
8473  fi
8474
8475  # remove trailing .exe if any
8476  new_path="${new_path/%.exe/}"
8477
8478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8479
8480  # First separate the path from the arguments. This will split at the first
8481  # space.
8482  complete="$FOUND_MAKE"
8483  path="${complete%% *}"
8484  tmp="$complete EOL"
8485  arguments="${tmp#* }"
8486
8487  # Input might be given as Windows format, start by converting to
8488  # unix format.
8489  new_path="$path"
8490
8491  windows_path="$new_path"
8492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8493    unix_path=`$CYGPATH -u "$windows_path"`
8494    new_path="$unix_path"
8495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8497    new_path="$unix_path"
8498  fi
8499
8500
8501  # Now try to locate executable using which
8502  new_path=`$WHICH "$new_path" 2> /dev/null`
8503
8504  if test "x$new_path" = x; then
8505    # Oops. Which didn't find the executable.
8506    # The splitting of arguments from the executable at a space might have been incorrect,
8507    # since paths with space are more likely in Windows. Give it another try with the whole
8508    # argument.
8509    path="$complete"
8510    arguments="EOL"
8511    new_path="$path"
8512
8513  windows_path="$new_path"
8514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8515    unix_path=`$CYGPATH -u "$windows_path"`
8516    new_path="$unix_path"
8517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8519    new_path="$unix_path"
8520  fi
8521
8522
8523    new_path=`$WHICH "$new_path" 2> /dev/null`
8524
8525    if test "x$new_path" = x; then
8526      # It's still not found. Now this is an unrecoverable error.
8527      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8528$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8529      has_space=`$ECHO "$complete" | $GREP " "`
8530      if test "x$has_space" != x; then
8531        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8532$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8533      fi
8534      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8535    fi
8536  fi
8537
8538  # Now new_path has a complete unix path to the binary
8539  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8540    # Keep paths in /bin as-is, but remove trailing .exe if any
8541    new_path="${new_path/%.exe/}"
8542    # Do not save /bin paths to all_fixpath_prefixes!
8543  else
8544    # Not in mixed or Windows style, start by that.
8545    new_path=`cmd //c echo $new_path`
8546
8547  input_path="$new_path"
8548  # Check if we need to convert this using DOS-style short mode. If the path
8549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8550  # take no chances and rewrite it.
8551  # Note: m4 eats our [], so we need to use [ and ] instead.
8552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8553  if test "x$has_forbidden_chars" != x; then
8554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8555    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8556  fi
8557
8558    # Output is in $new_path
8559
8560  windows_path="$new_path"
8561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8562    unix_path=`$CYGPATH -u "$windows_path"`
8563    new_path="$unix_path"
8564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8566    new_path="$unix_path"
8567  fi
8568
8569    # remove trailing .exe if any
8570    new_path="${new_path/%.exe/}"
8571
8572    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8573    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8574  fi
8575
8576  else
8577    # We're on a posix platform. Hooray! :)
8578    # First separate the path from the arguments. This will split at the first
8579    # space.
8580    complete="$FOUND_MAKE"
8581    path="${complete%% *}"
8582    tmp="$complete EOL"
8583    arguments="${tmp#* }"
8584
8585    # Cannot rely on the command "which" here since it doesn't always work.
8586    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8587    if test -z "$is_absolute_path"; then
8588      # Path to executable is not absolute. Find it.
8589      IFS_save="$IFS"
8590      IFS=:
8591      for p in $PATH; do
8592        if test -f "$p/$path" && test -x "$p/$path"; then
8593          new_path="$p/$path"
8594          break
8595        fi
8596      done
8597      IFS="$IFS_save"
8598    else
8599      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8600$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8601      new_path="$path"
8602    fi
8603
8604    if test "x$new_path" = x; then
8605        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8606$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8607        has_space=`$ECHO "$complete" | $GREP " "`
8608        if test "x$has_space" != x; then
8609          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8610$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8611        fi
8612        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8613      fi
8614  fi
8615
8616      # Now join together the path and the arguments once again
8617      if test "x$arguments" != xEOL; then
8618        new_complete="$new_path ${arguments% *}"
8619      else
8620        new_complete="$new_path"
8621      fi
8622
8623  if test "x$complete" != "x$new_complete"; then
8624      FOUND_MAKE="$new_complete"
8625      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8626$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8627    fi
8628
8629        fi
8630      fi
8631    fi
8632  fi
8633
8634    if test "x$FOUND_MAKE" = x; then
8635      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8636    fi
8637  else
8638    # Try our hardest to locate a correct version of GNU make
8639    for ac_prog in gmake
8640do
8641  # Extract the first word of "$ac_prog", so it can be a program name with args.
8642set dummy $ac_prog; ac_word=$2
8643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8644$as_echo_n "checking for $ac_word... " >&6; }
8645if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8646  $as_echo_n "(cached) " >&6
8647else
8648  case $CHECK_GMAKE in
8649  [\\/]* | ?:[\\/]*)
8650  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8651  ;;
8652  *)
8653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8654for as_dir in $PATH
8655do
8656  IFS=$as_save_IFS
8657  test -z "$as_dir" && as_dir=.
8658    for ac_exec_ext in '' $ac_executable_extensions; do
8659  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8660    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8662    break 2
8663  fi
8664done
8665  done
8666IFS=$as_save_IFS
8667
8668  ;;
8669esac
8670fi
8671CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8672if test -n "$CHECK_GMAKE"; then
8673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8674$as_echo "$CHECK_GMAKE" >&6; }
8675else
8676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8677$as_echo "no" >&6; }
8678fi
8679
8680
8681  test -n "$CHECK_GMAKE" && break
8682done
8683
8684
8685  MAKE_CANDIDATE=""$CHECK_GMAKE""
8686  DESCRIPTION="gmake in PATH"
8687  if test "x$MAKE_CANDIDATE" != x; then
8688    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8689$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8690    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8691    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8692    if test "x$IS_GNU_MAKE" = x; then
8693      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8694$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8695    else
8696      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8697      if test "x$IS_MODERN_MAKE" = x; then
8698        { $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
8699$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;}
8700      else
8701        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8702          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8703            MAKE_EXPECTED_ENV='cygwin'
8704          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8705            MAKE_EXPECTED_ENV='msys'
8706          else
8707            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8708          fi
8709          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8710          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8711        else
8712          # Not relevant for non-Windows
8713          IS_MAKE_CORRECT_ENV=true
8714        fi
8715        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8716          { $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
8717$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;}
8718        else
8719          FOUND_MAKE=$MAKE_CANDIDATE
8720
8721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8722
8723  # First separate the path from the arguments. This will split at the first
8724  # space.
8725  complete="$FOUND_MAKE"
8726  path="${complete%% *}"
8727  tmp="$complete EOL"
8728  arguments="${tmp#* }"
8729
8730  # Input might be given as Windows format, start by converting to
8731  # unix format.
8732  new_path=`$CYGPATH -u "$path"`
8733
8734  # Now try to locate executable using which
8735  new_path=`$WHICH "$new_path" 2> /dev/null`
8736  # bat and cmd files are not always considered executable in cygwin causing which
8737  # to not find them
8738  if test "x$new_path" = x \
8739           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8740           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8741    new_path=`$CYGPATH -u "$path"`
8742  fi
8743  if test "x$new_path" = x; then
8744    # Oops. Which didn't find the executable.
8745    # The splitting of arguments from the executable at a space might have been incorrect,
8746    # since paths with space are more likely in Windows. Give it another try with the whole
8747    # argument.
8748    path="$complete"
8749    arguments="EOL"
8750    new_path=`$CYGPATH -u "$path"`
8751    new_path=`$WHICH "$new_path" 2> /dev/null`
8752    # bat and cmd files are not always considered executable in cygwin causing which
8753    # to not find them
8754    if test "x$new_path" = x \
8755             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8756             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8757      new_path=`$CYGPATH -u "$path"`
8758    fi
8759    if test "x$new_path" = x; then
8760      # It's still not found. Now this is an unrecoverable error.
8761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8762$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8763      has_space=`$ECHO "$complete" | $GREP " "`
8764      if test "x$has_space" != x; then
8765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8767      fi
8768      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8769    fi
8770  fi
8771
8772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8775  # "foo.exe" is OK but "foo" is an error.
8776  #
8777  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8778  # It is also a way to make sure we got the proper file name for the real test later on.
8779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8780  if test "x$test_shortpath" = x; then
8781    # Short path failed, file does not exist as specified.
8782    # Try adding .exe or .cmd
8783    if test -f "${new_path}.exe"; then
8784       input_to_shortpath="${new_path}.exe"
8785    elif test -f "${new_path}.cmd"; then
8786       input_to_shortpath="${new_path}.cmd"
8787    else
8788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8789$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8790      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8791$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8792      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8793    fi
8794  else
8795    input_to_shortpath="$new_path"
8796  fi
8797
8798  # Call helper function which possibly converts this using DOS-style short mode.
8799  # If so, the updated path is stored in $new_path.
8800  new_path="$input_to_shortpath"
8801
8802  input_path="$input_to_shortpath"
8803  # Check if we need to convert this using DOS-style short mode. If the path
8804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8805  # take no chances and rewrite it.
8806  # Note: m4 eats our [], so we need to use [ and ] instead.
8807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8808  if test "x$has_forbidden_chars" != x; then
8809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8810    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8811    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8812    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8813      # Going to short mode and back again did indeed matter. Since short mode is
8814      # case insensitive, let's make it lowercase to improve readability.
8815      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8816      # Now convert it back to Unix-stile (cygpath)
8817      input_path=`$CYGPATH -u "$shortmode_path"`
8818      new_path="$input_path"
8819    fi
8820  fi
8821
8822  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8823  if test "x$test_cygdrive_prefix" = x; then
8824    # As a simple fix, exclude /usr/bin since it's not a real path.
8825    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8826      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8827      # a path prefixed by /cygdrive for fixpath to work.
8828      new_path="$CYGWIN_ROOT_PATH$input_path"
8829    fi
8830  fi
8831
8832  # remove trailing .exe if any
8833  new_path="${new_path/%.exe/}"
8834
8835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8836
8837  # First separate the path from the arguments. This will split at the first
8838  # space.
8839  complete="$FOUND_MAKE"
8840  path="${complete%% *}"
8841  tmp="$complete EOL"
8842  arguments="${tmp#* }"
8843
8844  # Input might be given as Windows format, start by converting to
8845  # unix format.
8846  new_path="$path"
8847
8848  windows_path="$new_path"
8849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8850    unix_path=`$CYGPATH -u "$windows_path"`
8851    new_path="$unix_path"
8852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8854    new_path="$unix_path"
8855  fi
8856
8857
8858  # Now try to locate executable using which
8859  new_path=`$WHICH "$new_path" 2> /dev/null`
8860
8861  if test "x$new_path" = x; then
8862    # Oops. Which didn't find the executable.
8863    # The splitting of arguments from the executable at a space might have been incorrect,
8864    # since paths with space are more likely in Windows. Give it another try with the whole
8865    # argument.
8866    path="$complete"
8867    arguments="EOL"
8868    new_path="$path"
8869
8870  windows_path="$new_path"
8871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8872    unix_path=`$CYGPATH -u "$windows_path"`
8873    new_path="$unix_path"
8874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8876    new_path="$unix_path"
8877  fi
8878
8879
8880    new_path=`$WHICH "$new_path" 2> /dev/null`
8881
8882    if test "x$new_path" = x; then
8883      # It's still not found. Now this is an unrecoverable error.
8884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8885$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8886      has_space=`$ECHO "$complete" | $GREP " "`
8887      if test "x$has_space" != x; then
8888        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8889$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8890      fi
8891      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8892    fi
8893  fi
8894
8895  # Now new_path has a complete unix path to the binary
8896  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8897    # Keep paths in /bin as-is, but remove trailing .exe if any
8898    new_path="${new_path/%.exe/}"
8899    # Do not save /bin paths to all_fixpath_prefixes!
8900  else
8901    # Not in mixed or Windows style, start by that.
8902    new_path=`cmd //c echo $new_path`
8903
8904  input_path="$new_path"
8905  # Check if we need to convert this using DOS-style short mode. If the path
8906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8907  # take no chances and rewrite it.
8908  # Note: m4 eats our [], so we need to use [ and ] instead.
8909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8910  if test "x$has_forbidden_chars" != x; then
8911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8913  fi
8914
8915    # Output is in $new_path
8916
8917  windows_path="$new_path"
8918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8919    unix_path=`$CYGPATH -u "$windows_path"`
8920    new_path="$unix_path"
8921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8923    new_path="$unix_path"
8924  fi
8925
8926    # remove trailing .exe if any
8927    new_path="${new_path/%.exe/}"
8928
8929    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8930    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8931  fi
8932
8933  else
8934    # We're on a posix platform. Hooray! :)
8935    # First separate the path from the arguments. This will split at the first
8936    # space.
8937    complete="$FOUND_MAKE"
8938    path="${complete%% *}"
8939    tmp="$complete EOL"
8940    arguments="${tmp#* }"
8941
8942    # Cannot rely on the command "which" here since it doesn't always work.
8943    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8944    if test -z "$is_absolute_path"; then
8945      # Path to executable is not absolute. Find it.
8946      IFS_save="$IFS"
8947      IFS=:
8948      for p in $PATH; do
8949        if test -f "$p/$path" && test -x "$p/$path"; then
8950          new_path="$p/$path"
8951          break
8952        fi
8953      done
8954      IFS="$IFS_save"
8955    else
8956      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8957$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8958      new_path="$path"
8959    fi
8960
8961    if test "x$new_path" = x; then
8962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8963$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8964        has_space=`$ECHO "$complete" | $GREP " "`
8965        if test "x$has_space" != x; then
8966          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8967$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8968        fi
8969        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8970      fi
8971  fi
8972
8973      # Now join together the path and the arguments once again
8974      if test "x$arguments" != xEOL; then
8975        new_complete="$new_path ${arguments% *}"
8976      else
8977        new_complete="$new_path"
8978      fi
8979
8980  if test "x$complete" != "x$new_complete"; then
8981      FOUND_MAKE="$new_complete"
8982      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8983$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8984    fi
8985
8986        fi
8987      fi
8988    fi
8989  fi
8990
8991
8992    if test "x$FOUND_MAKE" = x; then
8993      for ac_prog in make
8994do
8995  # Extract the first word of "$ac_prog", so it can be a program name with args.
8996set dummy $ac_prog; ac_word=$2
8997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8998$as_echo_n "checking for $ac_word... " >&6; }
8999if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
9000  $as_echo_n "(cached) " >&6
9001else
9002  case $CHECK_MAKE in
9003  [\\/]* | ?:[\\/]*)
9004  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
9005  ;;
9006  *)
9007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9008for as_dir in $PATH
9009do
9010  IFS=$as_save_IFS
9011  test -z "$as_dir" && as_dir=.
9012    for ac_exec_ext in '' $ac_executable_extensions; do
9013  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9014    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
9015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9016    break 2
9017  fi
9018done
9019  done
9020IFS=$as_save_IFS
9021
9022  ;;
9023esac
9024fi
9025CHECK_MAKE=$ac_cv_path_CHECK_MAKE
9026if test -n "$CHECK_MAKE"; then
9027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
9028$as_echo "$CHECK_MAKE" >&6; }
9029else
9030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9031$as_echo "no" >&6; }
9032fi
9033
9034
9035  test -n "$CHECK_MAKE" && break
9036done
9037
9038
9039  MAKE_CANDIDATE=""$CHECK_MAKE""
9040  DESCRIPTION="make in PATH"
9041  if test "x$MAKE_CANDIDATE" != x; then
9042    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9043$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9044    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9045    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9046    if test "x$IS_GNU_MAKE" = x; then
9047      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9048$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9049    else
9050      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9051      if test "x$IS_MODERN_MAKE" = x; then
9052        { $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
9053$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;}
9054      else
9055        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9056          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9057            MAKE_EXPECTED_ENV='cygwin'
9058          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9059            MAKE_EXPECTED_ENV='msys'
9060          else
9061            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9062          fi
9063          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9064          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9065        else
9066          # Not relevant for non-Windows
9067          IS_MAKE_CORRECT_ENV=true
9068        fi
9069        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9070          { $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
9071$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;}
9072        else
9073          FOUND_MAKE=$MAKE_CANDIDATE
9074
9075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9076
9077  # First separate the path from the arguments. This will split at the first
9078  # space.
9079  complete="$FOUND_MAKE"
9080  path="${complete%% *}"
9081  tmp="$complete EOL"
9082  arguments="${tmp#* }"
9083
9084  # Input might be given as Windows format, start by converting to
9085  # unix format.
9086  new_path=`$CYGPATH -u "$path"`
9087
9088  # Now try to locate executable using which
9089  new_path=`$WHICH "$new_path" 2> /dev/null`
9090  # bat and cmd files are not always considered executable in cygwin causing which
9091  # to not find them
9092  if test "x$new_path" = x \
9093           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9094           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9095    new_path=`$CYGPATH -u "$path"`
9096  fi
9097  if test "x$new_path" = x; then
9098    # Oops. Which didn't find the executable.
9099    # The splitting of arguments from the executable at a space might have been incorrect,
9100    # since paths with space are more likely in Windows. Give it another try with the whole
9101    # argument.
9102    path="$complete"
9103    arguments="EOL"
9104    new_path=`$CYGPATH -u "$path"`
9105    new_path=`$WHICH "$new_path" 2> /dev/null`
9106    # bat and cmd files are not always considered executable in cygwin causing which
9107    # to not find them
9108    if test "x$new_path" = x \
9109             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9110             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9111      new_path=`$CYGPATH -u "$path"`
9112    fi
9113    if test "x$new_path" = x; then
9114      # It's still not found. Now this is an unrecoverable error.
9115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9116$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9117      has_space=`$ECHO "$complete" | $GREP " "`
9118      if test "x$has_space" != x; then
9119        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9120$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9121      fi
9122      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9123    fi
9124  fi
9125
9126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9129  # "foo.exe" is OK but "foo" is an error.
9130  #
9131  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9132  # It is also a way to make sure we got the proper file name for the real test later on.
9133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9134  if test "x$test_shortpath" = x; then
9135    # Short path failed, file does not exist as specified.
9136    # Try adding .exe or .cmd
9137    if test -f "${new_path}.exe"; then
9138       input_to_shortpath="${new_path}.exe"
9139    elif test -f "${new_path}.cmd"; then
9140       input_to_shortpath="${new_path}.cmd"
9141    else
9142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9143$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9144      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9145$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9146      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9147    fi
9148  else
9149    input_to_shortpath="$new_path"
9150  fi
9151
9152  # Call helper function which possibly converts this using DOS-style short mode.
9153  # If so, the updated path is stored in $new_path.
9154  new_path="$input_to_shortpath"
9155
9156  input_path="$input_to_shortpath"
9157  # Check if we need to convert this using DOS-style short mode. If the path
9158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9159  # take no chances and rewrite it.
9160  # Note: m4 eats our [], so we need to use [ and ] instead.
9161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9162  if test "x$has_forbidden_chars" != x; then
9163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9167      # Going to short mode and back again did indeed matter. Since short mode is
9168      # case insensitive, let's make it lowercase to improve readability.
9169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9170      # Now convert it back to Unix-stile (cygpath)
9171      input_path=`$CYGPATH -u "$shortmode_path"`
9172      new_path="$input_path"
9173    fi
9174  fi
9175
9176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9177  if test "x$test_cygdrive_prefix" = x; then
9178    # As a simple fix, exclude /usr/bin since it's not a real path.
9179    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9181      # a path prefixed by /cygdrive for fixpath to work.
9182      new_path="$CYGWIN_ROOT_PATH$input_path"
9183    fi
9184  fi
9185
9186  # remove trailing .exe if any
9187  new_path="${new_path/%.exe/}"
9188
9189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9190
9191  # First separate the path from the arguments. This will split at the first
9192  # space.
9193  complete="$FOUND_MAKE"
9194  path="${complete%% *}"
9195  tmp="$complete EOL"
9196  arguments="${tmp#* }"
9197
9198  # Input might be given as Windows format, start by converting to
9199  # unix format.
9200  new_path="$path"
9201
9202  windows_path="$new_path"
9203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9204    unix_path=`$CYGPATH -u "$windows_path"`
9205    new_path="$unix_path"
9206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9208    new_path="$unix_path"
9209  fi
9210
9211
9212  # Now try to locate executable using which
9213  new_path=`$WHICH "$new_path" 2> /dev/null`
9214
9215  if test "x$new_path" = x; then
9216    # Oops. Which didn't find the executable.
9217    # The splitting of arguments from the executable at a space might have been incorrect,
9218    # since paths with space are more likely in Windows. Give it another try with the whole
9219    # argument.
9220    path="$complete"
9221    arguments="EOL"
9222    new_path="$path"
9223
9224  windows_path="$new_path"
9225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9226    unix_path=`$CYGPATH -u "$windows_path"`
9227    new_path="$unix_path"
9228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9230    new_path="$unix_path"
9231  fi
9232
9233
9234    new_path=`$WHICH "$new_path" 2> /dev/null`
9235
9236    if test "x$new_path" = x; then
9237      # It's still not found. Now this is an unrecoverable error.
9238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9239$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9240      has_space=`$ECHO "$complete" | $GREP " "`
9241      if test "x$has_space" != x; then
9242        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9243$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9244      fi
9245      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9246    fi
9247  fi
9248
9249  # Now new_path has a complete unix path to the binary
9250  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9251    # Keep paths in /bin as-is, but remove trailing .exe if any
9252    new_path="${new_path/%.exe/}"
9253    # Do not save /bin paths to all_fixpath_prefixes!
9254  else
9255    # Not in mixed or Windows style, start by that.
9256    new_path=`cmd //c echo $new_path`
9257
9258  input_path="$new_path"
9259  # Check if we need to convert this using DOS-style short mode. If the path
9260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9261  # take no chances and rewrite it.
9262  # Note: m4 eats our [], so we need to use [ and ] instead.
9263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9264  if test "x$has_forbidden_chars" != x; then
9265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9267  fi
9268
9269    # Output is in $new_path
9270
9271  windows_path="$new_path"
9272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9273    unix_path=`$CYGPATH -u "$windows_path"`
9274    new_path="$unix_path"
9275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9277    new_path="$unix_path"
9278  fi
9279
9280    # remove trailing .exe if any
9281    new_path="${new_path/%.exe/}"
9282
9283    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9284    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9285  fi
9286
9287  else
9288    # We're on a posix platform. Hooray! :)
9289    # First separate the path from the arguments. This will split at the first
9290    # space.
9291    complete="$FOUND_MAKE"
9292    path="${complete%% *}"
9293    tmp="$complete EOL"
9294    arguments="${tmp#* }"
9295
9296    # Cannot rely on the command "which" here since it doesn't always work.
9297    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9298    if test -z "$is_absolute_path"; then
9299      # Path to executable is not absolute. Find it.
9300      IFS_save="$IFS"
9301      IFS=:
9302      for p in $PATH; do
9303        if test -f "$p/$path" && test -x "$p/$path"; then
9304          new_path="$p/$path"
9305          break
9306        fi
9307      done
9308      IFS="$IFS_save"
9309    else
9310      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9311$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9312      new_path="$path"
9313    fi
9314
9315    if test "x$new_path" = x; then
9316        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9317$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9318        has_space=`$ECHO "$complete" | $GREP " "`
9319        if test "x$has_space" != x; then
9320          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9321$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9322        fi
9323        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9324      fi
9325  fi
9326
9327      # Now join together the path and the arguments once again
9328      if test "x$arguments" != xEOL; then
9329        new_complete="$new_path ${arguments% *}"
9330      else
9331        new_complete="$new_path"
9332      fi
9333
9334  if test "x$complete" != "x$new_complete"; then
9335      FOUND_MAKE="$new_complete"
9336      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9337$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9338    fi
9339
9340        fi
9341      fi
9342    fi
9343  fi
9344
9345    fi
9346
9347    if test "x$FOUND_MAKE" = x; then
9348      if test "x$TOOLS_DIR" != x; then
9349        # We have a tools-dir, check that as well before giving up.
9350        OLD_PATH=$PATH
9351        PATH=$TOOLS_DIR:$PATH
9352        for ac_prog in gmake
9353do
9354  # Extract the first word of "$ac_prog", so it can be a program name with args.
9355set dummy $ac_prog; ac_word=$2
9356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9357$as_echo_n "checking for $ac_word... " >&6; }
9358if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9359  $as_echo_n "(cached) " >&6
9360else
9361  case $CHECK_TOOLSDIR_GMAKE in
9362  [\\/]* | ?:[\\/]*)
9363  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9364  ;;
9365  *)
9366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9367for as_dir in $PATH
9368do
9369  IFS=$as_save_IFS
9370  test -z "$as_dir" && as_dir=.
9371    for ac_exec_ext in '' $ac_executable_extensions; do
9372  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9373    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9375    break 2
9376  fi
9377done
9378  done
9379IFS=$as_save_IFS
9380
9381  ;;
9382esac
9383fi
9384CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9385if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9387$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9388else
9389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9390$as_echo "no" >&6; }
9391fi
9392
9393
9394  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9395done
9396
9397
9398  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9399  DESCRIPTION="gmake in tools-dir"
9400  if test "x$MAKE_CANDIDATE" != x; then
9401    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9402$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9403    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9404    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9405    if test "x$IS_GNU_MAKE" = x; then
9406      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9407$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9408    else
9409      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9410      if test "x$IS_MODERN_MAKE" = x; then
9411        { $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
9412$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;}
9413      else
9414        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9415          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9416            MAKE_EXPECTED_ENV='cygwin'
9417          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9418            MAKE_EXPECTED_ENV='msys'
9419          else
9420            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9421          fi
9422          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9423          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9424        else
9425          # Not relevant for non-Windows
9426          IS_MAKE_CORRECT_ENV=true
9427        fi
9428        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9429          { $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
9430$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;}
9431        else
9432          FOUND_MAKE=$MAKE_CANDIDATE
9433
9434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9435
9436  # First separate the path from the arguments. This will split at the first
9437  # space.
9438  complete="$FOUND_MAKE"
9439  path="${complete%% *}"
9440  tmp="$complete EOL"
9441  arguments="${tmp#* }"
9442
9443  # Input might be given as Windows format, start by converting to
9444  # unix format.
9445  new_path=`$CYGPATH -u "$path"`
9446
9447  # Now try to locate executable using which
9448  new_path=`$WHICH "$new_path" 2> /dev/null`
9449  # bat and cmd files are not always considered executable in cygwin causing which
9450  # to not find them
9451  if test "x$new_path" = x \
9452           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9453           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9454    new_path=`$CYGPATH -u "$path"`
9455  fi
9456  if test "x$new_path" = x; then
9457    # Oops. Which didn't find the executable.
9458    # The splitting of arguments from the executable at a space might have been incorrect,
9459    # since paths with space are more likely in Windows. Give it another try with the whole
9460    # argument.
9461    path="$complete"
9462    arguments="EOL"
9463    new_path=`$CYGPATH -u "$path"`
9464    new_path=`$WHICH "$new_path" 2> /dev/null`
9465    # bat and cmd files are not always considered executable in cygwin causing which
9466    # to not find them
9467    if test "x$new_path" = x \
9468             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9469             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9470      new_path=`$CYGPATH -u "$path"`
9471    fi
9472    if test "x$new_path" = x; then
9473      # It's still not found. Now this is an unrecoverable error.
9474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9475$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9476      has_space=`$ECHO "$complete" | $GREP " "`
9477      if test "x$has_space" != x; then
9478        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9479$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9480      fi
9481      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9482    fi
9483  fi
9484
9485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9488  # "foo.exe" is OK but "foo" is an error.
9489  #
9490  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9491  # It is also a way to make sure we got the proper file name for the real test later on.
9492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9493  if test "x$test_shortpath" = x; then
9494    # Short path failed, file does not exist as specified.
9495    # Try adding .exe or .cmd
9496    if test -f "${new_path}.exe"; then
9497       input_to_shortpath="${new_path}.exe"
9498    elif test -f "${new_path}.cmd"; then
9499       input_to_shortpath="${new_path}.cmd"
9500    else
9501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9502$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9503      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9504$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9505      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9506    fi
9507  else
9508    input_to_shortpath="$new_path"
9509  fi
9510
9511  # Call helper function which possibly converts this using DOS-style short mode.
9512  # If so, the updated path is stored in $new_path.
9513  new_path="$input_to_shortpath"
9514
9515  input_path="$input_to_shortpath"
9516  # Check if we need to convert this using DOS-style short mode. If the path
9517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9518  # take no chances and rewrite it.
9519  # Note: m4 eats our [], so we need to use [ and ] instead.
9520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9521  if test "x$has_forbidden_chars" != x; then
9522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9526      # Going to short mode and back again did indeed matter. Since short mode is
9527      # case insensitive, let's make it lowercase to improve readability.
9528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9529      # Now convert it back to Unix-stile (cygpath)
9530      input_path=`$CYGPATH -u "$shortmode_path"`
9531      new_path="$input_path"
9532    fi
9533  fi
9534
9535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9536  if test "x$test_cygdrive_prefix" = x; then
9537    # As a simple fix, exclude /usr/bin since it's not a real path.
9538    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9540      # a path prefixed by /cygdrive for fixpath to work.
9541      new_path="$CYGWIN_ROOT_PATH$input_path"
9542    fi
9543  fi
9544
9545  # remove trailing .exe if any
9546  new_path="${new_path/%.exe/}"
9547
9548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9549
9550  # First separate the path from the arguments. This will split at the first
9551  # space.
9552  complete="$FOUND_MAKE"
9553  path="${complete%% *}"
9554  tmp="$complete EOL"
9555  arguments="${tmp#* }"
9556
9557  # Input might be given as Windows format, start by converting to
9558  # unix format.
9559  new_path="$path"
9560
9561  windows_path="$new_path"
9562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9563    unix_path=`$CYGPATH -u "$windows_path"`
9564    new_path="$unix_path"
9565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9567    new_path="$unix_path"
9568  fi
9569
9570
9571  # Now try to locate executable using which
9572  new_path=`$WHICH "$new_path" 2> /dev/null`
9573
9574  if test "x$new_path" = x; then
9575    # Oops. Which didn't find the executable.
9576    # The splitting of arguments from the executable at a space might have been incorrect,
9577    # since paths with space are more likely in Windows. Give it another try with the whole
9578    # argument.
9579    path="$complete"
9580    arguments="EOL"
9581    new_path="$path"
9582
9583  windows_path="$new_path"
9584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9585    unix_path=`$CYGPATH -u "$windows_path"`
9586    new_path="$unix_path"
9587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9589    new_path="$unix_path"
9590  fi
9591
9592
9593    new_path=`$WHICH "$new_path" 2> /dev/null`
9594
9595    if test "x$new_path" = x; then
9596      # It's still not found. Now this is an unrecoverable error.
9597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9598$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9599      has_space=`$ECHO "$complete" | $GREP " "`
9600      if test "x$has_space" != x; then
9601        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9602$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9603      fi
9604      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9605    fi
9606  fi
9607
9608  # Now new_path has a complete unix path to the binary
9609  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9610    # Keep paths in /bin as-is, but remove trailing .exe if any
9611    new_path="${new_path/%.exe/}"
9612    # Do not save /bin paths to all_fixpath_prefixes!
9613  else
9614    # Not in mixed or Windows style, start by that.
9615    new_path=`cmd //c echo $new_path`
9616
9617  input_path="$new_path"
9618  # Check if we need to convert this using DOS-style short mode. If the path
9619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9620  # take no chances and rewrite it.
9621  # Note: m4 eats our [], so we need to use [ and ] instead.
9622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9623  if test "x$has_forbidden_chars" != x; then
9624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9626  fi
9627
9628    # Output is in $new_path
9629
9630  windows_path="$new_path"
9631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9632    unix_path=`$CYGPATH -u "$windows_path"`
9633    new_path="$unix_path"
9634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9636    new_path="$unix_path"
9637  fi
9638
9639    # remove trailing .exe if any
9640    new_path="${new_path/%.exe/}"
9641
9642    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9643    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9644  fi
9645
9646  else
9647    # We're on a posix platform. Hooray! :)
9648    # First separate the path from the arguments. This will split at the first
9649    # space.
9650    complete="$FOUND_MAKE"
9651    path="${complete%% *}"
9652    tmp="$complete EOL"
9653    arguments="${tmp#* }"
9654
9655    # Cannot rely on the command "which" here since it doesn't always work.
9656    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9657    if test -z "$is_absolute_path"; then
9658      # Path to executable is not absolute. Find it.
9659      IFS_save="$IFS"
9660      IFS=:
9661      for p in $PATH; do
9662        if test -f "$p/$path" && test -x "$p/$path"; then
9663          new_path="$p/$path"
9664          break
9665        fi
9666      done
9667      IFS="$IFS_save"
9668    else
9669      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9670$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9671      new_path="$path"
9672    fi
9673
9674    if test "x$new_path" = x; then
9675        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9676$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9677        has_space=`$ECHO "$complete" | $GREP " "`
9678        if test "x$has_space" != x; then
9679          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9680$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9681        fi
9682        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9683      fi
9684  fi
9685
9686      # Now join together the path and the arguments once again
9687      if test "x$arguments" != xEOL; then
9688        new_complete="$new_path ${arguments% *}"
9689      else
9690        new_complete="$new_path"
9691      fi
9692
9693  if test "x$complete" != "x$new_complete"; then
9694      FOUND_MAKE="$new_complete"
9695      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9696$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9697    fi
9698
9699        fi
9700      fi
9701    fi
9702  fi
9703
9704        if test "x$FOUND_MAKE" = x; then
9705          for ac_prog in make
9706do
9707  # Extract the first word of "$ac_prog", so it can be a program name with args.
9708set dummy $ac_prog; ac_word=$2
9709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9710$as_echo_n "checking for $ac_word... " >&6; }
9711if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9712  $as_echo_n "(cached) " >&6
9713else
9714  case $CHECK_TOOLSDIR_MAKE in
9715  [\\/]* | ?:[\\/]*)
9716  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9717  ;;
9718  *)
9719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9720for as_dir in $PATH
9721do
9722  IFS=$as_save_IFS
9723  test -z "$as_dir" && as_dir=.
9724    for ac_exec_ext in '' $ac_executable_extensions; do
9725  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9726    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9728    break 2
9729  fi
9730done
9731  done
9732IFS=$as_save_IFS
9733
9734  ;;
9735esac
9736fi
9737CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9738if test -n "$CHECK_TOOLSDIR_MAKE"; then
9739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9740$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9741else
9742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9743$as_echo "no" >&6; }
9744fi
9745
9746
9747  test -n "$CHECK_TOOLSDIR_MAKE" && break
9748done
9749
9750
9751  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9752  DESCRIPTION="make in tools-dir"
9753  if test "x$MAKE_CANDIDATE" != x; then
9754    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9755$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9756    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9757    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9758    if test "x$IS_GNU_MAKE" = x; then
9759      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9760$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9761    else
9762      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9763      if test "x$IS_MODERN_MAKE" = x; then
9764        { $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
9765$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;}
9766      else
9767        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9768          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9769            MAKE_EXPECTED_ENV='cygwin'
9770          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9771            MAKE_EXPECTED_ENV='msys'
9772          else
9773            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9774          fi
9775          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9776          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9777        else
9778          # Not relevant for non-Windows
9779          IS_MAKE_CORRECT_ENV=true
9780        fi
9781        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9782          { $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
9783$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;}
9784        else
9785          FOUND_MAKE=$MAKE_CANDIDATE
9786
9787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9788
9789  # First separate the path from the arguments. This will split at the first
9790  # space.
9791  complete="$FOUND_MAKE"
9792  path="${complete%% *}"
9793  tmp="$complete EOL"
9794  arguments="${tmp#* }"
9795
9796  # Input might be given as Windows format, start by converting to
9797  # unix format.
9798  new_path=`$CYGPATH -u "$path"`
9799
9800  # Now try to locate executable using which
9801  new_path=`$WHICH "$new_path" 2> /dev/null`
9802  # bat and cmd files are not always considered executable in cygwin causing which
9803  # to not find them
9804  if test "x$new_path" = x \
9805           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9806           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9807    new_path=`$CYGPATH -u "$path"`
9808  fi
9809  if test "x$new_path" = x; then
9810    # Oops. Which didn't find the executable.
9811    # The splitting of arguments from the executable at a space might have been incorrect,
9812    # since paths with space are more likely in Windows. Give it another try with the whole
9813    # argument.
9814    path="$complete"
9815    arguments="EOL"
9816    new_path=`$CYGPATH -u "$path"`
9817    new_path=`$WHICH "$new_path" 2> /dev/null`
9818    # bat and cmd files are not always considered executable in cygwin causing which
9819    # to not find them
9820    if test "x$new_path" = x \
9821             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9822             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9823      new_path=`$CYGPATH -u "$path"`
9824    fi
9825    if test "x$new_path" = x; then
9826      # It's still not found. Now this is an unrecoverable error.
9827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9828$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9829      has_space=`$ECHO "$complete" | $GREP " "`
9830      if test "x$has_space" != x; then
9831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9833      fi
9834      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9835    fi
9836  fi
9837
9838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9841  # "foo.exe" is OK but "foo" is an error.
9842  #
9843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9844  # It is also a way to make sure we got the proper file name for the real test later on.
9845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9846  if test "x$test_shortpath" = x; then
9847    # Short path failed, file does not exist as specified.
9848    # Try adding .exe or .cmd
9849    if test -f "${new_path}.exe"; then
9850       input_to_shortpath="${new_path}.exe"
9851    elif test -f "${new_path}.cmd"; then
9852       input_to_shortpath="${new_path}.cmd"
9853    else
9854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9855$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9856      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9857$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9858      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9859    fi
9860  else
9861    input_to_shortpath="$new_path"
9862  fi
9863
9864  # Call helper function which possibly converts this using DOS-style short mode.
9865  # If so, the updated path is stored in $new_path.
9866  new_path="$input_to_shortpath"
9867
9868  input_path="$input_to_shortpath"
9869  # Check if we need to convert this using DOS-style short mode. If the path
9870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9871  # take no chances and rewrite it.
9872  # Note: m4 eats our [], so we need to use [ and ] instead.
9873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9874  if test "x$has_forbidden_chars" != x; then
9875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9879      # Going to short mode and back again did indeed matter. Since short mode is
9880      # case insensitive, let's make it lowercase to improve readability.
9881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9882      # Now convert it back to Unix-stile (cygpath)
9883      input_path=`$CYGPATH -u "$shortmode_path"`
9884      new_path="$input_path"
9885    fi
9886  fi
9887
9888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9889  if test "x$test_cygdrive_prefix" = x; then
9890    # As a simple fix, exclude /usr/bin since it's not a real path.
9891    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9893      # a path prefixed by /cygdrive for fixpath to work.
9894      new_path="$CYGWIN_ROOT_PATH$input_path"
9895    fi
9896  fi
9897
9898  # remove trailing .exe if any
9899  new_path="${new_path/%.exe/}"
9900
9901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9902
9903  # First separate the path from the arguments. This will split at the first
9904  # space.
9905  complete="$FOUND_MAKE"
9906  path="${complete%% *}"
9907  tmp="$complete EOL"
9908  arguments="${tmp#* }"
9909
9910  # Input might be given as Windows format, start by converting to
9911  # unix format.
9912  new_path="$path"
9913
9914  windows_path="$new_path"
9915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9916    unix_path=`$CYGPATH -u "$windows_path"`
9917    new_path="$unix_path"
9918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9920    new_path="$unix_path"
9921  fi
9922
9923
9924  # Now try to locate executable using which
9925  new_path=`$WHICH "$new_path" 2> /dev/null`
9926
9927  if test "x$new_path" = x; then
9928    # Oops. Which didn't find the executable.
9929    # The splitting of arguments from the executable at a space might have been incorrect,
9930    # since paths with space are more likely in Windows. Give it another try with the whole
9931    # argument.
9932    path="$complete"
9933    arguments="EOL"
9934    new_path="$path"
9935
9936  windows_path="$new_path"
9937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9938    unix_path=`$CYGPATH -u "$windows_path"`
9939    new_path="$unix_path"
9940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9942    new_path="$unix_path"
9943  fi
9944
9945
9946    new_path=`$WHICH "$new_path" 2> /dev/null`
9947
9948    if test "x$new_path" = x; then
9949      # It's still not found. Now this is an unrecoverable error.
9950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9951$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9952      has_space=`$ECHO "$complete" | $GREP " "`
9953      if test "x$has_space" != x; then
9954        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9955$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9956      fi
9957      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9958    fi
9959  fi
9960
9961  # Now new_path has a complete unix path to the binary
9962  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9963    # Keep paths in /bin as-is, but remove trailing .exe if any
9964    new_path="${new_path/%.exe/}"
9965    # Do not save /bin paths to all_fixpath_prefixes!
9966  else
9967    # Not in mixed or Windows style, start by that.
9968    new_path=`cmd //c echo $new_path`
9969
9970  input_path="$new_path"
9971  # Check if we need to convert this using DOS-style short mode. If the path
9972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9973  # take no chances and rewrite it.
9974  # Note: m4 eats our [], so we need to use [ and ] instead.
9975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9976  if test "x$has_forbidden_chars" != x; then
9977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9978    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9979  fi
9980
9981    # Output is in $new_path
9982
9983  windows_path="$new_path"
9984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9985    unix_path=`$CYGPATH -u "$windows_path"`
9986    new_path="$unix_path"
9987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9989    new_path="$unix_path"
9990  fi
9991
9992    # remove trailing .exe if any
9993    new_path="${new_path/%.exe/}"
9994
9995    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9996    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9997  fi
9998
9999  else
10000    # We're on a posix platform. Hooray! :)
10001    # First separate the path from the arguments. This will split at the first
10002    # space.
10003    complete="$FOUND_MAKE"
10004    path="${complete%% *}"
10005    tmp="$complete EOL"
10006    arguments="${tmp#* }"
10007
10008    # Cannot rely on the command "which" here since it doesn't always work.
10009    is_absolute_path=`$ECHO "$path" | $GREP ^/`
10010    if test -z "$is_absolute_path"; then
10011      # Path to executable is not absolute. Find it.
10012      IFS_save="$IFS"
10013      IFS=:
10014      for p in $PATH; do
10015        if test -f "$p/$path" && test -x "$p/$path"; then
10016          new_path="$p/$path"
10017          break
10018        fi
10019      done
10020      IFS="$IFS_save"
10021    else
10022      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10023$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10024      new_path="$path"
10025    fi
10026
10027    if test "x$new_path" = x; then
10028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10029$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10030        has_space=`$ECHO "$complete" | $GREP " "`
10031        if test "x$has_space" != x; then
10032          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10033$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10034        fi
10035        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10036      fi
10037  fi
10038
10039      # Now join together the path and the arguments once again
10040      if test "x$arguments" != xEOL; then
10041        new_complete="$new_path ${arguments% *}"
10042      else
10043        new_complete="$new_path"
10044      fi
10045
10046  if test "x$complete" != "x$new_complete"; then
10047      FOUND_MAKE="$new_complete"
10048      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10049$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10050    fi
10051
10052        fi
10053      fi
10054    fi
10055  fi
10056
10057        fi
10058        PATH=$OLD_PATH
10059      fi
10060    fi
10061
10062    if test "x$FOUND_MAKE" = x; then
10063      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
10064    fi
10065  fi
10066
10067  MAKE=$FOUND_MAKE
10068
10069  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10070$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10071
10072
10073
10074    # Test if find supports -delete
10075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10076$as_echo_n "checking if find supports -delete... " >&6; }
10077    FIND_DELETE="-delete"
10078
10079    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10080
10081    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10082
10083    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10084    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10085        # No, it does not.
10086        rm $DELETEDIR/TestIfFindSupportsDelete
10087        FIND_DELETE="-exec rm \{\} \+"
10088        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10089$as_echo "no" >&6; }
10090    else
10091        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10092$as_echo "yes" >&6; }
10093    fi
10094    rmdir $DELETEDIR
10095
10096
10097
10098# These tools might not be installed by default,
10099# need hint on how to install them.
10100
10101    for ac_prog in unzip
10102do
10103  # Extract the first word of "$ac_prog", so it can be a program name with args.
10104set dummy $ac_prog; ac_word=$2
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10106$as_echo_n "checking for $ac_word... " >&6; }
10107if test "${ac_cv_path_UNZIP+set}" = set; then :
10108  $as_echo_n "(cached) " >&6
10109else
10110  case $UNZIP in
10111  [\\/]* | ?:[\\/]*)
10112  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10113  ;;
10114  *)
10115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10116for as_dir in $PATH
10117do
10118  IFS=$as_save_IFS
10119  test -z "$as_dir" && as_dir=.
10120    for ac_exec_ext in '' $ac_executable_extensions; do
10121  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10122    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10124    break 2
10125  fi
10126done
10127  done
10128IFS=$as_save_IFS
10129
10130  ;;
10131esac
10132fi
10133UNZIP=$ac_cv_path_UNZIP
10134if test -n "$UNZIP"; then
10135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10136$as_echo "$UNZIP" >&6; }
10137else
10138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139$as_echo "no" >&6; }
10140fi
10141
10142
10143  test -n "$UNZIP" && break
10144done
10145
10146
10147    if test "x$UNZIP" = x; then
10148        if test "xunzip" = x; then
10149          PROG_NAME=unzip
10150        else
10151          PROG_NAME=unzip
10152        fi
10153        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10154$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10155        as_fn_error $? "Cannot continue" "$LINENO" 5
10156    fi
10157
10158
10159
10160    for ac_prog in zip
10161do
10162  # Extract the first word of "$ac_prog", so it can be a program name with args.
10163set dummy $ac_prog; ac_word=$2
10164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10165$as_echo_n "checking for $ac_word... " >&6; }
10166if test "${ac_cv_path_ZIP+set}" = set; then :
10167  $as_echo_n "(cached) " >&6
10168else
10169  case $ZIP in
10170  [\\/]* | ?:[\\/]*)
10171  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10172  ;;
10173  *)
10174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10175for as_dir in $PATH
10176do
10177  IFS=$as_save_IFS
10178  test -z "$as_dir" && as_dir=.
10179    for ac_exec_ext in '' $ac_executable_extensions; do
10180  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10181    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10183    break 2
10184  fi
10185done
10186  done
10187IFS=$as_save_IFS
10188
10189  ;;
10190esac
10191fi
10192ZIP=$ac_cv_path_ZIP
10193if test -n "$ZIP"; then
10194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10195$as_echo "$ZIP" >&6; }
10196else
10197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10198$as_echo "no" >&6; }
10199fi
10200
10201
10202  test -n "$ZIP" && break
10203done
10204
10205
10206    if test "x$ZIP" = x; then
10207        if test "xzip" = x; then
10208          PROG_NAME=zip
10209        else
10210          PROG_NAME=zip
10211        fi
10212        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10213$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10214        as_fn_error $? "Cannot continue" "$LINENO" 5
10215    fi
10216
10217
10218
10219# Non-required basic tools
10220
10221# Extract the first word of "ldd", so it can be a program name with args.
10222set dummy ldd; ac_word=$2
10223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10224$as_echo_n "checking for $ac_word... " >&6; }
10225if test "${ac_cv_path_LDD+set}" = set; then :
10226  $as_echo_n "(cached) " >&6
10227else
10228  case $LDD in
10229  [\\/]* | ?:[\\/]*)
10230  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10231  ;;
10232  *)
10233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10234for as_dir in $PATH
10235do
10236  IFS=$as_save_IFS
10237  test -z "$as_dir" && as_dir=.
10238    for ac_exec_ext in '' $ac_executable_extensions; do
10239  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10240    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10242    break 2
10243  fi
10244done
10245  done
10246IFS=$as_save_IFS
10247
10248  ;;
10249esac
10250fi
10251LDD=$ac_cv_path_LDD
10252if test -n "$LDD"; then
10253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10254$as_echo "$LDD" >&6; }
10255else
10256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10257$as_echo "no" >&6; }
10258fi
10259
10260
10261if test "x$LDD" = "x"; then
10262    # List shared lib dependencies is used for
10263    # debug output and checking for forbidden dependencies.
10264    # We can build without it.
10265    LDD="true"
10266fi
10267# Extract the first word of "otool", so it can be a program name with args.
10268set dummy otool; ac_word=$2
10269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10270$as_echo_n "checking for $ac_word... " >&6; }
10271if test "${ac_cv_path_OTOOL+set}" = set; then :
10272  $as_echo_n "(cached) " >&6
10273else
10274  case $OTOOL in
10275  [\\/]* | ?:[\\/]*)
10276  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10277  ;;
10278  *)
10279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10280for as_dir in $PATH
10281do
10282  IFS=$as_save_IFS
10283  test -z "$as_dir" && as_dir=.
10284    for ac_exec_ext in '' $ac_executable_extensions; do
10285  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10286    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10288    break 2
10289  fi
10290done
10291  done
10292IFS=$as_save_IFS
10293
10294  ;;
10295esac
10296fi
10297OTOOL=$ac_cv_path_OTOOL
10298if test -n "$OTOOL"; then
10299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10300$as_echo "$OTOOL" >&6; }
10301else
10302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10303$as_echo "no" >&6; }
10304fi
10305
10306
10307if test "x$OTOOL" = "x"; then
10308   OTOOL="true"
10309fi
10310for ac_prog in readelf greadelf
10311do
10312  # Extract the first word of "$ac_prog", so it can be a program name with args.
10313set dummy $ac_prog; ac_word=$2
10314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10315$as_echo_n "checking for $ac_word... " >&6; }
10316if test "${ac_cv_path_READELF+set}" = set; then :
10317  $as_echo_n "(cached) " >&6
10318else
10319  case $READELF in
10320  [\\/]* | ?:[\\/]*)
10321  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10322  ;;
10323  *)
10324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10325for as_dir in $PATH
10326do
10327  IFS=$as_save_IFS
10328  test -z "$as_dir" && as_dir=.
10329    for ac_exec_ext in '' $ac_executable_extensions; do
10330  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10331    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10333    break 2
10334  fi
10335done
10336  done
10337IFS=$as_save_IFS
10338
10339  ;;
10340esac
10341fi
10342READELF=$ac_cv_path_READELF
10343if test -n "$READELF"; then
10344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10345$as_echo "$READELF" >&6; }
10346else
10347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10348$as_echo "no" >&6; }
10349fi
10350
10351
10352  test -n "$READELF" && break
10353done
10354
10355# Extract the first word of "hg", so it can be a program name with args.
10356set dummy hg; ac_word=$2
10357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10358$as_echo_n "checking for $ac_word... " >&6; }
10359if test "${ac_cv_path_HG+set}" = set; then :
10360  $as_echo_n "(cached) " >&6
10361else
10362  case $HG in
10363  [\\/]* | ?:[\\/]*)
10364  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10365  ;;
10366  *)
10367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10368for as_dir in $PATH
10369do
10370  IFS=$as_save_IFS
10371  test -z "$as_dir" && as_dir=.
10372    for ac_exec_ext in '' $ac_executable_extensions; do
10373  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10374    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10376    break 2
10377  fi
10378done
10379  done
10380IFS=$as_save_IFS
10381
10382  ;;
10383esac
10384fi
10385HG=$ac_cv_path_HG
10386if test -n "$HG"; then
10387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10388$as_echo "$HG" >&6; }
10389else
10390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10391$as_echo "no" >&6; }
10392fi
10393
10394
10395# Extract the first word of "stat", so it can be a program name with args.
10396set dummy stat; ac_word=$2
10397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10398$as_echo_n "checking for $ac_word... " >&6; }
10399if test "${ac_cv_path_STAT+set}" = set; then :
10400  $as_echo_n "(cached) " >&6
10401else
10402  case $STAT in
10403  [\\/]* | ?:[\\/]*)
10404  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10405  ;;
10406  *)
10407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10408for as_dir in $PATH
10409do
10410  IFS=$as_save_IFS
10411  test -z "$as_dir" && as_dir=.
10412    for ac_exec_ext in '' $ac_executable_extensions; do
10413  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10414    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10416    break 2
10417  fi
10418done
10419  done
10420IFS=$as_save_IFS
10421
10422  ;;
10423esac
10424fi
10425STAT=$ac_cv_path_STAT
10426if test -n "$STAT"; then
10427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10428$as_echo "$STAT" >&6; }
10429else
10430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10431$as_echo "no" >&6; }
10432fi
10433
10434
10435# Extract the first word of "time", so it can be a program name with args.
10436set dummy time; ac_word=$2
10437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10438$as_echo_n "checking for $ac_word... " >&6; }
10439if test "${ac_cv_path_TIME+set}" = set; then :
10440  $as_echo_n "(cached) " >&6
10441else
10442  case $TIME in
10443  [\\/]* | ?:[\\/]*)
10444  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10445  ;;
10446  *)
10447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10448for as_dir in $PATH
10449do
10450  IFS=$as_save_IFS
10451  test -z "$as_dir" && as_dir=.
10452    for ac_exec_ext in '' $ac_executable_extensions; do
10453  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10454    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10456    break 2
10457  fi
10458done
10459  done
10460IFS=$as_save_IFS
10461
10462  ;;
10463esac
10464fi
10465TIME=$ac_cv_path_TIME
10466if test -n "$TIME"; then
10467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10468$as_echo "$TIME" >&6; }
10469else
10470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10471$as_echo "no" >&6; }
10472fi
10473
10474
10475
10476if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10477
10478    for ac_prog in comm
10479do
10480  # Extract the first word of "$ac_prog", so it can be a program name with args.
10481set dummy $ac_prog; ac_word=$2
10482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10483$as_echo_n "checking for $ac_word... " >&6; }
10484if test "${ac_cv_path_COMM+set}" = set; then :
10485  $as_echo_n "(cached) " >&6
10486else
10487  case $COMM in
10488  [\\/]* | ?:[\\/]*)
10489  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10490  ;;
10491  *)
10492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10493for as_dir in $PATH
10494do
10495  IFS=$as_save_IFS
10496  test -z "$as_dir" && as_dir=.
10497    for ac_exec_ext in '' $ac_executable_extensions; do
10498  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10499    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10501    break 2
10502  fi
10503done
10504  done
10505IFS=$as_save_IFS
10506
10507  ;;
10508esac
10509fi
10510COMM=$ac_cv_path_COMM
10511if test -n "$COMM"; then
10512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10513$as_echo "$COMM" >&6; }
10514else
10515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10516$as_echo "no" >&6; }
10517fi
10518
10519
10520  test -n "$COMM" && break
10521done
10522
10523
10524    if test "x$COMM" = x; then
10525        if test "xcomm" = x; then
10526          PROG_NAME=comm
10527        else
10528          PROG_NAME=comm
10529        fi
10530        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10531$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10532        as_fn_error $? "Cannot continue" "$LINENO" 5
10533    fi
10534
10535
10536fi
10537
10538if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10539
10540    for ac_prog in xattr
10541do
10542  # Extract the first word of "$ac_prog", so it can be a program name with args.
10543set dummy $ac_prog; ac_word=$2
10544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10545$as_echo_n "checking for $ac_word... " >&6; }
10546if test "${ac_cv_path_XATTR+set}" = set; then :
10547  $as_echo_n "(cached) " >&6
10548else
10549  case $XATTR in
10550  [\\/]* | ?:[\\/]*)
10551  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10552  ;;
10553  *)
10554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10555for as_dir in $PATH
10556do
10557  IFS=$as_save_IFS
10558  test -z "$as_dir" && as_dir=.
10559    for ac_exec_ext in '' $ac_executable_extensions; do
10560  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10561    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10563    break 2
10564  fi
10565done
10566  done
10567IFS=$as_save_IFS
10568
10569  ;;
10570esac
10571fi
10572XATTR=$ac_cv_path_XATTR
10573if test -n "$XATTR"; then
10574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10575$as_echo "$XATTR" >&6; }
10576else
10577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10578$as_echo "no" >&6; }
10579fi
10580
10581
10582  test -n "$XATTR" && break
10583done
10584
10585
10586    if test "x$XATTR" = x; then
10587        if test "xxattr" = x; then
10588          PROG_NAME=xattr
10589        else
10590          PROG_NAME=xattr
10591        fi
10592        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10593$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10594        as_fn_error $? "Cannot continue" "$LINENO" 5
10595    fi
10596
10597
10598  # Extract the first word of "codesign", so it can be a program name with args.
10599set dummy codesign; ac_word=$2
10600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10601$as_echo_n "checking for $ac_word... " >&6; }
10602if test "${ac_cv_path_CODESIGN+set}" = set; then :
10603  $as_echo_n "(cached) " >&6
10604else
10605  case $CODESIGN in
10606  [\\/]* | ?:[\\/]*)
10607  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10608  ;;
10609  *)
10610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10611for as_dir in $PATH
10612do
10613  IFS=$as_save_IFS
10614  test -z "$as_dir" && as_dir=.
10615    for ac_exec_ext in '' $ac_executable_extensions; do
10616  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10617    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10619    break 2
10620  fi
10621done
10622  done
10623IFS=$as_save_IFS
10624
10625  ;;
10626esac
10627fi
10628CODESIGN=$ac_cv_path_CODESIGN
10629if test -n "$CODESIGN"; then
10630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10631$as_echo "$CODESIGN" >&6; }
10632else
10633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10634$as_echo "no" >&6; }
10635fi
10636
10637
10638  if test "x$CODESIGN" != "x"; then
10639    # Verify that the openjdk_codesign certificate is present
10640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10641$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10642    rm -f codesign-testfile
10643    touch codesign-testfile
10644    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10645    rm -f codesign-testfile
10646    if test "x$CODESIGN" = x; then
10647      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10648$as_echo "no" >&6; }
10649    else
10650      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10651$as_echo "yes" >&6; }
10652    fi
10653  fi
10654fi
10655
10656
10657# Check if pkg-config is available.
10658
10659
10660if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10661	if test -n "$ac_tool_prefix"; then
10662  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10663set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10665$as_echo_n "checking for $ac_word... " >&6; }
10666if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10667  $as_echo_n "(cached) " >&6
10668else
10669  case $PKG_CONFIG in
10670  [\\/]* | ?:[\\/]*)
10671  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10672  ;;
10673  *)
10674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10675for as_dir in $PATH
10676do
10677  IFS=$as_save_IFS
10678  test -z "$as_dir" && as_dir=.
10679    for ac_exec_ext in '' $ac_executable_extensions; do
10680  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10681    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10683    break 2
10684  fi
10685done
10686  done
10687IFS=$as_save_IFS
10688
10689  ;;
10690esac
10691fi
10692PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10693if test -n "$PKG_CONFIG"; then
10694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10695$as_echo "$PKG_CONFIG" >&6; }
10696else
10697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10698$as_echo "no" >&6; }
10699fi
10700
10701
10702fi
10703if test -z "$ac_cv_path_PKG_CONFIG"; then
10704  ac_pt_PKG_CONFIG=$PKG_CONFIG
10705  # Extract the first word of "pkg-config", so it can be a program name with args.
10706set dummy pkg-config; ac_word=$2
10707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10708$as_echo_n "checking for $ac_word... " >&6; }
10709if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10710  $as_echo_n "(cached) " >&6
10711else
10712  case $ac_pt_PKG_CONFIG in
10713  [\\/]* | ?:[\\/]*)
10714  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10715  ;;
10716  *)
10717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10718for as_dir in $PATH
10719do
10720  IFS=$as_save_IFS
10721  test -z "$as_dir" && as_dir=.
10722    for ac_exec_ext in '' $ac_executable_extensions; do
10723  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10724    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10726    break 2
10727  fi
10728done
10729  done
10730IFS=$as_save_IFS
10731
10732  ;;
10733esac
10734fi
10735ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10736if test -n "$ac_pt_PKG_CONFIG"; then
10737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10738$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10739else
10740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10741$as_echo "no" >&6; }
10742fi
10743
10744  if test "x$ac_pt_PKG_CONFIG" = x; then
10745    PKG_CONFIG=""
10746  else
10747    case $cross_compiling:$ac_tool_warned in
10748yes:)
10749{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10750$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10751ac_tool_warned=yes ;;
10752esac
10753    PKG_CONFIG=$ac_pt_PKG_CONFIG
10754  fi
10755else
10756  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10757fi
10758
10759fi
10760if test -n "$PKG_CONFIG"; then
10761	_pkg_min_version=0.9.0
10762	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10763$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10764	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10765		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10766$as_echo "yes" >&6; }
10767	else
10768		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10769$as_echo "no" >&6; }
10770		PKG_CONFIG=""
10771	fi
10772
10773fi
10774
10775# After basic tools have been setup, we can check build os specific details.
10776
10777###############################################################################
10778
10779# Note that this is the build platform OS version!
10780
10781OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10782OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10783OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10784OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10785
10786
10787
10788
10789
10790# Setup builddeps, for automatic downloading of tools we need.
10791# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10792# boot-jdk setup, but we need to have basic tools setup first.
10793
10794
10795# Check whether --with-builddeps-conf was given.
10796if test "${with_builddeps_conf+set}" = set; then :
10797  withval=$with_builddeps_conf;
10798fi
10799
10800
10801
10802# Check whether --with-builddeps-server was given.
10803if test "${with_builddeps_server+set}" = set; then :
10804  withval=$with_builddeps_server;
10805fi
10806
10807
10808
10809# Check whether --with-builddeps-dir was given.
10810if test "${with_builddeps_dir+set}" = set; then :
10811  withval=$with_builddeps_dir;
10812else
10813  with_builddeps_dir=/localhome/builddeps
10814fi
10815
10816
10817
10818# Check whether --with-builddeps-group was given.
10819if test "${with_builddeps_group+set}" = set; then :
10820  withval=$with_builddeps_group;
10821fi
10822
10823
10824
10825
10826    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10827        if test "x$with_builddeps_conf" != x; then
10828            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10829$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10830            builddepsfile=$with_builddeps_conf
10831            if test -s $builddepsfile; then
10832                . $builddepsfile
10833                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10834$as_echo "loaded!" >&6; }
10835            else
10836               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10837           fi
10838        else
10839            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10840$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10841            builddepsfile=`mktemp`
10842            touch $builddepsfile
10843            # Put all found confs into a single file.
10844            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10845            # Source the file to acquire the variables
10846            if test -s $builddepsfile; then
10847                . $builddepsfile
10848                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10849$as_echo "found at least one!" >&6; }
10850            else
10851               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10852           fi
10853        fi
10854        # Create build and target names that use _ instead of "-" and ".".
10855        # This is necessary to use them in variable names.
10856        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10857        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10858        # Extract rewrite information for build and target
10859        eval rewritten_build=\${REWRITE_${build_var}}
10860        if test "x$rewritten_build" = x; then
10861            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10862            echo Build stays the same $rewritten_build
10863        else
10864            echo Rewriting build for builddeps into $rewritten_build
10865        fi
10866        eval rewritten_target=\${REWRITE_${target_var}}
10867        if test "x$rewritten_target" = x; then
10868            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10869            echo Target stays the same $rewritten_target
10870        else
10871            echo Rewriting target for builddeps into $rewritten_target
10872        fi
10873        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10874        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10875    fi
10876    for ac_prog in 7z unzip
10877do
10878  # Extract the first word of "$ac_prog", so it can be a program name with args.
10879set dummy $ac_prog; ac_word=$2
10880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10881$as_echo_n "checking for $ac_word... " >&6; }
10882if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10883  $as_echo_n "(cached) " >&6
10884else
10885  if test -n "$BDEPS_UNZIP"; then
10886  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10887else
10888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10889for as_dir in $PATH
10890do
10891  IFS=$as_save_IFS
10892  test -z "$as_dir" && as_dir=.
10893    for ac_exec_ext in '' $ac_executable_extensions; do
10894  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10895    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10897    break 2
10898  fi
10899done
10900  done
10901IFS=$as_save_IFS
10902
10903fi
10904fi
10905BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10906if test -n "$BDEPS_UNZIP"; then
10907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10908$as_echo "$BDEPS_UNZIP" >&6; }
10909else
10910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10911$as_echo "no" >&6; }
10912fi
10913
10914
10915  test -n "$BDEPS_UNZIP" && break
10916done
10917
10918    if test "x$BDEPS_UNZIP" = x7z; then
10919        BDEPS_UNZIP="7z x"
10920    fi
10921
10922    for ac_prog in wget lftp ftp
10923do
10924  # Extract the first word of "$ac_prog", so it can be a program name with args.
10925set dummy $ac_prog; ac_word=$2
10926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10927$as_echo_n "checking for $ac_word... " >&6; }
10928if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10929  $as_echo_n "(cached) " >&6
10930else
10931  if test -n "$BDEPS_FTP"; then
10932  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10933else
10934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10935for as_dir in $PATH
10936do
10937  IFS=$as_save_IFS
10938  test -z "$as_dir" && as_dir=.
10939    for ac_exec_ext in '' $ac_executable_extensions; do
10940  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10941    ac_cv_prog_BDEPS_FTP="$ac_prog"
10942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10943    break 2
10944  fi
10945done
10946  done
10947IFS=$as_save_IFS
10948
10949fi
10950fi
10951BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10952if test -n "$BDEPS_FTP"; then
10953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10954$as_echo "$BDEPS_FTP" >&6; }
10955else
10956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10957$as_echo "no" >&6; }
10958fi
10959
10960
10961  test -n "$BDEPS_FTP" && break
10962done
10963
10964
10965
10966###############################################################################
10967#
10968# Determine OpenJDK variants, options and version numbers.
10969#
10970###############################################################################
10971
10972# We need build & target for this.
10973
10974
10975###############################################################################
10976#
10977# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10978# We always build headless support.
10979#
10980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10981$as_echo_n "checking headful support... " >&6; }
10982# Check whether --enable-headful was given.
10983if test "${enable_headful+set}" = set; then :
10984  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10985else
10986  SUPPORT_HEADFUL=yes
10987fi
10988
10989
10990SUPPORT_HEADLESS=yes
10991BUILD_HEADLESS="BUILD_HEADLESS:=true"
10992
10993if test "x$SUPPORT_HEADFUL" = xyes; then
10994    # We are building both headful and headless.
10995    headful_msg="inlude support for both headful and headless"
10996fi
10997
10998if test "x$SUPPORT_HEADFUL" = xno; then
10999    # Thus we are building headless only.
11000    BUILD_HEADLESS="BUILD_HEADLESS:=true"
11001    headful_msg="headless only"
11002fi
11003
11004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11005$as_echo "$headful_msg" >&6; }
11006
11007
11008
11009
11010
11011# Control wether Hotspot runs Queens test after build.
11012# Check whether --enable-hotspot-test-in-build was given.
11013if test "${enable_hotspot_test_in_build+set}" = set; then :
11014  enableval=$enable_hotspot_test_in_build;
11015else
11016  enable_hotspot_test_in_build=no
11017fi
11018
11019if test "x$enable_hotspot_test_in_build" = "xyes"; then
11020    TEST_IN_BUILD=true
11021else
11022    TEST_IN_BUILD=false
11023fi
11024
11025
11026###############################################################################
11027#
11028# Choose cacerts source file
11029#
11030
11031# Check whether --with-cacerts-file was given.
11032if test "${with_cacerts_file+set}" = set; then :
11033  withval=$with_cacerts_file;
11034fi
11035
11036if test "x$with_cacerts_file" != x; then
11037    CACERTS_FILE=$with_cacerts_file
11038else
11039    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11040fi
11041
11042
11043###############################################################################
11044#
11045# Enable or disable unlimited crypto
11046#
11047# Check whether --enable-unlimited-crypto was given.
11048if test "${enable_unlimited_crypto+set}" = set; then :
11049  enableval=$enable_unlimited_crypto;
11050else
11051  enable_unlimited_crypto=no
11052fi
11053
11054if test "x$enable_unlimited_crypto" = "xyes"; then
11055    UNLIMITED_CRYPTO=true
11056else
11057    UNLIMITED_CRYPTO=false
11058fi
11059
11060
11061###############################################################################
11062#
11063# Enable or disable the elliptic curve crypto implementation
11064#
11065
11066
11067###############################################################################
11068#
11069# Compress jars
11070#
11071COMPRESS_JARS=false
11072
11073
11074
11075
11076# Source the version numbers
11077. $AUTOCONF_DIR/version-numbers
11078
11079# Get the settings from parameters
11080
11081# Check whether --with-milestone was given.
11082if test "${with_milestone+set}" = set; then :
11083  withval=$with_milestone;
11084fi
11085
11086if test "x$with_milestone" = xyes; then
11087  as_fn_error $? "Milestone must have a value" "$LINENO" 5
11088elif test "x$with_milestone" != x; then
11089    MILESTONE="$with_milestone"
11090fi
11091if test "x$MILESTONE" = x; then
11092  MILESTONE=internal
11093fi
11094
11095
11096# Check whether --with-update-version was given.
11097if test "${with_update_version+set}" = set; then :
11098  withval=$with_update_version;
11099fi
11100
11101if test "x$with_update_version" = xyes; then
11102  as_fn_error $? "Update version must have a value" "$LINENO" 5
11103elif test "x$with_update_version" != x; then
11104  JDK_UPDATE_VERSION="$with_update_version"
11105fi
11106
11107
11108# Check whether --with-build-number was given.
11109if test "${with_build_number+set}" = set; then :
11110  withval=$with_build_number;
11111fi
11112
11113if test "x$with_build_number" = xyes; then
11114  as_fn_error $? "Build number must have a value" "$LINENO" 5
11115elif test "x$with_build_number" != x; then
11116  JDK_BUILD_NUMBER="$with_build_number"
11117fi
11118if test "x$JDK_BUILD_NUMBER" = x; then
11119  JDK_BUILD_NUMBER=b00
11120fi
11121
11122
11123# Check whether --with-user-release-suffix was given.
11124if test "${with_user_release_suffix+set}" = set; then :
11125  withval=$with_user_release_suffix;
11126fi
11127
11128if test "x$with_user_release_suffix" = xyes; then
11129  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11130elif test "x$with_user_release_suffix" != x; then
11131  USER_RELEASE_SUFFIX="$with_user_release_suffix"
11132else
11133  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11134  # Avoid [:alnum:] since it depends on the locale.
11135  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
11136  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11137fi
11138
11139
11140# Now set the JDK version, milestone, build number etc.
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155COPYRIGHT_YEAR=`date +'%Y'`
11156
11157
11158if test "x$JDK_UPDATE_VERSION" != x; then
11159  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11160else
11161  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11162fi
11163
11164
11165COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11166
11167
11168
11169###############################################################################
11170#
11171# Setup BootJDK, used to bootstrap the build.
11172#
11173###############################################################################
11174
11175
11176BOOT_JDK_FOUND=no
11177
11178# Check whether --with-boot-jdk was given.
11179if test "${with_boot_jdk+set}" = set; then :
11180  withval=$with_boot_jdk;
11181fi
11182
11183
11184# We look for the Boot JDK through various means, going from more certain to
11185# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11186# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11187# must check if this is indeed valid; otherwise we'll continue looking.
11188
11189# Test: Is bootjdk explicitely set by command line arguments?
11190
11191  if test "x$BOOT_JDK_FOUND" = xno; then
11192    # Now execute the test
11193
11194if test "x$with_boot_jdk" != x; then
11195    BOOT_JDK=$with_boot_jdk
11196    BOOT_JDK_FOUND=maybe
11197    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11198$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11199fi
11200
11201
11202    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11203    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11204      # Do we have a bin/java?
11205      if test ! -x "$BOOT_JDK/bin/java"; then
11206        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11208        BOOT_JDK_FOUND=no
11209      else
11210        # Do we have a bin/javac?
11211        if test ! -x "$BOOT_JDK/bin/javac"; then
11212          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11213$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11214          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11215$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11216          BOOT_JDK_FOUND=no
11217        else
11218          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11219          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11220            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11221$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11222            BOOT_JDK_FOUND=no
11223          else
11224            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11225            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11226
11227            # Extra M4 quote needed to protect [] in grep expression.
11228            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11229            if test "x$FOUND_VERSION_78" = x; then
11230              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11232              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11233$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11234              BOOT_JDK_FOUND=no
11235            else
11236              # We're done! :-)
11237              BOOT_JDK_FOUND=yes
11238
11239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11240
11241  # Input might be given as Windows format, start by converting to
11242  # unix format.
11243  path="$BOOT_JDK"
11244  new_path=`$CYGPATH -u "$path"`
11245
11246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11249  # "foo.exe" is OK but "foo" is an error.
11250  #
11251  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11252  # It is also a way to make sure we got the proper file name for the real test later on.
11253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11254  if test "x$test_shortpath" = x; then
11255    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11256$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11257    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11258  fi
11259
11260  # Call helper function which possibly converts this using DOS-style short mode.
11261  # If so, the updated path is stored in $new_path.
11262
11263  input_path="$new_path"
11264  # Check if we need to convert this using DOS-style short mode. If the path
11265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11266  # take no chances and rewrite it.
11267  # Note: m4 eats our [], so we need to use [ and ] instead.
11268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11269  if test "x$has_forbidden_chars" != x; then
11270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11274      # Going to short mode and back again did indeed matter. Since short mode is
11275      # case insensitive, let's make it lowercase to improve readability.
11276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11277      # Now convert it back to Unix-stile (cygpath)
11278      input_path=`$CYGPATH -u "$shortmode_path"`
11279      new_path="$input_path"
11280    fi
11281  fi
11282
11283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11284  if test "x$test_cygdrive_prefix" = x; then
11285    # As a simple fix, exclude /usr/bin since it's not a real path.
11286    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11288      # a path prefixed by /cygdrive for fixpath to work.
11289      new_path="$CYGWIN_ROOT_PATH$input_path"
11290    fi
11291  fi
11292
11293
11294  if test "x$path" != "x$new_path"; then
11295    BOOT_JDK="$new_path"
11296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11297$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11298  fi
11299
11300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11301
11302  path="$BOOT_JDK"
11303  has_colon=`$ECHO $path | $GREP ^.:`
11304  new_path="$path"
11305  if test "x$has_colon" = x; then
11306    # Not in mixed or Windows style, start by that.
11307    new_path=`cmd //c echo $path`
11308  fi
11309
11310
11311  input_path="$new_path"
11312  # Check if we need to convert this using DOS-style short mode. If the path
11313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11314  # take no chances and rewrite it.
11315  # Note: m4 eats our [], so we need to use [ and ] instead.
11316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11317  if test "x$has_forbidden_chars" != x; then
11318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11319    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11320  fi
11321
11322
11323  windows_path="$new_path"
11324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11325    unix_path=`$CYGPATH -u "$windows_path"`
11326    new_path="$unix_path"
11327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11329    new_path="$unix_path"
11330  fi
11331
11332  if test "x$path" != "x$new_path"; then
11333    BOOT_JDK="$new_path"
11334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11335$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11336  fi
11337
11338  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11339  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11340
11341  else
11342    # We're on a posix platform. Hooray! :)
11343    path="$BOOT_JDK"
11344    has_space=`$ECHO "$path" | $GREP " "`
11345    if test "x$has_space" != x; then
11346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11347$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11348      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11349    fi
11350
11351    # Use eval to expand a potential ~
11352    eval path="$path"
11353    if test ! -f "$path" && test ! -d "$path"; then
11354      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11355    fi
11356
11357    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11358  fi
11359
11360              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11361$as_echo_n "checking for Boot JDK... " >&6; }
11362              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11363$as_echo "$BOOT_JDK" >&6; }
11364              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11365$as_echo_n "checking Boot JDK version... " >&6; }
11366              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11367              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11368$as_echo "$BOOT_JDK_VERSION" >&6; }
11369            fi # end check jdk version
11370          fi # end check rt.jar
11371        fi # end check javac
11372      fi # end check java
11373    fi # end check boot jdk found
11374  fi
11375
11376if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11377  # Having specified an argument which is incorrect will produce an instant failure;
11378  # we should not go on looking
11379  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11380fi
11381
11382# Test: Is bootjdk available from builddeps?
11383
11384  if test "x$BOOT_JDK_FOUND" = xno; then
11385    # Now execute the test
11386
11387
11388
11389    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11390        # Source the builddeps file again, to make sure it uses the latest variables!
11391        . $builddepsfile
11392        # Look for a target and build machine specific resource!
11393        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11394        if test "x$resource" = x; then
11395            # Ok, lets instead look for a target specific resource
11396            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11397        fi
11398        if test "x$resource" = x; then
11399            # Ok, lets instead look for a build specific resource
11400            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11401        fi
11402        if test "x$resource" = x; then
11403            # Ok, lets instead look for a generic resource
11404            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11405            resource=${builddep_bootjdk}
11406        fi
11407        if test "x$resource" != x; then
11408            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11409$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11410	    # If the resource in the builddeps.conf file is an existing directory,
11411	    # for example /java/linux/cups
11412	    if test -d ${resource}; then
11413	       depdir=${resource}
11414	    else
11415
11416# bootjdk is for example mymodule
11417# $resource is for example libs/general/libmymod_1_2_3.zip
11418# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11419# $with_builddeps_dir is for example /localhome/builddeps
11420# depdir is the name of the variable into which we store the depdir, eg MYMOD
11421# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11422# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11423    filename=`basename $resource`
11424    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11425    filebase=${filename%%.*}
11426    extension=${filename#*.}
11427    installdir=$with_builddeps_dir/$filebase
11428    if test ! -f $installdir/$filename.unpacked; then
11429        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11430$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11431        if test ! -d $installdir; then
11432            mkdir -p $installdir
11433        fi
11434        if test ! -d $installdir; then
11435            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11436        fi
11437        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11438        touch $tmpfile
11439        if test ! -f $tmpfile; then
11440            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11441        fi
11442
11443    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11444    # $tmpfile is the local file name for the downloaded file.
11445    VALID_TOOL=no
11446    if test "x$BDEPS_FTP" = xwget; then
11447       VALID_TOOL=yes
11448       wget -O $tmpfile $with_builddeps_server/$resource
11449    fi
11450    if test "x$BDEPS_FTP" = xlftp; then
11451       VALID_TOOL=yes
11452       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11453    fi
11454    if test "x$BDEPS_FTP" = xftp; then
11455        VALID_TOOL=yes
11456        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11457        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11458        FTPUSERPWD=${FTPSERVER%%@*}
11459        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11460            FTPUSER=${userpwd%%:*}
11461            FTPPWD=${userpwd#*@}
11462            FTPSERVER=${FTPSERVER#*@}
11463        else
11464            FTPUSER=ftp
11465            FTPPWD=ftp
11466        fi
11467        # the "pass" command does not work on some
11468        # ftp clients (read ftp.exe) but if it works,
11469        # passive mode is better!
11470        (\
11471            echo "user $FTPUSER $FTPPWD"        ;\
11472            echo "pass"                         ;\
11473            echo "bin"                          ;\
11474            echo "get $FTPPATH $tmpfile"              ;\
11475        ) | ftp -in $FTPSERVER
11476    fi
11477    if test "x$VALID_TOOL" != xyes; then
11478       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11479    fi
11480
11481        mv $tmpfile $installdir/$filename
11482        if test ! -s $installdir/$filename; then
11483            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11484        fi
11485        case "$extension" in
11486            zip)  echo "Unzipping $installdir/$filename..."
11487               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11488            ;;
11489            tar.gz) echo "Untaring $installdir/$filename..."
11490               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11491            ;;
11492            tgz) echo "Untaring $installdir/$filename..."
11493               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11494            ;;
11495            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11496            ;;
11497        esac
11498    fi
11499    if test -f $installdir/$filename.unpacked; then
11500        depdir=$installdir
11501    fi
11502
11503	    fi
11504            # Source the builddeps file again, because in the previous command, the depdir
11505            # was updated to point at the current build dependency install directory.
11506            . $builddepsfile
11507            # Now extract variables from the builddeps.conf files.
11508            theroot=${builddep_bootjdk_ROOT}
11509            thecflags=${builddep_bootjdk_CFLAGS}
11510            thelibs=${builddep_bootjdk_LIBS}
11511            if test "x$depdir" = x; then
11512                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11513            fi
11514            BOOT_JDK=$depdir
11515            if test "x$theroot" != x; then
11516               BOOT_JDK="$theroot"
11517            fi
11518            if test "x$thecflags" != x; then
11519               BOOT_JDK_CFLAGS="$thecflags"
11520            fi
11521            if test "x$thelibs" != x; then
11522               BOOT_JDK_LIBS="$thelibs"
11523            fi
11524            BOOT_JDK_FOUND=maybe
11525            else BOOT_JDK_FOUND=no
11526
11527        fi
11528        else BOOT_JDK_FOUND=no
11529
11530    fi
11531
11532
11533
11534    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11535    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11536      # Do we have a bin/java?
11537      if test ! -x "$BOOT_JDK/bin/java"; then
11538        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11540        BOOT_JDK_FOUND=no
11541      else
11542        # Do we have a bin/javac?
11543        if test ! -x "$BOOT_JDK/bin/javac"; then
11544          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11545$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11546          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11547$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11548          BOOT_JDK_FOUND=no
11549        else
11550          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11551          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11552            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11553$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11554            BOOT_JDK_FOUND=no
11555          else
11556            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11557            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11558
11559            # Extra M4 quote needed to protect [] in grep expression.
11560            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11561            if test "x$FOUND_VERSION_78" = x; then
11562              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11564              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11565$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11566              BOOT_JDK_FOUND=no
11567            else
11568              # We're done! :-)
11569              BOOT_JDK_FOUND=yes
11570
11571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11572
11573  # Input might be given as Windows format, start by converting to
11574  # unix format.
11575  path="$BOOT_JDK"
11576  new_path=`$CYGPATH -u "$path"`
11577
11578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11581  # "foo.exe" is OK but "foo" is an error.
11582  #
11583  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11584  # It is also a way to make sure we got the proper file name for the real test later on.
11585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11586  if test "x$test_shortpath" = x; then
11587    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11588$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11589    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11590  fi
11591
11592  # Call helper function which possibly converts this using DOS-style short mode.
11593  # If so, the updated path is stored in $new_path.
11594
11595  input_path="$new_path"
11596  # Check if we need to convert this using DOS-style short mode. If the path
11597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11598  # take no chances and rewrite it.
11599  # Note: m4 eats our [], so we need to use [ and ] instead.
11600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11601  if test "x$has_forbidden_chars" != x; then
11602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11603    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11604    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11605    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11606      # Going to short mode and back again did indeed matter. Since short mode is
11607      # case insensitive, let's make it lowercase to improve readability.
11608      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11609      # Now convert it back to Unix-stile (cygpath)
11610      input_path=`$CYGPATH -u "$shortmode_path"`
11611      new_path="$input_path"
11612    fi
11613  fi
11614
11615  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11616  if test "x$test_cygdrive_prefix" = x; then
11617    # As a simple fix, exclude /usr/bin since it's not a real path.
11618    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11619      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11620      # a path prefixed by /cygdrive for fixpath to work.
11621      new_path="$CYGWIN_ROOT_PATH$input_path"
11622    fi
11623  fi
11624
11625
11626  if test "x$path" != "x$new_path"; then
11627    BOOT_JDK="$new_path"
11628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11629$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11630  fi
11631
11632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11633
11634  path="$BOOT_JDK"
11635  has_colon=`$ECHO $path | $GREP ^.:`
11636  new_path="$path"
11637  if test "x$has_colon" = x; then
11638    # Not in mixed or Windows style, start by that.
11639    new_path=`cmd //c echo $path`
11640  fi
11641
11642
11643  input_path="$new_path"
11644  # Check if we need to convert this using DOS-style short mode. If the path
11645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11646  # take no chances and rewrite it.
11647  # Note: m4 eats our [], so we need to use [ and ] instead.
11648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11649  if test "x$has_forbidden_chars" != x; then
11650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11651    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11652  fi
11653
11654
11655  windows_path="$new_path"
11656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11657    unix_path=`$CYGPATH -u "$windows_path"`
11658    new_path="$unix_path"
11659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11661    new_path="$unix_path"
11662  fi
11663
11664  if test "x$path" != "x$new_path"; then
11665    BOOT_JDK="$new_path"
11666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11667$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11668  fi
11669
11670  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11671  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11672
11673  else
11674    # We're on a posix platform. Hooray! :)
11675    path="$BOOT_JDK"
11676    has_space=`$ECHO "$path" | $GREP " "`
11677    if test "x$has_space" != x; then
11678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11679$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11680      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11681    fi
11682
11683    # Use eval to expand a potential ~
11684    eval path="$path"
11685    if test ! -f "$path" && test ! -d "$path"; then
11686      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11687    fi
11688
11689    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11690  fi
11691
11692              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11693$as_echo_n "checking for Boot JDK... " >&6; }
11694              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11695$as_echo "$BOOT_JDK" >&6; }
11696              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11697$as_echo_n "checking Boot JDK version... " >&6; }
11698              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11699              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11700$as_echo "$BOOT_JDK_VERSION" >&6; }
11701            fi # end check jdk version
11702          fi # end check rt.jar
11703        fi # end check javac
11704      fi # end check java
11705    fi # end check boot jdk found
11706  fi
11707
11708
11709# Test: Is $JAVA_HOME set?
11710
11711  if test "x$BOOT_JDK_FOUND" = xno; then
11712    # Now execute the test
11713
11714    if test "x$JAVA_HOME" != x; then
11715        JAVA_HOME_PROCESSED="$JAVA_HOME"
11716
11717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11718
11719  # Input might be given as Windows format, start by converting to
11720  # unix format.
11721  path="$JAVA_HOME_PROCESSED"
11722  new_path=`$CYGPATH -u "$path"`
11723
11724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11727  # "foo.exe" is OK but "foo" is an error.
11728  #
11729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11730  # It is also a way to make sure we got the proper file name for the real test later on.
11731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11732  if test "x$test_shortpath" = x; then
11733    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11734$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11735    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11736  fi
11737
11738  # Call helper function which possibly converts this using DOS-style short mode.
11739  # If so, the updated path is stored in $new_path.
11740
11741  input_path="$new_path"
11742  # Check if we need to convert this using DOS-style short mode. If the path
11743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11744  # take no chances and rewrite it.
11745  # Note: m4 eats our [], so we need to use [ and ] instead.
11746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11747  if test "x$has_forbidden_chars" != x; then
11748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11752      # Going to short mode and back again did indeed matter. Since short mode is
11753      # case insensitive, let's make it lowercase to improve readability.
11754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11755      # Now convert it back to Unix-stile (cygpath)
11756      input_path=`$CYGPATH -u "$shortmode_path"`
11757      new_path="$input_path"
11758    fi
11759  fi
11760
11761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11762  if test "x$test_cygdrive_prefix" = x; then
11763    # As a simple fix, exclude /usr/bin since it's not a real path.
11764    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11766      # a path prefixed by /cygdrive for fixpath to work.
11767      new_path="$CYGWIN_ROOT_PATH$input_path"
11768    fi
11769  fi
11770
11771
11772  if test "x$path" != "x$new_path"; then
11773    JAVA_HOME_PROCESSED="$new_path"
11774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11775$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11776  fi
11777
11778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11779
11780  path="$JAVA_HOME_PROCESSED"
11781  has_colon=`$ECHO $path | $GREP ^.:`
11782  new_path="$path"
11783  if test "x$has_colon" = x; then
11784    # Not in mixed or Windows style, start by that.
11785    new_path=`cmd //c echo $path`
11786  fi
11787
11788
11789  input_path="$new_path"
11790  # Check if we need to convert this using DOS-style short mode. If the path
11791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11792  # take no chances and rewrite it.
11793  # Note: m4 eats our [], so we need to use [ and ] instead.
11794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11795  if test "x$has_forbidden_chars" != x; then
11796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11798  fi
11799
11800
11801  windows_path="$new_path"
11802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11803    unix_path=`$CYGPATH -u "$windows_path"`
11804    new_path="$unix_path"
11805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11807    new_path="$unix_path"
11808  fi
11809
11810  if test "x$path" != "x$new_path"; then
11811    JAVA_HOME_PROCESSED="$new_path"
11812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11813$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11814  fi
11815
11816  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11817  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11818
11819  else
11820    # We're on a posix platform. Hooray! :)
11821    path="$JAVA_HOME_PROCESSED"
11822    has_space=`$ECHO "$path" | $GREP " "`
11823    if test "x$has_space" != x; then
11824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11825$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11826      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11827    fi
11828
11829    # Use eval to expand a potential ~
11830    eval path="$path"
11831    if test ! -f "$path" && test ! -d "$path"; then
11832      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11833    fi
11834
11835    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11836  fi
11837
11838        if test ! -d "$JAVA_HOME_PROCESSED"; then
11839            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11840$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11841        else
11842          # Aha, the user has set a JAVA_HOME
11843          # let us use that as the Boot JDK.
11844          BOOT_JDK="$JAVA_HOME_PROCESSED"
11845          BOOT_JDK_FOUND=maybe
11846          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11847$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11848        fi
11849    fi
11850
11851
11852    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11853    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11854      # Do we have a bin/java?
11855      if test ! -x "$BOOT_JDK/bin/java"; then
11856        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11858        BOOT_JDK_FOUND=no
11859      else
11860        # Do we have a bin/javac?
11861        if test ! -x "$BOOT_JDK/bin/javac"; then
11862          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11864          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11865$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11866          BOOT_JDK_FOUND=no
11867        else
11868          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11869          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11870            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11871$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11872            BOOT_JDK_FOUND=no
11873          else
11874            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11875            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11876
11877            # Extra M4 quote needed to protect [] in grep expression.
11878            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11879            if test "x$FOUND_VERSION_78" = x; then
11880              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11882              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11883$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11884              BOOT_JDK_FOUND=no
11885            else
11886              # We're done! :-)
11887              BOOT_JDK_FOUND=yes
11888
11889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11890
11891  # Input might be given as Windows format, start by converting to
11892  # unix format.
11893  path="$BOOT_JDK"
11894  new_path=`$CYGPATH -u "$path"`
11895
11896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11899  # "foo.exe" is OK but "foo" is an error.
11900  #
11901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11902  # It is also a way to make sure we got the proper file name for the real test later on.
11903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11904  if test "x$test_shortpath" = x; then
11905    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11906$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11907    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11908  fi
11909
11910  # Call helper function which possibly converts this using DOS-style short mode.
11911  # If so, the updated path is stored in $new_path.
11912
11913  input_path="$new_path"
11914  # Check if we need to convert this using DOS-style short mode. If the path
11915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11916  # take no chances and rewrite it.
11917  # Note: m4 eats our [], so we need to use [ and ] instead.
11918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11919  if test "x$has_forbidden_chars" != x; then
11920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11924      # Going to short mode and back again did indeed matter. Since short mode is
11925      # case insensitive, let's make it lowercase to improve readability.
11926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11927      # Now convert it back to Unix-stile (cygpath)
11928      input_path=`$CYGPATH -u "$shortmode_path"`
11929      new_path="$input_path"
11930    fi
11931  fi
11932
11933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11934  if test "x$test_cygdrive_prefix" = x; then
11935    # As a simple fix, exclude /usr/bin since it's not a real path.
11936    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11938      # a path prefixed by /cygdrive for fixpath to work.
11939      new_path="$CYGWIN_ROOT_PATH$input_path"
11940    fi
11941  fi
11942
11943
11944  if test "x$path" != "x$new_path"; then
11945    BOOT_JDK="$new_path"
11946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11947$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11948  fi
11949
11950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11951
11952  path="$BOOT_JDK"
11953  has_colon=`$ECHO $path | $GREP ^.:`
11954  new_path="$path"
11955  if test "x$has_colon" = x; then
11956    # Not in mixed or Windows style, start by that.
11957    new_path=`cmd //c echo $path`
11958  fi
11959
11960
11961  input_path="$new_path"
11962  # Check if we need to convert this using DOS-style short mode. If the path
11963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11964  # take no chances and rewrite it.
11965  # Note: m4 eats our [], so we need to use [ and ] instead.
11966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11967  if test "x$has_forbidden_chars" != x; then
11968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11970  fi
11971
11972
11973  windows_path="$new_path"
11974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11975    unix_path=`$CYGPATH -u "$windows_path"`
11976    new_path="$unix_path"
11977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11979    new_path="$unix_path"
11980  fi
11981
11982  if test "x$path" != "x$new_path"; then
11983    BOOT_JDK="$new_path"
11984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11986  fi
11987
11988  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11989  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11990
11991  else
11992    # We're on a posix platform. Hooray! :)
11993    path="$BOOT_JDK"
11994    has_space=`$ECHO "$path" | $GREP " "`
11995    if test "x$has_space" != x; then
11996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11997$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11998      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11999    fi
12000
12001    # Use eval to expand a potential ~
12002    eval path="$path"
12003    if test ! -f "$path" && test ! -d "$path"; then
12004      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12005    fi
12006
12007    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12008  fi
12009
12010              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12011$as_echo_n "checking for Boot JDK... " >&6; }
12012              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12013$as_echo "$BOOT_JDK" >&6; }
12014              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12015$as_echo_n "checking Boot JDK version... " >&6; }
12016              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12017              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12018$as_echo "$BOOT_JDK_VERSION" >&6; }
12019            fi # end check jdk version
12020          fi # end check rt.jar
12021        fi # end check javac
12022      fi # end check java
12023    fi # end check boot jdk found
12024  fi
12025
12026
12027# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12028
12029  if test "x$BOOT_JDK_FOUND" = xno; then
12030    # Now execute the test
12031
12032    if test -x /usr/libexec/java_home; then
12033        BOOT_JDK=`/usr/libexec/java_home`
12034        BOOT_JDK_FOUND=maybe
12035        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12036$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12037    fi
12038
12039
12040    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12041    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12042      # Do we have a bin/java?
12043      if test ! -x "$BOOT_JDK/bin/java"; then
12044        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12045$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12046        BOOT_JDK_FOUND=no
12047      else
12048        # Do we have a bin/javac?
12049        if test ! -x "$BOOT_JDK/bin/javac"; then
12050          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12051$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12052          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12053$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12054          BOOT_JDK_FOUND=no
12055        else
12056          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12057          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12058            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12059$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12060            BOOT_JDK_FOUND=no
12061          else
12062            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12063            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12064
12065            # Extra M4 quote needed to protect [] in grep expression.
12066            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12067            if test "x$FOUND_VERSION_78" = x; then
12068              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12069$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12070              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12071$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12072              BOOT_JDK_FOUND=no
12073            else
12074              # We're done! :-)
12075              BOOT_JDK_FOUND=yes
12076
12077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12078
12079  # Input might be given as Windows format, start by converting to
12080  # unix format.
12081  path="$BOOT_JDK"
12082  new_path=`$CYGPATH -u "$path"`
12083
12084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12087  # "foo.exe" is OK but "foo" is an error.
12088  #
12089  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12090  # It is also a way to make sure we got the proper file name for the real test later on.
12091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12092  if test "x$test_shortpath" = x; then
12093    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12094$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12095    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12096  fi
12097
12098  # Call helper function which possibly converts this using DOS-style short mode.
12099  # If so, the updated path is stored in $new_path.
12100
12101  input_path="$new_path"
12102  # Check if we need to convert this using DOS-style short mode. If the path
12103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12104  # take no chances and rewrite it.
12105  # Note: m4 eats our [], so we need to use [ and ] instead.
12106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12107  if test "x$has_forbidden_chars" != x; then
12108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12112      # Going to short mode and back again did indeed matter. Since short mode is
12113      # case insensitive, let's make it lowercase to improve readability.
12114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12115      # Now convert it back to Unix-stile (cygpath)
12116      input_path=`$CYGPATH -u "$shortmode_path"`
12117      new_path="$input_path"
12118    fi
12119  fi
12120
12121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12122  if test "x$test_cygdrive_prefix" = x; then
12123    # As a simple fix, exclude /usr/bin since it's not a real path.
12124    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12126      # a path prefixed by /cygdrive for fixpath to work.
12127      new_path="$CYGWIN_ROOT_PATH$input_path"
12128    fi
12129  fi
12130
12131
12132  if test "x$path" != "x$new_path"; then
12133    BOOT_JDK="$new_path"
12134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12135$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12136  fi
12137
12138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12139
12140  path="$BOOT_JDK"
12141  has_colon=`$ECHO $path | $GREP ^.:`
12142  new_path="$path"
12143  if test "x$has_colon" = x; then
12144    # Not in mixed or Windows style, start by that.
12145    new_path=`cmd //c echo $path`
12146  fi
12147
12148
12149  input_path="$new_path"
12150  # Check if we need to convert this using DOS-style short mode. If the path
12151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12152  # take no chances and rewrite it.
12153  # Note: m4 eats our [], so we need to use [ and ] instead.
12154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12155  if test "x$has_forbidden_chars" != x; then
12156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12158  fi
12159
12160
12161  windows_path="$new_path"
12162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12163    unix_path=`$CYGPATH -u "$windows_path"`
12164    new_path="$unix_path"
12165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12167    new_path="$unix_path"
12168  fi
12169
12170  if test "x$path" != "x$new_path"; then
12171    BOOT_JDK="$new_path"
12172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12173$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12174  fi
12175
12176  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12177  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12178
12179  else
12180    # We're on a posix platform. Hooray! :)
12181    path="$BOOT_JDK"
12182    has_space=`$ECHO "$path" | $GREP " "`
12183    if test "x$has_space" != x; then
12184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12185$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12186      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12187    fi
12188
12189    # Use eval to expand a potential ~
12190    eval path="$path"
12191    if test ! -f "$path" && test ! -d "$path"; then
12192      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12193    fi
12194
12195    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12196  fi
12197
12198              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12199$as_echo_n "checking for Boot JDK... " >&6; }
12200              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12201$as_echo "$BOOT_JDK" >&6; }
12202              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12203$as_echo_n "checking Boot JDK version... " >&6; }
12204              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12205              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12206$as_echo "$BOOT_JDK_VERSION" >&6; }
12207            fi # end check jdk version
12208          fi # end check rt.jar
12209        fi # end check javac
12210      fi # end check java
12211    fi # end check boot jdk found
12212  fi
12213
12214
12215# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12216
12217  if test "x$BOOT_JDK_FOUND" = xno; then
12218    # Now execute the test
12219
12220    # Extract the first word of "javac", so it can be a program name with args.
12221set dummy javac; ac_word=$2
12222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12223$as_echo_n "checking for $ac_word... " >&6; }
12224if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
12225  $as_echo_n "(cached) " >&6
12226else
12227  case $JAVAC_CHECK in
12228  [\\/]* | ?:[\\/]*)
12229  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12230  ;;
12231  *)
12232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12233for as_dir in $PATH
12234do
12235  IFS=$as_save_IFS
12236  test -z "$as_dir" && as_dir=.
12237    for ac_exec_ext in '' $ac_executable_extensions; do
12238  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12239    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12241    break 2
12242  fi
12243done
12244  done
12245IFS=$as_save_IFS
12246
12247  ;;
12248esac
12249fi
12250JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12251if test -n "$JAVAC_CHECK"; then
12252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12253$as_echo "$JAVAC_CHECK" >&6; }
12254else
12255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12256$as_echo "no" >&6; }
12257fi
12258
12259
12260    # Extract the first word of "java", so it can be a program name with args.
12261set dummy java; ac_word=$2
12262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12263$as_echo_n "checking for $ac_word... " >&6; }
12264if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12265  $as_echo_n "(cached) " >&6
12266else
12267  case $JAVA_CHECK in
12268  [\\/]* | ?:[\\/]*)
12269  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12270  ;;
12271  *)
12272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12273for as_dir in $PATH
12274do
12275  IFS=$as_save_IFS
12276  test -z "$as_dir" && as_dir=.
12277    for ac_exec_ext in '' $ac_executable_extensions; do
12278  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12279    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12281    break 2
12282  fi
12283done
12284  done
12285IFS=$as_save_IFS
12286
12287  ;;
12288esac
12289fi
12290JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12291if test -n "$JAVA_CHECK"; then
12292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12293$as_echo "$JAVA_CHECK" >&6; }
12294else
12295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12296$as_echo "no" >&6; }
12297fi
12298
12299
12300    BINARY="$JAVAC_CHECK"
12301    if test "x$JAVAC_CHECK" = x; then
12302        BINARY="$JAVA_CHECK"
12303    fi
12304    if test "x$BINARY" != x; then
12305        # So there is a java(c) binary, it might be part of a JDK.
12306        # Lets find the JDK/JRE directory by following symbolic links.
12307        # Linux/GNU systems often have links from /usr/bin/java to
12308        # /etc/alternatives/java to the real JDK binary.
12309
12310    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12311        # Follow a chain of symbolic links. Use readlink
12312        # where it exists, else fall back to horribly
12313        # complicated shell code.
12314        if test "x$READLINK_TESTED" != yes; then
12315            # On MacOSX there is a readlink tool with a different
12316            # purpose than the GNU readlink tool. Check the found readlink.
12317            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12318            if test "x$ISGNU" = x; then
12319                 # A readlink that we do not know how to use.
12320                 # Are there other non-GNU readlinks out there?
12321                 READLINK_TESTED=yes
12322                 READLINK=
12323            fi
12324        fi
12325
12326        if test "x$READLINK" != x; then
12327            BINARY=`$READLINK -f $BINARY`
12328        else
12329            # Save the current directory for restoring afterwards
12330            STARTDIR=$PWD
12331            COUNTER=0
12332            sym_link_dir=`$DIRNAME $BINARY`
12333            sym_link_file=`$BASENAME $BINARY`
12334            cd $sym_link_dir
12335            # Use -P flag to resolve symlinks in directories.
12336            cd `$THEPWDCMD -P`
12337            sym_link_dir=`$THEPWDCMD -P`
12338            # Resolve file symlinks
12339            while test $COUNTER -lt 20; do
12340                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12341                if test "x$ISLINK" == x; then
12342                    # This is not a symbolic link! We are done!
12343                    break
12344                fi
12345                # Again resolve directory symlinks since the target of the just found
12346                # link could be in a different directory
12347                cd `$DIRNAME $ISLINK`
12348                sym_link_dir=`$THEPWDCMD -P`
12349                sym_link_file=`$BASENAME $ISLINK`
12350                let COUNTER=COUNTER+1
12351            done
12352            cd $STARTDIR
12353            BINARY=$sym_link_dir/$sym_link_file
12354        fi
12355    fi
12356
12357        BOOT_JDK=`dirname "$BINARY"`
12358        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12359        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12360            # Looks like we found ourselves an JDK
12361            BOOT_JDK_FOUND=maybe
12362            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12363$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12364        fi
12365    fi
12366
12367
12368    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12369    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12370      # Do we have a bin/java?
12371      if test ! -x "$BOOT_JDK/bin/java"; then
12372        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12374        BOOT_JDK_FOUND=no
12375      else
12376        # Do we have a bin/javac?
12377        if test ! -x "$BOOT_JDK/bin/javac"; then
12378          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12380          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12381$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12382          BOOT_JDK_FOUND=no
12383        else
12384          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12385          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12386            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12388            BOOT_JDK_FOUND=no
12389          else
12390            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12391            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12392
12393            # Extra M4 quote needed to protect [] in grep expression.
12394            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12395            if test "x$FOUND_VERSION_78" = x; then
12396              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12398              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12399$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12400              BOOT_JDK_FOUND=no
12401            else
12402              # We're done! :-)
12403              BOOT_JDK_FOUND=yes
12404
12405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12406
12407  # Input might be given as Windows format, start by converting to
12408  # unix format.
12409  path="$BOOT_JDK"
12410  new_path=`$CYGPATH -u "$path"`
12411
12412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12415  # "foo.exe" is OK but "foo" is an error.
12416  #
12417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12418  # It is also a way to make sure we got the proper file name for the real test later on.
12419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12420  if test "x$test_shortpath" = x; then
12421    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12422$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12423    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12424  fi
12425
12426  # Call helper function which possibly converts this using DOS-style short mode.
12427  # If so, the updated path is stored in $new_path.
12428
12429  input_path="$new_path"
12430  # Check if we need to convert this using DOS-style short mode. If the path
12431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12432  # take no chances and rewrite it.
12433  # Note: m4 eats our [], so we need to use [ and ] instead.
12434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12435  if test "x$has_forbidden_chars" != x; then
12436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12440      # Going to short mode and back again did indeed matter. Since short mode is
12441      # case insensitive, let's make it lowercase to improve readability.
12442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12443      # Now convert it back to Unix-stile (cygpath)
12444      input_path=`$CYGPATH -u "$shortmode_path"`
12445      new_path="$input_path"
12446    fi
12447  fi
12448
12449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12450  if test "x$test_cygdrive_prefix" = x; then
12451    # As a simple fix, exclude /usr/bin since it's not a real path.
12452    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12454      # a path prefixed by /cygdrive for fixpath to work.
12455      new_path="$CYGWIN_ROOT_PATH$input_path"
12456    fi
12457  fi
12458
12459
12460  if test "x$path" != "x$new_path"; then
12461    BOOT_JDK="$new_path"
12462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12463$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12464  fi
12465
12466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12467
12468  path="$BOOT_JDK"
12469  has_colon=`$ECHO $path | $GREP ^.:`
12470  new_path="$path"
12471  if test "x$has_colon" = x; then
12472    # Not in mixed or Windows style, start by that.
12473    new_path=`cmd //c echo $path`
12474  fi
12475
12476
12477  input_path="$new_path"
12478  # Check if we need to convert this using DOS-style short mode. If the path
12479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12480  # take no chances and rewrite it.
12481  # Note: m4 eats our [], so we need to use [ and ] instead.
12482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12483  if test "x$has_forbidden_chars" != x; then
12484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12486  fi
12487
12488
12489  windows_path="$new_path"
12490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12491    unix_path=`$CYGPATH -u "$windows_path"`
12492    new_path="$unix_path"
12493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12495    new_path="$unix_path"
12496  fi
12497
12498  if test "x$path" != "x$new_path"; then
12499    BOOT_JDK="$new_path"
12500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12501$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12502  fi
12503
12504  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12505  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12506
12507  else
12508    # We're on a posix platform. Hooray! :)
12509    path="$BOOT_JDK"
12510    has_space=`$ECHO "$path" | $GREP " "`
12511    if test "x$has_space" != x; then
12512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12513$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12514      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12515    fi
12516
12517    # Use eval to expand a potential ~
12518    eval path="$path"
12519    if test ! -f "$path" && test ! -d "$path"; then
12520      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12521    fi
12522
12523    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12524  fi
12525
12526              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12527$as_echo_n "checking for Boot JDK... " >&6; }
12528              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12529$as_echo "$BOOT_JDK" >&6; }
12530              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12531$as_echo_n "checking Boot JDK version... " >&6; }
12532              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12533              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12534$as_echo "$BOOT_JDK_VERSION" >&6; }
12535            fi # end check jdk version
12536          fi # end check rt.jar
12537        fi # end check javac
12538      fi # end check java
12539    fi # end check boot jdk found
12540  fi
12541
12542
12543# Test: Is there a JDK installed in default, well-known locations?
12544
12545  if test "x$BOOT_JDK_FOUND" = xno; then
12546    # Now execute the test
12547
12548  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12549
12550  if test "x$BOOT_JDK_FOUND" = xno; then
12551    # Now execute the test
12552
12553  if test "x$ProgramW6432" != x; then
12554    VIRTUAL_DIR="$ProgramW6432/Java"
12555
12556  windows_path="$VIRTUAL_DIR"
12557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12558    unix_path=`$CYGPATH -u "$windows_path"`
12559    VIRTUAL_DIR="$unix_path"
12560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12562    VIRTUAL_DIR="$unix_path"
12563  fi
12564
12565
12566  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12567  BOOT_JDK_SUFFIX=""
12568  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12569  if test "x$ALL_JDKS_FOUND" != x; then
12570    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12571
12572  if test "x$BOOT_JDK_FOUND" = xno; then
12573    # Now execute the test
12574
12575        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12576        if test -d "$BOOT_JDK"; then
12577          BOOT_JDK_FOUND=maybe
12578          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12579$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12580        fi
12581
12582
12583    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12584    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12585      # Do we have a bin/java?
12586      if test ! -x "$BOOT_JDK/bin/java"; then
12587        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12589        BOOT_JDK_FOUND=no
12590      else
12591        # Do we have a bin/javac?
12592        if test ! -x "$BOOT_JDK/bin/javac"; then
12593          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12595          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12596$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12597          BOOT_JDK_FOUND=no
12598        else
12599          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12600          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12601            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12603            BOOT_JDK_FOUND=no
12604          else
12605            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12606            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12607
12608            # Extra M4 quote needed to protect [] in grep expression.
12609            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12610            if test "x$FOUND_VERSION_78" = x; then
12611              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12613              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12614$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12615              BOOT_JDK_FOUND=no
12616            else
12617              # We're done! :-)
12618              BOOT_JDK_FOUND=yes
12619
12620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12621
12622  # Input might be given as Windows format, start by converting to
12623  # unix format.
12624  path="$BOOT_JDK"
12625  new_path=`$CYGPATH -u "$path"`
12626
12627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12630  # "foo.exe" is OK but "foo" is an error.
12631  #
12632  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12633  # It is also a way to make sure we got the proper file name for the real test later on.
12634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12635  if test "x$test_shortpath" = x; then
12636    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12637$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12638    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12639  fi
12640
12641  # Call helper function which possibly converts this using DOS-style short mode.
12642  # If so, the updated path is stored in $new_path.
12643
12644  input_path="$new_path"
12645  # Check if we need to convert this using DOS-style short mode. If the path
12646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12647  # take no chances and rewrite it.
12648  # Note: m4 eats our [], so we need to use [ and ] instead.
12649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12650  if test "x$has_forbidden_chars" != x; then
12651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12655      # Going to short mode and back again did indeed matter. Since short mode is
12656      # case insensitive, let's make it lowercase to improve readability.
12657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12658      # Now convert it back to Unix-stile (cygpath)
12659      input_path=`$CYGPATH -u "$shortmode_path"`
12660      new_path="$input_path"
12661    fi
12662  fi
12663
12664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12665  if test "x$test_cygdrive_prefix" = x; then
12666    # As a simple fix, exclude /usr/bin since it's not a real path.
12667    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12669      # a path prefixed by /cygdrive for fixpath to work.
12670      new_path="$CYGWIN_ROOT_PATH$input_path"
12671    fi
12672  fi
12673
12674
12675  if test "x$path" != "x$new_path"; then
12676    BOOT_JDK="$new_path"
12677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12678$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12679  fi
12680
12681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12682
12683  path="$BOOT_JDK"
12684  has_colon=`$ECHO $path | $GREP ^.:`
12685  new_path="$path"
12686  if test "x$has_colon" = x; then
12687    # Not in mixed or Windows style, start by that.
12688    new_path=`cmd //c echo $path`
12689  fi
12690
12691
12692  input_path="$new_path"
12693  # Check if we need to convert this using DOS-style short mode. If the path
12694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12695  # take no chances and rewrite it.
12696  # Note: m4 eats our [], so we need to use [ and ] instead.
12697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12698  if test "x$has_forbidden_chars" != x; then
12699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12701  fi
12702
12703
12704  windows_path="$new_path"
12705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12706    unix_path=`$CYGPATH -u "$windows_path"`
12707    new_path="$unix_path"
12708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12710    new_path="$unix_path"
12711  fi
12712
12713  if test "x$path" != "x$new_path"; then
12714    BOOT_JDK="$new_path"
12715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12716$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12717  fi
12718
12719  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12720  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12721
12722  else
12723    # We're on a posix platform. Hooray! :)
12724    path="$BOOT_JDK"
12725    has_space=`$ECHO "$path" | $GREP " "`
12726    if test "x$has_space" != x; then
12727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12729      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12730    fi
12731
12732    # Use eval to expand a potential ~
12733    eval path="$path"
12734    if test ! -f "$path" && test ! -d "$path"; then
12735      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12736    fi
12737
12738    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12739  fi
12740
12741              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12742$as_echo_n "checking for Boot JDK... " >&6; }
12743              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12744$as_echo "$BOOT_JDK" >&6; }
12745              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12746$as_echo_n "checking Boot JDK version... " >&6; }
12747              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12748              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12749$as_echo "$BOOT_JDK_VERSION" >&6; }
12750            fi # end check jdk version
12751          fi # end check rt.jar
12752        fi # end check javac
12753      fi # end check java
12754    fi # end check boot jdk found
12755  fi
12756
12757    done
12758  fi
12759
12760  fi
12761
12762
12763    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12764    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12765      # Do we have a bin/java?
12766      if test ! -x "$BOOT_JDK/bin/java"; then
12767        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12769        BOOT_JDK_FOUND=no
12770      else
12771        # Do we have a bin/javac?
12772        if test ! -x "$BOOT_JDK/bin/javac"; then
12773          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12775          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12776$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12777          BOOT_JDK_FOUND=no
12778        else
12779          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12780          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12781            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12783            BOOT_JDK_FOUND=no
12784          else
12785            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12786            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12787
12788            # Extra M4 quote needed to protect [] in grep expression.
12789            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12790            if test "x$FOUND_VERSION_78" = x; then
12791              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12793              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12794$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12795              BOOT_JDK_FOUND=no
12796            else
12797              # We're done! :-)
12798              BOOT_JDK_FOUND=yes
12799
12800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12801
12802  # Input might be given as Windows format, start by converting to
12803  # unix format.
12804  path="$BOOT_JDK"
12805  new_path=`$CYGPATH -u "$path"`
12806
12807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12810  # "foo.exe" is OK but "foo" is an error.
12811  #
12812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12813  # It is also a way to make sure we got the proper file name for the real test later on.
12814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12815  if test "x$test_shortpath" = x; then
12816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12817$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12818    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12819  fi
12820
12821  # Call helper function which possibly converts this using DOS-style short mode.
12822  # If so, the updated path is stored in $new_path.
12823
12824  input_path="$new_path"
12825  # Check if we need to convert this using DOS-style short mode. If the path
12826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12827  # take no chances and rewrite it.
12828  # Note: m4 eats our [], so we need to use [ and ] instead.
12829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12830  if test "x$has_forbidden_chars" != x; then
12831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12835      # Going to short mode and back again did indeed matter. Since short mode is
12836      # case insensitive, let's make it lowercase to improve readability.
12837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12838      # Now convert it back to Unix-stile (cygpath)
12839      input_path=`$CYGPATH -u "$shortmode_path"`
12840      new_path="$input_path"
12841    fi
12842  fi
12843
12844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12845  if test "x$test_cygdrive_prefix" = x; then
12846    # As a simple fix, exclude /usr/bin since it's not a real path.
12847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12849      # a path prefixed by /cygdrive for fixpath to work.
12850      new_path="$CYGWIN_ROOT_PATH$input_path"
12851    fi
12852  fi
12853
12854
12855  if test "x$path" != "x$new_path"; then
12856    BOOT_JDK="$new_path"
12857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12858$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12859  fi
12860
12861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12862
12863  path="$BOOT_JDK"
12864  has_colon=`$ECHO $path | $GREP ^.:`
12865  new_path="$path"
12866  if test "x$has_colon" = x; then
12867    # Not in mixed or Windows style, start by that.
12868    new_path=`cmd //c echo $path`
12869  fi
12870
12871
12872  input_path="$new_path"
12873  # Check if we need to convert this using DOS-style short mode. If the path
12874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12875  # take no chances and rewrite it.
12876  # Note: m4 eats our [], so we need to use [ and ] instead.
12877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12878  if test "x$has_forbidden_chars" != x; then
12879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12881  fi
12882
12883
12884  windows_path="$new_path"
12885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12886    unix_path=`$CYGPATH -u "$windows_path"`
12887    new_path="$unix_path"
12888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12890    new_path="$unix_path"
12891  fi
12892
12893  if test "x$path" != "x$new_path"; then
12894    BOOT_JDK="$new_path"
12895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12896$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12897  fi
12898
12899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12901
12902  else
12903    # We're on a posix platform. Hooray! :)
12904    path="$BOOT_JDK"
12905    has_space=`$ECHO "$path" | $GREP " "`
12906    if test "x$has_space" != x; then
12907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12908$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12909      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12910    fi
12911
12912    # Use eval to expand a potential ~
12913    eval path="$path"
12914    if test ! -f "$path" && test ! -d "$path"; then
12915      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12916    fi
12917
12918    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12919  fi
12920
12921              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12922$as_echo_n "checking for Boot JDK... " >&6; }
12923              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12924$as_echo "$BOOT_JDK" >&6; }
12925              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12926$as_echo_n "checking Boot JDK version... " >&6; }
12927              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12928              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12929$as_echo "$BOOT_JDK_VERSION" >&6; }
12930            fi # end check jdk version
12931          fi # end check rt.jar
12932        fi # end check javac
12933      fi # end check java
12934    fi # end check boot jdk found
12935  fi
12936
12937
12938  if test "x$BOOT_JDK_FOUND" = xno; then
12939    # Now execute the test
12940
12941  if test "x$PROGRAMW6432" != x; then
12942    VIRTUAL_DIR="$PROGRAMW6432/Java"
12943
12944  windows_path="$VIRTUAL_DIR"
12945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12946    unix_path=`$CYGPATH -u "$windows_path"`
12947    VIRTUAL_DIR="$unix_path"
12948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12950    VIRTUAL_DIR="$unix_path"
12951  fi
12952
12953
12954  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12955  BOOT_JDK_SUFFIX=""
12956  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12957  if test "x$ALL_JDKS_FOUND" != x; then
12958    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12959
12960  if test "x$BOOT_JDK_FOUND" = xno; then
12961    # Now execute the test
12962
12963        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12964        if test -d "$BOOT_JDK"; then
12965          BOOT_JDK_FOUND=maybe
12966          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12967$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12968        fi
12969
12970
12971    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12972    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12973      # Do we have a bin/java?
12974      if test ! -x "$BOOT_JDK/bin/java"; then
12975        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12977        BOOT_JDK_FOUND=no
12978      else
12979        # Do we have a bin/javac?
12980        if test ! -x "$BOOT_JDK/bin/javac"; then
12981          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12982$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12983          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12984$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12985          BOOT_JDK_FOUND=no
12986        else
12987          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12988          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12989            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12991            BOOT_JDK_FOUND=no
12992          else
12993            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12994            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12995
12996            # Extra M4 quote needed to protect [] in grep expression.
12997            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12998            if test "x$FOUND_VERSION_78" = x; then
12999              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13001              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13002$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13003              BOOT_JDK_FOUND=no
13004            else
13005              # We're done! :-)
13006              BOOT_JDK_FOUND=yes
13007
13008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13009
13010  # Input might be given as Windows format, start by converting to
13011  # unix format.
13012  path="$BOOT_JDK"
13013  new_path=`$CYGPATH -u "$path"`
13014
13015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13018  # "foo.exe" is OK but "foo" is an error.
13019  #
13020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13021  # It is also a way to make sure we got the proper file name for the real test later on.
13022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13023  if test "x$test_shortpath" = x; then
13024    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13025$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13026    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13027  fi
13028
13029  # Call helper function which possibly converts this using DOS-style short mode.
13030  # If so, the updated path is stored in $new_path.
13031
13032  input_path="$new_path"
13033  # Check if we need to convert this using DOS-style short mode. If the path
13034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13035  # take no chances and rewrite it.
13036  # Note: m4 eats our [], so we need to use [ and ] instead.
13037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13038  if test "x$has_forbidden_chars" != x; then
13039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13043      # Going to short mode and back again did indeed matter. Since short mode is
13044      # case insensitive, let's make it lowercase to improve readability.
13045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13046      # Now convert it back to Unix-stile (cygpath)
13047      input_path=`$CYGPATH -u "$shortmode_path"`
13048      new_path="$input_path"
13049    fi
13050  fi
13051
13052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13053  if test "x$test_cygdrive_prefix" = x; then
13054    # As a simple fix, exclude /usr/bin since it's not a real path.
13055    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13057      # a path prefixed by /cygdrive for fixpath to work.
13058      new_path="$CYGWIN_ROOT_PATH$input_path"
13059    fi
13060  fi
13061
13062
13063  if test "x$path" != "x$new_path"; then
13064    BOOT_JDK="$new_path"
13065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13066$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13067  fi
13068
13069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13070
13071  path="$BOOT_JDK"
13072  has_colon=`$ECHO $path | $GREP ^.:`
13073  new_path="$path"
13074  if test "x$has_colon" = x; then
13075    # Not in mixed or Windows style, start by that.
13076    new_path=`cmd //c echo $path`
13077  fi
13078
13079
13080  input_path="$new_path"
13081  # Check if we need to convert this using DOS-style short mode. If the path
13082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13083  # take no chances and rewrite it.
13084  # Note: m4 eats our [], so we need to use [ and ] instead.
13085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13086  if test "x$has_forbidden_chars" != x; then
13087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13089  fi
13090
13091
13092  windows_path="$new_path"
13093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13094    unix_path=`$CYGPATH -u "$windows_path"`
13095    new_path="$unix_path"
13096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13098    new_path="$unix_path"
13099  fi
13100
13101  if test "x$path" != "x$new_path"; then
13102    BOOT_JDK="$new_path"
13103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13105  fi
13106
13107  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13108  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13109
13110  else
13111    # We're on a posix platform. Hooray! :)
13112    path="$BOOT_JDK"
13113    has_space=`$ECHO "$path" | $GREP " "`
13114    if test "x$has_space" != x; then
13115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13116$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13117      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13118    fi
13119
13120    # Use eval to expand a potential ~
13121    eval path="$path"
13122    if test ! -f "$path" && test ! -d "$path"; then
13123      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13124    fi
13125
13126    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13127  fi
13128
13129              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13130$as_echo_n "checking for Boot JDK... " >&6; }
13131              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13132$as_echo "$BOOT_JDK" >&6; }
13133              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13134$as_echo_n "checking Boot JDK version... " >&6; }
13135              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13136              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13137$as_echo "$BOOT_JDK_VERSION" >&6; }
13138            fi # end check jdk version
13139          fi # end check rt.jar
13140        fi # end check javac
13141      fi # end check java
13142    fi # end check boot jdk found
13143  fi
13144
13145    done
13146  fi
13147
13148  fi
13149
13150
13151    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13152    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13153      # Do we have a bin/java?
13154      if test ! -x "$BOOT_JDK/bin/java"; then
13155        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13157        BOOT_JDK_FOUND=no
13158      else
13159        # Do we have a bin/javac?
13160        if test ! -x "$BOOT_JDK/bin/javac"; then
13161          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13163          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13164$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13165          BOOT_JDK_FOUND=no
13166        else
13167          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13168          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13169            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13171            BOOT_JDK_FOUND=no
13172          else
13173            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13174            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13175
13176            # Extra M4 quote needed to protect [] in grep expression.
13177            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13178            if test "x$FOUND_VERSION_78" = x; then
13179              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13181              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13182$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13183              BOOT_JDK_FOUND=no
13184            else
13185              # We're done! :-)
13186              BOOT_JDK_FOUND=yes
13187
13188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13189
13190  # Input might be given as Windows format, start by converting to
13191  # unix format.
13192  path="$BOOT_JDK"
13193  new_path=`$CYGPATH -u "$path"`
13194
13195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13198  # "foo.exe" is OK but "foo" is an error.
13199  #
13200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13201  # It is also a way to make sure we got the proper file name for the real test later on.
13202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13203  if test "x$test_shortpath" = x; then
13204    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13205$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13206    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13207  fi
13208
13209  # Call helper function which possibly converts this using DOS-style short mode.
13210  # If so, the updated path is stored in $new_path.
13211
13212  input_path="$new_path"
13213  # Check if we need to convert this using DOS-style short mode. If the path
13214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13215  # take no chances and rewrite it.
13216  # Note: m4 eats our [], so we need to use [ and ] instead.
13217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13218  if test "x$has_forbidden_chars" != x; then
13219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13223      # Going to short mode and back again did indeed matter. Since short mode is
13224      # case insensitive, let's make it lowercase to improve readability.
13225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13226      # Now convert it back to Unix-stile (cygpath)
13227      input_path=`$CYGPATH -u "$shortmode_path"`
13228      new_path="$input_path"
13229    fi
13230  fi
13231
13232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13233  if test "x$test_cygdrive_prefix" = x; then
13234    # As a simple fix, exclude /usr/bin since it's not a real path.
13235    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13237      # a path prefixed by /cygdrive for fixpath to work.
13238      new_path="$CYGWIN_ROOT_PATH$input_path"
13239    fi
13240  fi
13241
13242
13243  if test "x$path" != "x$new_path"; then
13244    BOOT_JDK="$new_path"
13245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13246$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13247  fi
13248
13249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13250
13251  path="$BOOT_JDK"
13252  has_colon=`$ECHO $path | $GREP ^.:`
13253  new_path="$path"
13254  if test "x$has_colon" = x; then
13255    # Not in mixed or Windows style, start by that.
13256    new_path=`cmd //c echo $path`
13257  fi
13258
13259
13260  input_path="$new_path"
13261  # Check if we need to convert this using DOS-style short mode. If the path
13262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13263  # take no chances and rewrite it.
13264  # Note: m4 eats our [], so we need to use [ and ] instead.
13265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13266  if test "x$has_forbidden_chars" != x; then
13267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13269  fi
13270
13271
13272  windows_path="$new_path"
13273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13274    unix_path=`$CYGPATH -u "$windows_path"`
13275    new_path="$unix_path"
13276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13278    new_path="$unix_path"
13279  fi
13280
13281  if test "x$path" != "x$new_path"; then
13282    BOOT_JDK="$new_path"
13283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13284$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13285  fi
13286
13287  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13288  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13289
13290  else
13291    # We're on a posix platform. Hooray! :)
13292    path="$BOOT_JDK"
13293    has_space=`$ECHO "$path" | $GREP " "`
13294    if test "x$has_space" != x; then
13295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13296$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13297      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13298    fi
13299
13300    # Use eval to expand a potential ~
13301    eval path="$path"
13302    if test ! -f "$path" && test ! -d "$path"; then
13303      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13304    fi
13305
13306    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13307  fi
13308
13309              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13310$as_echo_n "checking for Boot JDK... " >&6; }
13311              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13312$as_echo "$BOOT_JDK" >&6; }
13313              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13314$as_echo_n "checking Boot JDK version... " >&6; }
13315              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13316              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13317$as_echo "$BOOT_JDK_VERSION" >&6; }
13318            fi # end check jdk version
13319          fi # end check rt.jar
13320        fi # end check javac
13321      fi # end check java
13322    fi # end check boot jdk found
13323  fi
13324
13325
13326  if test "x$BOOT_JDK_FOUND" = xno; then
13327    # Now execute the test
13328
13329  if test "x$PROGRAMFILES" != x; then
13330    VIRTUAL_DIR="$PROGRAMFILES/Java"
13331
13332  windows_path="$VIRTUAL_DIR"
13333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13334    unix_path=`$CYGPATH -u "$windows_path"`
13335    VIRTUAL_DIR="$unix_path"
13336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13338    VIRTUAL_DIR="$unix_path"
13339  fi
13340
13341
13342  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13343  BOOT_JDK_SUFFIX=""
13344  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13345  if test "x$ALL_JDKS_FOUND" != x; then
13346    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13347
13348  if test "x$BOOT_JDK_FOUND" = xno; then
13349    # Now execute the test
13350
13351        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13352        if test -d "$BOOT_JDK"; then
13353          BOOT_JDK_FOUND=maybe
13354          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13355$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13356        fi
13357
13358
13359    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13360    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13361      # Do we have a bin/java?
13362      if test ! -x "$BOOT_JDK/bin/java"; then
13363        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13365        BOOT_JDK_FOUND=no
13366      else
13367        # Do we have a bin/javac?
13368        if test ! -x "$BOOT_JDK/bin/javac"; then
13369          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13371          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13372$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13373          BOOT_JDK_FOUND=no
13374        else
13375          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13376          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13377            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13378$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13379            BOOT_JDK_FOUND=no
13380          else
13381            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13382            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13383
13384            # Extra M4 quote needed to protect [] in grep expression.
13385            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13386            if test "x$FOUND_VERSION_78" = x; then
13387              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13389              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13390$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13391              BOOT_JDK_FOUND=no
13392            else
13393              # We're done! :-)
13394              BOOT_JDK_FOUND=yes
13395
13396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13397
13398  # Input might be given as Windows format, start by converting to
13399  # unix format.
13400  path="$BOOT_JDK"
13401  new_path=`$CYGPATH -u "$path"`
13402
13403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13406  # "foo.exe" is OK but "foo" is an error.
13407  #
13408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13409  # It is also a way to make sure we got the proper file name for the real test later on.
13410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13411  if test "x$test_shortpath" = x; then
13412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13413$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13414    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13415  fi
13416
13417  # Call helper function which possibly converts this using DOS-style short mode.
13418  # If so, the updated path is stored in $new_path.
13419
13420  input_path="$new_path"
13421  # Check if we need to convert this using DOS-style short mode. If the path
13422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13423  # take no chances and rewrite it.
13424  # Note: m4 eats our [], so we need to use [ and ] instead.
13425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13426  if test "x$has_forbidden_chars" != x; then
13427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13431      # Going to short mode and back again did indeed matter. Since short mode is
13432      # case insensitive, let's make it lowercase to improve readability.
13433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13434      # Now convert it back to Unix-stile (cygpath)
13435      input_path=`$CYGPATH -u "$shortmode_path"`
13436      new_path="$input_path"
13437    fi
13438  fi
13439
13440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13441  if test "x$test_cygdrive_prefix" = x; then
13442    # As a simple fix, exclude /usr/bin since it's not a real path.
13443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13445      # a path prefixed by /cygdrive for fixpath to work.
13446      new_path="$CYGWIN_ROOT_PATH$input_path"
13447    fi
13448  fi
13449
13450
13451  if test "x$path" != "x$new_path"; then
13452    BOOT_JDK="$new_path"
13453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13454$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13455  fi
13456
13457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13458
13459  path="$BOOT_JDK"
13460  has_colon=`$ECHO $path | $GREP ^.:`
13461  new_path="$path"
13462  if test "x$has_colon" = x; then
13463    # Not in mixed or Windows style, start by that.
13464    new_path=`cmd //c echo $path`
13465  fi
13466
13467
13468  input_path="$new_path"
13469  # Check if we need to convert this using DOS-style short mode. If the path
13470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13471  # take no chances and rewrite it.
13472  # Note: m4 eats our [], so we need to use [ and ] instead.
13473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13474  if test "x$has_forbidden_chars" != x; then
13475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13477  fi
13478
13479
13480  windows_path="$new_path"
13481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13482    unix_path=`$CYGPATH -u "$windows_path"`
13483    new_path="$unix_path"
13484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13486    new_path="$unix_path"
13487  fi
13488
13489  if test "x$path" != "x$new_path"; then
13490    BOOT_JDK="$new_path"
13491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13493  fi
13494
13495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13497
13498  else
13499    # We're on a posix platform. Hooray! :)
13500    path="$BOOT_JDK"
13501    has_space=`$ECHO "$path" | $GREP " "`
13502    if test "x$has_space" != x; then
13503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13504$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13505      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13506    fi
13507
13508    # Use eval to expand a potential ~
13509    eval path="$path"
13510    if test ! -f "$path" && test ! -d "$path"; then
13511      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13512    fi
13513
13514    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13515  fi
13516
13517              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13518$as_echo_n "checking for Boot JDK... " >&6; }
13519              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13520$as_echo "$BOOT_JDK" >&6; }
13521              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13522$as_echo_n "checking Boot JDK version... " >&6; }
13523              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13524              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13525$as_echo "$BOOT_JDK_VERSION" >&6; }
13526            fi # end check jdk version
13527          fi # end check rt.jar
13528        fi # end check javac
13529      fi # end check java
13530    fi # end check boot jdk found
13531  fi
13532
13533    done
13534  fi
13535
13536  fi
13537
13538
13539    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13540    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13541      # Do we have a bin/java?
13542      if test ! -x "$BOOT_JDK/bin/java"; then
13543        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13544$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13545        BOOT_JDK_FOUND=no
13546      else
13547        # Do we have a bin/javac?
13548        if test ! -x "$BOOT_JDK/bin/javac"; then
13549          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13551          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13552$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13553          BOOT_JDK_FOUND=no
13554        else
13555          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13556          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13557            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13559            BOOT_JDK_FOUND=no
13560          else
13561            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13562            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13563
13564            # Extra M4 quote needed to protect [] in grep expression.
13565            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13566            if test "x$FOUND_VERSION_78" = x; then
13567              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13568$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13569              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13570$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13571              BOOT_JDK_FOUND=no
13572            else
13573              # We're done! :-)
13574              BOOT_JDK_FOUND=yes
13575
13576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13577
13578  # Input might be given as Windows format, start by converting to
13579  # unix format.
13580  path="$BOOT_JDK"
13581  new_path=`$CYGPATH -u "$path"`
13582
13583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13586  # "foo.exe" is OK but "foo" is an error.
13587  #
13588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13589  # It is also a way to make sure we got the proper file name for the real test later on.
13590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13591  if test "x$test_shortpath" = x; then
13592    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13593$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13594    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13595  fi
13596
13597  # Call helper function which possibly converts this using DOS-style short mode.
13598  # If so, the updated path is stored in $new_path.
13599
13600  input_path="$new_path"
13601  # Check if we need to convert this using DOS-style short mode. If the path
13602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13603  # take no chances and rewrite it.
13604  # Note: m4 eats our [], so we need to use [ and ] instead.
13605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13606  if test "x$has_forbidden_chars" != x; then
13607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13611      # Going to short mode and back again did indeed matter. Since short mode is
13612      # case insensitive, let's make it lowercase to improve readability.
13613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13614      # Now convert it back to Unix-stile (cygpath)
13615      input_path=`$CYGPATH -u "$shortmode_path"`
13616      new_path="$input_path"
13617    fi
13618  fi
13619
13620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13621  if test "x$test_cygdrive_prefix" = x; then
13622    # As a simple fix, exclude /usr/bin since it's not a real path.
13623    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13625      # a path prefixed by /cygdrive for fixpath to work.
13626      new_path="$CYGWIN_ROOT_PATH$input_path"
13627    fi
13628  fi
13629
13630
13631  if test "x$path" != "x$new_path"; then
13632    BOOT_JDK="$new_path"
13633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13634$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13635  fi
13636
13637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13638
13639  path="$BOOT_JDK"
13640  has_colon=`$ECHO $path | $GREP ^.:`
13641  new_path="$path"
13642  if test "x$has_colon" = x; then
13643    # Not in mixed or Windows style, start by that.
13644    new_path=`cmd //c echo $path`
13645  fi
13646
13647
13648  input_path="$new_path"
13649  # Check if we need to convert this using DOS-style short mode. If the path
13650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13651  # take no chances and rewrite it.
13652  # Note: m4 eats our [], so we need to use [ and ] instead.
13653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13654  if test "x$has_forbidden_chars" != x; then
13655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13657  fi
13658
13659
13660  windows_path="$new_path"
13661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13662    unix_path=`$CYGPATH -u "$windows_path"`
13663    new_path="$unix_path"
13664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13666    new_path="$unix_path"
13667  fi
13668
13669  if test "x$path" != "x$new_path"; then
13670    BOOT_JDK="$new_path"
13671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13672$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13673  fi
13674
13675  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13676  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13677
13678  else
13679    # We're on a posix platform. Hooray! :)
13680    path="$BOOT_JDK"
13681    has_space=`$ECHO "$path" | $GREP " "`
13682    if test "x$has_space" != x; then
13683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13684$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13685      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13686    fi
13687
13688    # Use eval to expand a potential ~
13689    eval path="$path"
13690    if test ! -f "$path" && test ! -d "$path"; then
13691      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13692    fi
13693
13694    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13695  fi
13696
13697              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13698$as_echo_n "checking for Boot JDK... " >&6; }
13699              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13700$as_echo "$BOOT_JDK" >&6; }
13701              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13702$as_echo_n "checking Boot JDK version... " >&6; }
13703              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13704              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13705$as_echo "$BOOT_JDK_VERSION" >&6; }
13706            fi # end check jdk version
13707          fi # end check rt.jar
13708        fi # end check javac
13709      fi # end check java
13710    fi # end check boot jdk found
13711  fi
13712
13713
13714  if test "x$BOOT_JDK_FOUND" = xno; then
13715    # Now execute the test
13716
13717  if test "x$ProgramFiles" != x; then
13718    VIRTUAL_DIR="$ProgramFiles/Java"
13719
13720  windows_path="$VIRTUAL_DIR"
13721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13722    unix_path=`$CYGPATH -u "$windows_path"`
13723    VIRTUAL_DIR="$unix_path"
13724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13726    VIRTUAL_DIR="$unix_path"
13727  fi
13728
13729
13730  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13731  BOOT_JDK_SUFFIX=""
13732  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13733  if test "x$ALL_JDKS_FOUND" != x; then
13734    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13735
13736  if test "x$BOOT_JDK_FOUND" = xno; then
13737    # Now execute the test
13738
13739        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13740        if test -d "$BOOT_JDK"; then
13741          BOOT_JDK_FOUND=maybe
13742          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13743$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13744        fi
13745
13746
13747    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13748    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13749      # Do we have a bin/java?
13750      if test ! -x "$BOOT_JDK/bin/java"; then
13751        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13753        BOOT_JDK_FOUND=no
13754      else
13755        # Do we have a bin/javac?
13756        if test ! -x "$BOOT_JDK/bin/javac"; then
13757          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13758$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13759          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13760$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13761          BOOT_JDK_FOUND=no
13762        else
13763          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13764          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13765            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13767            BOOT_JDK_FOUND=no
13768          else
13769            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13770            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13771
13772            # Extra M4 quote needed to protect [] in grep expression.
13773            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13774            if test "x$FOUND_VERSION_78" = x; then
13775              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13777              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13778$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13779              BOOT_JDK_FOUND=no
13780            else
13781              # We're done! :-)
13782              BOOT_JDK_FOUND=yes
13783
13784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13785
13786  # Input might be given as Windows format, start by converting to
13787  # unix format.
13788  path="$BOOT_JDK"
13789  new_path=`$CYGPATH -u "$path"`
13790
13791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13794  # "foo.exe" is OK but "foo" is an error.
13795  #
13796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13797  # It is also a way to make sure we got the proper file name for the real test later on.
13798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13799  if test "x$test_shortpath" = x; then
13800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13801$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13802    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13803  fi
13804
13805  # Call helper function which possibly converts this using DOS-style short mode.
13806  # If so, the updated path is stored in $new_path.
13807
13808  input_path="$new_path"
13809  # Check if we need to convert this using DOS-style short mode. If the path
13810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13811  # take no chances and rewrite it.
13812  # Note: m4 eats our [], so we need to use [ and ] instead.
13813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13814  if test "x$has_forbidden_chars" != x; then
13815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13819      # Going to short mode and back again did indeed matter. Since short mode is
13820      # case insensitive, let's make it lowercase to improve readability.
13821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13822      # Now convert it back to Unix-stile (cygpath)
13823      input_path=`$CYGPATH -u "$shortmode_path"`
13824      new_path="$input_path"
13825    fi
13826  fi
13827
13828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13829  if test "x$test_cygdrive_prefix" = x; then
13830    # As a simple fix, exclude /usr/bin since it's not a real path.
13831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13833      # a path prefixed by /cygdrive for fixpath to work.
13834      new_path="$CYGWIN_ROOT_PATH$input_path"
13835    fi
13836  fi
13837
13838
13839  if test "x$path" != "x$new_path"; then
13840    BOOT_JDK="$new_path"
13841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13842$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13843  fi
13844
13845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13846
13847  path="$BOOT_JDK"
13848  has_colon=`$ECHO $path | $GREP ^.:`
13849  new_path="$path"
13850  if test "x$has_colon" = x; then
13851    # Not in mixed or Windows style, start by that.
13852    new_path=`cmd //c echo $path`
13853  fi
13854
13855
13856  input_path="$new_path"
13857  # Check if we need to convert this using DOS-style short mode. If the path
13858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13859  # take no chances and rewrite it.
13860  # Note: m4 eats our [], so we need to use [ and ] instead.
13861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13862  if test "x$has_forbidden_chars" != x; then
13863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13865  fi
13866
13867
13868  windows_path="$new_path"
13869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13870    unix_path=`$CYGPATH -u "$windows_path"`
13871    new_path="$unix_path"
13872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13874    new_path="$unix_path"
13875  fi
13876
13877  if test "x$path" != "x$new_path"; then
13878    BOOT_JDK="$new_path"
13879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13880$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13881  fi
13882
13883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13885
13886  else
13887    # We're on a posix platform. Hooray! :)
13888    path="$BOOT_JDK"
13889    has_space=`$ECHO "$path" | $GREP " "`
13890    if test "x$has_space" != x; then
13891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13892$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13893      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13894    fi
13895
13896    # Use eval to expand a potential ~
13897    eval path="$path"
13898    if test ! -f "$path" && test ! -d "$path"; then
13899      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13900    fi
13901
13902    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13903  fi
13904
13905              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13906$as_echo_n "checking for Boot JDK... " >&6; }
13907              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13908$as_echo "$BOOT_JDK" >&6; }
13909              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13910$as_echo_n "checking Boot JDK version... " >&6; }
13911              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13912              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13913$as_echo "$BOOT_JDK_VERSION" >&6; }
13914            fi # end check jdk version
13915          fi # end check rt.jar
13916        fi # end check javac
13917      fi # end check java
13918    fi # end check boot jdk found
13919  fi
13920
13921    done
13922  fi
13923
13924  fi
13925
13926
13927    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13928    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13929      # Do we have a bin/java?
13930      if test ! -x "$BOOT_JDK/bin/java"; then
13931        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13932$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13933        BOOT_JDK_FOUND=no
13934      else
13935        # Do we have a bin/javac?
13936        if test ! -x "$BOOT_JDK/bin/javac"; then
13937          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13938$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13939          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13940$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13941          BOOT_JDK_FOUND=no
13942        else
13943          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13944          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13945            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13947            BOOT_JDK_FOUND=no
13948          else
13949            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13950            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13951
13952            # Extra M4 quote needed to protect [] in grep expression.
13953            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13954            if test "x$FOUND_VERSION_78" = x; then
13955              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13956$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13957              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13958$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13959              BOOT_JDK_FOUND=no
13960            else
13961              # We're done! :-)
13962              BOOT_JDK_FOUND=yes
13963
13964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13965
13966  # Input might be given as Windows format, start by converting to
13967  # unix format.
13968  path="$BOOT_JDK"
13969  new_path=`$CYGPATH -u "$path"`
13970
13971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13974  # "foo.exe" is OK but "foo" is an error.
13975  #
13976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13977  # It is also a way to make sure we got the proper file name for the real test later on.
13978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13979  if test "x$test_shortpath" = x; then
13980    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13981$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13982    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13983  fi
13984
13985  # Call helper function which possibly converts this using DOS-style short mode.
13986  # If so, the updated path is stored in $new_path.
13987
13988  input_path="$new_path"
13989  # Check if we need to convert this using DOS-style short mode. If the path
13990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13991  # take no chances and rewrite it.
13992  # Note: m4 eats our [], so we need to use [ and ] instead.
13993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13994  if test "x$has_forbidden_chars" != x; then
13995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13999      # Going to short mode and back again did indeed matter. Since short mode is
14000      # case insensitive, let's make it lowercase to improve readability.
14001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14002      # Now convert it back to Unix-stile (cygpath)
14003      input_path=`$CYGPATH -u "$shortmode_path"`
14004      new_path="$input_path"
14005    fi
14006  fi
14007
14008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14009  if test "x$test_cygdrive_prefix" = x; then
14010    # As a simple fix, exclude /usr/bin since it's not a real path.
14011    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14013      # a path prefixed by /cygdrive for fixpath to work.
14014      new_path="$CYGWIN_ROOT_PATH$input_path"
14015    fi
14016  fi
14017
14018
14019  if test "x$path" != "x$new_path"; then
14020    BOOT_JDK="$new_path"
14021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14022$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14023  fi
14024
14025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14026
14027  path="$BOOT_JDK"
14028  has_colon=`$ECHO $path | $GREP ^.:`
14029  new_path="$path"
14030  if test "x$has_colon" = x; then
14031    # Not in mixed or Windows style, start by that.
14032    new_path=`cmd //c echo $path`
14033  fi
14034
14035
14036  input_path="$new_path"
14037  # Check if we need to convert this using DOS-style short mode. If the path
14038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14039  # take no chances and rewrite it.
14040  # Note: m4 eats our [], so we need to use [ and ] instead.
14041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14042  if test "x$has_forbidden_chars" != x; then
14043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14045  fi
14046
14047
14048  windows_path="$new_path"
14049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14050    unix_path=`$CYGPATH -u "$windows_path"`
14051    new_path="$unix_path"
14052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14054    new_path="$unix_path"
14055  fi
14056
14057  if test "x$path" != "x$new_path"; then
14058    BOOT_JDK="$new_path"
14059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14060$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14061  fi
14062
14063  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14064  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14065
14066  else
14067    # We're on a posix platform. Hooray! :)
14068    path="$BOOT_JDK"
14069    has_space=`$ECHO "$path" | $GREP " "`
14070    if test "x$has_space" != x; then
14071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14072$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14073      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14074    fi
14075
14076    # Use eval to expand a potential ~
14077    eval path="$path"
14078    if test ! -f "$path" && test ! -d "$path"; then
14079      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14080    fi
14081
14082    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14083  fi
14084
14085              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14086$as_echo_n "checking for Boot JDK... " >&6; }
14087              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14088$as_echo "$BOOT_JDK" >&6; }
14089              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14090$as_echo_n "checking Boot JDK version... " >&6; }
14091              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14092              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14093$as_echo "$BOOT_JDK_VERSION" >&6; }
14094            fi # end check jdk version
14095          fi # end check rt.jar
14096        fi # end check javac
14097      fi # end check java
14098    fi # end check boot jdk found
14099  fi
14100
14101
14102  if test "x$BOOT_JDK_FOUND" = xno; then
14103    # Now execute the test
14104
14105  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14106  BOOT_JDK_SUFFIX=""
14107  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14108  if test "x$ALL_JDKS_FOUND" != x; then
14109    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14110
14111  if test "x$BOOT_JDK_FOUND" = xno; then
14112    # Now execute the test
14113
14114        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14115        if test -d "$BOOT_JDK"; then
14116          BOOT_JDK_FOUND=maybe
14117          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14118$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14119        fi
14120
14121
14122    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14123    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14124      # Do we have a bin/java?
14125      if test ! -x "$BOOT_JDK/bin/java"; then
14126        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14128        BOOT_JDK_FOUND=no
14129      else
14130        # Do we have a bin/javac?
14131        if test ! -x "$BOOT_JDK/bin/javac"; then
14132          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14133$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14134          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14135$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14136          BOOT_JDK_FOUND=no
14137        else
14138          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14139          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14140            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14142            BOOT_JDK_FOUND=no
14143          else
14144            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14145            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14146
14147            # Extra M4 quote needed to protect [] in grep expression.
14148            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14149            if test "x$FOUND_VERSION_78" = x; then
14150              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14152              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14153$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14154              BOOT_JDK_FOUND=no
14155            else
14156              # We're done! :-)
14157              BOOT_JDK_FOUND=yes
14158
14159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14160
14161  # Input might be given as Windows format, start by converting to
14162  # unix format.
14163  path="$BOOT_JDK"
14164  new_path=`$CYGPATH -u "$path"`
14165
14166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14169  # "foo.exe" is OK but "foo" is an error.
14170  #
14171  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14172  # It is also a way to make sure we got the proper file name for the real test later on.
14173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14174  if test "x$test_shortpath" = x; then
14175    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14176$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14177    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14178  fi
14179
14180  # Call helper function which possibly converts this using DOS-style short mode.
14181  # If so, the updated path is stored in $new_path.
14182
14183  input_path="$new_path"
14184  # Check if we need to convert this using DOS-style short mode. If the path
14185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14186  # take no chances and rewrite it.
14187  # Note: m4 eats our [], so we need to use [ and ] instead.
14188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14189  if test "x$has_forbidden_chars" != x; then
14190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14194      # Going to short mode and back again did indeed matter. Since short mode is
14195      # case insensitive, let's make it lowercase to improve readability.
14196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14197      # Now convert it back to Unix-stile (cygpath)
14198      input_path=`$CYGPATH -u "$shortmode_path"`
14199      new_path="$input_path"
14200    fi
14201  fi
14202
14203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14204  if test "x$test_cygdrive_prefix" = x; then
14205    # As a simple fix, exclude /usr/bin since it's not a real path.
14206    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14208      # a path prefixed by /cygdrive for fixpath to work.
14209      new_path="$CYGWIN_ROOT_PATH$input_path"
14210    fi
14211  fi
14212
14213
14214  if test "x$path" != "x$new_path"; then
14215    BOOT_JDK="$new_path"
14216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14217$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14218  fi
14219
14220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14221
14222  path="$BOOT_JDK"
14223  has_colon=`$ECHO $path | $GREP ^.:`
14224  new_path="$path"
14225  if test "x$has_colon" = x; then
14226    # Not in mixed or Windows style, start by that.
14227    new_path=`cmd //c echo $path`
14228  fi
14229
14230
14231  input_path="$new_path"
14232  # Check if we need to convert this using DOS-style short mode. If the path
14233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14234  # take no chances and rewrite it.
14235  # Note: m4 eats our [], so we need to use [ and ] instead.
14236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14237  if test "x$has_forbidden_chars" != x; then
14238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14240  fi
14241
14242
14243  windows_path="$new_path"
14244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14245    unix_path=`$CYGPATH -u "$windows_path"`
14246    new_path="$unix_path"
14247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14249    new_path="$unix_path"
14250  fi
14251
14252  if test "x$path" != "x$new_path"; then
14253    BOOT_JDK="$new_path"
14254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14255$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14256  fi
14257
14258  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14259  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14260
14261  else
14262    # We're on a posix platform. Hooray! :)
14263    path="$BOOT_JDK"
14264    has_space=`$ECHO "$path" | $GREP " "`
14265    if test "x$has_space" != x; then
14266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14267$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14268      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14269    fi
14270
14271    # Use eval to expand a potential ~
14272    eval path="$path"
14273    if test ! -f "$path" && test ! -d "$path"; then
14274      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14275    fi
14276
14277    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14278  fi
14279
14280              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14281$as_echo_n "checking for Boot JDK... " >&6; }
14282              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14283$as_echo "$BOOT_JDK" >&6; }
14284              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14285$as_echo_n "checking Boot JDK version... " >&6; }
14286              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14287              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14288$as_echo "$BOOT_JDK_VERSION" >&6; }
14289            fi # end check jdk version
14290          fi # end check rt.jar
14291        fi # end check javac
14292      fi # end check java
14293    fi # end check boot jdk found
14294  fi
14295
14296    done
14297  fi
14298
14299
14300    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14301    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14302      # Do we have a bin/java?
14303      if test ! -x "$BOOT_JDK/bin/java"; then
14304        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14306        BOOT_JDK_FOUND=no
14307      else
14308        # Do we have a bin/javac?
14309        if test ! -x "$BOOT_JDK/bin/javac"; then
14310          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14312          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14313$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14314          BOOT_JDK_FOUND=no
14315        else
14316          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14317          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14318            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14320            BOOT_JDK_FOUND=no
14321          else
14322            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14323            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14324
14325            # Extra M4 quote needed to protect [] in grep expression.
14326            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14327            if test "x$FOUND_VERSION_78" = x; then
14328              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14330              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14331$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14332              BOOT_JDK_FOUND=no
14333            else
14334              # We're done! :-)
14335              BOOT_JDK_FOUND=yes
14336
14337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14338
14339  # Input might be given as Windows format, start by converting to
14340  # unix format.
14341  path="$BOOT_JDK"
14342  new_path=`$CYGPATH -u "$path"`
14343
14344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14347  # "foo.exe" is OK but "foo" is an error.
14348  #
14349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14350  # It is also a way to make sure we got the proper file name for the real test later on.
14351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14352  if test "x$test_shortpath" = x; then
14353    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14354$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14355    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14356  fi
14357
14358  # Call helper function which possibly converts this using DOS-style short mode.
14359  # If so, the updated path is stored in $new_path.
14360
14361  input_path="$new_path"
14362  # Check if we need to convert this using DOS-style short mode. If the path
14363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14364  # take no chances and rewrite it.
14365  # Note: m4 eats our [], so we need to use [ and ] instead.
14366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14367  if test "x$has_forbidden_chars" != x; then
14368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14372      # Going to short mode and back again did indeed matter. Since short mode is
14373      # case insensitive, let's make it lowercase to improve readability.
14374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14375      # Now convert it back to Unix-stile (cygpath)
14376      input_path=`$CYGPATH -u "$shortmode_path"`
14377      new_path="$input_path"
14378    fi
14379  fi
14380
14381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14382  if test "x$test_cygdrive_prefix" = x; then
14383    # As a simple fix, exclude /usr/bin since it's not a real path.
14384    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14386      # a path prefixed by /cygdrive for fixpath to work.
14387      new_path="$CYGWIN_ROOT_PATH$input_path"
14388    fi
14389  fi
14390
14391
14392  if test "x$path" != "x$new_path"; then
14393    BOOT_JDK="$new_path"
14394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14395$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14396  fi
14397
14398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14399
14400  path="$BOOT_JDK"
14401  has_colon=`$ECHO $path | $GREP ^.:`
14402  new_path="$path"
14403  if test "x$has_colon" = x; then
14404    # Not in mixed or Windows style, start by that.
14405    new_path=`cmd //c echo $path`
14406  fi
14407
14408
14409  input_path="$new_path"
14410  # Check if we need to convert this using DOS-style short mode. If the path
14411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14412  # take no chances and rewrite it.
14413  # Note: m4 eats our [], so we need to use [ and ] instead.
14414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14415  if test "x$has_forbidden_chars" != x; then
14416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14418  fi
14419
14420
14421  windows_path="$new_path"
14422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14423    unix_path=`$CYGPATH -u "$windows_path"`
14424    new_path="$unix_path"
14425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14427    new_path="$unix_path"
14428  fi
14429
14430  if test "x$path" != "x$new_path"; then
14431    BOOT_JDK="$new_path"
14432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14433$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14434  fi
14435
14436  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14437  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14438
14439  else
14440    # We're on a posix platform. Hooray! :)
14441    path="$BOOT_JDK"
14442    has_space=`$ECHO "$path" | $GREP " "`
14443    if test "x$has_space" != x; then
14444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14445$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14446      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14447    fi
14448
14449    # Use eval to expand a potential ~
14450    eval path="$path"
14451    if test ! -f "$path" && test ! -d "$path"; then
14452      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14453    fi
14454
14455    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14456  fi
14457
14458              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14459$as_echo_n "checking for Boot JDK... " >&6; }
14460              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14461$as_echo "$BOOT_JDK" >&6; }
14462              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14463$as_echo_n "checking Boot JDK version... " >&6; }
14464              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14465              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14466$as_echo "$BOOT_JDK_VERSION" >&6; }
14467            fi # end check jdk version
14468          fi # end check rt.jar
14469        fi # end check javac
14470      fi # end check java
14471    fi # end check boot jdk found
14472  fi
14473
14474  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14475
14476  if test "x$BOOT_JDK_FOUND" = xno; then
14477    # Now execute the test
14478
14479  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14480  BOOT_JDK_SUFFIX="/Contents/Home"
14481  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14482  if test "x$ALL_JDKS_FOUND" != x; then
14483    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14484
14485  if test "x$BOOT_JDK_FOUND" = xno; then
14486    # Now execute the test
14487
14488        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14489        if test -d "$BOOT_JDK"; then
14490          BOOT_JDK_FOUND=maybe
14491          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14492$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14493        fi
14494
14495
14496    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14497    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14498      # Do we have a bin/java?
14499      if test ! -x "$BOOT_JDK/bin/java"; then
14500        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14502        BOOT_JDK_FOUND=no
14503      else
14504        # Do we have a bin/javac?
14505        if test ! -x "$BOOT_JDK/bin/javac"; then
14506          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14508          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14509$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14510          BOOT_JDK_FOUND=no
14511        else
14512          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14513          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14514            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14516            BOOT_JDK_FOUND=no
14517          else
14518            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14519            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14520
14521            # Extra M4 quote needed to protect [] in grep expression.
14522            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14523            if test "x$FOUND_VERSION_78" = x; then
14524              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14526              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14527$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14528              BOOT_JDK_FOUND=no
14529            else
14530              # We're done! :-)
14531              BOOT_JDK_FOUND=yes
14532
14533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14534
14535  # Input might be given as Windows format, start by converting to
14536  # unix format.
14537  path="$BOOT_JDK"
14538  new_path=`$CYGPATH -u "$path"`
14539
14540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14543  # "foo.exe" is OK but "foo" is an error.
14544  #
14545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14546  # It is also a way to make sure we got the proper file name for the real test later on.
14547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14548  if test "x$test_shortpath" = x; then
14549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14550$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14551    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14552  fi
14553
14554  # Call helper function which possibly converts this using DOS-style short mode.
14555  # If so, the updated path is stored in $new_path.
14556
14557  input_path="$new_path"
14558  # Check if we need to convert this using DOS-style short mode. If the path
14559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14560  # take no chances and rewrite it.
14561  # Note: m4 eats our [], so we need to use [ and ] instead.
14562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14563  if test "x$has_forbidden_chars" != x; then
14564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14568      # Going to short mode and back again did indeed matter. Since short mode is
14569      # case insensitive, let's make it lowercase to improve readability.
14570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14571      # Now convert it back to Unix-stile (cygpath)
14572      input_path=`$CYGPATH -u "$shortmode_path"`
14573      new_path="$input_path"
14574    fi
14575  fi
14576
14577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14578  if test "x$test_cygdrive_prefix" = x; then
14579    # As a simple fix, exclude /usr/bin since it's not a real path.
14580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14582      # a path prefixed by /cygdrive for fixpath to work.
14583      new_path="$CYGWIN_ROOT_PATH$input_path"
14584    fi
14585  fi
14586
14587
14588  if test "x$path" != "x$new_path"; then
14589    BOOT_JDK="$new_path"
14590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14591$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14592  fi
14593
14594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14595
14596  path="$BOOT_JDK"
14597  has_colon=`$ECHO $path | $GREP ^.:`
14598  new_path="$path"
14599  if test "x$has_colon" = x; then
14600    # Not in mixed or Windows style, start by that.
14601    new_path=`cmd //c echo $path`
14602  fi
14603
14604
14605  input_path="$new_path"
14606  # Check if we need to convert this using DOS-style short mode. If the path
14607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14608  # take no chances and rewrite it.
14609  # Note: m4 eats our [], so we need to use [ and ] instead.
14610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14611  if test "x$has_forbidden_chars" != x; then
14612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14614  fi
14615
14616
14617  windows_path="$new_path"
14618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14619    unix_path=`$CYGPATH -u "$windows_path"`
14620    new_path="$unix_path"
14621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14623    new_path="$unix_path"
14624  fi
14625
14626  if test "x$path" != "x$new_path"; then
14627    BOOT_JDK="$new_path"
14628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14629$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14630  fi
14631
14632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14634
14635  else
14636    # We're on a posix platform. Hooray! :)
14637    path="$BOOT_JDK"
14638    has_space=`$ECHO "$path" | $GREP " "`
14639    if test "x$has_space" != x; then
14640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14641$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14642      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14643    fi
14644
14645    # Use eval to expand a potential ~
14646    eval path="$path"
14647    if test ! -f "$path" && test ! -d "$path"; then
14648      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14649    fi
14650
14651    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14652  fi
14653
14654              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14655$as_echo_n "checking for Boot JDK... " >&6; }
14656              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14657$as_echo "$BOOT_JDK" >&6; }
14658              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14659$as_echo_n "checking Boot JDK version... " >&6; }
14660              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14661              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14662$as_echo "$BOOT_JDK_VERSION" >&6; }
14663            fi # end check jdk version
14664          fi # end check rt.jar
14665        fi # end check javac
14666      fi # end check java
14667    fi # end check boot jdk found
14668  fi
14669
14670    done
14671  fi
14672
14673
14674    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14675    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14676      # Do we have a bin/java?
14677      if test ! -x "$BOOT_JDK/bin/java"; then
14678        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14680        BOOT_JDK_FOUND=no
14681      else
14682        # Do we have a bin/javac?
14683        if test ! -x "$BOOT_JDK/bin/javac"; then
14684          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14686          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14687$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14688          BOOT_JDK_FOUND=no
14689        else
14690          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14691          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14692            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14694            BOOT_JDK_FOUND=no
14695          else
14696            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14697            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14698
14699            # Extra M4 quote needed to protect [] in grep expression.
14700            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14701            if test "x$FOUND_VERSION_78" = x; then
14702              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14704              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14705$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14706              BOOT_JDK_FOUND=no
14707            else
14708              # We're done! :-)
14709              BOOT_JDK_FOUND=yes
14710
14711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14712
14713  # Input might be given as Windows format, start by converting to
14714  # unix format.
14715  path="$BOOT_JDK"
14716  new_path=`$CYGPATH -u "$path"`
14717
14718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14721  # "foo.exe" is OK but "foo" is an error.
14722  #
14723  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14724  # It is also a way to make sure we got the proper file name for the real test later on.
14725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14726  if test "x$test_shortpath" = x; then
14727    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14729    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14730  fi
14731
14732  # Call helper function which possibly converts this using DOS-style short mode.
14733  # If so, the updated path is stored in $new_path.
14734
14735  input_path="$new_path"
14736  # Check if we need to convert this using DOS-style short mode. If the path
14737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14738  # take no chances and rewrite it.
14739  # Note: m4 eats our [], so we need to use [ and ] instead.
14740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14741  if test "x$has_forbidden_chars" != x; then
14742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14746      # Going to short mode and back again did indeed matter. Since short mode is
14747      # case insensitive, let's make it lowercase to improve readability.
14748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14749      # Now convert it back to Unix-stile (cygpath)
14750      input_path=`$CYGPATH -u "$shortmode_path"`
14751      new_path="$input_path"
14752    fi
14753  fi
14754
14755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14756  if test "x$test_cygdrive_prefix" = x; then
14757    # As a simple fix, exclude /usr/bin since it's not a real path.
14758    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14760      # a path prefixed by /cygdrive for fixpath to work.
14761      new_path="$CYGWIN_ROOT_PATH$input_path"
14762    fi
14763  fi
14764
14765
14766  if test "x$path" != "x$new_path"; then
14767    BOOT_JDK="$new_path"
14768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14769$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14770  fi
14771
14772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14773
14774  path="$BOOT_JDK"
14775  has_colon=`$ECHO $path | $GREP ^.:`
14776  new_path="$path"
14777  if test "x$has_colon" = x; then
14778    # Not in mixed or Windows style, start by that.
14779    new_path=`cmd //c echo $path`
14780  fi
14781
14782
14783  input_path="$new_path"
14784  # Check if we need to convert this using DOS-style short mode. If the path
14785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14786  # take no chances and rewrite it.
14787  # Note: m4 eats our [], so we need to use [ and ] instead.
14788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14789  if test "x$has_forbidden_chars" != x; then
14790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14791    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14792  fi
14793
14794
14795  windows_path="$new_path"
14796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14797    unix_path=`$CYGPATH -u "$windows_path"`
14798    new_path="$unix_path"
14799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14801    new_path="$unix_path"
14802  fi
14803
14804  if test "x$path" != "x$new_path"; then
14805    BOOT_JDK="$new_path"
14806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14807$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14808  fi
14809
14810  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14811  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14812
14813  else
14814    # We're on a posix platform. Hooray! :)
14815    path="$BOOT_JDK"
14816    has_space=`$ECHO "$path" | $GREP " "`
14817    if test "x$has_space" != x; then
14818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14819$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14820      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14821    fi
14822
14823    # Use eval to expand a potential ~
14824    eval path="$path"
14825    if test ! -f "$path" && test ! -d "$path"; then
14826      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14827    fi
14828
14829    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14830  fi
14831
14832              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14833$as_echo_n "checking for Boot JDK... " >&6; }
14834              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14835$as_echo "$BOOT_JDK" >&6; }
14836              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14837$as_echo_n "checking Boot JDK version... " >&6; }
14838              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14839              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14840$as_echo "$BOOT_JDK_VERSION" >&6; }
14841            fi # end check jdk version
14842          fi # end check rt.jar
14843        fi # end check javac
14844      fi # end check java
14845    fi # end check boot jdk found
14846  fi
14847
14848
14849  if test "x$BOOT_JDK_FOUND" = xno; then
14850    # Now execute the test
14851
14852  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14853  BOOT_JDK_SUFFIX="/Contents/Home"
14854  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14855  if test "x$ALL_JDKS_FOUND" != x; then
14856    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14857
14858  if test "x$BOOT_JDK_FOUND" = xno; then
14859    # Now execute the test
14860
14861        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14862        if test -d "$BOOT_JDK"; then
14863          BOOT_JDK_FOUND=maybe
14864          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14865$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14866        fi
14867
14868
14869    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14870    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14871      # Do we have a bin/java?
14872      if test ! -x "$BOOT_JDK/bin/java"; then
14873        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14875        BOOT_JDK_FOUND=no
14876      else
14877        # Do we have a bin/javac?
14878        if test ! -x "$BOOT_JDK/bin/javac"; then
14879          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14881          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14882$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14883          BOOT_JDK_FOUND=no
14884        else
14885          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14886          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14887            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14888$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14889            BOOT_JDK_FOUND=no
14890          else
14891            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14892            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14893
14894            # Extra M4 quote needed to protect [] in grep expression.
14895            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14896            if test "x$FOUND_VERSION_78" = x; then
14897              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14899              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14900$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14901              BOOT_JDK_FOUND=no
14902            else
14903              # We're done! :-)
14904              BOOT_JDK_FOUND=yes
14905
14906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14907
14908  # Input might be given as Windows format, start by converting to
14909  # unix format.
14910  path="$BOOT_JDK"
14911  new_path=`$CYGPATH -u "$path"`
14912
14913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14916  # "foo.exe" is OK but "foo" is an error.
14917  #
14918  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14919  # It is also a way to make sure we got the proper file name for the real test later on.
14920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14921  if test "x$test_shortpath" = x; then
14922    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14923$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14924    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14925  fi
14926
14927  # Call helper function which possibly converts this using DOS-style short mode.
14928  # If so, the updated path is stored in $new_path.
14929
14930  input_path="$new_path"
14931  # Check if we need to convert this using DOS-style short mode. If the path
14932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14933  # take no chances and rewrite it.
14934  # Note: m4 eats our [], so we need to use [ and ] instead.
14935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14936  if test "x$has_forbidden_chars" != x; then
14937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14941      # Going to short mode and back again did indeed matter. Since short mode is
14942      # case insensitive, let's make it lowercase to improve readability.
14943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14944      # Now convert it back to Unix-stile (cygpath)
14945      input_path=`$CYGPATH -u "$shortmode_path"`
14946      new_path="$input_path"
14947    fi
14948  fi
14949
14950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14951  if test "x$test_cygdrive_prefix" = x; then
14952    # As a simple fix, exclude /usr/bin since it's not a real path.
14953    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14955      # a path prefixed by /cygdrive for fixpath to work.
14956      new_path="$CYGWIN_ROOT_PATH$input_path"
14957    fi
14958  fi
14959
14960
14961  if test "x$path" != "x$new_path"; then
14962    BOOT_JDK="$new_path"
14963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14964$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14965  fi
14966
14967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14968
14969  path="$BOOT_JDK"
14970  has_colon=`$ECHO $path | $GREP ^.:`
14971  new_path="$path"
14972  if test "x$has_colon" = x; then
14973    # Not in mixed or Windows style, start by that.
14974    new_path=`cmd //c echo $path`
14975  fi
14976
14977
14978  input_path="$new_path"
14979  # Check if we need to convert this using DOS-style short mode. If the path
14980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14981  # take no chances and rewrite it.
14982  # Note: m4 eats our [], so we need to use [ and ] instead.
14983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14984  if test "x$has_forbidden_chars" != x; then
14985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14987  fi
14988
14989
14990  windows_path="$new_path"
14991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14992    unix_path=`$CYGPATH -u "$windows_path"`
14993    new_path="$unix_path"
14994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14996    new_path="$unix_path"
14997  fi
14998
14999  if test "x$path" != "x$new_path"; then
15000    BOOT_JDK="$new_path"
15001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15002$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15003  fi
15004
15005  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15006  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15007
15008  else
15009    # We're on a posix platform. Hooray! :)
15010    path="$BOOT_JDK"
15011    has_space=`$ECHO "$path" | $GREP " "`
15012    if test "x$has_space" != x; then
15013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15014$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15015      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15016    fi
15017
15018    # Use eval to expand a potential ~
15019    eval path="$path"
15020    if test ! -f "$path" && test ! -d "$path"; then
15021      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15022    fi
15023
15024    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15025  fi
15026
15027              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15028$as_echo_n "checking for Boot JDK... " >&6; }
15029              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15030$as_echo "$BOOT_JDK" >&6; }
15031              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15032$as_echo_n "checking Boot JDK version... " >&6; }
15033              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15034              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15035$as_echo "$BOOT_JDK_VERSION" >&6; }
15036            fi # end check jdk version
15037          fi # end check rt.jar
15038        fi # end check javac
15039      fi # end check java
15040    fi # end check boot jdk found
15041  fi
15042
15043    done
15044  fi
15045
15046
15047    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15048    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15049      # Do we have a bin/java?
15050      if test ! -x "$BOOT_JDK/bin/java"; then
15051        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15053        BOOT_JDK_FOUND=no
15054      else
15055        # Do we have a bin/javac?
15056        if test ! -x "$BOOT_JDK/bin/javac"; then
15057          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15059          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15060$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15061          BOOT_JDK_FOUND=no
15062        else
15063          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15064          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15065            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15067            BOOT_JDK_FOUND=no
15068          else
15069            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15070            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15071
15072            # Extra M4 quote needed to protect [] in grep expression.
15073            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15074            if test "x$FOUND_VERSION_78" = x; then
15075              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15077              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15078$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15079              BOOT_JDK_FOUND=no
15080            else
15081              # We're done! :-)
15082              BOOT_JDK_FOUND=yes
15083
15084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15085
15086  # Input might be given as Windows format, start by converting to
15087  # unix format.
15088  path="$BOOT_JDK"
15089  new_path=`$CYGPATH -u "$path"`
15090
15091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15094  # "foo.exe" is OK but "foo" is an error.
15095  #
15096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15097  # It is also a way to make sure we got the proper file name for the real test later on.
15098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15099  if test "x$test_shortpath" = x; then
15100    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15101$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15102    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15103  fi
15104
15105  # Call helper function which possibly converts this using DOS-style short mode.
15106  # If so, the updated path is stored in $new_path.
15107
15108  input_path="$new_path"
15109  # Check if we need to convert this using DOS-style short mode. If the path
15110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15111  # take no chances and rewrite it.
15112  # Note: m4 eats our [], so we need to use [ and ] instead.
15113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15114  if test "x$has_forbidden_chars" != x; then
15115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15119      # Going to short mode and back again did indeed matter. Since short mode is
15120      # case insensitive, let's make it lowercase to improve readability.
15121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15122      # Now convert it back to Unix-stile (cygpath)
15123      input_path=`$CYGPATH -u "$shortmode_path"`
15124      new_path="$input_path"
15125    fi
15126  fi
15127
15128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15129  if test "x$test_cygdrive_prefix" = x; then
15130    # As a simple fix, exclude /usr/bin since it's not a real path.
15131    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15133      # a path prefixed by /cygdrive for fixpath to work.
15134      new_path="$CYGWIN_ROOT_PATH$input_path"
15135    fi
15136  fi
15137
15138
15139  if test "x$path" != "x$new_path"; then
15140    BOOT_JDK="$new_path"
15141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15142$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15143  fi
15144
15145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15146
15147  path="$BOOT_JDK"
15148  has_colon=`$ECHO $path | $GREP ^.:`
15149  new_path="$path"
15150  if test "x$has_colon" = x; then
15151    # Not in mixed or Windows style, start by that.
15152    new_path=`cmd //c echo $path`
15153  fi
15154
15155
15156  input_path="$new_path"
15157  # Check if we need to convert this using DOS-style short mode. If the path
15158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15159  # take no chances and rewrite it.
15160  # Note: m4 eats our [], so we need to use [ and ] instead.
15161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15162  if test "x$has_forbidden_chars" != x; then
15163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15165  fi
15166
15167
15168  windows_path="$new_path"
15169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15170    unix_path=`$CYGPATH -u "$windows_path"`
15171    new_path="$unix_path"
15172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15174    new_path="$unix_path"
15175  fi
15176
15177  if test "x$path" != "x$new_path"; then
15178    BOOT_JDK="$new_path"
15179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15180$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15181  fi
15182
15183  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15184  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15185
15186  else
15187    # We're on a posix platform. Hooray! :)
15188    path="$BOOT_JDK"
15189    has_space=`$ECHO "$path" | $GREP " "`
15190    if test "x$has_space" != x; then
15191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15192$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15193      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15194    fi
15195
15196    # Use eval to expand a potential ~
15197    eval path="$path"
15198    if test ! -f "$path" && test ! -d "$path"; then
15199      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15200    fi
15201
15202    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15203  fi
15204
15205              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15206$as_echo_n "checking for Boot JDK... " >&6; }
15207              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15208$as_echo "$BOOT_JDK" >&6; }
15209              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15210$as_echo_n "checking Boot JDK version... " >&6; }
15211              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15212              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15213$as_echo "$BOOT_JDK_VERSION" >&6; }
15214            fi # end check jdk version
15215          fi # end check rt.jar
15216        fi # end check javac
15217      fi # end check java
15218    fi # end check boot jdk found
15219  fi
15220
15221  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15222
15223  if test "x$BOOT_JDK_FOUND" = xno; then
15224    # Now execute the test
15225
15226  BOOT_JDK_PREFIX="/usr/lib/jvm"
15227  BOOT_JDK_SUFFIX=""
15228  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15229  if test "x$ALL_JDKS_FOUND" != x; then
15230    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15231
15232  if test "x$BOOT_JDK_FOUND" = xno; then
15233    # Now execute the test
15234
15235        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15236        if test -d "$BOOT_JDK"; then
15237          BOOT_JDK_FOUND=maybe
15238          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15239$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15240        fi
15241
15242
15243    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15244    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15245      # Do we have a bin/java?
15246      if test ! -x "$BOOT_JDK/bin/java"; then
15247        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15249        BOOT_JDK_FOUND=no
15250      else
15251        # Do we have a bin/javac?
15252        if test ! -x "$BOOT_JDK/bin/javac"; then
15253          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15255          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15256$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15257          BOOT_JDK_FOUND=no
15258        else
15259          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15260          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15261            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15263            BOOT_JDK_FOUND=no
15264          else
15265            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15266            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15267
15268            # Extra M4 quote needed to protect [] in grep expression.
15269            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15270            if test "x$FOUND_VERSION_78" = x; then
15271              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15273              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15274$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15275              BOOT_JDK_FOUND=no
15276            else
15277              # We're done! :-)
15278              BOOT_JDK_FOUND=yes
15279
15280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15281
15282  # Input might be given as Windows format, start by converting to
15283  # unix format.
15284  path="$BOOT_JDK"
15285  new_path=`$CYGPATH -u "$path"`
15286
15287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15290  # "foo.exe" is OK but "foo" is an error.
15291  #
15292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15293  # It is also a way to make sure we got the proper file name for the real test later on.
15294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15295  if test "x$test_shortpath" = x; then
15296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15297$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15298    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15299  fi
15300
15301  # Call helper function which possibly converts this using DOS-style short mode.
15302  # If so, the updated path is stored in $new_path.
15303
15304  input_path="$new_path"
15305  # Check if we need to convert this using DOS-style short mode. If the path
15306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15307  # take no chances and rewrite it.
15308  # Note: m4 eats our [], so we need to use [ and ] instead.
15309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15310  if test "x$has_forbidden_chars" != x; then
15311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15315      # Going to short mode and back again did indeed matter. Since short mode is
15316      # case insensitive, let's make it lowercase to improve readability.
15317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15318      # Now convert it back to Unix-stile (cygpath)
15319      input_path=`$CYGPATH -u "$shortmode_path"`
15320      new_path="$input_path"
15321    fi
15322  fi
15323
15324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15325  if test "x$test_cygdrive_prefix" = x; then
15326    # As a simple fix, exclude /usr/bin since it's not a real path.
15327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15329      # a path prefixed by /cygdrive for fixpath to work.
15330      new_path="$CYGWIN_ROOT_PATH$input_path"
15331    fi
15332  fi
15333
15334
15335  if test "x$path" != "x$new_path"; then
15336    BOOT_JDK="$new_path"
15337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15339  fi
15340
15341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15342
15343  path="$BOOT_JDK"
15344  has_colon=`$ECHO $path | $GREP ^.:`
15345  new_path="$path"
15346  if test "x$has_colon" = x; then
15347    # Not in mixed or Windows style, start by that.
15348    new_path=`cmd //c echo $path`
15349  fi
15350
15351
15352  input_path="$new_path"
15353  # Check if we need to convert this using DOS-style short mode. If the path
15354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15355  # take no chances and rewrite it.
15356  # Note: m4 eats our [], so we need to use [ and ] instead.
15357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15358  if test "x$has_forbidden_chars" != x; then
15359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15361  fi
15362
15363
15364  windows_path="$new_path"
15365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15366    unix_path=`$CYGPATH -u "$windows_path"`
15367    new_path="$unix_path"
15368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15370    new_path="$unix_path"
15371  fi
15372
15373  if test "x$path" != "x$new_path"; then
15374    BOOT_JDK="$new_path"
15375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15376$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15377  fi
15378
15379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15381
15382  else
15383    # We're on a posix platform. Hooray! :)
15384    path="$BOOT_JDK"
15385    has_space=`$ECHO "$path" | $GREP " "`
15386    if test "x$has_space" != x; then
15387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15388$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15389      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15390    fi
15391
15392    # Use eval to expand a potential ~
15393    eval path="$path"
15394    if test ! -f "$path" && test ! -d "$path"; then
15395      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15396    fi
15397
15398    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15399  fi
15400
15401              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15402$as_echo_n "checking for Boot JDK... " >&6; }
15403              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15404$as_echo "$BOOT_JDK" >&6; }
15405              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15406$as_echo_n "checking Boot JDK version... " >&6; }
15407              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15408              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15409$as_echo "$BOOT_JDK_VERSION" >&6; }
15410            fi # end check jdk version
15411          fi # end check rt.jar
15412        fi # end check javac
15413      fi # end check java
15414    fi # end check boot jdk found
15415  fi
15416
15417    done
15418  fi
15419
15420
15421    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15422    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15423      # Do we have a bin/java?
15424      if test ! -x "$BOOT_JDK/bin/java"; then
15425        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15427        BOOT_JDK_FOUND=no
15428      else
15429        # Do we have a bin/javac?
15430        if test ! -x "$BOOT_JDK/bin/javac"; then
15431          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15433          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15434$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15435          BOOT_JDK_FOUND=no
15436        else
15437          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15438          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15439            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15441            BOOT_JDK_FOUND=no
15442          else
15443            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15444            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15445
15446            # Extra M4 quote needed to protect [] in grep expression.
15447            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15448            if test "x$FOUND_VERSION_78" = x; then
15449              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15451              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15452$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15453              BOOT_JDK_FOUND=no
15454            else
15455              # We're done! :-)
15456              BOOT_JDK_FOUND=yes
15457
15458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15459
15460  # Input might be given as Windows format, start by converting to
15461  # unix format.
15462  path="$BOOT_JDK"
15463  new_path=`$CYGPATH -u "$path"`
15464
15465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15468  # "foo.exe" is OK but "foo" is an error.
15469  #
15470  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15471  # It is also a way to make sure we got the proper file name for the real test later on.
15472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15473  if test "x$test_shortpath" = x; then
15474    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15476    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15477  fi
15478
15479  # Call helper function which possibly converts this using DOS-style short mode.
15480  # If so, the updated path is stored in $new_path.
15481
15482  input_path="$new_path"
15483  # Check if we need to convert this using DOS-style short mode. If the path
15484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15485  # take no chances and rewrite it.
15486  # Note: m4 eats our [], so we need to use [ and ] instead.
15487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15488  if test "x$has_forbidden_chars" != x; then
15489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15493      # Going to short mode and back again did indeed matter. Since short mode is
15494      # case insensitive, let's make it lowercase to improve readability.
15495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15496      # Now convert it back to Unix-stile (cygpath)
15497      input_path=`$CYGPATH -u "$shortmode_path"`
15498      new_path="$input_path"
15499    fi
15500  fi
15501
15502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15503  if test "x$test_cygdrive_prefix" = x; then
15504    # As a simple fix, exclude /usr/bin since it's not a real path.
15505    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15507      # a path prefixed by /cygdrive for fixpath to work.
15508      new_path="$CYGWIN_ROOT_PATH$input_path"
15509    fi
15510  fi
15511
15512
15513  if test "x$path" != "x$new_path"; then
15514    BOOT_JDK="$new_path"
15515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15516$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15517  fi
15518
15519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15520
15521  path="$BOOT_JDK"
15522  has_colon=`$ECHO $path | $GREP ^.:`
15523  new_path="$path"
15524  if test "x$has_colon" = x; then
15525    # Not in mixed or Windows style, start by that.
15526    new_path=`cmd //c echo $path`
15527  fi
15528
15529
15530  input_path="$new_path"
15531  # Check if we need to convert this using DOS-style short mode. If the path
15532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15533  # take no chances and rewrite it.
15534  # Note: m4 eats our [], so we need to use [ and ] instead.
15535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15536  if test "x$has_forbidden_chars" != x; then
15537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15539  fi
15540
15541
15542  windows_path="$new_path"
15543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15544    unix_path=`$CYGPATH -u "$windows_path"`
15545    new_path="$unix_path"
15546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15548    new_path="$unix_path"
15549  fi
15550
15551  if test "x$path" != "x$new_path"; then
15552    BOOT_JDK="$new_path"
15553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15554$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15555  fi
15556
15557  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15558  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15559
15560  else
15561    # We're on a posix platform. Hooray! :)
15562    path="$BOOT_JDK"
15563    has_space=`$ECHO "$path" | $GREP " "`
15564    if test "x$has_space" != x; then
15565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15566$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15567      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15568    fi
15569
15570    # Use eval to expand a potential ~
15571    eval path="$path"
15572    if test ! -f "$path" && test ! -d "$path"; then
15573      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15574    fi
15575
15576    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15577  fi
15578
15579              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15580$as_echo_n "checking for Boot JDK... " >&6; }
15581              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15582$as_echo "$BOOT_JDK" >&6; }
15583              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15584$as_echo_n "checking Boot JDK version... " >&6; }
15585              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15586              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15587$as_echo "$BOOT_JDK_VERSION" >&6; }
15588            fi # end check jdk version
15589          fi # end check rt.jar
15590        fi # end check javac
15591      fi # end check java
15592    fi # end check boot jdk found
15593  fi
15594
15595  fi
15596
15597
15598    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15599    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15600      # Do we have a bin/java?
15601      if test ! -x "$BOOT_JDK/bin/java"; then
15602        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15604        BOOT_JDK_FOUND=no
15605      else
15606        # Do we have a bin/javac?
15607        if test ! -x "$BOOT_JDK/bin/javac"; then
15608          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15610          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15611$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15612          BOOT_JDK_FOUND=no
15613        else
15614          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15615          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15616            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15618            BOOT_JDK_FOUND=no
15619          else
15620            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15621            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15622
15623            # Extra M4 quote needed to protect [] in grep expression.
15624            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15625            if test "x$FOUND_VERSION_78" = x; then
15626              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15628              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15629$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15630              BOOT_JDK_FOUND=no
15631            else
15632              # We're done! :-)
15633              BOOT_JDK_FOUND=yes
15634
15635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15636
15637  # Input might be given as Windows format, start by converting to
15638  # unix format.
15639  path="$BOOT_JDK"
15640  new_path=`$CYGPATH -u "$path"`
15641
15642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15645  # "foo.exe" is OK but "foo" is an error.
15646  #
15647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15648  # It is also a way to make sure we got the proper file name for the real test later on.
15649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15650  if test "x$test_shortpath" = x; then
15651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15653    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15654  fi
15655
15656  # Call helper function which possibly converts this using DOS-style short mode.
15657  # If so, the updated path is stored in $new_path.
15658
15659  input_path="$new_path"
15660  # Check if we need to convert this using DOS-style short mode. If the path
15661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15662  # take no chances and rewrite it.
15663  # Note: m4 eats our [], so we need to use [ and ] instead.
15664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15665  if test "x$has_forbidden_chars" != x; then
15666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15670      # Going to short mode and back again did indeed matter. Since short mode is
15671      # case insensitive, let's make it lowercase to improve readability.
15672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15673      # Now convert it back to Unix-stile (cygpath)
15674      input_path=`$CYGPATH -u "$shortmode_path"`
15675      new_path="$input_path"
15676    fi
15677  fi
15678
15679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15680  if test "x$test_cygdrive_prefix" = x; then
15681    # As a simple fix, exclude /usr/bin since it's not a real path.
15682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15684      # a path prefixed by /cygdrive for fixpath to work.
15685      new_path="$CYGWIN_ROOT_PATH$input_path"
15686    fi
15687  fi
15688
15689
15690  if test "x$path" != "x$new_path"; then
15691    BOOT_JDK="$new_path"
15692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15693$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15694  fi
15695
15696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15697
15698  path="$BOOT_JDK"
15699  has_colon=`$ECHO $path | $GREP ^.:`
15700  new_path="$path"
15701  if test "x$has_colon" = x; then
15702    # Not in mixed or Windows style, start by that.
15703    new_path=`cmd //c echo $path`
15704  fi
15705
15706
15707  input_path="$new_path"
15708  # Check if we need to convert this using DOS-style short mode. If the path
15709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15710  # take no chances and rewrite it.
15711  # Note: m4 eats our [], so we need to use [ and ] instead.
15712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15713  if test "x$has_forbidden_chars" != x; then
15714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15716  fi
15717
15718
15719  windows_path="$new_path"
15720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15721    unix_path=`$CYGPATH -u "$windows_path"`
15722    new_path="$unix_path"
15723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15725    new_path="$unix_path"
15726  fi
15727
15728  if test "x$path" != "x$new_path"; then
15729    BOOT_JDK="$new_path"
15730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15731$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15732  fi
15733
15734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15736
15737  else
15738    # We're on a posix platform. Hooray! :)
15739    path="$BOOT_JDK"
15740    has_space=`$ECHO "$path" | $GREP " "`
15741    if test "x$has_space" != x; then
15742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15743$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15744      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15745    fi
15746
15747    # Use eval to expand a potential ~
15748    eval path="$path"
15749    if test ! -f "$path" && test ! -d "$path"; then
15750      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15751    fi
15752
15753    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15754  fi
15755
15756              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15757$as_echo_n "checking for Boot JDK... " >&6; }
15758              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15759$as_echo "$BOOT_JDK" >&6; }
15760              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15761$as_echo_n "checking Boot JDK version... " >&6; }
15762              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15763              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15764$as_echo "$BOOT_JDK_VERSION" >&6; }
15765            fi # end check jdk version
15766          fi # end check rt.jar
15767        fi # end check javac
15768      fi # end check java
15769    fi # end check boot jdk found
15770  fi
15771
15772
15773# If we haven't found anything yet, we've truly lost. Give up.
15774if test "x$BOOT_JDK_FOUND" = xno; then
15775
15776    # Print a helpful message on how to acquire the necessary build dependency.
15777    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15778    MISSING_DEPENDENCY=openjdk
15779    PKGHANDLER_COMMAND=
15780
15781    case $PKGHANDLER in
15782	apt-get)
15783                apt_help     $MISSING_DEPENDENCY ;;
15784    yum)
15785                yum_help     $MISSING_DEPENDENCY ;;
15786	port)
15787                port_help    $MISSING_DEPENDENCY ;;
15788	pkgutil)
15789                pkgutil_help $MISSING_DEPENDENCY ;;
15790	pkgadd)
15791                pkgadd_help  $MISSING_DEPENDENCY ;;
15792    * )
15793      break ;;
15794    esac
15795
15796    if test "x$PKGHANDLER_COMMAND" != x; then
15797        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15798    fi
15799
15800  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15801$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15802  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15803$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15804  as_fn_error $? "Cannot continue" "$LINENO" 5
15805fi
15806
15807# Setup proper paths for what we found
15808BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15809if test ! -f "$BOOT_RTJAR"; then
15810    # On MacOSX it is called classes.jar
15811    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15812    if test -f "$BOOT_RTJAR"; then
15813      # Remove the ..
15814      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15815    fi
15816fi
15817BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15818BOOT_JDK="$BOOT_JDK"
15819
15820
15821
15822
15823# Setup tools from the Boot JDK.
15824
15825  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15826$as_echo_n "checking for java in Boot JDK... " >&6; }
15827  JAVA=$BOOT_JDK/bin/java
15828  if test ! -x $JAVA; then
15829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15830$as_echo "not found" >&6; }
15831      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15832$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15833      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15834  fi
15835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15836$as_echo "ok" >&6; }
15837
15838
15839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15840$as_echo_n "checking for javac in Boot JDK... " >&6; }
15841  JAVAC=$BOOT_JDK/bin/javac
15842  if test ! -x $JAVAC; then
15843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15844$as_echo "not found" >&6; }
15845      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15846$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15847      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15848  fi
15849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15850$as_echo "ok" >&6; }
15851
15852
15853  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15854$as_echo_n "checking for javah in Boot JDK... " >&6; }
15855  JAVAH=$BOOT_JDK/bin/javah
15856  if test ! -x $JAVAH; then
15857      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15858$as_echo "not found" >&6; }
15859      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15860$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15861      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15862  fi
15863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15864$as_echo "ok" >&6; }
15865
15866
15867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15868$as_echo_n "checking for javap in Boot JDK... " >&6; }
15869  JAVAP=$BOOT_JDK/bin/javap
15870  if test ! -x $JAVAP; then
15871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15872$as_echo "not found" >&6; }
15873      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15874$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15875      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15876  fi
15877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15878$as_echo "ok" >&6; }
15879
15880
15881  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15882$as_echo_n "checking for jar in Boot JDK... " >&6; }
15883  JAR=$BOOT_JDK/bin/jar
15884  if test ! -x $JAR; then
15885      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15886$as_echo "not found" >&6; }
15887      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15888$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15889      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15890  fi
15891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15892$as_echo "ok" >&6; }
15893
15894
15895  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15896$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15897  RMIC=$BOOT_JDK/bin/rmic
15898  if test ! -x $RMIC; then
15899      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15900$as_echo "not found" >&6; }
15901      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15902$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15903      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15904  fi
15905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15906$as_echo "ok" >&6; }
15907
15908
15909  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15910$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15911  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15912  if test ! -x $NATIVE2ASCII; then
15913      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15914$as_echo "not found" >&6; }
15915      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15916$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15917      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15918  fi
15919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15920$as_echo "ok" >&6; }
15921
15922
15923# Finally, set some other options...
15924
15925# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15926BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15927
15928
15929
15930
15931##############################################################################
15932#
15933# Specify options for anything that is run with the Boot JDK.
15934#
15935
15936# Check whether --with-boot-jdk-jvmargs was given.
15937if test "${with_boot_jdk_jvmargs+set}" = set; then :
15938  withval=$with_boot_jdk_jvmargs;
15939fi
15940
15941
15942if test "x$with_boot_jdk_jvmargs" = x; then
15943    # Not all JVM:s accept the same arguments on the command line.
15944    # OpenJDK specific increase in thread stack for JDK build,
15945    # well more specifically, when running javac.
15946    if test "x$BUILD_NUM_BITS" = x32; then
15947       STACK_SIZE=768
15948    else
15949       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15950       # since 64-bit pointers are pushed on the stach. Apparently, we need
15951       # to increase the stack space when javacing the JDK....
15952       STACK_SIZE=1536
15953    fi
15954
15955    # Minimum amount of heap memory.
15956
15957    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15958    $ECHO "Command: $JAVA -Xms64M -version" >&5
15959    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15960    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15961    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15962    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15963        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15964	JVM_ARG_OK=true
15965    else
15966	$ECHO "Arg failed:" >&5
15967	$ECHO "$OUTPUT" >&5
15968	JVM_ARG_OK=false
15969    fi
15970
15971    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15972        # Why does macosx need more heap? Its the huge JDK batch.
15973
15974    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15975    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15976    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15977    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15978    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15979    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15980        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15981	JVM_ARG_OK=true
15982    else
15983	$ECHO "Arg failed:" >&5
15984	$ECHO "$OUTPUT" >&5
15985	JVM_ARG_OK=false
15986    fi
15987
15988    else
15989
15990    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15991    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15992    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15993    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15994    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15995    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15996        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15997	JVM_ARG_OK=true
15998    else
15999	$ECHO "Arg failed:" >&5
16000	$ECHO "$OUTPUT" >&5
16001	JVM_ARG_OK=false
16002    fi
16003
16004    fi
16005    # When is adding -client something that speeds up the JVM?
16006    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
16007
16008    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16009    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16010    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16011    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16012    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16013    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16014        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
16015	JVM_ARG_OK=true
16016    else
16017	$ECHO "Arg failed:" >&5
16018	$ECHO "$OUTPUT" >&5
16019	JVM_ARG_OK=false
16020    fi
16021
16022
16023    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16024    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16025    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16026    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16027    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16028    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16029        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
16030	JVM_ARG_OK=true
16031    else
16032	$ECHO "Arg failed:" >&5
16033	$ECHO "$OUTPUT" >&5
16034	JVM_ARG_OK=false
16035    fi
16036
16037
16038    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16039    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16040    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16041    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16042    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16043    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16044        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16045	JVM_ARG_OK=true
16046    else
16047	$ECHO "Arg failed:" >&5
16048	$ECHO "$OUTPUT" >&5
16049	JVM_ARG_OK=false
16050    fi
16051
16052    # Disable special log output when a debug build is used as Boot JDK...
16053
16054    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16055    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16056    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16057    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16058    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16059    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16060        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16061	JVM_ARG_OK=true
16062    else
16063	$ECHO "Arg failed:" >&5
16064	$ECHO "$OUTPUT" >&5
16065	JVM_ARG_OK=false
16066    fi
16067
16068fi
16069
16070BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16071
16072
16073
16074###############################################################################
16075#
16076# Configure the sources to use. We can add or override individual directories.
16077#
16078###############################################################################
16079
16080
16081
16082# Where are the sources. Any of these can be overridden
16083# using --with-override-corba and the likes.
16084LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16085CORBA_TOPDIR="$SRC_ROOT/corba"
16086JAXP_TOPDIR="$SRC_ROOT/jaxp"
16087JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16088HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16089NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16090JDK_TOPDIR="$SRC_ROOT/jdk"
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101###############################################################################
16102#
16103# Pickup additional source for a component from outside of the source root
16104# or override source for a component.
16105#
16106
16107# Check whether --with-add-source-root was given.
16108if test "${with_add_source_root+set}" = set; then :
16109  withval=$with_add_source_root;
16110fi
16111
16112
16113
16114# Check whether --with-override-source-root was given.
16115if test "${with_override_source_root+set}" = set; then :
16116  withval=$with_override_source_root;
16117fi
16118
16119
16120
16121# Check whether --with-adds-and-overrides was given.
16122if test "${with_adds_and_overrides+set}" = set; then :
16123  withval=$with_adds_and_overrides;
16124fi
16125
16126
16127if test "x$with_adds_and_overrides" != x; then
16128    with_add_source_root="$with_adds_and_overrides/adds"
16129    with_override_source_root="$with_adds_and_overrides/overrides"
16130fi
16131
16132if test "x$with_add_source_root" != x; then
16133    if ! test -d $with_add_source_root; then
16134       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16135    fi
16136    CURDIR="$PWD"
16137    cd "$with_add_source_root"
16138    ADD_SRC_ROOT="`pwd`"
16139    cd "$CURDIR"
16140    # Verify that the addon source root does not have any root makefiles.
16141    # If it does, then it is usually an error, prevent this.
16142    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16143       test -f $with_add_source_root/langtools/make/Makefile; then
16144        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
16145    fi
16146    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16147       test -f $with_add_source_root/corba/make/Makefile; then
16148        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
16149    fi
16150    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16151       test -f $with_add_source_root/jaxp/make/Makefile; then
16152        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
16153    fi
16154    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16155       test -f $with_add_source_root/jaxws/make/Makefile; then
16156        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
16157    fi
16158    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16159       test -f $with_add_source_root/hotspot/make/Makefile; then
16160        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
16161    fi
16162    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16163       test -f $with_add_source_root/jdk/make/Makefile; then
16164        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
16165    fi
16166fi
16167
16168
16169if test "x$with_override_source_root" != x; then
16170    if ! test -d $with_override_source_root; then
16171       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16172    fi
16173    CURDIR="$PWD"
16174    cd "$with_override_source_root"
16175    OVERRIDE_SRC_ROOT="`pwd`"
16176    cd "$CURDIR"
16177    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16178       test -f $with_override_source_root/langtools/make/Makefile; then
16179        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
16180    fi
16181    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16182       test -f $with_override_source_root/corba/make/Makefile; then
16183        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
16184    fi
16185    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16186       test -f $with_override_source_root/jaxp/make/Makefile; then
16187        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
16188    fi
16189    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16190       test -f $with_override_source_root/jaxws/make/Makefile; then
16191        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
16192    fi
16193    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16194       test -f $with_override_source_root/hotspot/make/Makefile; then
16195        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
16196    fi
16197    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16198       test -f $with_override_source_root/jdk/make/Makefile; then
16199        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
16200    fi
16201fi
16202
16203
16204###############################################################################
16205#
16206# Override a repo completely, this is used for example when you have 3 small
16207# development sandboxes of the langtools sources and want to avoid having 3 full
16208# OpenJDK sources checked out on disk.
16209#
16210# Assuming that the 3 langtools sandboxes are located here:
16211# /home/fredrik/sandbox1/langtools
16212# /home/fredrik/sandbox2/langtools
16213# /home/fredrik/sandbox3/langtools
16214#
16215# From the source root you create build subdirs manually:
16216#     mkdir -p build1 build2 build3
16217# in each build directory run:
16218#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16219#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16220#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16221#
16222
16223
16224# Check whether --with-override-langtools was given.
16225if test "${with_override_langtools+set}" = set; then :
16226  withval=$with_override_langtools;
16227fi
16228
16229
16230
16231# Check whether --with-override-corba was given.
16232if test "${with_override_corba+set}" = set; then :
16233  withval=$with_override_corba;
16234fi
16235
16236
16237
16238# Check whether --with-override-jaxp was given.
16239if test "${with_override_jaxp+set}" = set; then :
16240  withval=$with_override_jaxp;
16241fi
16242
16243
16244
16245# Check whether --with-override-jaxws was given.
16246if test "${with_override_jaxws+set}" = set; then :
16247  withval=$with_override_jaxws;
16248fi
16249
16250
16251
16252# Check whether --with-override-hotspot was given.
16253if test "${with_override_hotspot+set}" = set; then :
16254  withval=$with_override_hotspot;
16255fi
16256
16257
16258
16259# Check whether --with-override-jdk was given.
16260if test "${with_override_jdk+set}" = set; then :
16261  withval=$with_override_jdk;
16262fi
16263
16264
16265if test "x$with_override_langtools" != x; then
16266    CURDIR="$PWD"
16267    cd "$with_override_langtools"
16268    LANGTOOLS_TOPDIR="`pwd`"
16269    cd "$CURDIR"
16270    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16271        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16272    fi
16273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16274$as_echo_n "checking if langtools should be overridden... " >&6; }
16275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16276$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16277fi
16278if test "x$with_override_corba" != x; then
16279    CURDIR="$PWD"
16280    cd "$with_override_corba"
16281    CORBA_TOPDIR="`pwd`"
16282    cd "$CURDIR"
16283    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16284        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16285    fi
16286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16287$as_echo_n "checking if corba should be overridden... " >&6; }
16288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16289$as_echo "yes with $CORBA_TOPDIR" >&6; }
16290fi
16291if test "x$with_override_jaxp" != x; then
16292    CURDIR="$PWD"
16293    cd "$with_override_jaxp"
16294    JAXP_TOPDIR="`pwd`"
16295    cd "$CURDIR"
16296    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16297        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16298    fi
16299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16300$as_echo_n "checking if jaxp should be overridden... " >&6; }
16301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16302$as_echo "yes with $JAXP_TOPDIR" >&6; }
16303fi
16304if test "x$with_override_jaxws" != x; then
16305    CURDIR="$PWD"
16306    cd "$with_override_jaxws"
16307    JAXWS_TOPDIR="`pwd`"
16308    cd "$CURDIR"
16309    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16310        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16311    fi
16312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16313$as_echo_n "checking if jaxws should be overridden... " >&6; }
16314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16315$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16316fi
16317if test "x$with_override_hotspot" != x; then
16318    CURDIR="$PWD"
16319    cd "$with_override_hotspot"
16320    HOTSPOT_TOPDIR="`pwd`"
16321    cd "$CURDIR"
16322    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16323       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16324        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16325    fi
16326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16327$as_echo_n "checking if hotspot should be overridden... " >&6; }
16328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16329$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16330fi
16331if test "x$with_override_nashorn" != x; then
16332    CURDIR="$PWD"
16333    cd "$with_override_nashorn"
16334    NASHORN_TOPDIR="`pwd`"
16335    cd "$CURDIR"
16336    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16337        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16338    fi
16339    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16340$as_echo_n "checking if nashorn should be overridden... " >&6; }
16341    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16342$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16343fi
16344if test "x$with_override_jdk" != x; then
16345    CURDIR="$PWD"
16346    cd "$with_override_jdk"
16347    JDK_TOPDIR="`pwd`"
16348    cd "$CURDIR"
16349    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16350        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16351    fi
16352    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16353$as_echo_n "checking if JDK should be overridden... " >&6; }
16354    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16355$as_echo "yes with $JDK_TOPDIR" >&6; }
16356fi
16357
16358
16359
16360BUILD_OUTPUT="$OUTPUT_ROOT"
16361
16362
16363HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16364BUILD_HOTSPOT=true
16365
16366
16367
16368# Check whether --with-import-hotspot was given.
16369if test "${with_import_hotspot+set}" = set; then :
16370  withval=$with_import_hotspot;
16371fi
16372
16373if test "x$with_import_hotspot" != x; then
16374    CURDIR="$PWD"
16375    cd "$with_import_hotspot"
16376    HOTSPOT_DIST="`pwd`"
16377    cd "$CURDIR"
16378    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16379        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16380    fi
16381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16382$as_echo_n "checking if hotspot should be imported... " >&6; }
16383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16384$as_echo "yes from $HOTSPOT_DIST" >&6; }
16385    BUILD_HOTSPOT=false
16386fi
16387
16388JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16389
16390
16391###############################################################################
16392#
16393# Setup the toolchain (compilers etc), i.e. the tools that need to be
16394# cross-compilation aware.
16395#
16396###############################################################################
16397
16398
16399###############################################################################
16400#
16401# Configure the development tool paths and potential sysroot.
16402#
16403ac_ext=cpp
16404ac_cpp='$CXXCPP $CPPFLAGS'
16405ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16406ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16407ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16408
16409
16410# The option used to specify the target .o,.a or .so file.
16411# When compiling, how to specify the to be created object file.
16412CC_OUT_OPTION='-o$(SPACE)'
16413# When linking, how to specify the to be created executable.
16414EXE_OUT_OPTION='-o$(SPACE)'
16415# When linking, how to specify the to be created dynamically linkable library.
16416LD_OUT_OPTION='-o$(SPACE)'
16417# When archiving, how to specify the to be create static archive for object files.
16418AR_OUT_OPTION='rcs$(SPACE)'
16419
16420
16421
16422
16423
16424# Locate the actual tools
16425
16426
16427# Check whether --with-jtreg was given.
16428if test "${with_jtreg+set}" = set; then :
16429  withval=$with_jtreg;
16430else
16431  with_jtreg=no
16432fi
16433
16434
16435  if test "x$with_jtreg" = xno; then
16436    # jtreg disabled
16437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16438$as_echo_n "checking for jtreg... " >&6; }
16439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16440$as_echo "no" >&6; }
16441  else
16442    if test "x$with_jtreg" != xyes; then
16443      # with path specified.
16444      JT_HOME="$with_jtreg"
16445    fi
16446
16447    if test "x$JT_HOME" != x; then
16448      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16449$as_echo_n "checking for jtreg... " >&6; }
16450
16451      # use JT_HOME enviroment var.
16452
16453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16454
16455  # Input might be given as Windows format, start by converting to
16456  # unix format.
16457  path="$JT_HOME"
16458  new_path=`$CYGPATH -u "$path"`
16459
16460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16463  # "foo.exe" is OK but "foo" is an error.
16464  #
16465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16466  # It is also a way to make sure we got the proper file name for the real test later on.
16467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16468  if test "x$test_shortpath" = x; then
16469    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16470$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16471    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16472  fi
16473
16474  # Call helper function which possibly converts this using DOS-style short mode.
16475  # If so, the updated path is stored in $new_path.
16476
16477  input_path="$new_path"
16478  # Check if we need to convert this using DOS-style short mode. If the path
16479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16480  # take no chances and rewrite it.
16481  # Note: m4 eats our [], so we need to use [ and ] instead.
16482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16483  if test "x$has_forbidden_chars" != x; then
16484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16488      # Going to short mode and back again did indeed matter. Since short mode is
16489      # case insensitive, let's make it lowercase to improve readability.
16490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16491      # Now convert it back to Unix-stile (cygpath)
16492      input_path=`$CYGPATH -u "$shortmode_path"`
16493      new_path="$input_path"
16494    fi
16495  fi
16496
16497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16498  if test "x$test_cygdrive_prefix" = x; then
16499    # As a simple fix, exclude /usr/bin since it's not a real path.
16500    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16502      # a path prefixed by /cygdrive for fixpath to work.
16503      new_path="$CYGWIN_ROOT_PATH$input_path"
16504    fi
16505  fi
16506
16507
16508  if test "x$path" != "x$new_path"; then
16509    JT_HOME="$new_path"
16510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16511$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16512  fi
16513
16514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16515
16516  path="$JT_HOME"
16517  has_colon=`$ECHO $path | $GREP ^.:`
16518  new_path="$path"
16519  if test "x$has_colon" = x; then
16520    # Not in mixed or Windows style, start by that.
16521    new_path=`cmd //c echo $path`
16522  fi
16523
16524
16525  input_path="$new_path"
16526  # Check if we need to convert this using DOS-style short mode. If the path
16527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16528  # take no chances and rewrite it.
16529  # Note: m4 eats our [], so we need to use [ and ] instead.
16530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16531  if test "x$has_forbidden_chars" != x; then
16532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16534  fi
16535
16536
16537  windows_path="$new_path"
16538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16539    unix_path=`$CYGPATH -u "$windows_path"`
16540    new_path="$unix_path"
16541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16543    new_path="$unix_path"
16544  fi
16545
16546  if test "x$path" != "x$new_path"; then
16547    JT_HOME="$new_path"
16548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16549$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16550  fi
16551
16552  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16553  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16554
16555  else
16556    # We're on a posix platform. Hooray! :)
16557    path="$JT_HOME"
16558    has_space=`$ECHO "$path" | $GREP " "`
16559    if test "x$has_space" != x; then
16560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16561$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16562      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16563    fi
16564
16565    # Use eval to expand a potential ~
16566    eval path="$path"
16567    if test ! -f "$path" && test ! -d "$path"; then
16568      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16569    fi
16570
16571    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16572  fi
16573
16574
16575      # jtreg win32 script works for everybody
16576      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16577
16578      if test ! -f "$JTREGEXE"; then
16579        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16580      fi
16581
16582      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16583$as_echo "$JTREGEXE" >&6; }
16584    else
16585      # try to find jtreg on path
16586
16587    for ac_prog in jtreg
16588do
16589  # Extract the first word of "$ac_prog", so it can be a program name with args.
16590set dummy $ac_prog; ac_word=$2
16591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16592$as_echo_n "checking for $ac_word... " >&6; }
16593if test "${ac_cv_path_JTREGEXE+set}" = set; then :
16594  $as_echo_n "(cached) " >&6
16595else
16596  case $JTREGEXE in
16597  [\\/]* | ?:[\\/]*)
16598  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16599  ;;
16600  *)
16601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16602for as_dir in $PATH
16603do
16604  IFS=$as_save_IFS
16605  test -z "$as_dir" && as_dir=.
16606    for ac_exec_ext in '' $ac_executable_extensions; do
16607  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16608    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16610    break 2
16611  fi
16612done
16613  done
16614IFS=$as_save_IFS
16615
16616  ;;
16617esac
16618fi
16619JTREGEXE=$ac_cv_path_JTREGEXE
16620if test -n "$JTREGEXE"; then
16621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16622$as_echo "$JTREGEXE" >&6; }
16623else
16624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16625$as_echo "no" >&6; }
16626fi
16627
16628
16629  test -n "$JTREGEXE" && break
16630done
16631
16632
16633    if test "x$JTREGEXE" = x; then
16634        if test "xjtreg" = x; then
16635          PROG_NAME=jtregexe
16636        else
16637          PROG_NAME=jtreg
16638        fi
16639        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16640$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16641        as_fn_error $? "Cannot continue" "$LINENO" 5
16642    fi
16643
16644
16645      JT_HOME="`$DIRNAME $JTREGEXE`"
16646    fi
16647  fi
16648
16649
16650
16651
16652
16653if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16654
16655  # Store path to cygwin link.exe to help excluding it when searching for
16656  # VS linker. This must be done before changing the PATH when looking for VS.
16657  # Extract the first word of "link", so it can be a program name with args.
16658set dummy link; ac_word=$2
16659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16660$as_echo_n "checking for $ac_word... " >&6; }
16661if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16662  $as_echo_n "(cached) " >&6
16663else
16664  case $CYGWIN_LINK in
16665  [\\/]* | ?:[\\/]*)
16666  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16667  ;;
16668  *)
16669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16670for as_dir in $PATH
16671do
16672  IFS=$as_save_IFS
16673  test -z "$as_dir" && as_dir=.
16674    for ac_exec_ext in '' $ac_executable_extensions; do
16675  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16676    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16678    break 2
16679  fi
16680done
16681  done
16682IFS=$as_save_IFS
16683
16684  ;;
16685esac
16686fi
16687CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16688if test -n "$CYGWIN_LINK"; then
16689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16690$as_echo "$CYGWIN_LINK" >&6; }
16691else
16692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16693$as_echo "no" >&6; }
16694fi
16695
16696
16697  if test "x$CYGWIN_LINK" != x; then
16698    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16699$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16700    "$CYGWIN_LINK" --version > /dev/null
16701    if test $? -eq 0 ; then
16702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16703$as_echo "yes" >&6; }
16704    else
16705      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16706$as_echo "no" >&6; }
16707      # This might be the VS linker. Don't exclude it later on.
16708      CYGWIN_LINK=""
16709    fi
16710  fi
16711
16712  # First-hand choice is to locate and run the vsvars bat file.
16713
16714  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16715    VCVARSFILE="vc/bin/vcvars32.bat"
16716  else
16717    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16718  fi
16719
16720  VS_ENV_CMD=""
16721  VS_ENV_ARGS=""
16722  if test "x$with_toolsdir" != x; then
16723
16724  if test "x$VS_ENV_CMD" = x; then
16725    VS100BASE="$with_toolsdir/../.."
16726    METHOD="--with-tools-dir"
16727
16728  windows_path="$VS100BASE"
16729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16730    unix_path=`$CYGPATH -u "$windows_path"`
16731    VS100BASE="$unix_path"
16732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16734    VS100BASE="$unix_path"
16735  fi
16736
16737    if test -d "$VS100BASE"; then
16738      if test -f "$VS100BASE/$VCVARSFILE"; then
16739        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16740$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16741        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16742      else
16743        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16744$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16745        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16746$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16747      fi
16748    fi
16749  fi
16750
16751  fi
16752
16753  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16754    # Having specified an argument which is incorrect will produce an instant failure;
16755    # we should not go on looking
16756    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16757$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16758    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16759$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16760    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16761  fi
16762
16763  if test "x$VS100COMNTOOLS" != x; then
16764
16765  if test "x$VS_ENV_CMD" = x; then
16766    VS100BASE="$VS100COMNTOOLS/../.."
16767    METHOD="VS100COMNTOOLS variable"
16768
16769  windows_path="$VS100BASE"
16770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16771    unix_path=`$CYGPATH -u "$windows_path"`
16772    VS100BASE="$unix_path"
16773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16775    VS100BASE="$unix_path"
16776  fi
16777
16778    if test -d "$VS100BASE"; then
16779      if test -f "$VS100BASE/$VCVARSFILE"; then
16780        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16781$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16782        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16783      else
16784        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16785$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16786        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16787$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16788      fi
16789    fi
16790  fi
16791
16792  fi
16793  if test "x$PROGRAMFILES" != x; then
16794
16795  if test "x$VS_ENV_CMD" = x; then
16796    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16797    METHOD="well-known name"
16798
16799  windows_path="$VS100BASE"
16800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16801    unix_path=`$CYGPATH -u "$windows_path"`
16802    VS100BASE="$unix_path"
16803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16805    VS100BASE="$unix_path"
16806  fi
16807
16808    if test -d "$VS100BASE"; then
16809      if test -f "$VS100BASE/$VCVARSFILE"; then
16810        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16811$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16812        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16813      else
16814        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16815$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16816        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16817$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16818      fi
16819    fi
16820  fi
16821
16822  fi
16823
16824  if test "x$VS_ENV_CMD" = x; then
16825    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16826    METHOD="well-known name"
16827
16828  windows_path="$VS100BASE"
16829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16830    unix_path=`$CYGPATH -u "$windows_path"`
16831    VS100BASE="$unix_path"
16832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16834    VS100BASE="$unix_path"
16835  fi
16836
16837    if test -d "$VS100BASE"; then
16838      if test -f "$VS100BASE/$VCVARSFILE"; then
16839        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16840$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16841        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16842      else
16843        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16844$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16845        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16846$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16847      fi
16848    fi
16849  fi
16850
16851
16852  if test "x$VS_ENV_CMD" = x; then
16853    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16854    METHOD="well-known name"
16855
16856  windows_path="$VS100BASE"
16857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16858    unix_path=`$CYGPATH -u "$windows_path"`
16859    VS100BASE="$unix_path"
16860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16862    VS100BASE="$unix_path"
16863  fi
16864
16865    if test -d "$VS100BASE"; then
16866      if test -f "$VS100BASE/$VCVARSFILE"; then
16867        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16868$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16869        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16870      else
16871        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16872$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16873        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16874$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16875      fi
16876    fi
16877  fi
16878
16879
16880  if test "x$ProgramW6432" != x; then
16881
16882  if test "x$VS_ENV_CMD" = x; then
16883    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16884    METHOD="well-known name"
16885
16886  windows_path="$WIN_SDK_BASE"
16887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16888    unix_path=`$CYGPATH -u "$windows_path"`
16889    WIN_SDK_BASE="$unix_path"
16890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16892    WIN_SDK_BASE="$unix_path"
16893  fi
16894
16895    if test -d "$WIN_SDK_BASE"; then
16896      # There have been cases of partial or broken SDK installations. A missing
16897      # lib dir is not going to work.
16898      if test ! -d "$WIN_SDK_BASE/../lib"; then
16899        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16900$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16901        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16902$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16903      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16904        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16905$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16906        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16907        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16908          VS_ENV_ARGS="/x86"
16909        else
16910          VS_ENV_ARGS="/x64"
16911        fi
16912      else
16913        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16914$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16915        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16916$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16917      fi
16918    fi
16919  fi
16920
16921  fi
16922  if test "x$PROGRAMW6432" != x; then
16923
16924  if test "x$VS_ENV_CMD" = x; then
16925    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16926    METHOD="well-known name"
16927
16928  windows_path="$WIN_SDK_BASE"
16929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16930    unix_path=`$CYGPATH -u "$windows_path"`
16931    WIN_SDK_BASE="$unix_path"
16932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16934    WIN_SDK_BASE="$unix_path"
16935  fi
16936
16937    if test -d "$WIN_SDK_BASE"; then
16938      # There have been cases of partial or broken SDK installations. A missing
16939      # lib dir is not going to work.
16940      if test ! -d "$WIN_SDK_BASE/../lib"; then
16941        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16942$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16943        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16944$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16945      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16946        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16947$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16948        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16949        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16950          VS_ENV_ARGS="/x86"
16951        else
16952          VS_ENV_ARGS="/x64"
16953        fi
16954      else
16955        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16956$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16957        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16958$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16959      fi
16960    fi
16961  fi
16962
16963  fi
16964  if test "x$PROGRAMFILES" != x; then
16965
16966  if test "x$VS_ENV_CMD" = x; then
16967    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16968    METHOD="well-known name"
16969
16970  windows_path="$WIN_SDK_BASE"
16971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16972    unix_path=`$CYGPATH -u "$windows_path"`
16973    WIN_SDK_BASE="$unix_path"
16974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16976    WIN_SDK_BASE="$unix_path"
16977  fi
16978
16979    if test -d "$WIN_SDK_BASE"; then
16980      # There have been cases of partial or broken SDK installations. A missing
16981      # lib dir is not going to work.
16982      if test ! -d "$WIN_SDK_BASE/../lib"; then
16983        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16984$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16985        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16986$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16987      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16988        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16989$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16990        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16991        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16992          VS_ENV_ARGS="/x86"
16993        else
16994          VS_ENV_ARGS="/x64"
16995        fi
16996      else
16997        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16998$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16999        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17000$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17001      fi
17002    fi
17003  fi
17004
17005  fi
17006
17007  if test "x$VS_ENV_CMD" = x; then
17008    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17009    METHOD="well-known name"
17010
17011  windows_path="$WIN_SDK_BASE"
17012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17013    unix_path=`$CYGPATH -u "$windows_path"`
17014    WIN_SDK_BASE="$unix_path"
17015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17017    WIN_SDK_BASE="$unix_path"
17018  fi
17019
17020    if test -d "$WIN_SDK_BASE"; then
17021      # There have been cases of partial or broken SDK installations. A missing
17022      # lib dir is not going to work.
17023      if test ! -d "$WIN_SDK_BASE/../lib"; then
17024        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17025$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17026        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17027$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17028      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17029        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17030$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17031        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17032        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17033          VS_ENV_ARGS="/x86"
17034        else
17035          VS_ENV_ARGS="/x64"
17036        fi
17037      else
17038        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17039$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17040        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17041$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17042      fi
17043    fi
17044  fi
17045
17046
17047  if test "x$VS_ENV_CMD" = x; then
17048    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17049    METHOD="well-known name"
17050
17051  windows_path="$WIN_SDK_BASE"
17052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17053    unix_path=`$CYGPATH -u "$windows_path"`
17054    WIN_SDK_BASE="$unix_path"
17055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17057    WIN_SDK_BASE="$unix_path"
17058  fi
17059
17060    if test -d "$WIN_SDK_BASE"; then
17061      # There have been cases of partial or broken SDK installations. A missing
17062      # lib dir is not going to work.
17063      if test ! -d "$WIN_SDK_BASE/../lib"; then
17064        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17065$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17066        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17067$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17068      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17069        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17070$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17071        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17072        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17073          VS_ENV_ARGS="/x86"
17074        else
17075          VS_ENV_ARGS="/x64"
17076        fi
17077      else
17078        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17079$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17080        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17081$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17082      fi
17083    fi
17084  fi
17085
17086
17087  if test "x$VS_ENV_CMD" != x; then
17088    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17089
17090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17091
17092  # First separate the path from the arguments. This will split at the first
17093  # space.
17094  complete="$VS_ENV_CMD"
17095  path="${complete%% *}"
17096  tmp="$complete EOL"
17097  arguments="${tmp#* }"
17098
17099  # Input might be given as Windows format, start by converting to
17100  # unix format.
17101  new_path=`$CYGPATH -u "$path"`
17102
17103  # Now try to locate executable using which
17104  new_path=`$WHICH "$new_path" 2> /dev/null`
17105  # bat and cmd files are not always considered executable in cygwin causing which
17106  # to not find them
17107  if test "x$new_path" = x \
17108           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17109           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17110    new_path=`$CYGPATH -u "$path"`
17111  fi
17112  if test "x$new_path" = x; then
17113    # Oops. Which didn't find the executable.
17114    # The splitting of arguments from the executable at a space might have been incorrect,
17115    # since paths with space are more likely in Windows. Give it another try with the whole
17116    # argument.
17117    path="$complete"
17118    arguments="EOL"
17119    new_path=`$CYGPATH -u "$path"`
17120    new_path=`$WHICH "$new_path" 2> /dev/null`
17121    # bat and cmd files are not always considered executable in cygwin causing which
17122    # to not find them
17123    if test "x$new_path" = x \
17124             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17125             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17126      new_path=`$CYGPATH -u "$path"`
17127    fi
17128    if test "x$new_path" = x; then
17129      # It's still not found. Now this is an unrecoverable error.
17130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17131$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17132      has_space=`$ECHO "$complete" | $GREP " "`
17133      if test "x$has_space" != x; then
17134        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17135$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17136      fi
17137      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17138    fi
17139  fi
17140
17141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17144  # "foo.exe" is OK but "foo" is an error.
17145  #
17146  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17147  # It is also a way to make sure we got the proper file name for the real test later on.
17148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17149  if test "x$test_shortpath" = x; then
17150    # Short path failed, file does not exist as specified.
17151    # Try adding .exe or .cmd
17152    if test -f "${new_path}.exe"; then
17153       input_to_shortpath="${new_path}.exe"
17154    elif test -f "${new_path}.cmd"; then
17155       input_to_shortpath="${new_path}.cmd"
17156    else
17157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17158$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17159      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17160$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17161      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17162    fi
17163  else
17164    input_to_shortpath="$new_path"
17165  fi
17166
17167  # Call helper function which possibly converts this using DOS-style short mode.
17168  # If so, the updated path is stored in $new_path.
17169  new_path="$input_to_shortpath"
17170
17171  input_path="$input_to_shortpath"
17172  # Check if we need to convert this using DOS-style short mode. If the path
17173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17174  # take no chances and rewrite it.
17175  # Note: m4 eats our [], so we need to use [ and ] instead.
17176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17177  if test "x$has_forbidden_chars" != x; then
17178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17179    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17180    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17181    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17182      # Going to short mode and back again did indeed matter. Since short mode is
17183      # case insensitive, let's make it lowercase to improve readability.
17184      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17185      # Now convert it back to Unix-stile (cygpath)
17186      input_path=`$CYGPATH -u "$shortmode_path"`
17187      new_path="$input_path"
17188    fi
17189  fi
17190
17191  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17192  if test "x$test_cygdrive_prefix" = x; then
17193    # As a simple fix, exclude /usr/bin since it's not a real path.
17194    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17195      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17196      # a path prefixed by /cygdrive for fixpath to work.
17197      new_path="$CYGWIN_ROOT_PATH$input_path"
17198    fi
17199  fi
17200
17201  # remove trailing .exe if any
17202  new_path="${new_path/%.exe/}"
17203
17204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17205
17206  # First separate the path from the arguments. This will split at the first
17207  # space.
17208  complete="$VS_ENV_CMD"
17209  path="${complete%% *}"
17210  tmp="$complete EOL"
17211  arguments="${tmp#* }"
17212
17213  # Input might be given as Windows format, start by converting to
17214  # unix format.
17215  new_path="$path"
17216
17217  windows_path="$new_path"
17218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17219    unix_path=`$CYGPATH -u "$windows_path"`
17220    new_path="$unix_path"
17221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17223    new_path="$unix_path"
17224  fi
17225
17226
17227  # Now try to locate executable using which
17228  new_path=`$WHICH "$new_path" 2> /dev/null`
17229
17230  if test "x$new_path" = x; then
17231    # Oops. Which didn't find the executable.
17232    # The splitting of arguments from the executable at a space might have been incorrect,
17233    # since paths with space are more likely in Windows. Give it another try with the whole
17234    # argument.
17235    path="$complete"
17236    arguments="EOL"
17237    new_path="$path"
17238
17239  windows_path="$new_path"
17240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17241    unix_path=`$CYGPATH -u "$windows_path"`
17242    new_path="$unix_path"
17243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17245    new_path="$unix_path"
17246  fi
17247
17248
17249    new_path=`$WHICH "$new_path" 2> /dev/null`
17250
17251    if test "x$new_path" = x; then
17252      # It's still not found. Now this is an unrecoverable error.
17253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17254$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17255      has_space=`$ECHO "$complete" | $GREP " "`
17256      if test "x$has_space" != x; then
17257        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17258$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17259      fi
17260      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17261    fi
17262  fi
17263
17264  # Now new_path has a complete unix path to the binary
17265  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17266    # Keep paths in /bin as-is, but remove trailing .exe if any
17267    new_path="${new_path/%.exe/}"
17268    # Do not save /bin paths to all_fixpath_prefixes!
17269  else
17270    # Not in mixed or Windows style, start by that.
17271    new_path=`cmd //c echo $new_path`
17272
17273  input_path="$new_path"
17274  # Check if we need to convert this using DOS-style short mode. If the path
17275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17276  # take no chances and rewrite it.
17277  # Note: m4 eats our [], so we need to use [ and ] instead.
17278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17279  if test "x$has_forbidden_chars" != x; then
17280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17281    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17282  fi
17283
17284    # Output is in $new_path
17285
17286  windows_path="$new_path"
17287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17288    unix_path=`$CYGPATH -u "$windows_path"`
17289    new_path="$unix_path"
17290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17292    new_path="$unix_path"
17293  fi
17294
17295    # remove trailing .exe if any
17296    new_path="${new_path/%.exe/}"
17297
17298    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17299    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17300  fi
17301
17302  else
17303    # We're on a posix platform. Hooray! :)
17304    # First separate the path from the arguments. This will split at the first
17305    # space.
17306    complete="$VS_ENV_CMD"
17307    path="${complete%% *}"
17308    tmp="$complete EOL"
17309    arguments="${tmp#* }"
17310
17311    # Cannot rely on the command "which" here since it doesn't always work.
17312    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17313    if test -z "$is_absolute_path"; then
17314      # Path to executable is not absolute. Find it.
17315      IFS_save="$IFS"
17316      IFS=:
17317      for p in $PATH; do
17318        if test -f "$p/$path" && test -x "$p/$path"; then
17319          new_path="$p/$path"
17320          break
17321        fi
17322      done
17323      IFS="$IFS_save"
17324    else
17325      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17326$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17327      new_path="$path"
17328    fi
17329
17330    if test "x$new_path" = x; then
17331        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17332$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17333        has_space=`$ECHO "$complete" | $GREP " "`
17334        if test "x$has_space" != x; then
17335          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17336$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17337        fi
17338        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17339      fi
17340  fi
17341
17342      # Now join together the path and the arguments once again
17343      if test "x$arguments" != xEOL; then
17344        new_complete="$new_path ${arguments% *}"
17345      else
17346        new_complete="$new_path"
17347      fi
17348
17349  if test "x$complete" != "x$new_complete"; then
17350      VS_ENV_CMD="$new_complete"
17351      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17352$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17353    fi
17354
17355
17356    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17357    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17358$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17359    cd $OUTPUT_ROOT
17360    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17361    # to autoconf standards.
17362
17363    #----
17364
17365    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17366    # but calculate the difference in Cygwin environment before/after running it and then
17367    # apply the diff.
17368
17369    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17370      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17371      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17372      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17373    else
17374      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17375      _dosbash=`cmd //c echo \`which bash\``
17376    fi
17377
17378    # generate the set of exported vars before/after the vs10 setup
17379    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17380    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17381    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17382    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17383
17384    # Now execute the newly created bat file.
17385    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17386    cmd /c localdevenvtmp.bat | cat
17387
17388    # apply the diff (less some non-vs10 vars named by "!")
17389    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17390    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17391    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17392
17393    # cleanup
17394    $RM localdevenvtmp*
17395    #----
17396    cd $CURDIR
17397    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17399$as_echo "no" >&6; }
17400      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17401$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17402      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17403$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17404      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17405$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17406      as_fn_error $? "Cannot continue" "$LINENO" 5
17407    fi
17408
17409    # Now set all paths and other env variables. This will allow the rest of
17410    # the configure script to find and run the compiler in the proper way.
17411    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17412$as_echo "$as_me: Setting extracted environment variables" >&6;}
17413    . $OUTPUT_ROOT/localdevenv.sh
17414  else
17415    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17416    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17417$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17418  fi
17419
17420  # At this point, we should have corrent variables in the environment, or we can't continue.
17421  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17422$as_echo_n "checking for Visual Studio variables... " >&6; }
17423
17424  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17425    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17427$as_echo "present but broken" >&6; }
17428      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17429    else
17430      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17431$as_echo "ok" >&6; }
17432      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17433      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17434      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17435      VS_PATH="$PATH"
17436
17437
17438
17439    fi
17440  else
17441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17442$as_echo "not found" >&6; }
17443
17444    if test "x$VS_ENV_CMD" = x; then
17445      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17446$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17447      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17448$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17449    else
17450      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17451$as_echo "$as_me: Running the extraction script failed." >&6;}
17452    fi
17453    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17454$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17455    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17456$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17457    as_fn_error $? "Cannot continue" "$LINENO" 5
17458  fi
17459
17460  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17461$as_echo_n "checking for msvcr100.dll... " >&6; }
17462
17463# Check whether --with-msvcr-dll was given.
17464if test "${with_msvcr_dll+set}" = set; then :
17465  withval=$with_msvcr_dll;
17466fi
17467
17468  if test "x$with_msvcr_dll" != x; then
17469    MSVCR_DLL="$with_msvcr_dll"
17470  else
17471    if test "x$VCINSTALLDIR" != x; then
17472      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17473        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17474      else
17475        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17476        if test "x$MSVCR_DLL" = x; then
17477          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17478        fi
17479      fi
17480      if test "x$MSVCR_DLL" != x; then
17481        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17482$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17483      else
17484        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17485$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17486      fi
17487    fi
17488    # Try some fallback alternatives
17489    if test "x$MSVCR_DLL" = x; then
17490      # If visual studio express is installed, there is usually one with the debugger
17491      if test "x$VS100COMNTOOLS" != x; then
17492        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17493          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17494          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17495$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17496        fi
17497      fi
17498    fi
17499    if test "x$MSVCR_DLL" = x; then
17500      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17501        # Fallback for 32bit builds, look in the windows directory.
17502        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17503          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17504$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17505          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17506        fi
17507      fi
17508    fi
17509  fi
17510  if test "x$MSVCR_DLL" = x; then
17511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17512$as_echo "no" >&6; }
17513    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17514  fi
17515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17516$as_echo "$MSVCR_DLL" >&6; }
17517
17518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17519
17520  # Input might be given as Windows format, start by converting to
17521  # unix format.
17522  path="$MSVCR_DLL"
17523  new_path=`$CYGPATH -u "$path"`
17524
17525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17528  # "foo.exe" is OK but "foo" is an error.
17529  #
17530  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17531  # It is also a way to make sure we got the proper file name for the real test later on.
17532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17533  if test "x$test_shortpath" = x; then
17534    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17535$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17536    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17537  fi
17538
17539  # Call helper function which possibly converts this using DOS-style short mode.
17540  # If so, the updated path is stored in $new_path.
17541
17542  input_path="$new_path"
17543  # Check if we need to convert this using DOS-style short mode. If the path
17544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17545  # take no chances and rewrite it.
17546  # Note: m4 eats our [], so we need to use [ and ] instead.
17547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17548  if test "x$has_forbidden_chars" != x; then
17549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17553      # Going to short mode and back again did indeed matter. Since short mode is
17554      # case insensitive, let's make it lowercase to improve readability.
17555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17556      # Now convert it back to Unix-stile (cygpath)
17557      input_path=`$CYGPATH -u "$shortmode_path"`
17558      new_path="$input_path"
17559    fi
17560  fi
17561
17562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17563  if test "x$test_cygdrive_prefix" = x; then
17564    # As a simple fix, exclude /usr/bin since it's not a real path.
17565    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17567      # a path prefixed by /cygdrive for fixpath to work.
17568      new_path="$CYGWIN_ROOT_PATH$input_path"
17569    fi
17570  fi
17571
17572
17573  if test "x$path" != "x$new_path"; then
17574    MSVCR_DLL="$new_path"
17575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17576$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17577  fi
17578
17579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17580
17581  path="$MSVCR_DLL"
17582  has_colon=`$ECHO $path | $GREP ^.:`
17583  new_path="$path"
17584  if test "x$has_colon" = x; then
17585    # Not in mixed or Windows style, start by that.
17586    new_path=`cmd //c echo $path`
17587  fi
17588
17589
17590  input_path="$new_path"
17591  # Check if we need to convert this using DOS-style short mode. If the path
17592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17593  # take no chances and rewrite it.
17594  # Note: m4 eats our [], so we need to use [ and ] instead.
17595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17596  if test "x$has_forbidden_chars" != x; then
17597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17599  fi
17600
17601
17602  windows_path="$new_path"
17603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17604    unix_path=`$CYGPATH -u "$windows_path"`
17605    new_path="$unix_path"
17606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17608    new_path="$unix_path"
17609  fi
17610
17611  if test "x$path" != "x$new_path"; then
17612    MSVCR_DLL="$new_path"
17613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17614$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17615  fi
17616
17617  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17618  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17619
17620  else
17621    # We're on a posix platform. Hooray! :)
17622    path="$MSVCR_DLL"
17623    has_space=`$ECHO "$path" | $GREP " "`
17624    if test "x$has_space" != x; then
17625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17626$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17627      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17628    fi
17629
17630    # Use eval to expand a potential ~
17631    eval path="$path"
17632    if test ! -f "$path" && test ! -d "$path"; then
17633      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17634    fi
17635
17636    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17637  fi
17638
17639
17640
17641
17642# Check whether --with-dxsdk was given.
17643if test "${with_dxsdk+set}" = set; then :
17644  withval=$with_dxsdk;
17645fi
17646
17647
17648# Check whether --with-dxsdk-lib was given.
17649if test "${with_dxsdk_lib+set}" = set; then :
17650  withval=$with_dxsdk_lib;
17651fi
17652
17653
17654# Check whether --with-dxsdk-include was given.
17655if test "${with_dxsdk_include+set}" = set; then :
17656  withval=$with_dxsdk_include;
17657fi
17658
17659
17660  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17661$as_echo_n "checking for DirectX SDK... " >&6; }
17662
17663  if test "x$with_dxsdk" != x; then
17664    dxsdk_path="$with_dxsdk"
17665  elif test "x$DXSDK_DIR" != x; then
17666    dxsdk_path="$DXSDK_DIR"
17667  elif test -d "C:/DXSDK"; then
17668    dxsdk_path="C:/DXSDK"
17669  else
17670    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17671  fi
17672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17673$as_echo "$dxsdk_path" >&6; }
17674
17675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17676
17677  # Input might be given as Windows format, start by converting to
17678  # unix format.
17679  path="$dxsdk_path"
17680  new_path=`$CYGPATH -u "$path"`
17681
17682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17685  # "foo.exe" is OK but "foo" is an error.
17686  #
17687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17688  # It is also a way to make sure we got the proper file name for the real test later on.
17689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17690  if test "x$test_shortpath" = x; then
17691    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17692$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17693    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17694  fi
17695
17696  # Call helper function which possibly converts this using DOS-style short mode.
17697  # If so, the updated path is stored in $new_path.
17698
17699  input_path="$new_path"
17700  # Check if we need to convert this using DOS-style short mode. If the path
17701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17702  # take no chances and rewrite it.
17703  # Note: m4 eats our [], so we need to use [ and ] instead.
17704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17705  if test "x$has_forbidden_chars" != x; then
17706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17710      # Going to short mode and back again did indeed matter. Since short mode is
17711      # case insensitive, let's make it lowercase to improve readability.
17712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17713      # Now convert it back to Unix-stile (cygpath)
17714      input_path=`$CYGPATH -u "$shortmode_path"`
17715      new_path="$input_path"
17716    fi
17717  fi
17718
17719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17720  if test "x$test_cygdrive_prefix" = x; then
17721    # As a simple fix, exclude /usr/bin since it's not a real path.
17722    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17724      # a path prefixed by /cygdrive for fixpath to work.
17725      new_path="$CYGWIN_ROOT_PATH$input_path"
17726    fi
17727  fi
17728
17729
17730  if test "x$path" != "x$new_path"; then
17731    dxsdk_path="$new_path"
17732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17733$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17734  fi
17735
17736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17737
17738  path="$dxsdk_path"
17739  has_colon=`$ECHO $path | $GREP ^.:`
17740  new_path="$path"
17741  if test "x$has_colon" = x; then
17742    # Not in mixed or Windows style, start by that.
17743    new_path=`cmd //c echo $path`
17744  fi
17745
17746
17747  input_path="$new_path"
17748  # Check if we need to convert this using DOS-style short mode. If the path
17749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17750  # take no chances and rewrite it.
17751  # Note: m4 eats our [], so we need to use [ and ] instead.
17752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17753  if test "x$has_forbidden_chars" != x; then
17754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17756  fi
17757
17758
17759  windows_path="$new_path"
17760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17761    unix_path=`$CYGPATH -u "$windows_path"`
17762    new_path="$unix_path"
17763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17765    new_path="$unix_path"
17766  fi
17767
17768  if test "x$path" != "x$new_path"; then
17769    dxsdk_path="$new_path"
17770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17771$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17772  fi
17773
17774  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17775  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17776
17777  else
17778    # We're on a posix platform. Hooray! :)
17779    path="$dxsdk_path"
17780    has_space=`$ECHO "$path" | $GREP " "`
17781    if test "x$has_space" != x; then
17782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17783$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17784      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17785    fi
17786
17787    # Use eval to expand a potential ~
17788    eval path="$path"
17789    if test ! -f "$path" && test ! -d "$path"; then
17790      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17791    fi
17792
17793    dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17794  fi
17795
17796
17797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17798$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17799  if test "x$with_dxsdk_lib" != x; then
17800    DXSDK_LIB_PATH="$with_dxsdk_lib"
17801  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17802    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17803  else
17804    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17805  fi
17806  # dsound.lib is linked to in jsoundds
17807  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17808    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17809  fi
17810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17811$as_echo "$DXSDK_LIB_PATH" >&6; }
17812
17813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17814
17815  # Input might be given as Windows format, start by converting to
17816  # unix format.
17817  path="$DXSDK_LIB_PATH"
17818  new_path=`$CYGPATH -u "$path"`
17819
17820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17823  # "foo.exe" is OK but "foo" is an error.
17824  #
17825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17826  # It is also a way to make sure we got the proper file name for the real test later on.
17827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17828  if test "x$test_shortpath" = x; then
17829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17830$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17831    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17832  fi
17833
17834  # Call helper function which possibly converts this using DOS-style short mode.
17835  # If so, the updated path is stored in $new_path.
17836
17837  input_path="$new_path"
17838  # Check if we need to convert this using DOS-style short mode. If the path
17839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17840  # take no chances and rewrite it.
17841  # Note: m4 eats our [], so we need to use [ and ] instead.
17842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17843  if test "x$has_forbidden_chars" != x; then
17844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17848      # Going to short mode and back again did indeed matter. Since short mode is
17849      # case insensitive, let's make it lowercase to improve readability.
17850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17851      # Now convert it back to Unix-stile (cygpath)
17852      input_path=`$CYGPATH -u "$shortmode_path"`
17853      new_path="$input_path"
17854    fi
17855  fi
17856
17857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17858  if test "x$test_cygdrive_prefix" = x; then
17859    # As a simple fix, exclude /usr/bin since it's not a real path.
17860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17862      # a path prefixed by /cygdrive for fixpath to work.
17863      new_path="$CYGWIN_ROOT_PATH$input_path"
17864    fi
17865  fi
17866
17867
17868  if test "x$path" != "x$new_path"; then
17869    DXSDK_LIB_PATH="$new_path"
17870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17871$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17872  fi
17873
17874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17875
17876  path="$DXSDK_LIB_PATH"
17877  has_colon=`$ECHO $path | $GREP ^.:`
17878  new_path="$path"
17879  if test "x$has_colon" = x; then
17880    # Not in mixed or Windows style, start by that.
17881    new_path=`cmd //c echo $path`
17882  fi
17883
17884
17885  input_path="$new_path"
17886  # Check if we need to convert this using DOS-style short mode. If the path
17887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17888  # take no chances and rewrite it.
17889  # Note: m4 eats our [], so we need to use [ and ] instead.
17890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17891  if test "x$has_forbidden_chars" != x; then
17892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17894  fi
17895
17896
17897  windows_path="$new_path"
17898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17899    unix_path=`$CYGPATH -u "$windows_path"`
17900    new_path="$unix_path"
17901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17903    new_path="$unix_path"
17904  fi
17905
17906  if test "x$path" != "x$new_path"; then
17907    DXSDK_LIB_PATH="$new_path"
17908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17909$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17910  fi
17911
17912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17914
17915  else
17916    # We're on a posix platform. Hooray! :)
17917    path="$DXSDK_LIB_PATH"
17918    has_space=`$ECHO "$path" | $GREP " "`
17919    if test "x$has_space" != x; then
17920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17921$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17922      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17923    fi
17924
17925    # Use eval to expand a potential ~
17926    eval path="$path"
17927    if test ! -f "$path" && test ! -d "$path"; then
17928      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17929    fi
17930
17931    DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17932  fi
17933
17934
17935  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17936$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17937  if test "x$with_dxsdk_include" != x; then
17938    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17939  else
17940    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17941  fi
17942  # dsound.h is included in jsoundds
17943  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17944    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17945  fi
17946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17947$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17948
17949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17950
17951  # Input might be given as Windows format, start by converting to
17952  # unix format.
17953  path="$DXSDK_INCLUDE_PATH"
17954  new_path=`$CYGPATH -u "$path"`
17955
17956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17959  # "foo.exe" is OK but "foo" is an error.
17960  #
17961  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17962  # It is also a way to make sure we got the proper file name for the real test later on.
17963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17964  if test "x$test_shortpath" = x; then
17965    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17966$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17967    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17968  fi
17969
17970  # Call helper function which possibly converts this using DOS-style short mode.
17971  # If so, the updated path is stored in $new_path.
17972
17973  input_path="$new_path"
17974  # Check if we need to convert this using DOS-style short mode. If the path
17975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17976  # take no chances and rewrite it.
17977  # Note: m4 eats our [], so we need to use [ and ] instead.
17978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17979  if test "x$has_forbidden_chars" != x; then
17980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17981    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17982    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17983    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17984      # Going to short mode and back again did indeed matter. Since short mode is
17985      # case insensitive, let's make it lowercase to improve readability.
17986      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17987      # Now convert it back to Unix-stile (cygpath)
17988      input_path=`$CYGPATH -u "$shortmode_path"`
17989      new_path="$input_path"
17990    fi
17991  fi
17992
17993  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17994  if test "x$test_cygdrive_prefix" = x; then
17995    # As a simple fix, exclude /usr/bin since it's not a real path.
17996    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17997      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17998      # a path prefixed by /cygdrive for fixpath to work.
17999      new_path="$CYGWIN_ROOT_PATH$input_path"
18000    fi
18001  fi
18002
18003
18004  if test "x$path" != "x$new_path"; then
18005    DXSDK_INCLUDE_PATH="$new_path"
18006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
18007$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
18008  fi
18009
18010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18011
18012  path="$DXSDK_INCLUDE_PATH"
18013  has_colon=`$ECHO $path | $GREP ^.:`
18014  new_path="$path"
18015  if test "x$has_colon" = x; then
18016    # Not in mixed or Windows style, start by that.
18017    new_path=`cmd //c echo $path`
18018  fi
18019
18020
18021  input_path="$new_path"
18022  # Check if we need to convert this using DOS-style short mode. If the path
18023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18024  # take no chances and rewrite it.
18025  # Note: m4 eats our [], so we need to use [ and ] instead.
18026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18027  if test "x$has_forbidden_chars" != x; then
18028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18029    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18030  fi
18031
18032
18033  windows_path="$new_path"
18034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18035    unix_path=`$CYGPATH -u "$windows_path"`
18036    new_path="$unix_path"
18037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18039    new_path="$unix_path"
18040  fi
18041
18042  if test "x$path" != "x$new_path"; then
18043    DXSDK_INCLUDE_PATH="$new_path"
18044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
18045$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
18046  fi
18047
18048  # Save the first 10 bytes of this path to the storage, so fixpath can work.
18049  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18050
18051  else
18052    # We're on a posix platform. Hooray! :)
18053    path="$DXSDK_INCLUDE_PATH"
18054    has_space=`$ECHO "$path" | $GREP " "`
18055    if test "x$has_space" != x; then
18056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
18057$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
18058      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18059    fi
18060
18061    # Use eval to expand a potential ~
18062    eval path="$path"
18063    if test ! -f "$path" && test ! -d "$path"; then
18064      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
18065    fi
18066
18067    DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
18068  fi
18069
18070
18071
18072
18073  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
18074
18075fi
18076
18077
18078
18079# If --build AND --host is set, then the configure script will find any
18080# cross compilation tools in the PATH. Cross compilation tools
18081# follows the cross compilation standard where they are prefixed with ${host}.
18082# For example the binary i686-sun-solaris2.10-gcc
18083# will cross compile for i686-sun-solaris2.10
18084# If neither of build and host is not set, then build=host and the
18085# default compiler found in the path will be used.
18086# Setting only --host, does not seem to be really supported.
18087# Please set both --build and --host if you want to cross compile.
18088
18089if test "x$COMPILE_TYPE" = "xcross"; then
18090    # Now we to find a C/C++ compiler that can build executables for the build
18091    # platform. We can't use the AC_PROG_CC macro, since it can only be used
18092    # once. Also, we need to do this before adding a tools dir to the path,
18093    # otherwise we might pick up cross-compilers which don't use standard naming.
18094    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18095    # to wait until they are properly discovered.
18096    for ac_prog in cl cc gcc
18097do
18098  # Extract the first word of "$ac_prog", so it can be a program name with args.
18099set dummy $ac_prog; ac_word=$2
18100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18101$as_echo_n "checking for $ac_word... " >&6; }
18102if test "${ac_cv_path_BUILD_CC+set}" = set; then :
18103  $as_echo_n "(cached) " >&6
18104else
18105  case $BUILD_CC in
18106  [\\/]* | ?:[\\/]*)
18107  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18108  ;;
18109  *)
18110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18111for as_dir in $PATH
18112do
18113  IFS=$as_save_IFS
18114  test -z "$as_dir" && as_dir=.
18115    for ac_exec_ext in '' $ac_executable_extensions; do
18116  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18117    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18119    break 2
18120  fi
18121done
18122  done
18123IFS=$as_save_IFS
18124
18125  ;;
18126esac
18127fi
18128BUILD_CC=$ac_cv_path_BUILD_CC
18129if test -n "$BUILD_CC"; then
18130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18131$as_echo "$BUILD_CC" >&6; }
18132else
18133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18134$as_echo "no" >&6; }
18135fi
18136
18137
18138  test -n "$BUILD_CC" && break
18139done
18140
18141
18142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18143
18144  # First separate the path from the arguments. This will split at the first
18145  # space.
18146  complete="$BUILD_CC"
18147  path="${complete%% *}"
18148  tmp="$complete EOL"
18149  arguments="${tmp#* }"
18150
18151  # Input might be given as Windows format, start by converting to
18152  # unix format.
18153  new_path=`$CYGPATH -u "$path"`
18154
18155  # Now try to locate executable using which
18156  new_path=`$WHICH "$new_path" 2> /dev/null`
18157  # bat and cmd files are not always considered executable in cygwin causing which
18158  # to not find them
18159  if test "x$new_path" = x \
18160           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18161           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18162    new_path=`$CYGPATH -u "$path"`
18163  fi
18164  if test "x$new_path" = x; then
18165    # Oops. Which didn't find the executable.
18166    # The splitting of arguments from the executable at a space might have been incorrect,
18167    # since paths with space are more likely in Windows. Give it another try with the whole
18168    # argument.
18169    path="$complete"
18170    arguments="EOL"
18171    new_path=`$CYGPATH -u "$path"`
18172    new_path=`$WHICH "$new_path" 2> /dev/null`
18173    # bat and cmd files are not always considered executable in cygwin causing which
18174    # to not find them
18175    if test "x$new_path" = x \
18176             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18177             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18178      new_path=`$CYGPATH -u "$path"`
18179    fi
18180    if test "x$new_path" = x; then
18181      # It's still not found. Now this is an unrecoverable error.
18182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18183$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18184      has_space=`$ECHO "$complete" | $GREP " "`
18185      if test "x$has_space" != x; then
18186        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18187$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18188      fi
18189      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18190    fi
18191  fi
18192
18193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18196  # "foo.exe" is OK but "foo" is an error.
18197  #
18198  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18199  # It is also a way to make sure we got the proper file name for the real test later on.
18200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18201  if test "x$test_shortpath" = x; then
18202    # Short path failed, file does not exist as specified.
18203    # Try adding .exe or .cmd
18204    if test -f "${new_path}.exe"; then
18205       input_to_shortpath="${new_path}.exe"
18206    elif test -f "${new_path}.cmd"; then
18207       input_to_shortpath="${new_path}.cmd"
18208    else
18209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18210$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18211      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18212$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18213      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18214    fi
18215  else
18216    input_to_shortpath="$new_path"
18217  fi
18218
18219  # Call helper function which possibly converts this using DOS-style short mode.
18220  # If so, the updated path is stored in $new_path.
18221  new_path="$input_to_shortpath"
18222
18223  input_path="$input_to_shortpath"
18224  # Check if we need to convert this using DOS-style short mode. If the path
18225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18226  # take no chances and rewrite it.
18227  # Note: m4 eats our [], so we need to use [ and ] instead.
18228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18229  if test "x$has_forbidden_chars" != x; then
18230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18234      # Going to short mode and back again did indeed matter. Since short mode is
18235      # case insensitive, let's make it lowercase to improve readability.
18236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18237      # Now convert it back to Unix-stile (cygpath)
18238      input_path=`$CYGPATH -u "$shortmode_path"`
18239      new_path="$input_path"
18240    fi
18241  fi
18242
18243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18244  if test "x$test_cygdrive_prefix" = x; then
18245    # As a simple fix, exclude /usr/bin since it's not a real path.
18246    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18248      # a path prefixed by /cygdrive for fixpath to work.
18249      new_path="$CYGWIN_ROOT_PATH$input_path"
18250    fi
18251  fi
18252
18253  # remove trailing .exe if any
18254  new_path="${new_path/%.exe/}"
18255
18256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18257
18258  # First separate the path from the arguments. This will split at the first
18259  # space.
18260  complete="$BUILD_CC"
18261  path="${complete%% *}"
18262  tmp="$complete EOL"
18263  arguments="${tmp#* }"
18264
18265  # Input might be given as Windows format, start by converting to
18266  # unix format.
18267  new_path="$path"
18268
18269  windows_path="$new_path"
18270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18271    unix_path=`$CYGPATH -u "$windows_path"`
18272    new_path="$unix_path"
18273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18275    new_path="$unix_path"
18276  fi
18277
18278
18279  # Now try to locate executable using which
18280  new_path=`$WHICH "$new_path" 2> /dev/null`
18281
18282  if test "x$new_path" = x; then
18283    # Oops. Which didn't find the executable.
18284    # The splitting of arguments from the executable at a space might have been incorrect,
18285    # since paths with space are more likely in Windows. Give it another try with the whole
18286    # argument.
18287    path="$complete"
18288    arguments="EOL"
18289    new_path="$path"
18290
18291  windows_path="$new_path"
18292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18293    unix_path=`$CYGPATH -u "$windows_path"`
18294    new_path="$unix_path"
18295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18297    new_path="$unix_path"
18298  fi
18299
18300
18301    new_path=`$WHICH "$new_path" 2> /dev/null`
18302
18303    if test "x$new_path" = x; then
18304      # It's still not found. Now this is an unrecoverable error.
18305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18306$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18307      has_space=`$ECHO "$complete" | $GREP " "`
18308      if test "x$has_space" != x; then
18309        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18310$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18311      fi
18312      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18313    fi
18314  fi
18315
18316  # Now new_path has a complete unix path to the binary
18317  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18318    # Keep paths in /bin as-is, but remove trailing .exe if any
18319    new_path="${new_path/%.exe/}"
18320    # Do not save /bin paths to all_fixpath_prefixes!
18321  else
18322    # Not in mixed or Windows style, start by that.
18323    new_path=`cmd //c echo $new_path`
18324
18325  input_path="$new_path"
18326  # Check if we need to convert this using DOS-style short mode. If the path
18327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18328  # take no chances and rewrite it.
18329  # Note: m4 eats our [], so we need to use [ and ] instead.
18330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18331  if test "x$has_forbidden_chars" != x; then
18332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18333    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18334  fi
18335
18336    # Output is in $new_path
18337
18338  windows_path="$new_path"
18339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18340    unix_path=`$CYGPATH -u "$windows_path"`
18341    new_path="$unix_path"
18342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18344    new_path="$unix_path"
18345  fi
18346
18347    # remove trailing .exe if any
18348    new_path="${new_path/%.exe/}"
18349
18350    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18351    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18352  fi
18353
18354  else
18355    # We're on a posix platform. Hooray! :)
18356    # First separate the path from the arguments. This will split at the first
18357    # space.
18358    complete="$BUILD_CC"
18359    path="${complete%% *}"
18360    tmp="$complete EOL"
18361    arguments="${tmp#* }"
18362
18363    # Cannot rely on the command "which" here since it doesn't always work.
18364    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18365    if test -z "$is_absolute_path"; then
18366      # Path to executable is not absolute. Find it.
18367      IFS_save="$IFS"
18368      IFS=:
18369      for p in $PATH; do
18370        if test -f "$p/$path" && test -x "$p/$path"; then
18371          new_path="$p/$path"
18372          break
18373        fi
18374      done
18375      IFS="$IFS_save"
18376    else
18377      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18378$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18379      new_path="$path"
18380    fi
18381
18382    if test "x$new_path" = x; then
18383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18384$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18385        has_space=`$ECHO "$complete" | $GREP " "`
18386        if test "x$has_space" != x; then
18387          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18388$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18389        fi
18390        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18391      fi
18392  fi
18393
18394      # Now join together the path and the arguments once again
18395      if test "x$arguments" != xEOL; then
18396        new_complete="$new_path ${arguments% *}"
18397      else
18398        new_complete="$new_path"
18399      fi
18400
18401  if test "x$complete" != "x$new_complete"; then
18402      BUILD_CC="$new_complete"
18403      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18404$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18405    fi
18406
18407    for ac_prog in cl CC g++
18408do
18409  # Extract the first word of "$ac_prog", so it can be a program name with args.
18410set dummy $ac_prog; ac_word=$2
18411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18412$as_echo_n "checking for $ac_word... " >&6; }
18413if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
18414  $as_echo_n "(cached) " >&6
18415else
18416  case $BUILD_CXX in
18417  [\\/]* | ?:[\\/]*)
18418  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18419  ;;
18420  *)
18421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18422for as_dir in $PATH
18423do
18424  IFS=$as_save_IFS
18425  test -z "$as_dir" && as_dir=.
18426    for ac_exec_ext in '' $ac_executable_extensions; do
18427  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18428    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18430    break 2
18431  fi
18432done
18433  done
18434IFS=$as_save_IFS
18435
18436  ;;
18437esac
18438fi
18439BUILD_CXX=$ac_cv_path_BUILD_CXX
18440if test -n "$BUILD_CXX"; then
18441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18442$as_echo "$BUILD_CXX" >&6; }
18443else
18444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18445$as_echo "no" >&6; }
18446fi
18447
18448
18449  test -n "$BUILD_CXX" && break
18450done
18451
18452
18453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18454
18455  # First separate the path from the arguments. This will split at the first
18456  # space.
18457  complete="$BUILD_CXX"
18458  path="${complete%% *}"
18459  tmp="$complete EOL"
18460  arguments="${tmp#* }"
18461
18462  # Input might be given as Windows format, start by converting to
18463  # unix format.
18464  new_path=`$CYGPATH -u "$path"`
18465
18466  # Now try to locate executable using which
18467  new_path=`$WHICH "$new_path" 2> /dev/null`
18468  # bat and cmd files are not always considered executable in cygwin causing which
18469  # to not find them
18470  if test "x$new_path" = x \
18471           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18472           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18473    new_path=`$CYGPATH -u "$path"`
18474  fi
18475  if test "x$new_path" = x; then
18476    # Oops. Which didn't find the executable.
18477    # The splitting of arguments from the executable at a space might have been incorrect,
18478    # since paths with space are more likely in Windows. Give it another try with the whole
18479    # argument.
18480    path="$complete"
18481    arguments="EOL"
18482    new_path=`$CYGPATH -u "$path"`
18483    new_path=`$WHICH "$new_path" 2> /dev/null`
18484    # bat and cmd files are not always considered executable in cygwin causing which
18485    # to not find them
18486    if test "x$new_path" = x \
18487             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18488             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18489      new_path=`$CYGPATH -u "$path"`
18490    fi
18491    if test "x$new_path" = x; then
18492      # It's still not found. Now this is an unrecoverable error.
18493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18494$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18495      has_space=`$ECHO "$complete" | $GREP " "`
18496      if test "x$has_space" != x; then
18497        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18498$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18499      fi
18500      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18501    fi
18502  fi
18503
18504  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18505  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18506  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18507  # "foo.exe" is OK but "foo" is an error.
18508  #
18509  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18510  # It is also a way to make sure we got the proper file name for the real test later on.
18511  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18512  if test "x$test_shortpath" = x; then
18513    # Short path failed, file does not exist as specified.
18514    # Try adding .exe or .cmd
18515    if test -f "${new_path}.exe"; then
18516       input_to_shortpath="${new_path}.exe"
18517    elif test -f "${new_path}.cmd"; then
18518       input_to_shortpath="${new_path}.cmd"
18519    else
18520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18521$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18522      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18523$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18524      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18525    fi
18526  else
18527    input_to_shortpath="$new_path"
18528  fi
18529
18530  # Call helper function which possibly converts this using DOS-style short mode.
18531  # If so, the updated path is stored in $new_path.
18532  new_path="$input_to_shortpath"
18533
18534  input_path="$input_to_shortpath"
18535  # Check if we need to convert this using DOS-style short mode. If the path
18536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18537  # take no chances and rewrite it.
18538  # Note: m4 eats our [], so we need to use [ and ] instead.
18539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18540  if test "x$has_forbidden_chars" != x; then
18541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18545      # Going to short mode and back again did indeed matter. Since short mode is
18546      # case insensitive, let's make it lowercase to improve readability.
18547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18548      # Now convert it back to Unix-stile (cygpath)
18549      input_path=`$CYGPATH -u "$shortmode_path"`
18550      new_path="$input_path"
18551    fi
18552  fi
18553
18554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18555  if test "x$test_cygdrive_prefix" = x; then
18556    # As a simple fix, exclude /usr/bin since it's not a real path.
18557    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18559      # a path prefixed by /cygdrive for fixpath to work.
18560      new_path="$CYGWIN_ROOT_PATH$input_path"
18561    fi
18562  fi
18563
18564  # remove trailing .exe if any
18565  new_path="${new_path/%.exe/}"
18566
18567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18568
18569  # First separate the path from the arguments. This will split at the first
18570  # space.
18571  complete="$BUILD_CXX"
18572  path="${complete%% *}"
18573  tmp="$complete EOL"
18574  arguments="${tmp#* }"
18575
18576  # Input might be given as Windows format, start by converting to
18577  # unix format.
18578  new_path="$path"
18579
18580  windows_path="$new_path"
18581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18582    unix_path=`$CYGPATH -u "$windows_path"`
18583    new_path="$unix_path"
18584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18586    new_path="$unix_path"
18587  fi
18588
18589
18590  # Now try to locate executable using which
18591  new_path=`$WHICH "$new_path" 2> /dev/null`
18592
18593  if test "x$new_path" = x; then
18594    # Oops. Which didn't find the executable.
18595    # The splitting of arguments from the executable at a space might have been incorrect,
18596    # since paths with space are more likely in Windows. Give it another try with the whole
18597    # argument.
18598    path="$complete"
18599    arguments="EOL"
18600    new_path="$path"
18601
18602  windows_path="$new_path"
18603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18604    unix_path=`$CYGPATH -u "$windows_path"`
18605    new_path="$unix_path"
18606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18608    new_path="$unix_path"
18609  fi
18610
18611
18612    new_path=`$WHICH "$new_path" 2> /dev/null`
18613
18614    if test "x$new_path" = x; then
18615      # It's still not found. Now this is an unrecoverable error.
18616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18617$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18618      has_space=`$ECHO "$complete" | $GREP " "`
18619      if test "x$has_space" != x; then
18620        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18621$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18622      fi
18623      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18624    fi
18625  fi
18626
18627  # Now new_path has a complete unix path to the binary
18628  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18629    # Keep paths in /bin as-is, but remove trailing .exe if any
18630    new_path="${new_path/%.exe/}"
18631    # Do not save /bin paths to all_fixpath_prefixes!
18632  else
18633    # Not in mixed or Windows style, start by that.
18634    new_path=`cmd //c echo $new_path`
18635
18636  input_path="$new_path"
18637  # Check if we need to convert this using DOS-style short mode. If the path
18638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18639  # take no chances and rewrite it.
18640  # Note: m4 eats our [], so we need to use [ and ] instead.
18641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18642  if test "x$has_forbidden_chars" != x; then
18643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18644    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18645  fi
18646
18647    # Output is in $new_path
18648
18649  windows_path="$new_path"
18650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18651    unix_path=`$CYGPATH -u "$windows_path"`
18652    new_path="$unix_path"
18653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18655    new_path="$unix_path"
18656  fi
18657
18658    # remove trailing .exe if any
18659    new_path="${new_path/%.exe/}"
18660
18661    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18662    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18663  fi
18664
18665  else
18666    # We're on a posix platform. Hooray! :)
18667    # First separate the path from the arguments. This will split at the first
18668    # space.
18669    complete="$BUILD_CXX"
18670    path="${complete%% *}"
18671    tmp="$complete EOL"
18672    arguments="${tmp#* }"
18673
18674    # Cannot rely on the command "which" here since it doesn't always work.
18675    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18676    if test -z "$is_absolute_path"; then
18677      # Path to executable is not absolute. Find it.
18678      IFS_save="$IFS"
18679      IFS=:
18680      for p in $PATH; do
18681        if test -f "$p/$path" && test -x "$p/$path"; then
18682          new_path="$p/$path"
18683          break
18684        fi
18685      done
18686      IFS="$IFS_save"
18687    else
18688      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18689$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18690      new_path="$path"
18691    fi
18692
18693    if test "x$new_path" = x; then
18694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18695$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18696        has_space=`$ECHO "$complete" | $GREP " "`
18697        if test "x$has_space" != x; then
18698          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18699$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18700        fi
18701        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18702      fi
18703  fi
18704
18705      # Now join together the path and the arguments once again
18706      if test "x$arguments" != xEOL; then
18707        new_complete="$new_path ${arguments% *}"
18708      else
18709        new_complete="$new_path"
18710      fi
18711
18712  if test "x$complete" != "x$new_complete"; then
18713      BUILD_CXX="$new_complete"
18714      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18715$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18716    fi
18717
18718    # Extract the first word of "ld", so it can be a program name with args.
18719set dummy ld; ac_word=$2
18720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18721$as_echo_n "checking for $ac_word... " >&6; }
18722if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18723  $as_echo_n "(cached) " >&6
18724else
18725  case $BUILD_LD in
18726  [\\/]* | ?:[\\/]*)
18727  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18728  ;;
18729  *)
18730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18731for as_dir in $PATH
18732do
18733  IFS=$as_save_IFS
18734  test -z "$as_dir" && as_dir=.
18735    for ac_exec_ext in '' $ac_executable_extensions; do
18736  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18737    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18739    break 2
18740  fi
18741done
18742  done
18743IFS=$as_save_IFS
18744
18745  ;;
18746esac
18747fi
18748BUILD_LD=$ac_cv_path_BUILD_LD
18749if test -n "$BUILD_LD"; then
18750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18751$as_echo "$BUILD_LD" >&6; }
18752else
18753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18754$as_echo "no" >&6; }
18755fi
18756
18757
18758
18759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18760
18761  # First separate the path from the arguments. This will split at the first
18762  # space.
18763  complete="$BUILD_LD"
18764  path="${complete%% *}"
18765  tmp="$complete EOL"
18766  arguments="${tmp#* }"
18767
18768  # Input might be given as Windows format, start by converting to
18769  # unix format.
18770  new_path=`$CYGPATH -u "$path"`
18771
18772  # Now try to locate executable using which
18773  new_path=`$WHICH "$new_path" 2> /dev/null`
18774  # bat and cmd files are not always considered executable in cygwin causing which
18775  # to not find them
18776  if test "x$new_path" = x \
18777           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18778           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18779    new_path=`$CYGPATH -u "$path"`
18780  fi
18781  if test "x$new_path" = x; then
18782    # Oops. Which didn't find the executable.
18783    # The splitting of arguments from the executable at a space might have been incorrect,
18784    # since paths with space are more likely in Windows. Give it another try with the whole
18785    # argument.
18786    path="$complete"
18787    arguments="EOL"
18788    new_path=`$CYGPATH -u "$path"`
18789    new_path=`$WHICH "$new_path" 2> /dev/null`
18790    # bat and cmd files are not always considered executable in cygwin causing which
18791    # to not find them
18792    if test "x$new_path" = x \
18793             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18794             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18795      new_path=`$CYGPATH -u "$path"`
18796    fi
18797    if test "x$new_path" = x; then
18798      # It's still not found. Now this is an unrecoverable error.
18799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18800$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18801      has_space=`$ECHO "$complete" | $GREP " "`
18802      if test "x$has_space" != x; then
18803        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18804$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18805      fi
18806      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18807    fi
18808  fi
18809
18810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18813  # "foo.exe" is OK but "foo" is an error.
18814  #
18815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18816  # It is also a way to make sure we got the proper file name for the real test later on.
18817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18818  if test "x$test_shortpath" = x; then
18819    # Short path failed, file does not exist as specified.
18820    # Try adding .exe or .cmd
18821    if test -f "${new_path}.exe"; then
18822       input_to_shortpath="${new_path}.exe"
18823    elif test -f "${new_path}.cmd"; then
18824       input_to_shortpath="${new_path}.cmd"
18825    else
18826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18827$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18828      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18829$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18830      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18831    fi
18832  else
18833    input_to_shortpath="$new_path"
18834  fi
18835
18836  # Call helper function which possibly converts this using DOS-style short mode.
18837  # If so, the updated path is stored in $new_path.
18838  new_path="$input_to_shortpath"
18839
18840  input_path="$input_to_shortpath"
18841  # Check if we need to convert this using DOS-style short mode. If the path
18842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18843  # take no chances and rewrite it.
18844  # Note: m4 eats our [], so we need to use [ and ] instead.
18845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18846  if test "x$has_forbidden_chars" != x; then
18847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18851      # Going to short mode and back again did indeed matter. Since short mode is
18852      # case insensitive, let's make it lowercase to improve readability.
18853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18854      # Now convert it back to Unix-stile (cygpath)
18855      input_path=`$CYGPATH -u "$shortmode_path"`
18856      new_path="$input_path"
18857    fi
18858  fi
18859
18860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18861  if test "x$test_cygdrive_prefix" = x; then
18862    # As a simple fix, exclude /usr/bin since it's not a real path.
18863    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18865      # a path prefixed by /cygdrive for fixpath to work.
18866      new_path="$CYGWIN_ROOT_PATH$input_path"
18867    fi
18868  fi
18869
18870  # remove trailing .exe if any
18871  new_path="${new_path/%.exe/}"
18872
18873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18874
18875  # First separate the path from the arguments. This will split at the first
18876  # space.
18877  complete="$BUILD_LD"
18878  path="${complete%% *}"
18879  tmp="$complete EOL"
18880  arguments="${tmp#* }"
18881
18882  # Input might be given as Windows format, start by converting to
18883  # unix format.
18884  new_path="$path"
18885
18886  windows_path="$new_path"
18887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18888    unix_path=`$CYGPATH -u "$windows_path"`
18889    new_path="$unix_path"
18890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18892    new_path="$unix_path"
18893  fi
18894
18895
18896  # Now try to locate executable using which
18897  new_path=`$WHICH "$new_path" 2> /dev/null`
18898
18899  if test "x$new_path" = x; then
18900    # Oops. Which didn't find the executable.
18901    # The splitting of arguments from the executable at a space might have been incorrect,
18902    # since paths with space are more likely in Windows. Give it another try with the whole
18903    # argument.
18904    path="$complete"
18905    arguments="EOL"
18906    new_path="$path"
18907
18908  windows_path="$new_path"
18909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18910    unix_path=`$CYGPATH -u "$windows_path"`
18911    new_path="$unix_path"
18912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18914    new_path="$unix_path"
18915  fi
18916
18917
18918    new_path=`$WHICH "$new_path" 2> /dev/null`
18919
18920    if test "x$new_path" = x; then
18921      # It's still not found. Now this is an unrecoverable error.
18922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18923$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18924      has_space=`$ECHO "$complete" | $GREP " "`
18925      if test "x$has_space" != x; then
18926        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18927$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18928      fi
18929      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18930    fi
18931  fi
18932
18933  # Now new_path has a complete unix path to the binary
18934  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18935    # Keep paths in /bin as-is, but remove trailing .exe if any
18936    new_path="${new_path/%.exe/}"
18937    # Do not save /bin paths to all_fixpath_prefixes!
18938  else
18939    # Not in mixed or Windows style, start by that.
18940    new_path=`cmd //c echo $new_path`
18941
18942  input_path="$new_path"
18943  # Check if we need to convert this using DOS-style short mode. If the path
18944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18945  # take no chances and rewrite it.
18946  # Note: m4 eats our [], so we need to use [ and ] instead.
18947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18948  if test "x$has_forbidden_chars" != x; then
18949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18950    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18951  fi
18952
18953    # Output is in $new_path
18954
18955  windows_path="$new_path"
18956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18957    unix_path=`$CYGPATH -u "$windows_path"`
18958    new_path="$unix_path"
18959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18961    new_path="$unix_path"
18962  fi
18963
18964    # remove trailing .exe if any
18965    new_path="${new_path/%.exe/}"
18966
18967    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18968    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18969  fi
18970
18971  else
18972    # We're on a posix platform. Hooray! :)
18973    # First separate the path from the arguments. This will split at the first
18974    # space.
18975    complete="$BUILD_LD"
18976    path="${complete%% *}"
18977    tmp="$complete EOL"
18978    arguments="${tmp#* }"
18979
18980    # Cannot rely on the command "which" here since it doesn't always work.
18981    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18982    if test -z "$is_absolute_path"; then
18983      # Path to executable is not absolute. Find it.
18984      IFS_save="$IFS"
18985      IFS=:
18986      for p in $PATH; do
18987        if test -f "$p/$path" && test -x "$p/$path"; then
18988          new_path="$p/$path"
18989          break
18990        fi
18991      done
18992      IFS="$IFS_save"
18993    else
18994      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18995$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18996      new_path="$path"
18997    fi
18998
18999    if test "x$new_path" = x; then
19000        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
19001$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
19002        has_space=`$ECHO "$complete" | $GREP " "`
19003        if test "x$has_space" != x; then
19004          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19005$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19006        fi
19007        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
19008      fi
19009  fi
19010
19011      # Now join together the path and the arguments once again
19012      if test "x$arguments" != xEOL; then
19013        new_complete="$new_path ${arguments% *}"
19014      else
19015        new_complete="$new_path"
19016      fi
19017
19018  if test "x$complete" != "x$new_complete"; then
19019      BUILD_LD="$new_complete"
19020      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
19021$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
19022    fi
19023
19024fi
19025
19026
19027
19028
19029# If a devkit is found on the builddeps server, then prepend its path to the
19030# PATH variable. If there are cross compilers available in the devkit, these
19031# will be found by AC_PROG_CC et al.
19032DEVKIT=
19033
19034
19035    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19036        # Source the builddeps file again, to make sure it uses the latest variables!
19037        . $builddepsfile
19038        # Look for a target and build machine specific resource!
19039        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19040        if test "x$resource" = x; then
19041            # Ok, lets instead look for a target specific resource
19042            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
19043        fi
19044        if test "x$resource" = x; then
19045            # Ok, lets instead look for a build specific resource
19046            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
19047        fi
19048        if test "x$resource" = x; then
19049            # Ok, lets instead look for a generic resource
19050            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
19051            resource=${builddep_devkit}
19052        fi
19053        if test "x$resource" != x; then
19054            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19055$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19056	    # If the resource in the builddeps.conf file is an existing directory,
19057	    # for example /java/linux/cups
19058	    if test -d ${resource}; then
19059	       depdir=${resource}
19060	    else
19061
19062# devkit is for example mymodule
19063# $resource is for example libs/general/libmymod_1_2_3.zip
19064# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19065# $with_builddeps_dir is for example /localhome/builddeps
19066# depdir is the name of the variable into which we store the depdir, eg MYMOD
19067# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19068# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19069    filename=`basename $resource`
19070    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19071    filebase=${filename%%.*}
19072    extension=${filename#*.}
19073    installdir=$with_builddeps_dir/$filebase
19074    if test ! -f $installdir/$filename.unpacked; then
19075        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19076$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19077        if test ! -d $installdir; then
19078            mkdir -p $installdir
19079        fi
19080        if test ! -d $installdir; then
19081            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19082        fi
19083        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19084        touch $tmpfile
19085        if test ! -f $tmpfile; then
19086            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19087        fi
19088
19089    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19090    # $tmpfile is the local file name for the downloaded file.
19091    VALID_TOOL=no
19092    if test "x$BDEPS_FTP" = xwget; then
19093       VALID_TOOL=yes
19094       wget -O $tmpfile $with_builddeps_server/$resource
19095    fi
19096    if test "x$BDEPS_FTP" = xlftp; then
19097       VALID_TOOL=yes
19098       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19099    fi
19100    if test "x$BDEPS_FTP" = xftp; then
19101        VALID_TOOL=yes
19102        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19103        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19104        FTPUSERPWD=${FTPSERVER%%@*}
19105        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19106            FTPUSER=${userpwd%%:*}
19107            FTPPWD=${userpwd#*@}
19108            FTPSERVER=${FTPSERVER#*@}
19109        else
19110            FTPUSER=ftp
19111            FTPPWD=ftp
19112        fi
19113        # the "pass" command does not work on some
19114        # ftp clients (read ftp.exe) but if it works,
19115        # passive mode is better!
19116        (\
19117            echo "user $FTPUSER $FTPPWD"        ;\
19118            echo "pass"                         ;\
19119            echo "bin"                          ;\
19120            echo "get $FTPPATH $tmpfile"              ;\
19121        ) | ftp -in $FTPSERVER
19122    fi
19123    if test "x$VALID_TOOL" != xyes; then
19124       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19125    fi
19126
19127        mv $tmpfile $installdir/$filename
19128        if test ! -s $installdir/$filename; then
19129            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19130        fi
19131        case "$extension" in
19132            zip)  echo "Unzipping $installdir/$filename..."
19133               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19134            ;;
19135            tar.gz) echo "Untaring $installdir/$filename..."
19136               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19137            ;;
19138            tgz) echo "Untaring $installdir/$filename..."
19139               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19140            ;;
19141            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19142            ;;
19143        esac
19144    fi
19145    if test -f $installdir/$filename.unpacked; then
19146        depdir=$installdir
19147    fi
19148
19149	    fi
19150            # Source the builddeps file again, because in the previous command, the depdir
19151            # was updated to point at the current build dependency install directory.
19152            . $builddepsfile
19153            # Now extract variables from the builddeps.conf files.
19154            theroot=${builddep_devkit_ROOT}
19155            thecflags=${builddep_devkit_CFLAGS}
19156            thelibs=${builddep_devkit_LIBS}
19157            if test "x$depdir" = x; then
19158                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19159            fi
19160            DEVKIT=$depdir
19161            if test "x$theroot" != x; then
19162               DEVKIT="$theroot"
19163            fi
19164            if test "x$thecflags" != x; then
19165               DEVKIT_CFLAGS="$thecflags"
19166            fi
19167            if test "x$thelibs" != x; then
19168               DEVKIT_LIBS="$thelibs"
19169            fi
19170            # Found devkit
19171                     PATH="$DEVKIT/bin:$PATH"
19172                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19173                     if test "x$x_includes" = "xNONE"; then
19174                         x_includes="$SYS_ROOT/usr/include/X11"
19175                     fi
19176                     if test "x$x_libraries" = "xNONE"; then
19177                         x_libraries="$SYS_ROOT/usr/lib"
19178                     fi
19179
19180
19181        fi
19182
19183    fi
19184
19185
19186# Store the CFLAGS etal passed to the configure script.
19187ORG_CFLAGS="$CFLAGS"
19188ORG_CXXFLAGS="$CXXFLAGS"
19189ORG_OBJCFLAGS="$OBJCFLAGS"
19190
19191# autoconf magic only relies on PATH, so update it if tools dir is specified
19192OLD_PATH="$PATH"
19193if test "x$TOOLS_DIR" != x; then
19194  PATH=$TOOLS_DIR:$PATH
19195fi
19196
19197
19198### Locate C compiler (CC)
19199
19200# On windows, only cl.exe is supported.
19201# On Solaris, cc is preferred to gcc.
19202# Elsewhere, gcc is preferred to cc.
19203
19204if test "x$CC" != x; then
19205  COMPILER_CHECK_LIST="$CC"
19206elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19207  COMPILER_CHECK_LIST="cl"
19208elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19209  COMPILER_CHECK_LIST="cc gcc"
19210else
19211  COMPILER_CHECK_LIST="gcc cc"
19212fi
19213
19214
19215  COMPILER_NAME=C
19216
19217  CC=
19218  # If TOOLS_DIR is set, check for all compiler names in there first
19219  # before checking the rest of the PATH.
19220  if test -n "$TOOLS_DIR"; then
19221    PATH_save="$PATH"
19222    PATH="$TOOLS_DIR"
19223    for ac_prog in $COMPILER_CHECK_LIST
19224do
19225  # Extract the first word of "$ac_prog", so it can be a program name with args.
19226set dummy $ac_prog; ac_word=$2
19227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19228$as_echo_n "checking for $ac_word... " >&6; }
19229if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
19230  $as_echo_n "(cached) " >&6
19231else
19232  case $TOOLS_DIR_CC in
19233  [\\/]* | ?:[\\/]*)
19234  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19235  ;;
19236  *)
19237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19238for as_dir in $PATH
19239do
19240  IFS=$as_save_IFS
19241  test -z "$as_dir" && as_dir=.
19242    for ac_exec_ext in '' $ac_executable_extensions; do
19243  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19244    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19246    break 2
19247  fi
19248done
19249  done
19250IFS=$as_save_IFS
19251
19252  ;;
19253esac
19254fi
19255TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19256if test -n "$TOOLS_DIR_CC"; then
19257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19258$as_echo "$TOOLS_DIR_CC" >&6; }
19259else
19260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19261$as_echo "no" >&6; }
19262fi
19263
19264
19265  test -n "$TOOLS_DIR_CC" && break
19266done
19267
19268    CC=$TOOLS_DIR_CC
19269    PATH="$PATH_save"
19270  fi
19271
19272  # AC_PATH_PROGS can't be run multiple times with the same variable,
19273  # so create a new name for this run.
19274  if test "x$CC" = x; then
19275    for ac_prog in $COMPILER_CHECK_LIST
19276do
19277  # Extract the first word of "$ac_prog", so it can be a program name with args.
19278set dummy $ac_prog; ac_word=$2
19279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19280$as_echo_n "checking for $ac_word... " >&6; }
19281if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
19282  $as_echo_n "(cached) " >&6
19283else
19284  case $POTENTIAL_CC in
19285  [\\/]* | ?:[\\/]*)
19286  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19287  ;;
19288  *)
19289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19290for as_dir in $PATH
19291do
19292  IFS=$as_save_IFS
19293  test -z "$as_dir" && as_dir=.
19294    for ac_exec_ext in '' $ac_executable_extensions; do
19295  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19296    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19298    break 2
19299  fi
19300done
19301  done
19302IFS=$as_save_IFS
19303
19304  ;;
19305esac
19306fi
19307POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19308if test -n "$POTENTIAL_CC"; then
19309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19310$as_echo "$POTENTIAL_CC" >&6; }
19311else
19312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19313$as_echo "no" >&6; }
19314fi
19315
19316
19317  test -n "$POTENTIAL_CC" && break
19318done
19319
19320    CC=$POTENTIAL_CC
19321  fi
19322
19323  if test "x$CC" = x; then
19324
19325    # Print a helpful message on how to acquire the necessary build dependency.
19326    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19327    MISSING_DEPENDENCY=devkit
19328    PKGHANDLER_COMMAND=
19329
19330    case $PKGHANDLER in
19331	apt-get)
19332                apt_help     $MISSING_DEPENDENCY ;;
19333    yum)
19334                yum_help     $MISSING_DEPENDENCY ;;
19335	port)
19336                port_help    $MISSING_DEPENDENCY ;;
19337	pkgutil)
19338                pkgutil_help $MISSING_DEPENDENCY ;;
19339	pkgadd)
19340                pkgadd_help  $MISSING_DEPENDENCY ;;
19341    * )
19342      break ;;
19343    esac
19344
19345    if test "x$PKGHANDLER_COMMAND" != x; then
19346        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19347    fi
19348
19349      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19350  fi
19351
19352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19353
19354  # First separate the path from the arguments. This will split at the first
19355  # space.
19356  complete="$CC"
19357  path="${complete%% *}"
19358  tmp="$complete EOL"
19359  arguments="${tmp#* }"
19360
19361  # Input might be given as Windows format, start by converting to
19362  # unix format.
19363  new_path=`$CYGPATH -u "$path"`
19364
19365  # Now try to locate executable using which
19366  new_path=`$WHICH "$new_path" 2> /dev/null`
19367  # bat and cmd files are not always considered executable in cygwin causing which
19368  # to not find them
19369  if test "x$new_path" = x \
19370           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19371           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19372    new_path=`$CYGPATH -u "$path"`
19373  fi
19374  if test "x$new_path" = x; then
19375    # Oops. Which didn't find the executable.
19376    # The splitting of arguments from the executable at a space might have been incorrect,
19377    # since paths with space are more likely in Windows. Give it another try with the whole
19378    # argument.
19379    path="$complete"
19380    arguments="EOL"
19381    new_path=`$CYGPATH -u "$path"`
19382    new_path=`$WHICH "$new_path" 2> /dev/null`
19383    # bat and cmd files are not always considered executable in cygwin causing which
19384    # to not find them
19385    if test "x$new_path" = x \
19386             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19387             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19388      new_path=`$CYGPATH -u "$path"`
19389    fi
19390    if test "x$new_path" = x; then
19391      # It's still not found. Now this is an unrecoverable error.
19392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19393$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19394      has_space=`$ECHO "$complete" | $GREP " "`
19395      if test "x$has_space" != x; then
19396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19398      fi
19399      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19400    fi
19401  fi
19402
19403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19406  # "foo.exe" is OK but "foo" is an error.
19407  #
19408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19409  # It is also a way to make sure we got the proper file name for the real test later on.
19410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19411  if test "x$test_shortpath" = x; then
19412    # Short path failed, file does not exist as specified.
19413    # Try adding .exe or .cmd
19414    if test -f "${new_path}.exe"; then
19415       input_to_shortpath="${new_path}.exe"
19416    elif test -f "${new_path}.cmd"; then
19417       input_to_shortpath="${new_path}.cmd"
19418    else
19419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19420$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19421      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19422$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19423      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19424    fi
19425  else
19426    input_to_shortpath="$new_path"
19427  fi
19428
19429  # Call helper function which possibly converts this using DOS-style short mode.
19430  # If so, the updated path is stored in $new_path.
19431  new_path="$input_to_shortpath"
19432
19433  input_path="$input_to_shortpath"
19434  # Check if we need to convert this using DOS-style short mode. If the path
19435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19436  # take no chances and rewrite it.
19437  # Note: m4 eats our [], so we need to use [ and ] instead.
19438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19439  if test "x$has_forbidden_chars" != x; then
19440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19444      # Going to short mode and back again did indeed matter. Since short mode is
19445      # case insensitive, let's make it lowercase to improve readability.
19446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19447      # Now convert it back to Unix-stile (cygpath)
19448      input_path=`$CYGPATH -u "$shortmode_path"`
19449      new_path="$input_path"
19450    fi
19451  fi
19452
19453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19454  if test "x$test_cygdrive_prefix" = x; then
19455    # As a simple fix, exclude /usr/bin since it's not a real path.
19456    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19458      # a path prefixed by /cygdrive for fixpath to work.
19459      new_path="$CYGWIN_ROOT_PATH$input_path"
19460    fi
19461  fi
19462
19463  # remove trailing .exe if any
19464  new_path="${new_path/%.exe/}"
19465
19466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19467
19468  # First separate the path from the arguments. This will split at the first
19469  # space.
19470  complete="$CC"
19471  path="${complete%% *}"
19472  tmp="$complete EOL"
19473  arguments="${tmp#* }"
19474
19475  # Input might be given as Windows format, start by converting to
19476  # unix format.
19477  new_path="$path"
19478
19479  windows_path="$new_path"
19480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19481    unix_path=`$CYGPATH -u "$windows_path"`
19482    new_path="$unix_path"
19483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19485    new_path="$unix_path"
19486  fi
19487
19488
19489  # Now try to locate executable using which
19490  new_path=`$WHICH "$new_path" 2> /dev/null`
19491
19492  if test "x$new_path" = x; then
19493    # Oops. Which didn't find the executable.
19494    # The splitting of arguments from the executable at a space might have been incorrect,
19495    # since paths with space are more likely in Windows. Give it another try with the whole
19496    # argument.
19497    path="$complete"
19498    arguments="EOL"
19499    new_path="$path"
19500
19501  windows_path="$new_path"
19502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19503    unix_path=`$CYGPATH -u "$windows_path"`
19504    new_path="$unix_path"
19505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19507    new_path="$unix_path"
19508  fi
19509
19510
19511    new_path=`$WHICH "$new_path" 2> /dev/null`
19512
19513    if test "x$new_path" = x; then
19514      # It's still not found. Now this is an unrecoverable error.
19515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19516$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19517      has_space=`$ECHO "$complete" | $GREP " "`
19518      if test "x$has_space" != x; then
19519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19521      fi
19522      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19523    fi
19524  fi
19525
19526  # Now new_path has a complete unix path to the binary
19527  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19528    # Keep paths in /bin as-is, but remove trailing .exe if any
19529    new_path="${new_path/%.exe/}"
19530    # Do not save /bin paths to all_fixpath_prefixes!
19531  else
19532    # Not in mixed or Windows style, start by that.
19533    new_path=`cmd //c echo $new_path`
19534
19535  input_path="$new_path"
19536  # Check if we need to convert this using DOS-style short mode. If the path
19537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19538  # take no chances and rewrite it.
19539  # Note: m4 eats our [], so we need to use [ and ] instead.
19540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19541  if test "x$has_forbidden_chars" != x; then
19542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19544  fi
19545
19546    # Output is in $new_path
19547
19548  windows_path="$new_path"
19549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19550    unix_path=`$CYGPATH -u "$windows_path"`
19551    new_path="$unix_path"
19552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19554    new_path="$unix_path"
19555  fi
19556
19557    # remove trailing .exe if any
19558    new_path="${new_path/%.exe/}"
19559
19560    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19561    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19562  fi
19563
19564  else
19565    # We're on a posix platform. Hooray! :)
19566    # First separate the path from the arguments. This will split at the first
19567    # space.
19568    complete="$CC"
19569    path="${complete%% *}"
19570    tmp="$complete EOL"
19571    arguments="${tmp#* }"
19572
19573    # Cannot rely on the command "which" here since it doesn't always work.
19574    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19575    if test -z "$is_absolute_path"; then
19576      # Path to executable is not absolute. Find it.
19577      IFS_save="$IFS"
19578      IFS=:
19579      for p in $PATH; do
19580        if test -f "$p/$path" && test -x "$p/$path"; then
19581          new_path="$p/$path"
19582          break
19583        fi
19584      done
19585      IFS="$IFS_save"
19586    else
19587      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19588$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19589      new_path="$path"
19590    fi
19591
19592    if test "x$new_path" = x; then
19593        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19594$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19595        has_space=`$ECHO "$complete" | $GREP " "`
19596        if test "x$has_space" != x; then
19597          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19598$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19599        fi
19600        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19601      fi
19602  fi
19603
19604      # Now join together the path and the arguments once again
19605      if test "x$arguments" != xEOL; then
19606        new_complete="$new_path ${arguments% *}"
19607      else
19608        new_complete="$new_path"
19609      fi
19610
19611  if test "x$complete" != "x$new_complete"; then
19612      CC="$new_complete"
19613      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19614$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19615    fi
19616
19617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19618$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19619  TEST_COMPILER="$CC"
19620
19621    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19622        # Follow a chain of symbolic links. Use readlink
19623        # where it exists, else fall back to horribly
19624        # complicated shell code.
19625        if test "x$READLINK_TESTED" != yes; then
19626            # On MacOSX there is a readlink tool with a different
19627            # purpose than the GNU readlink tool. Check the found readlink.
19628            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19629            if test "x$ISGNU" = x; then
19630                 # A readlink that we do not know how to use.
19631                 # Are there other non-GNU readlinks out there?
19632                 READLINK_TESTED=yes
19633                 READLINK=
19634            fi
19635        fi
19636
19637        if test "x$READLINK" != x; then
19638            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19639        else
19640            # Save the current directory for restoring afterwards
19641            STARTDIR=$PWD
19642            COUNTER=0
19643            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19644            sym_link_file=`$BASENAME $TEST_COMPILER`
19645            cd $sym_link_dir
19646            # Use -P flag to resolve symlinks in directories.
19647            cd `$THEPWDCMD -P`
19648            sym_link_dir=`$THEPWDCMD -P`
19649            # Resolve file symlinks
19650            while test $COUNTER -lt 20; do
19651                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19652                if test "x$ISLINK" == x; then
19653                    # This is not a symbolic link! We are done!
19654                    break
19655                fi
19656                # Again resolve directory symlinks since the target of the just found
19657                # link could be in a different directory
19658                cd `$DIRNAME $ISLINK`
19659                sym_link_dir=`$THEPWDCMD -P`
19660                sym_link_file=`$BASENAME $ISLINK`
19661                let COUNTER=COUNTER+1
19662            done
19663            cd $STARTDIR
19664            TEST_COMPILER=$sym_link_dir/$sym_link_file
19665        fi
19666    fi
19667
19668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19669$as_echo "$TEST_COMPILER" >&6; }
19670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19671$as_echo_n "checking if CC is disguised ccache... " >&6; }
19672
19673  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19674  if test "x$COMPILER_BASENAME" = "xccache"; then
19675    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19676$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19677    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19678    # We want to control ccache invocation ourselves, so ignore this cc and try
19679    # searching again.
19680
19681    # Remove the path to the fake ccache cc from the PATH
19682    RETRY_COMPILER_SAVED_PATH="$PATH"
19683    COMPILER_DIRNAME=`$DIRNAME $CC`
19684    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19685
19686    # Try again looking for our compiler
19687    if test -n "$ac_tool_prefix"; then
19688  for ac_prog in $COMPILER_CHECK_LIST
19689  do
19690    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19691set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19693$as_echo_n "checking for $ac_word... " >&6; }
19694if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19695  $as_echo_n "(cached) " >&6
19696else
19697  if test -n "$PROPER_COMPILER_CC"; then
19698  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19699else
19700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19701for as_dir in $PATH
19702do
19703  IFS=$as_save_IFS
19704  test -z "$as_dir" && as_dir=.
19705    for ac_exec_ext in '' $ac_executable_extensions; do
19706  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19707    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19709    break 2
19710  fi
19711done
19712  done
19713IFS=$as_save_IFS
19714
19715fi
19716fi
19717PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19718if test -n "$PROPER_COMPILER_CC"; then
19719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19720$as_echo "$PROPER_COMPILER_CC" >&6; }
19721else
19722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19723$as_echo "no" >&6; }
19724fi
19725
19726
19727    test -n "$PROPER_COMPILER_CC" && break
19728  done
19729fi
19730if test -z "$PROPER_COMPILER_CC"; then
19731  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19732  for ac_prog in $COMPILER_CHECK_LIST
19733do
19734  # Extract the first word of "$ac_prog", so it can be a program name with args.
19735set dummy $ac_prog; ac_word=$2
19736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19737$as_echo_n "checking for $ac_word... " >&6; }
19738if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19739  $as_echo_n "(cached) " >&6
19740else
19741  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19742  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19743else
19744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19745for as_dir in $PATH
19746do
19747  IFS=$as_save_IFS
19748  test -z "$as_dir" && as_dir=.
19749    for ac_exec_ext in '' $ac_executable_extensions; do
19750  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19751    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19753    break 2
19754  fi
19755done
19756  done
19757IFS=$as_save_IFS
19758
19759fi
19760fi
19761ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19762if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19764$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19765else
19766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19767$as_echo "no" >&6; }
19768fi
19769
19770
19771  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19772done
19773
19774  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19775    PROPER_COMPILER_CC=""
19776  else
19777    case $cross_compiling:$ac_tool_warned in
19778yes:)
19779{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19780$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19781ac_tool_warned=yes ;;
19782esac
19783    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19784  fi
19785fi
19786
19787
19788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19789
19790  # First separate the path from the arguments. This will split at the first
19791  # space.
19792  complete="$PROPER_COMPILER_CC"
19793  path="${complete%% *}"
19794  tmp="$complete EOL"
19795  arguments="${tmp#* }"
19796
19797  # Input might be given as Windows format, start by converting to
19798  # unix format.
19799  new_path=`$CYGPATH -u "$path"`
19800
19801  # Now try to locate executable using which
19802  new_path=`$WHICH "$new_path" 2> /dev/null`
19803  # bat and cmd files are not always considered executable in cygwin causing which
19804  # to not find them
19805  if test "x$new_path" = x \
19806           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19807           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19808    new_path=`$CYGPATH -u "$path"`
19809  fi
19810  if test "x$new_path" = x; then
19811    # Oops. Which didn't find the executable.
19812    # The splitting of arguments from the executable at a space might have been incorrect,
19813    # since paths with space are more likely in Windows. Give it another try with the whole
19814    # argument.
19815    path="$complete"
19816    arguments="EOL"
19817    new_path=`$CYGPATH -u "$path"`
19818    new_path=`$WHICH "$new_path" 2> /dev/null`
19819    # bat and cmd files are not always considered executable in cygwin causing which
19820    # to not find them
19821    if test "x$new_path" = x \
19822             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19823             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19824      new_path=`$CYGPATH -u "$path"`
19825    fi
19826    if test "x$new_path" = x; then
19827      # It's still not found. Now this is an unrecoverable error.
19828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19829$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19830      has_space=`$ECHO "$complete" | $GREP " "`
19831      if test "x$has_space" != x; then
19832        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19833$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19834      fi
19835      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19836    fi
19837  fi
19838
19839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19842  # "foo.exe" is OK but "foo" is an error.
19843  #
19844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19845  # It is also a way to make sure we got the proper file name for the real test later on.
19846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19847  if test "x$test_shortpath" = x; then
19848    # Short path failed, file does not exist as specified.
19849    # Try adding .exe or .cmd
19850    if test -f "${new_path}.exe"; then
19851       input_to_shortpath="${new_path}.exe"
19852    elif test -f "${new_path}.cmd"; then
19853       input_to_shortpath="${new_path}.cmd"
19854    else
19855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19856$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19857      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19858$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19859      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19860    fi
19861  else
19862    input_to_shortpath="$new_path"
19863  fi
19864
19865  # Call helper function which possibly converts this using DOS-style short mode.
19866  # If so, the updated path is stored in $new_path.
19867  new_path="$input_to_shortpath"
19868
19869  input_path="$input_to_shortpath"
19870  # Check if we need to convert this using DOS-style short mode. If the path
19871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19872  # take no chances and rewrite it.
19873  # Note: m4 eats our [], so we need to use [ and ] instead.
19874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19875  if test "x$has_forbidden_chars" != x; then
19876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19880      # Going to short mode and back again did indeed matter. Since short mode is
19881      # case insensitive, let's make it lowercase to improve readability.
19882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19883      # Now convert it back to Unix-stile (cygpath)
19884      input_path=`$CYGPATH -u "$shortmode_path"`
19885      new_path="$input_path"
19886    fi
19887  fi
19888
19889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19890  if test "x$test_cygdrive_prefix" = x; then
19891    # As a simple fix, exclude /usr/bin since it's not a real path.
19892    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19894      # a path prefixed by /cygdrive for fixpath to work.
19895      new_path="$CYGWIN_ROOT_PATH$input_path"
19896    fi
19897  fi
19898
19899  # remove trailing .exe if any
19900  new_path="${new_path/%.exe/}"
19901
19902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19903
19904  # First separate the path from the arguments. This will split at the first
19905  # space.
19906  complete="$PROPER_COMPILER_CC"
19907  path="${complete%% *}"
19908  tmp="$complete EOL"
19909  arguments="${tmp#* }"
19910
19911  # Input might be given as Windows format, start by converting to
19912  # unix format.
19913  new_path="$path"
19914
19915  windows_path="$new_path"
19916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19917    unix_path=`$CYGPATH -u "$windows_path"`
19918    new_path="$unix_path"
19919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19921    new_path="$unix_path"
19922  fi
19923
19924
19925  # Now try to locate executable using which
19926  new_path=`$WHICH "$new_path" 2> /dev/null`
19927
19928  if test "x$new_path" = x; then
19929    # Oops. Which didn't find the executable.
19930    # The splitting of arguments from the executable at a space might have been incorrect,
19931    # since paths with space are more likely in Windows. Give it another try with the whole
19932    # argument.
19933    path="$complete"
19934    arguments="EOL"
19935    new_path="$path"
19936
19937  windows_path="$new_path"
19938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19939    unix_path=`$CYGPATH -u "$windows_path"`
19940    new_path="$unix_path"
19941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19943    new_path="$unix_path"
19944  fi
19945
19946
19947    new_path=`$WHICH "$new_path" 2> /dev/null`
19948
19949    if test "x$new_path" = x; then
19950      # It's still not found. Now this is an unrecoverable error.
19951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19952$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19953      has_space=`$ECHO "$complete" | $GREP " "`
19954      if test "x$has_space" != x; then
19955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19957      fi
19958      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19959    fi
19960  fi
19961
19962  # Now new_path has a complete unix path to the binary
19963  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19964    # Keep paths in /bin as-is, but remove trailing .exe if any
19965    new_path="${new_path/%.exe/}"
19966    # Do not save /bin paths to all_fixpath_prefixes!
19967  else
19968    # Not in mixed or Windows style, start by that.
19969    new_path=`cmd //c echo $new_path`
19970
19971  input_path="$new_path"
19972  # Check if we need to convert this using DOS-style short mode. If the path
19973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19974  # take no chances and rewrite it.
19975  # Note: m4 eats our [], so we need to use [ and ] instead.
19976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19977  if test "x$has_forbidden_chars" != x; then
19978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19980  fi
19981
19982    # Output is in $new_path
19983
19984  windows_path="$new_path"
19985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19986    unix_path=`$CYGPATH -u "$windows_path"`
19987    new_path="$unix_path"
19988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19990    new_path="$unix_path"
19991  fi
19992
19993    # remove trailing .exe if any
19994    new_path="${new_path/%.exe/}"
19995
19996    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19997    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19998  fi
19999
20000  else
20001    # We're on a posix platform. Hooray! :)
20002    # First separate the path from the arguments. This will split at the first
20003    # space.
20004    complete="$PROPER_COMPILER_CC"
20005    path="${complete%% *}"
20006    tmp="$complete EOL"
20007    arguments="${tmp#* }"
20008
20009    # Cannot rely on the command "which" here since it doesn't always work.
20010    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20011    if test -z "$is_absolute_path"; then
20012      # Path to executable is not absolute. Find it.
20013      IFS_save="$IFS"
20014      IFS=:
20015      for p in $PATH; do
20016        if test -f "$p/$path" && test -x "$p/$path"; then
20017          new_path="$p/$path"
20018          break
20019        fi
20020      done
20021      IFS="$IFS_save"
20022    else
20023      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
20024$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
20025      new_path="$path"
20026    fi
20027
20028    if test "x$new_path" = x; then
20029        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20030$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20031        has_space=`$ECHO "$complete" | $GREP " "`
20032        if test "x$has_space" != x; then
20033          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20034$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20035        fi
20036        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20037      fi
20038  fi
20039
20040      # Now join together the path and the arguments once again
20041      if test "x$arguments" != xEOL; then
20042        new_complete="$new_path ${arguments% *}"
20043      else
20044        new_complete="$new_path"
20045      fi
20046
20047  if test "x$complete" != "x$new_complete"; then
20048      PROPER_COMPILER_CC="$new_complete"
20049      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20050$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20051    fi
20052
20053    PATH="$RETRY_COMPILER_SAVED_PATH"
20054
20055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20056$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20057
20058    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20059        # Follow a chain of symbolic links. Use readlink
20060        # where it exists, else fall back to horribly
20061        # complicated shell code.
20062        if test "x$READLINK_TESTED" != yes; then
20063            # On MacOSX there is a readlink tool with a different
20064            # purpose than the GNU readlink tool. Check the found readlink.
20065            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20066            if test "x$ISGNU" = x; then
20067                 # A readlink that we do not know how to use.
20068                 # Are there other non-GNU readlinks out there?
20069                 READLINK_TESTED=yes
20070                 READLINK=
20071            fi
20072        fi
20073
20074        if test "x$READLINK" != x; then
20075            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20076        else
20077            # Save the current directory for restoring afterwards
20078            STARTDIR=$PWD
20079            COUNTER=0
20080            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20081            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20082            cd $sym_link_dir
20083            # Use -P flag to resolve symlinks in directories.
20084            cd `$THEPWDCMD -P`
20085            sym_link_dir=`$THEPWDCMD -P`
20086            # Resolve file symlinks
20087            while test $COUNTER -lt 20; do
20088                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20089                if test "x$ISLINK" == x; then
20090                    # This is not a symbolic link! We are done!
20091                    break
20092                fi
20093                # Again resolve directory symlinks since the target of the just found
20094                # link could be in a different directory
20095                cd `$DIRNAME $ISLINK`
20096                sym_link_dir=`$THEPWDCMD -P`
20097                sym_link_file=`$BASENAME $ISLINK`
20098                let COUNTER=COUNTER+1
20099            done
20100            cd $STARTDIR
20101            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20102        fi
20103    fi
20104
20105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20106$as_echo "$PROPER_COMPILER_CC" >&6; }
20107    CC="$PROPER_COMPILER_CC"
20108  else
20109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20110$as_echo "no, keeping CC" >&6; }
20111    CC="$TEST_COMPILER"
20112  fi
20113
20114  COMPILER=$CC
20115  COMPILER_NAME=$COMPILER_NAME
20116
20117  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20118    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20119    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20120    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20121    if test $? -ne 0; then
20122      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20123
20124      { $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
20125$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20126      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20127$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20128      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20129    else
20130      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20131      COMPILER_VENDOR="Sun Studio"
20132    fi
20133  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20134    # First line typically looks something like:
20135    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20136    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20137    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20138    COMPILER_VENDOR="Microsoft CL.EXE"
20139    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20140    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20141      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20142        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20143      fi
20144    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20145      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20146        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20147      fi
20148    fi
20149  else
20150    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20151    # Check that this is likely to be GCC.
20152    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20153    if test $? -ne 0; then
20154      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20155$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20156      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20157$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20158      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20159    fi
20160
20161    # First line typically looks something like:
20162    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20163    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20164    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20165  fi
20166  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20167  CC_VERSION="$COMPILER_VERSION"
20168  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20169  CC_VENDOR="$COMPILER_VENDOR"
20170
20171  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20172$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20173
20174
20175# Now that we have resolved CC ourself, let autoconf have its go at it
20176ac_ext=c
20177ac_cpp='$CPP $CPPFLAGS'
20178ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20179ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20180ac_compiler_gnu=$ac_cv_c_compiler_gnu
20181if test -n "$ac_tool_prefix"; then
20182  for ac_prog in $CC
20183  do
20184    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20185set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20187$as_echo_n "checking for $ac_word... " >&6; }
20188if test "${ac_cv_prog_CC+set}" = set; then :
20189  $as_echo_n "(cached) " >&6
20190else
20191  if test -n "$CC"; then
20192  ac_cv_prog_CC="$CC" # Let the user override the test.
20193else
20194as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20195for as_dir in $PATH
20196do
20197  IFS=$as_save_IFS
20198  test -z "$as_dir" && as_dir=.
20199    for ac_exec_ext in '' $ac_executable_extensions; do
20200  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20201    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20203    break 2
20204  fi
20205done
20206  done
20207IFS=$as_save_IFS
20208
20209fi
20210fi
20211CC=$ac_cv_prog_CC
20212if test -n "$CC"; then
20213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20214$as_echo "$CC" >&6; }
20215else
20216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20217$as_echo "no" >&6; }
20218fi
20219
20220
20221    test -n "$CC" && break
20222  done
20223fi
20224if test -z "$CC"; then
20225  ac_ct_CC=$CC
20226  for ac_prog in $CC
20227do
20228  # Extract the first word of "$ac_prog", so it can be a program name with args.
20229set dummy $ac_prog; ac_word=$2
20230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20231$as_echo_n "checking for $ac_word... " >&6; }
20232if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
20233  $as_echo_n "(cached) " >&6
20234else
20235  if test -n "$ac_ct_CC"; then
20236  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20237else
20238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20239for as_dir in $PATH
20240do
20241  IFS=$as_save_IFS
20242  test -z "$as_dir" && as_dir=.
20243    for ac_exec_ext in '' $ac_executable_extensions; do
20244  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20245    ac_cv_prog_ac_ct_CC="$ac_prog"
20246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20247    break 2
20248  fi
20249done
20250  done
20251IFS=$as_save_IFS
20252
20253fi
20254fi
20255ac_ct_CC=$ac_cv_prog_ac_ct_CC
20256if test -n "$ac_ct_CC"; then
20257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20258$as_echo "$ac_ct_CC" >&6; }
20259else
20260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20261$as_echo "no" >&6; }
20262fi
20263
20264
20265  test -n "$ac_ct_CC" && break
20266done
20267
20268  if test "x$ac_ct_CC" = x; then
20269    CC=""
20270  else
20271    case $cross_compiling:$ac_tool_warned in
20272yes:)
20273{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20274$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20275ac_tool_warned=yes ;;
20276esac
20277    CC=$ac_ct_CC
20278  fi
20279fi
20280
20281
20282test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20283$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20284as_fn_error $? "no acceptable C compiler found in \$PATH
20285See \`config.log' for more details" "$LINENO" 5 ; }
20286
20287# Provide some information about the compiler.
20288$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20289set X $ac_compile
20290ac_compiler=$2
20291for ac_option in --version -v -V -qversion; do
20292  { { ac_try="$ac_compiler $ac_option >&5"
20293case "(($ac_try" in
20294  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20295  *) ac_try_echo=$ac_try;;
20296esac
20297eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20298$as_echo "$ac_try_echo"; } >&5
20299  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20300  ac_status=$?
20301  if test -s conftest.err; then
20302    sed '10a\
20303... rest of stderr output deleted ...
20304         10q' conftest.err >conftest.er1
20305    cat conftest.er1 >&5
20306  fi
20307  rm -f conftest.er1 conftest.err
20308  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20309  test $ac_status = 0; }
20310done
20311
20312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20313/* end confdefs.h.  */
20314
20315int
20316main ()
20317{
20318
20319  ;
20320  return 0;
20321}
20322_ACEOF
20323ac_clean_files_save=$ac_clean_files
20324ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20325# Try to create an executable without -o first, disregard a.out.
20326# It will help us diagnose broken compilers, and finding out an intuition
20327# of exeext.
20328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20329$as_echo_n "checking whether the C compiler works... " >&6; }
20330ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20331
20332# The possible output files:
20333ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20334
20335ac_rmfiles=
20336for ac_file in $ac_files
20337do
20338  case $ac_file in
20339    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20340    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20341  esac
20342done
20343rm -f $ac_rmfiles
20344
20345if { { ac_try="$ac_link_default"
20346case "(($ac_try" in
20347  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20348  *) ac_try_echo=$ac_try;;
20349esac
20350eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20351$as_echo "$ac_try_echo"; } >&5
20352  (eval "$ac_link_default") 2>&5
20353  ac_status=$?
20354  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20355  test $ac_status = 0; }; then :
20356  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20357# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20358# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20359# so that the user can short-circuit this test for compilers unknown to
20360# Autoconf.
20361for ac_file in $ac_files ''
20362do
20363  test -f "$ac_file" || continue
20364  case $ac_file in
20365    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20366	;;
20367    [ab].out )
20368	# We found the default executable, but exeext='' is most
20369	# certainly right.
20370	break;;
20371    *.* )
20372	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20373	then :; else
20374	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20375	fi
20376	# We set ac_cv_exeext here because the later test for it is not
20377	# safe: cross compilers may not add the suffix if given an `-o'
20378	# argument, so we may need to know it at that point already.
20379	# Even if this section looks crufty: it has the advantage of
20380	# actually working.
20381	break;;
20382    * )
20383	break;;
20384  esac
20385done
20386test "$ac_cv_exeext" = no && ac_cv_exeext=
20387
20388else
20389  ac_file=''
20390fi
20391if test -z "$ac_file"; then :
20392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20393$as_echo "no" >&6; }
20394$as_echo "$as_me: failed program was:" >&5
20395sed 's/^/| /' conftest.$ac_ext >&5
20396
20397{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20398$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20399as_fn_error 77 "C compiler cannot create executables
20400See \`config.log' for more details" "$LINENO" 5 ; }
20401else
20402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20403$as_echo "yes" >&6; }
20404fi
20405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20406$as_echo_n "checking for C compiler default output file name... " >&6; }
20407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20408$as_echo "$ac_file" >&6; }
20409ac_exeext=$ac_cv_exeext
20410
20411rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20412ac_clean_files=$ac_clean_files_save
20413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20414$as_echo_n "checking for suffix of executables... " >&6; }
20415if { { ac_try="$ac_link"
20416case "(($ac_try" in
20417  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20418  *) ac_try_echo=$ac_try;;
20419esac
20420eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20421$as_echo "$ac_try_echo"; } >&5
20422  (eval "$ac_link") 2>&5
20423  ac_status=$?
20424  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20425  test $ac_status = 0; }; then :
20426  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20427# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20428# work properly (i.e., refer to `conftest.exe'), while it won't with
20429# `rm'.
20430for ac_file in conftest.exe conftest conftest.*; do
20431  test -f "$ac_file" || continue
20432  case $ac_file in
20433    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20434    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20435	  break;;
20436    * ) break;;
20437  esac
20438done
20439else
20440  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20441$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20442as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20443See \`config.log' for more details" "$LINENO" 5 ; }
20444fi
20445rm -f conftest conftest$ac_cv_exeext
20446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20447$as_echo "$ac_cv_exeext" >&6; }
20448
20449rm -f conftest.$ac_ext
20450EXEEXT=$ac_cv_exeext
20451ac_exeext=$EXEEXT
20452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20453/* end confdefs.h.  */
20454#include <stdio.h>
20455int
20456main ()
20457{
20458FILE *f = fopen ("conftest.out", "w");
20459 return ferror (f) || fclose (f) != 0;
20460
20461  ;
20462  return 0;
20463}
20464_ACEOF
20465ac_clean_files="$ac_clean_files conftest.out"
20466# Check that the compiler produces executables we can run.  If not, either
20467# the compiler is broken, or we cross compile.
20468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20469$as_echo_n "checking whether we are cross compiling... " >&6; }
20470if test "$cross_compiling" != yes; then
20471  { { ac_try="$ac_link"
20472case "(($ac_try" in
20473  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20474  *) ac_try_echo=$ac_try;;
20475esac
20476eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20477$as_echo "$ac_try_echo"; } >&5
20478  (eval "$ac_link") 2>&5
20479  ac_status=$?
20480  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20481  test $ac_status = 0; }
20482  if { ac_try='./conftest$ac_cv_exeext'
20483  { { case "(($ac_try" in
20484  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20485  *) ac_try_echo=$ac_try;;
20486esac
20487eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20488$as_echo "$ac_try_echo"; } >&5
20489  (eval "$ac_try") 2>&5
20490  ac_status=$?
20491  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20492  test $ac_status = 0; }; }; then
20493    cross_compiling=no
20494  else
20495    if test "$cross_compiling" = maybe; then
20496	cross_compiling=yes
20497    else
20498	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20499$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20500as_fn_error $? "cannot run C compiled programs.
20501If you meant to cross compile, use \`--host'.
20502See \`config.log' for more details" "$LINENO" 5 ; }
20503    fi
20504  fi
20505fi
20506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20507$as_echo "$cross_compiling" >&6; }
20508
20509rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20510ac_clean_files=$ac_clean_files_save
20511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20512$as_echo_n "checking for suffix of object files... " >&6; }
20513if test "${ac_cv_objext+set}" = set; then :
20514  $as_echo_n "(cached) " >&6
20515else
20516  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20517/* end confdefs.h.  */
20518
20519int
20520main ()
20521{
20522
20523  ;
20524  return 0;
20525}
20526_ACEOF
20527rm -f conftest.o conftest.obj
20528if { { ac_try="$ac_compile"
20529case "(($ac_try" in
20530  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20531  *) ac_try_echo=$ac_try;;
20532esac
20533eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20534$as_echo "$ac_try_echo"; } >&5
20535  (eval "$ac_compile") 2>&5
20536  ac_status=$?
20537  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20538  test $ac_status = 0; }; then :
20539  for ac_file in conftest.o conftest.obj conftest.*; do
20540  test -f "$ac_file" || continue;
20541  case $ac_file in
20542    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20543    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20544       break;;
20545  esac
20546done
20547else
20548  $as_echo "$as_me: failed program was:" >&5
20549sed 's/^/| /' conftest.$ac_ext >&5
20550
20551{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20552$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20553as_fn_error $? "cannot compute suffix of object files: cannot compile
20554See \`config.log' for more details" "$LINENO" 5 ; }
20555fi
20556rm -f conftest.$ac_cv_objext conftest.$ac_ext
20557fi
20558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20559$as_echo "$ac_cv_objext" >&6; }
20560OBJEXT=$ac_cv_objext
20561ac_objext=$OBJEXT
20562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20563$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20564if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20565  $as_echo_n "(cached) " >&6
20566else
20567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20568/* end confdefs.h.  */
20569
20570int
20571main ()
20572{
20573#ifndef __GNUC__
20574       choke me
20575#endif
20576
20577  ;
20578  return 0;
20579}
20580_ACEOF
20581if ac_fn_c_try_compile "$LINENO"; then :
20582  ac_compiler_gnu=yes
20583else
20584  ac_compiler_gnu=no
20585fi
20586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20587ac_cv_c_compiler_gnu=$ac_compiler_gnu
20588
20589fi
20590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20591$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20592if test $ac_compiler_gnu = yes; then
20593  GCC=yes
20594else
20595  GCC=
20596fi
20597ac_test_CFLAGS=${CFLAGS+set}
20598ac_save_CFLAGS=$CFLAGS
20599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20600$as_echo_n "checking whether $CC accepts -g... " >&6; }
20601if test "${ac_cv_prog_cc_g+set}" = set; then :
20602  $as_echo_n "(cached) " >&6
20603else
20604  ac_save_c_werror_flag=$ac_c_werror_flag
20605   ac_c_werror_flag=yes
20606   ac_cv_prog_cc_g=no
20607   CFLAGS="-g"
20608   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20609/* end confdefs.h.  */
20610
20611int
20612main ()
20613{
20614
20615  ;
20616  return 0;
20617}
20618_ACEOF
20619if ac_fn_c_try_compile "$LINENO"; then :
20620  ac_cv_prog_cc_g=yes
20621else
20622  CFLAGS=""
20623      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20624/* end confdefs.h.  */
20625
20626int
20627main ()
20628{
20629
20630  ;
20631  return 0;
20632}
20633_ACEOF
20634if ac_fn_c_try_compile "$LINENO"; then :
20635
20636else
20637  ac_c_werror_flag=$ac_save_c_werror_flag
20638	 CFLAGS="-g"
20639	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20640/* end confdefs.h.  */
20641
20642int
20643main ()
20644{
20645
20646  ;
20647  return 0;
20648}
20649_ACEOF
20650if ac_fn_c_try_compile "$LINENO"; then :
20651  ac_cv_prog_cc_g=yes
20652fi
20653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20654fi
20655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20656fi
20657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20658   ac_c_werror_flag=$ac_save_c_werror_flag
20659fi
20660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20661$as_echo "$ac_cv_prog_cc_g" >&6; }
20662if test "$ac_test_CFLAGS" = set; then
20663  CFLAGS=$ac_save_CFLAGS
20664elif test $ac_cv_prog_cc_g = yes; then
20665  if test "$GCC" = yes; then
20666    CFLAGS="-g -O2"
20667  else
20668    CFLAGS="-g"
20669  fi
20670else
20671  if test "$GCC" = yes; then
20672    CFLAGS="-O2"
20673  else
20674    CFLAGS=
20675  fi
20676fi
20677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20678$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20679if test "${ac_cv_prog_cc_c89+set}" = set; then :
20680  $as_echo_n "(cached) " >&6
20681else
20682  ac_cv_prog_cc_c89=no
20683ac_save_CC=$CC
20684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20685/* end confdefs.h.  */
20686#include <stdarg.h>
20687#include <stdio.h>
20688#include <sys/types.h>
20689#include <sys/stat.h>
20690/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20691struct buf { int x; };
20692FILE * (*rcsopen) (struct buf *, struct stat *, int);
20693static char *e (p, i)
20694     char **p;
20695     int i;
20696{
20697  return p[i];
20698}
20699static char *f (char * (*g) (char **, int), char **p, ...)
20700{
20701  char *s;
20702  va_list v;
20703  va_start (v,p);
20704  s = g (p, va_arg (v,int));
20705  va_end (v);
20706  return s;
20707}
20708
20709/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20710   function prototypes and stuff, but not '\xHH' hex character constants.
20711   These don't provoke an error unfortunately, instead are silently treated
20712   as 'x'.  The following induces an error, until -std is added to get
20713   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20714   array size at least.  It's necessary to write '\x00'==0 to get something
20715   that's true only with -std.  */
20716int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20717
20718/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20719   inside strings and character constants.  */
20720#define FOO(x) 'x'
20721int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20722
20723int test (int i, double x);
20724struct s1 {int (*f) (int a);};
20725struct s2 {int (*f) (double a);};
20726int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20727int argc;
20728char **argv;
20729int
20730main ()
20731{
20732return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20733  ;
20734  return 0;
20735}
20736_ACEOF
20737for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20738	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20739do
20740  CC="$ac_save_CC $ac_arg"
20741  if ac_fn_c_try_compile "$LINENO"; then :
20742  ac_cv_prog_cc_c89=$ac_arg
20743fi
20744rm -f core conftest.err conftest.$ac_objext
20745  test "x$ac_cv_prog_cc_c89" != "xno" && break
20746done
20747rm -f conftest.$ac_ext
20748CC=$ac_save_CC
20749
20750fi
20751# AC_CACHE_VAL
20752case "x$ac_cv_prog_cc_c89" in
20753  x)
20754    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20755$as_echo "none needed" >&6; } ;;
20756  xno)
20757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20758$as_echo "unsupported" >&6; } ;;
20759  *)
20760    CC="$CC $ac_cv_prog_cc_c89"
20761    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20762$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20763esac
20764if test "x$ac_cv_prog_cc_c89" != xno; then :
20765
20766fi
20767
20768ac_ext=cpp
20769ac_cpp='$CXXCPP $CPPFLAGS'
20770ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20771ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20772ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20773
20774
20775### Locate C++ compiler (CXX)
20776
20777if test "x$CXX" != x; then
20778  COMPILER_CHECK_LIST="$CXX"
20779elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20780  COMPILER_CHECK_LIST="cl"
20781elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20782  COMPILER_CHECK_LIST="CC g++"
20783else
20784  COMPILER_CHECK_LIST="g++ CC"
20785fi
20786
20787
20788  COMPILER_NAME=C++
20789
20790  CXX=
20791  # If TOOLS_DIR is set, check for all compiler names in there first
20792  # before checking the rest of the PATH.
20793  if test -n "$TOOLS_DIR"; then
20794    PATH_save="$PATH"
20795    PATH="$TOOLS_DIR"
20796    for ac_prog in $COMPILER_CHECK_LIST
20797do
20798  # Extract the first word of "$ac_prog", so it can be a program name with args.
20799set dummy $ac_prog; ac_word=$2
20800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20801$as_echo_n "checking for $ac_word... " >&6; }
20802if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20803  $as_echo_n "(cached) " >&6
20804else
20805  case $TOOLS_DIR_CXX in
20806  [\\/]* | ?:[\\/]*)
20807  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20808  ;;
20809  *)
20810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20811for as_dir in $PATH
20812do
20813  IFS=$as_save_IFS
20814  test -z "$as_dir" && as_dir=.
20815    for ac_exec_ext in '' $ac_executable_extensions; do
20816  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20817    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20819    break 2
20820  fi
20821done
20822  done
20823IFS=$as_save_IFS
20824
20825  ;;
20826esac
20827fi
20828TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20829if test -n "$TOOLS_DIR_CXX"; then
20830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20831$as_echo "$TOOLS_DIR_CXX" >&6; }
20832else
20833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20834$as_echo "no" >&6; }
20835fi
20836
20837
20838  test -n "$TOOLS_DIR_CXX" && break
20839done
20840
20841    CXX=$TOOLS_DIR_CXX
20842    PATH="$PATH_save"
20843  fi
20844
20845  # AC_PATH_PROGS can't be run multiple times with the same variable,
20846  # so create a new name for this run.
20847  if test "x$CXX" = x; then
20848    for ac_prog in $COMPILER_CHECK_LIST
20849do
20850  # Extract the first word of "$ac_prog", so it can be a program name with args.
20851set dummy $ac_prog; ac_word=$2
20852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20853$as_echo_n "checking for $ac_word... " >&6; }
20854if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20855  $as_echo_n "(cached) " >&6
20856else
20857  case $POTENTIAL_CXX in
20858  [\\/]* | ?:[\\/]*)
20859  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20860  ;;
20861  *)
20862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20863for as_dir in $PATH
20864do
20865  IFS=$as_save_IFS
20866  test -z "$as_dir" && as_dir=.
20867    for ac_exec_ext in '' $ac_executable_extensions; do
20868  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20869    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20871    break 2
20872  fi
20873done
20874  done
20875IFS=$as_save_IFS
20876
20877  ;;
20878esac
20879fi
20880POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20881if test -n "$POTENTIAL_CXX"; then
20882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20883$as_echo "$POTENTIAL_CXX" >&6; }
20884else
20885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20886$as_echo "no" >&6; }
20887fi
20888
20889
20890  test -n "$POTENTIAL_CXX" && break
20891done
20892
20893    CXX=$POTENTIAL_CXX
20894  fi
20895
20896  if test "x$CXX" = x; then
20897
20898    # Print a helpful message on how to acquire the necessary build dependency.
20899    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20900    MISSING_DEPENDENCY=devkit
20901    PKGHANDLER_COMMAND=
20902
20903    case $PKGHANDLER in
20904	apt-get)
20905                apt_help     $MISSING_DEPENDENCY ;;
20906    yum)
20907                yum_help     $MISSING_DEPENDENCY ;;
20908	port)
20909                port_help    $MISSING_DEPENDENCY ;;
20910	pkgutil)
20911                pkgutil_help $MISSING_DEPENDENCY ;;
20912	pkgadd)
20913                pkgadd_help  $MISSING_DEPENDENCY ;;
20914    * )
20915      break ;;
20916    esac
20917
20918    if test "x$PKGHANDLER_COMMAND" != x; then
20919        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20920    fi
20921
20922      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20923  fi
20924
20925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20926
20927  # First separate the path from the arguments. This will split at the first
20928  # space.
20929  complete="$CXX"
20930  path="${complete%% *}"
20931  tmp="$complete EOL"
20932  arguments="${tmp#* }"
20933
20934  # Input might be given as Windows format, start by converting to
20935  # unix format.
20936  new_path=`$CYGPATH -u "$path"`
20937
20938  # Now try to locate executable using which
20939  new_path=`$WHICH "$new_path" 2> /dev/null`
20940  # bat and cmd files are not always considered executable in cygwin causing which
20941  # to not find them
20942  if test "x$new_path" = x \
20943           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20944           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20945    new_path=`$CYGPATH -u "$path"`
20946  fi
20947  if test "x$new_path" = x; then
20948    # Oops. Which didn't find the executable.
20949    # The splitting of arguments from the executable at a space might have been incorrect,
20950    # since paths with space are more likely in Windows. Give it another try with the whole
20951    # argument.
20952    path="$complete"
20953    arguments="EOL"
20954    new_path=`$CYGPATH -u "$path"`
20955    new_path=`$WHICH "$new_path" 2> /dev/null`
20956    # bat and cmd files are not always considered executable in cygwin causing which
20957    # to not find them
20958    if test "x$new_path" = x \
20959             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20960             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20961      new_path=`$CYGPATH -u "$path"`
20962    fi
20963    if test "x$new_path" = x; then
20964      # It's still not found. Now this is an unrecoverable error.
20965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20966$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20967      has_space=`$ECHO "$complete" | $GREP " "`
20968      if test "x$has_space" != x; then
20969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20971      fi
20972      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20973    fi
20974  fi
20975
20976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20979  # "foo.exe" is OK but "foo" is an error.
20980  #
20981  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20982  # It is also a way to make sure we got the proper file name for the real test later on.
20983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20984  if test "x$test_shortpath" = x; then
20985    # Short path failed, file does not exist as specified.
20986    # Try adding .exe or .cmd
20987    if test -f "${new_path}.exe"; then
20988       input_to_shortpath="${new_path}.exe"
20989    elif test -f "${new_path}.cmd"; then
20990       input_to_shortpath="${new_path}.cmd"
20991    else
20992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20993$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20994      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20995$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20996      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20997    fi
20998  else
20999    input_to_shortpath="$new_path"
21000  fi
21001
21002  # Call helper function which possibly converts this using DOS-style short mode.
21003  # If so, the updated path is stored in $new_path.
21004  new_path="$input_to_shortpath"
21005
21006  input_path="$input_to_shortpath"
21007  # Check if we need to convert this using DOS-style short mode. If the path
21008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21009  # take no chances and rewrite it.
21010  # Note: m4 eats our [], so we need to use [ and ] instead.
21011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21012  if test "x$has_forbidden_chars" != x; then
21013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21017      # Going to short mode and back again did indeed matter. Since short mode is
21018      # case insensitive, let's make it lowercase to improve readability.
21019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21020      # Now convert it back to Unix-stile (cygpath)
21021      input_path=`$CYGPATH -u "$shortmode_path"`
21022      new_path="$input_path"
21023    fi
21024  fi
21025
21026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21027  if test "x$test_cygdrive_prefix" = x; then
21028    # As a simple fix, exclude /usr/bin since it's not a real path.
21029    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21031      # a path prefixed by /cygdrive for fixpath to work.
21032      new_path="$CYGWIN_ROOT_PATH$input_path"
21033    fi
21034  fi
21035
21036  # remove trailing .exe if any
21037  new_path="${new_path/%.exe/}"
21038
21039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21040
21041  # First separate the path from the arguments. This will split at the first
21042  # space.
21043  complete="$CXX"
21044  path="${complete%% *}"
21045  tmp="$complete EOL"
21046  arguments="${tmp#* }"
21047
21048  # Input might be given as Windows format, start by converting to
21049  # unix format.
21050  new_path="$path"
21051
21052  windows_path="$new_path"
21053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21054    unix_path=`$CYGPATH -u "$windows_path"`
21055    new_path="$unix_path"
21056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21058    new_path="$unix_path"
21059  fi
21060
21061
21062  # Now try to locate executable using which
21063  new_path=`$WHICH "$new_path" 2> /dev/null`
21064
21065  if test "x$new_path" = x; then
21066    # Oops. Which didn't find the executable.
21067    # The splitting of arguments from the executable at a space might have been incorrect,
21068    # since paths with space are more likely in Windows. Give it another try with the whole
21069    # argument.
21070    path="$complete"
21071    arguments="EOL"
21072    new_path="$path"
21073
21074  windows_path="$new_path"
21075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21076    unix_path=`$CYGPATH -u "$windows_path"`
21077    new_path="$unix_path"
21078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21080    new_path="$unix_path"
21081  fi
21082
21083
21084    new_path=`$WHICH "$new_path" 2> /dev/null`
21085
21086    if test "x$new_path" = x; then
21087      # It's still not found. Now this is an unrecoverable error.
21088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21089$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21090      has_space=`$ECHO "$complete" | $GREP " "`
21091      if test "x$has_space" != x; then
21092        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21093$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21094      fi
21095      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21096    fi
21097  fi
21098
21099  # Now new_path has a complete unix path to the binary
21100  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21101    # Keep paths in /bin as-is, but remove trailing .exe if any
21102    new_path="${new_path/%.exe/}"
21103    # Do not save /bin paths to all_fixpath_prefixes!
21104  else
21105    # Not in mixed or Windows style, start by that.
21106    new_path=`cmd //c echo $new_path`
21107
21108  input_path="$new_path"
21109  # Check if we need to convert this using DOS-style short mode. If the path
21110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21111  # take no chances and rewrite it.
21112  # Note: m4 eats our [], so we need to use [ and ] instead.
21113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21114  if test "x$has_forbidden_chars" != x; then
21115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21117  fi
21118
21119    # Output is in $new_path
21120
21121  windows_path="$new_path"
21122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21123    unix_path=`$CYGPATH -u "$windows_path"`
21124    new_path="$unix_path"
21125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21127    new_path="$unix_path"
21128  fi
21129
21130    # remove trailing .exe if any
21131    new_path="${new_path/%.exe/}"
21132
21133    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21134    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21135  fi
21136
21137  else
21138    # We're on a posix platform. Hooray! :)
21139    # First separate the path from the arguments. This will split at the first
21140    # space.
21141    complete="$CXX"
21142    path="${complete%% *}"
21143    tmp="$complete EOL"
21144    arguments="${tmp#* }"
21145
21146    # Cannot rely on the command "which" here since it doesn't always work.
21147    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21148    if test -z "$is_absolute_path"; then
21149      # Path to executable is not absolute. Find it.
21150      IFS_save="$IFS"
21151      IFS=:
21152      for p in $PATH; do
21153        if test -f "$p/$path" && test -x "$p/$path"; then
21154          new_path="$p/$path"
21155          break
21156        fi
21157      done
21158      IFS="$IFS_save"
21159    else
21160      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21161$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21162      new_path="$path"
21163    fi
21164
21165    if test "x$new_path" = x; then
21166        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21167$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21168        has_space=`$ECHO "$complete" | $GREP " "`
21169        if test "x$has_space" != x; then
21170          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21171$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21172        fi
21173        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21174      fi
21175  fi
21176
21177      # Now join together the path and the arguments once again
21178      if test "x$arguments" != xEOL; then
21179        new_complete="$new_path ${arguments% *}"
21180      else
21181        new_complete="$new_path"
21182      fi
21183
21184  if test "x$complete" != "x$new_complete"; then
21185      CXX="$new_complete"
21186      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21187$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21188    fi
21189
21190  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21191$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21192  TEST_COMPILER="$CXX"
21193
21194    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21195        # Follow a chain of symbolic links. Use readlink
21196        # where it exists, else fall back to horribly
21197        # complicated shell code.
21198        if test "x$READLINK_TESTED" != yes; then
21199            # On MacOSX there is a readlink tool with a different
21200            # purpose than the GNU readlink tool. Check the found readlink.
21201            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21202            if test "x$ISGNU" = x; then
21203                 # A readlink that we do not know how to use.
21204                 # Are there other non-GNU readlinks out there?
21205                 READLINK_TESTED=yes
21206                 READLINK=
21207            fi
21208        fi
21209
21210        if test "x$READLINK" != x; then
21211            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21212        else
21213            # Save the current directory for restoring afterwards
21214            STARTDIR=$PWD
21215            COUNTER=0
21216            sym_link_dir=`$DIRNAME $TEST_COMPILER`
21217            sym_link_file=`$BASENAME $TEST_COMPILER`
21218            cd $sym_link_dir
21219            # Use -P flag to resolve symlinks in directories.
21220            cd `$THEPWDCMD -P`
21221            sym_link_dir=`$THEPWDCMD -P`
21222            # Resolve file symlinks
21223            while test $COUNTER -lt 20; do
21224                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21225                if test "x$ISLINK" == x; then
21226                    # This is not a symbolic link! We are done!
21227                    break
21228                fi
21229                # Again resolve directory symlinks since the target of the just found
21230                # link could be in a different directory
21231                cd `$DIRNAME $ISLINK`
21232                sym_link_dir=`$THEPWDCMD -P`
21233                sym_link_file=`$BASENAME $ISLINK`
21234                let COUNTER=COUNTER+1
21235            done
21236            cd $STARTDIR
21237            TEST_COMPILER=$sym_link_dir/$sym_link_file
21238        fi
21239    fi
21240
21241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21242$as_echo "$TEST_COMPILER" >&6; }
21243  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21244$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21245
21246  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21247  if test "x$COMPILER_BASENAME" = "xccache"; then
21248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21249$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21250    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21251    # We want to control ccache invocation ourselves, so ignore this cc and try
21252    # searching again.
21253
21254    # Remove the path to the fake ccache cc from the PATH
21255    RETRY_COMPILER_SAVED_PATH="$PATH"
21256    COMPILER_DIRNAME=`$DIRNAME $CXX`
21257    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21258
21259    # Try again looking for our compiler
21260    if test -n "$ac_tool_prefix"; then
21261  for ac_prog in $COMPILER_CHECK_LIST
21262  do
21263    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21264set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21266$as_echo_n "checking for $ac_word... " >&6; }
21267if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
21268  $as_echo_n "(cached) " >&6
21269else
21270  if test -n "$PROPER_COMPILER_CXX"; then
21271  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21272else
21273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21274for as_dir in $PATH
21275do
21276  IFS=$as_save_IFS
21277  test -z "$as_dir" && as_dir=.
21278    for ac_exec_ext in '' $ac_executable_extensions; do
21279  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21280    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21282    break 2
21283  fi
21284done
21285  done
21286IFS=$as_save_IFS
21287
21288fi
21289fi
21290PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21291if test -n "$PROPER_COMPILER_CXX"; then
21292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21293$as_echo "$PROPER_COMPILER_CXX" >&6; }
21294else
21295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21296$as_echo "no" >&6; }
21297fi
21298
21299
21300    test -n "$PROPER_COMPILER_CXX" && break
21301  done
21302fi
21303if test -z "$PROPER_COMPILER_CXX"; then
21304  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21305  for ac_prog in $COMPILER_CHECK_LIST
21306do
21307  # Extract the first word of "$ac_prog", so it can be a program name with args.
21308set dummy $ac_prog; ac_word=$2
21309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21310$as_echo_n "checking for $ac_word... " >&6; }
21311if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
21312  $as_echo_n "(cached) " >&6
21313else
21314  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21315  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21316else
21317as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21318for as_dir in $PATH
21319do
21320  IFS=$as_save_IFS
21321  test -z "$as_dir" && as_dir=.
21322    for ac_exec_ext in '' $ac_executable_extensions; do
21323  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21324    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21326    break 2
21327  fi
21328done
21329  done
21330IFS=$as_save_IFS
21331
21332fi
21333fi
21334ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21335if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21337$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21338else
21339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21340$as_echo "no" >&6; }
21341fi
21342
21343
21344  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21345done
21346
21347  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21348    PROPER_COMPILER_CXX=""
21349  else
21350    case $cross_compiling:$ac_tool_warned in
21351yes:)
21352{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21353$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21354ac_tool_warned=yes ;;
21355esac
21356    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21357  fi
21358fi
21359
21360
21361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21362
21363  # First separate the path from the arguments. This will split at the first
21364  # space.
21365  complete="$PROPER_COMPILER_CXX"
21366  path="${complete%% *}"
21367  tmp="$complete EOL"
21368  arguments="${tmp#* }"
21369
21370  # Input might be given as Windows format, start by converting to
21371  # unix format.
21372  new_path=`$CYGPATH -u "$path"`
21373
21374  # Now try to locate executable using which
21375  new_path=`$WHICH "$new_path" 2> /dev/null`
21376  # bat and cmd files are not always considered executable in cygwin causing which
21377  # to not find them
21378  if test "x$new_path" = x \
21379           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21380           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21381    new_path=`$CYGPATH -u "$path"`
21382  fi
21383  if test "x$new_path" = x; then
21384    # Oops. Which didn't find the executable.
21385    # The splitting of arguments from the executable at a space might have been incorrect,
21386    # since paths with space are more likely in Windows. Give it another try with the whole
21387    # argument.
21388    path="$complete"
21389    arguments="EOL"
21390    new_path=`$CYGPATH -u "$path"`
21391    new_path=`$WHICH "$new_path" 2> /dev/null`
21392    # bat and cmd files are not always considered executable in cygwin causing which
21393    # to not find them
21394    if test "x$new_path" = x \
21395             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21396             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21397      new_path=`$CYGPATH -u "$path"`
21398    fi
21399    if test "x$new_path" = x; then
21400      # It's still not found. Now this is an unrecoverable error.
21401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21402$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21403      has_space=`$ECHO "$complete" | $GREP " "`
21404      if test "x$has_space" != x; then
21405        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21406$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21407      fi
21408      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21409    fi
21410  fi
21411
21412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21415  # "foo.exe" is OK but "foo" is an error.
21416  #
21417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21418  # It is also a way to make sure we got the proper file name for the real test later on.
21419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21420  if test "x$test_shortpath" = x; then
21421    # Short path failed, file does not exist as specified.
21422    # Try adding .exe or .cmd
21423    if test -f "${new_path}.exe"; then
21424       input_to_shortpath="${new_path}.exe"
21425    elif test -f "${new_path}.cmd"; then
21426       input_to_shortpath="${new_path}.cmd"
21427    else
21428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21429$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21430      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21431$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21432      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21433    fi
21434  else
21435    input_to_shortpath="$new_path"
21436  fi
21437
21438  # Call helper function which possibly converts this using DOS-style short mode.
21439  # If so, the updated path is stored in $new_path.
21440  new_path="$input_to_shortpath"
21441
21442  input_path="$input_to_shortpath"
21443  # Check if we need to convert this using DOS-style short mode. If the path
21444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21445  # take no chances and rewrite it.
21446  # Note: m4 eats our [], so we need to use [ and ] instead.
21447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21448  if test "x$has_forbidden_chars" != x; then
21449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21450    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21451    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21452    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21453      # Going to short mode and back again did indeed matter. Since short mode is
21454      # case insensitive, let's make it lowercase to improve readability.
21455      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21456      # Now convert it back to Unix-stile (cygpath)
21457      input_path=`$CYGPATH -u "$shortmode_path"`
21458      new_path="$input_path"
21459    fi
21460  fi
21461
21462  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21463  if test "x$test_cygdrive_prefix" = x; then
21464    # As a simple fix, exclude /usr/bin since it's not a real path.
21465    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21466      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21467      # a path prefixed by /cygdrive for fixpath to work.
21468      new_path="$CYGWIN_ROOT_PATH$input_path"
21469    fi
21470  fi
21471
21472  # remove trailing .exe if any
21473  new_path="${new_path/%.exe/}"
21474
21475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21476
21477  # First separate the path from the arguments. This will split at the first
21478  # space.
21479  complete="$PROPER_COMPILER_CXX"
21480  path="${complete%% *}"
21481  tmp="$complete EOL"
21482  arguments="${tmp#* }"
21483
21484  # Input might be given as Windows format, start by converting to
21485  # unix format.
21486  new_path="$path"
21487
21488  windows_path="$new_path"
21489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21490    unix_path=`$CYGPATH -u "$windows_path"`
21491    new_path="$unix_path"
21492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21494    new_path="$unix_path"
21495  fi
21496
21497
21498  # Now try to locate executable using which
21499  new_path=`$WHICH "$new_path" 2> /dev/null`
21500
21501  if test "x$new_path" = x; then
21502    # Oops. Which didn't find the executable.
21503    # The splitting of arguments from the executable at a space might have been incorrect,
21504    # since paths with space are more likely in Windows. Give it another try with the whole
21505    # argument.
21506    path="$complete"
21507    arguments="EOL"
21508    new_path="$path"
21509
21510  windows_path="$new_path"
21511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21512    unix_path=`$CYGPATH -u "$windows_path"`
21513    new_path="$unix_path"
21514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21516    new_path="$unix_path"
21517  fi
21518
21519
21520    new_path=`$WHICH "$new_path" 2> /dev/null`
21521
21522    if test "x$new_path" = x; then
21523      # It's still not found. Now this is an unrecoverable error.
21524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21525$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21526      has_space=`$ECHO "$complete" | $GREP " "`
21527      if test "x$has_space" != x; then
21528        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21529$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21530      fi
21531      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21532    fi
21533  fi
21534
21535  # Now new_path has a complete unix path to the binary
21536  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21537    # Keep paths in /bin as-is, but remove trailing .exe if any
21538    new_path="${new_path/%.exe/}"
21539    # Do not save /bin paths to all_fixpath_prefixes!
21540  else
21541    # Not in mixed or Windows style, start by that.
21542    new_path=`cmd //c echo $new_path`
21543
21544  input_path="$new_path"
21545  # Check if we need to convert this using DOS-style short mode. If the path
21546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21547  # take no chances and rewrite it.
21548  # Note: m4 eats our [], so we need to use [ and ] instead.
21549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21550  if test "x$has_forbidden_chars" != x; then
21551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21553  fi
21554
21555    # Output is in $new_path
21556
21557  windows_path="$new_path"
21558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21559    unix_path=`$CYGPATH -u "$windows_path"`
21560    new_path="$unix_path"
21561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21563    new_path="$unix_path"
21564  fi
21565
21566    # remove trailing .exe if any
21567    new_path="${new_path/%.exe/}"
21568
21569    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21570    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21571  fi
21572
21573  else
21574    # We're on a posix platform. Hooray! :)
21575    # First separate the path from the arguments. This will split at the first
21576    # space.
21577    complete="$PROPER_COMPILER_CXX"
21578    path="${complete%% *}"
21579    tmp="$complete EOL"
21580    arguments="${tmp#* }"
21581
21582    # Cannot rely on the command "which" here since it doesn't always work.
21583    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21584    if test -z "$is_absolute_path"; then
21585      # Path to executable is not absolute. Find it.
21586      IFS_save="$IFS"
21587      IFS=:
21588      for p in $PATH; do
21589        if test -f "$p/$path" && test -x "$p/$path"; then
21590          new_path="$p/$path"
21591          break
21592        fi
21593      done
21594      IFS="$IFS_save"
21595    else
21596      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21597$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21598      new_path="$path"
21599    fi
21600
21601    if test "x$new_path" = x; then
21602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21603$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21604        has_space=`$ECHO "$complete" | $GREP " "`
21605        if test "x$has_space" != x; then
21606          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21607$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21608        fi
21609        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21610      fi
21611  fi
21612
21613      # Now join together the path and the arguments once again
21614      if test "x$arguments" != xEOL; then
21615        new_complete="$new_path ${arguments% *}"
21616      else
21617        new_complete="$new_path"
21618      fi
21619
21620  if test "x$complete" != "x$new_complete"; then
21621      PROPER_COMPILER_CXX="$new_complete"
21622      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21623$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21624    fi
21625
21626    PATH="$RETRY_COMPILER_SAVED_PATH"
21627
21628    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21629$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21630
21631    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21632        # Follow a chain of symbolic links. Use readlink
21633        # where it exists, else fall back to horribly
21634        # complicated shell code.
21635        if test "x$READLINK_TESTED" != yes; then
21636            # On MacOSX there is a readlink tool with a different
21637            # purpose than the GNU readlink tool. Check the found readlink.
21638            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21639            if test "x$ISGNU" = x; then
21640                 # A readlink that we do not know how to use.
21641                 # Are there other non-GNU readlinks out there?
21642                 READLINK_TESTED=yes
21643                 READLINK=
21644            fi
21645        fi
21646
21647        if test "x$READLINK" != x; then
21648            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21649        else
21650            # Save the current directory for restoring afterwards
21651            STARTDIR=$PWD
21652            COUNTER=0
21653            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21654            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21655            cd $sym_link_dir
21656            # Use -P flag to resolve symlinks in directories.
21657            cd `$THEPWDCMD -P`
21658            sym_link_dir=`$THEPWDCMD -P`
21659            # Resolve file symlinks
21660            while test $COUNTER -lt 20; do
21661                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21662                if test "x$ISLINK" == x; then
21663                    # This is not a symbolic link! We are done!
21664                    break
21665                fi
21666                # Again resolve directory symlinks since the target of the just found
21667                # link could be in a different directory
21668                cd `$DIRNAME $ISLINK`
21669                sym_link_dir=`$THEPWDCMD -P`
21670                sym_link_file=`$BASENAME $ISLINK`
21671                let COUNTER=COUNTER+1
21672            done
21673            cd $STARTDIR
21674            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21675        fi
21676    fi
21677
21678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21679$as_echo "$PROPER_COMPILER_CXX" >&6; }
21680    CXX="$PROPER_COMPILER_CXX"
21681  else
21682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21683$as_echo "no, keeping CXX" >&6; }
21684    CXX="$TEST_COMPILER"
21685  fi
21686
21687  COMPILER=$CXX
21688  COMPILER_NAME=$COMPILER_NAME
21689
21690  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21691    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21692    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21693    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21694    if test $? -ne 0; then
21695      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21696
21697      { $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
21698$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21699      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21700$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21701      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21702    else
21703      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21704      COMPILER_VENDOR="Sun Studio"
21705    fi
21706  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21707    # First line typically looks something like:
21708    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21709    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21710    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21711    COMPILER_VENDOR="Microsoft CL.EXE"
21712    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21713    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21714      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21715        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21716      fi
21717    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21718      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21719        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21720      fi
21721    fi
21722  else
21723    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21724    # Check that this is likely to be GCC.
21725    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21726    if test $? -ne 0; then
21727      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21728$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21729      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21730$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21731      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21732    fi
21733
21734    # First line typically looks something like:
21735    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21736    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21737    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21738  fi
21739  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21740  CXX_VERSION="$COMPILER_VERSION"
21741  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21742  CXX_VENDOR="$COMPILER_VENDOR"
21743
21744  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21745$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21746
21747
21748# Now that we have resolved CXX ourself, let autoconf have its go at it
21749ac_ext=cpp
21750ac_cpp='$CXXCPP $CPPFLAGS'
21751ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21752ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21753ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21754if test -z "$CXX"; then
21755  if test -n "$CCC"; then
21756    CXX=$CCC
21757  else
21758    if test -n "$ac_tool_prefix"; then
21759  for ac_prog in $CXX
21760  do
21761    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21762set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21764$as_echo_n "checking for $ac_word... " >&6; }
21765if test "${ac_cv_prog_CXX+set}" = set; then :
21766  $as_echo_n "(cached) " >&6
21767else
21768  if test -n "$CXX"; then
21769  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21770else
21771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21772for as_dir in $PATH
21773do
21774  IFS=$as_save_IFS
21775  test -z "$as_dir" && as_dir=.
21776    for ac_exec_ext in '' $ac_executable_extensions; do
21777  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21778    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21780    break 2
21781  fi
21782done
21783  done
21784IFS=$as_save_IFS
21785
21786fi
21787fi
21788CXX=$ac_cv_prog_CXX
21789if test -n "$CXX"; then
21790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21791$as_echo "$CXX" >&6; }
21792else
21793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21794$as_echo "no" >&6; }
21795fi
21796
21797
21798    test -n "$CXX" && break
21799  done
21800fi
21801if test -z "$CXX"; then
21802  ac_ct_CXX=$CXX
21803  for ac_prog in $CXX
21804do
21805  # Extract the first word of "$ac_prog", so it can be a program name with args.
21806set dummy $ac_prog; ac_word=$2
21807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21808$as_echo_n "checking for $ac_word... " >&6; }
21809if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21810  $as_echo_n "(cached) " >&6
21811else
21812  if test -n "$ac_ct_CXX"; then
21813  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21814else
21815as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21816for as_dir in $PATH
21817do
21818  IFS=$as_save_IFS
21819  test -z "$as_dir" && as_dir=.
21820    for ac_exec_ext in '' $ac_executable_extensions; do
21821  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21822    ac_cv_prog_ac_ct_CXX="$ac_prog"
21823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21824    break 2
21825  fi
21826done
21827  done
21828IFS=$as_save_IFS
21829
21830fi
21831fi
21832ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21833if test -n "$ac_ct_CXX"; then
21834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21835$as_echo "$ac_ct_CXX" >&6; }
21836else
21837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21838$as_echo "no" >&6; }
21839fi
21840
21841
21842  test -n "$ac_ct_CXX" && break
21843done
21844
21845  if test "x$ac_ct_CXX" = x; then
21846    CXX="g++"
21847  else
21848    case $cross_compiling:$ac_tool_warned in
21849yes:)
21850{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21851$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21852ac_tool_warned=yes ;;
21853esac
21854    CXX=$ac_ct_CXX
21855  fi
21856fi
21857
21858  fi
21859fi
21860# Provide some information about the compiler.
21861$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21862set X $ac_compile
21863ac_compiler=$2
21864for ac_option in --version -v -V -qversion; do
21865  { { ac_try="$ac_compiler $ac_option >&5"
21866case "(($ac_try" in
21867  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21868  *) ac_try_echo=$ac_try;;
21869esac
21870eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21871$as_echo "$ac_try_echo"; } >&5
21872  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21873  ac_status=$?
21874  if test -s conftest.err; then
21875    sed '10a\
21876... rest of stderr output deleted ...
21877         10q' conftest.err >conftest.er1
21878    cat conftest.er1 >&5
21879  fi
21880  rm -f conftest.er1 conftest.err
21881  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21882  test $ac_status = 0; }
21883done
21884
21885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21886$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21887if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21888  $as_echo_n "(cached) " >&6
21889else
21890  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21891/* end confdefs.h.  */
21892
21893int
21894main ()
21895{
21896#ifndef __GNUC__
21897       choke me
21898#endif
21899
21900  ;
21901  return 0;
21902}
21903_ACEOF
21904if ac_fn_cxx_try_compile "$LINENO"; then :
21905  ac_compiler_gnu=yes
21906else
21907  ac_compiler_gnu=no
21908fi
21909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21910ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21911
21912fi
21913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21914$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21915if test $ac_compiler_gnu = yes; then
21916  GXX=yes
21917else
21918  GXX=
21919fi
21920ac_test_CXXFLAGS=${CXXFLAGS+set}
21921ac_save_CXXFLAGS=$CXXFLAGS
21922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21923$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21924if test "${ac_cv_prog_cxx_g+set}" = set; then :
21925  $as_echo_n "(cached) " >&6
21926else
21927  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21928   ac_cxx_werror_flag=yes
21929   ac_cv_prog_cxx_g=no
21930   CXXFLAGS="-g"
21931   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21932/* end confdefs.h.  */
21933
21934int
21935main ()
21936{
21937
21938  ;
21939  return 0;
21940}
21941_ACEOF
21942if ac_fn_cxx_try_compile "$LINENO"; then :
21943  ac_cv_prog_cxx_g=yes
21944else
21945  CXXFLAGS=""
21946      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21947/* end confdefs.h.  */
21948
21949int
21950main ()
21951{
21952
21953  ;
21954  return 0;
21955}
21956_ACEOF
21957if ac_fn_cxx_try_compile "$LINENO"; then :
21958
21959else
21960  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21961	 CXXFLAGS="-g"
21962	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21963/* end confdefs.h.  */
21964
21965int
21966main ()
21967{
21968
21969  ;
21970  return 0;
21971}
21972_ACEOF
21973if ac_fn_cxx_try_compile "$LINENO"; then :
21974  ac_cv_prog_cxx_g=yes
21975fi
21976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21977fi
21978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21979fi
21980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21981   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21982fi
21983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21984$as_echo "$ac_cv_prog_cxx_g" >&6; }
21985if test "$ac_test_CXXFLAGS" = set; then
21986  CXXFLAGS=$ac_save_CXXFLAGS
21987elif test $ac_cv_prog_cxx_g = yes; then
21988  if test "$GXX" = yes; then
21989    CXXFLAGS="-g -O2"
21990  else
21991    CXXFLAGS="-g"
21992  fi
21993else
21994  if test "$GXX" = yes; then
21995    CXXFLAGS="-O2"
21996  else
21997    CXXFLAGS=
21998  fi
21999fi
22000ac_ext=cpp
22001ac_cpp='$CXXCPP $CPPFLAGS'
22002ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22003ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22004ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22005
22006
22007### Locate other tools
22008
22009if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22010    ac_ext=m
22011ac_cpp='$OBJCPP $CPPFLAGS'
22012ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22013ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22014ac_compiler_gnu=$ac_cv_objc_compiler_gnu
22015if test -n "$ac_tool_prefix"; then
22016  for ac_prog in gcc objcc objc cc CC
22017  do
22018    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22019set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22021$as_echo_n "checking for $ac_word... " >&6; }
22022if test "${ac_cv_prog_OBJC+set}" = set; then :
22023  $as_echo_n "(cached) " >&6
22024else
22025  if test -n "$OBJC"; then
22026  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
22027else
22028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22029for as_dir in $PATH
22030do
22031  IFS=$as_save_IFS
22032  test -z "$as_dir" && as_dir=.
22033    for ac_exec_ext in '' $ac_executable_extensions; do
22034  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22035    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22037    break 2
22038  fi
22039done
22040  done
22041IFS=$as_save_IFS
22042
22043fi
22044fi
22045OBJC=$ac_cv_prog_OBJC
22046if test -n "$OBJC"; then
22047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22048$as_echo "$OBJC" >&6; }
22049else
22050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22051$as_echo "no" >&6; }
22052fi
22053
22054
22055    test -n "$OBJC" && break
22056  done
22057fi
22058if test -z "$OBJC"; then
22059  ac_ct_OBJC=$OBJC
22060  for ac_prog in gcc objcc objc cc CC
22061do
22062  # Extract the first word of "$ac_prog", so it can be a program name with args.
22063set dummy $ac_prog; ac_word=$2
22064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22065$as_echo_n "checking for $ac_word... " >&6; }
22066if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
22067  $as_echo_n "(cached) " >&6
22068else
22069  if test -n "$ac_ct_OBJC"; then
22070  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22071else
22072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22073for as_dir in $PATH
22074do
22075  IFS=$as_save_IFS
22076  test -z "$as_dir" && as_dir=.
22077    for ac_exec_ext in '' $ac_executable_extensions; do
22078  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22079    ac_cv_prog_ac_ct_OBJC="$ac_prog"
22080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22081    break 2
22082  fi
22083done
22084  done
22085IFS=$as_save_IFS
22086
22087fi
22088fi
22089ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22090if test -n "$ac_ct_OBJC"; then
22091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22092$as_echo "$ac_ct_OBJC" >&6; }
22093else
22094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22095$as_echo "no" >&6; }
22096fi
22097
22098
22099  test -n "$ac_ct_OBJC" && break
22100done
22101
22102  if test "x$ac_ct_OBJC" = x; then
22103    OBJC="gcc"
22104  else
22105    case $cross_compiling:$ac_tool_warned in
22106yes:)
22107{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22108$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22109ac_tool_warned=yes ;;
22110esac
22111    OBJC=$ac_ct_OBJC
22112  fi
22113fi
22114
22115# Provide some information about the compiler.
22116$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22117set X $ac_compile
22118ac_compiler=$2
22119for ac_option in --version -v -V -qversion; do
22120  { { ac_try="$ac_compiler $ac_option >&5"
22121case "(($ac_try" in
22122  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22123  *) ac_try_echo=$ac_try;;
22124esac
22125eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22126$as_echo "$ac_try_echo"; } >&5
22127  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22128  ac_status=$?
22129  if test -s conftest.err; then
22130    sed '10a\
22131... rest of stderr output deleted ...
22132         10q' conftest.err >conftest.er1
22133    cat conftest.er1 >&5
22134  fi
22135  rm -f conftest.er1 conftest.err
22136  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22137  test $ac_status = 0; }
22138done
22139
22140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22141$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22142if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
22143  $as_echo_n "(cached) " >&6
22144else
22145  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22146/* end confdefs.h.  */
22147
22148int
22149main ()
22150{
22151#ifndef __GNUC__
22152       choke me
22153#endif
22154
22155  ;
22156  return 0;
22157}
22158_ACEOF
22159if ac_fn_objc_try_compile "$LINENO"; then :
22160  ac_compiler_gnu=yes
22161else
22162  ac_compiler_gnu=no
22163fi
22164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22165ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22166
22167fi
22168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22169$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22170if test $ac_compiler_gnu = yes; then
22171  GOBJC=yes
22172else
22173  GOBJC=
22174fi
22175ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22176ac_save_OBJCFLAGS=$OBJCFLAGS
22177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22178$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22179if test "${ac_cv_prog_objc_g+set}" = set; then :
22180  $as_echo_n "(cached) " >&6
22181else
22182  ac_save_objc_werror_flag=$ac_objc_werror_flag
22183   ac_objc_werror_flag=yes
22184   ac_cv_prog_objc_g=no
22185   OBJCFLAGS="-g"
22186   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22187/* end confdefs.h.  */
22188
22189int
22190main ()
22191{
22192
22193  ;
22194  return 0;
22195}
22196_ACEOF
22197if ac_fn_objc_try_compile "$LINENO"; then :
22198  ac_cv_prog_objc_g=yes
22199else
22200  OBJCFLAGS=""
22201      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22202/* end confdefs.h.  */
22203
22204int
22205main ()
22206{
22207
22208  ;
22209  return 0;
22210}
22211_ACEOF
22212if ac_fn_objc_try_compile "$LINENO"; then :
22213
22214else
22215  ac_objc_werror_flag=$ac_save_objc_werror_flag
22216	 OBJCFLAGS="-g"
22217	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22218/* end confdefs.h.  */
22219
22220int
22221main ()
22222{
22223
22224  ;
22225  return 0;
22226}
22227_ACEOF
22228if ac_fn_objc_try_compile "$LINENO"; then :
22229  ac_cv_prog_objc_g=yes
22230fi
22231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22232fi
22233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22234fi
22235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22236   ac_objc_werror_flag=$ac_save_objc_werror_flag
22237fi
22238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22239$as_echo "$ac_cv_prog_objc_g" >&6; }
22240if test "$ac_test_OBJCFLAGS" = set; then
22241  OBJCFLAGS=$ac_save_OBJCFLAGS
22242elif test $ac_cv_prog_objc_g = yes; then
22243  if test "$GOBJC" = yes; then
22244    OBJCFLAGS="-g -O2"
22245  else
22246    OBJCFLAGS="-g"
22247  fi
22248else
22249  if test "$GOBJC" = yes; then
22250    OBJCFLAGS="-O2"
22251  else
22252    OBJCFLAGS=
22253  fi
22254fi
22255ac_ext=cpp
22256ac_cpp='$CXXCPP $CPPFLAGS'
22257ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22258ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22259ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22260
22261
22262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22263
22264  # First separate the path from the arguments. This will split at the first
22265  # space.
22266  complete="$OBJC"
22267  path="${complete%% *}"
22268  tmp="$complete EOL"
22269  arguments="${tmp#* }"
22270
22271  # Input might be given as Windows format, start by converting to
22272  # unix format.
22273  new_path=`$CYGPATH -u "$path"`
22274
22275  # Now try to locate executable using which
22276  new_path=`$WHICH "$new_path" 2> /dev/null`
22277  # bat and cmd files are not always considered executable in cygwin causing which
22278  # to not find them
22279  if test "x$new_path" = x \
22280           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22281           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22282    new_path=`$CYGPATH -u "$path"`
22283  fi
22284  if test "x$new_path" = x; then
22285    # Oops. Which didn't find the executable.
22286    # The splitting of arguments from the executable at a space might have been incorrect,
22287    # since paths with space are more likely in Windows. Give it another try with the whole
22288    # argument.
22289    path="$complete"
22290    arguments="EOL"
22291    new_path=`$CYGPATH -u "$path"`
22292    new_path=`$WHICH "$new_path" 2> /dev/null`
22293    # bat and cmd files are not always considered executable in cygwin causing which
22294    # to not find them
22295    if test "x$new_path" = x \
22296             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22297             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22298      new_path=`$CYGPATH -u "$path"`
22299    fi
22300    if test "x$new_path" = x; then
22301      # It's still not found. Now this is an unrecoverable error.
22302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22303$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22304      has_space=`$ECHO "$complete" | $GREP " "`
22305      if test "x$has_space" != x; then
22306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22308      fi
22309      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22310    fi
22311  fi
22312
22313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22316  # "foo.exe" is OK but "foo" is an error.
22317  #
22318  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22319  # It is also a way to make sure we got the proper file name for the real test later on.
22320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22321  if test "x$test_shortpath" = x; then
22322    # Short path failed, file does not exist as specified.
22323    # Try adding .exe or .cmd
22324    if test -f "${new_path}.exe"; then
22325       input_to_shortpath="${new_path}.exe"
22326    elif test -f "${new_path}.cmd"; then
22327       input_to_shortpath="${new_path}.cmd"
22328    else
22329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22330$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22331      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22332$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22333      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22334    fi
22335  else
22336    input_to_shortpath="$new_path"
22337  fi
22338
22339  # Call helper function which possibly converts this using DOS-style short mode.
22340  # If so, the updated path is stored in $new_path.
22341  new_path="$input_to_shortpath"
22342
22343  input_path="$input_to_shortpath"
22344  # Check if we need to convert this using DOS-style short mode. If the path
22345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22346  # take no chances and rewrite it.
22347  # Note: m4 eats our [], so we need to use [ and ] instead.
22348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22349  if test "x$has_forbidden_chars" != x; then
22350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22354      # Going to short mode and back again did indeed matter. Since short mode is
22355      # case insensitive, let's make it lowercase to improve readability.
22356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22357      # Now convert it back to Unix-stile (cygpath)
22358      input_path=`$CYGPATH -u "$shortmode_path"`
22359      new_path="$input_path"
22360    fi
22361  fi
22362
22363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22364  if test "x$test_cygdrive_prefix" = x; then
22365    # As a simple fix, exclude /usr/bin since it's not a real path.
22366    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22368      # a path prefixed by /cygdrive for fixpath to work.
22369      new_path="$CYGWIN_ROOT_PATH$input_path"
22370    fi
22371  fi
22372
22373  # remove trailing .exe if any
22374  new_path="${new_path/%.exe/}"
22375
22376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22377
22378  # First separate the path from the arguments. This will split at the first
22379  # space.
22380  complete="$OBJC"
22381  path="${complete%% *}"
22382  tmp="$complete EOL"
22383  arguments="${tmp#* }"
22384
22385  # Input might be given as Windows format, start by converting to
22386  # unix format.
22387  new_path="$path"
22388
22389  windows_path="$new_path"
22390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22391    unix_path=`$CYGPATH -u "$windows_path"`
22392    new_path="$unix_path"
22393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22395    new_path="$unix_path"
22396  fi
22397
22398
22399  # Now try to locate executable using which
22400  new_path=`$WHICH "$new_path" 2> /dev/null`
22401
22402  if test "x$new_path" = x; then
22403    # Oops. Which didn't find the executable.
22404    # The splitting of arguments from the executable at a space might have been incorrect,
22405    # since paths with space are more likely in Windows. Give it another try with the whole
22406    # argument.
22407    path="$complete"
22408    arguments="EOL"
22409    new_path="$path"
22410
22411  windows_path="$new_path"
22412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22413    unix_path=`$CYGPATH -u "$windows_path"`
22414    new_path="$unix_path"
22415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22417    new_path="$unix_path"
22418  fi
22419
22420
22421    new_path=`$WHICH "$new_path" 2> /dev/null`
22422
22423    if test "x$new_path" = x; then
22424      # It's still not found. Now this is an unrecoverable error.
22425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22426$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22427      has_space=`$ECHO "$complete" | $GREP " "`
22428      if test "x$has_space" != x; then
22429        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22430$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22431      fi
22432      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22433    fi
22434  fi
22435
22436  # Now new_path has a complete unix path to the binary
22437  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22438    # Keep paths in /bin as-is, but remove trailing .exe if any
22439    new_path="${new_path/%.exe/}"
22440    # Do not save /bin paths to all_fixpath_prefixes!
22441  else
22442    # Not in mixed or Windows style, start by that.
22443    new_path=`cmd //c echo $new_path`
22444
22445  input_path="$new_path"
22446  # Check if we need to convert this using DOS-style short mode. If the path
22447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22448  # take no chances and rewrite it.
22449  # Note: m4 eats our [], so we need to use [ and ] instead.
22450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22451  if test "x$has_forbidden_chars" != x; then
22452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22453    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22454  fi
22455
22456    # Output is in $new_path
22457
22458  windows_path="$new_path"
22459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22460    unix_path=`$CYGPATH -u "$windows_path"`
22461    new_path="$unix_path"
22462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22464    new_path="$unix_path"
22465  fi
22466
22467    # remove trailing .exe if any
22468    new_path="${new_path/%.exe/}"
22469
22470    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22471    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22472  fi
22473
22474  else
22475    # We're on a posix platform. Hooray! :)
22476    # First separate the path from the arguments. This will split at the first
22477    # space.
22478    complete="$OBJC"
22479    path="${complete%% *}"
22480    tmp="$complete EOL"
22481    arguments="${tmp#* }"
22482
22483    # Cannot rely on the command "which" here since it doesn't always work.
22484    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22485    if test -z "$is_absolute_path"; then
22486      # Path to executable is not absolute. Find it.
22487      IFS_save="$IFS"
22488      IFS=:
22489      for p in $PATH; do
22490        if test -f "$p/$path" && test -x "$p/$path"; then
22491          new_path="$p/$path"
22492          break
22493        fi
22494      done
22495      IFS="$IFS_save"
22496    else
22497      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22498$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22499      new_path="$path"
22500    fi
22501
22502    if test "x$new_path" = x; then
22503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22504$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22505        has_space=`$ECHO "$complete" | $GREP " "`
22506        if test "x$has_space" != x; then
22507          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22508$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22509        fi
22510        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22511      fi
22512  fi
22513
22514      # Now join together the path and the arguments once again
22515      if test "x$arguments" != xEOL; then
22516        new_complete="$new_path ${arguments% *}"
22517      else
22518        new_complete="$new_path"
22519      fi
22520
22521  if test "x$complete" != "x$new_complete"; then
22522      OBJC="$new_complete"
22523      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22524$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22525    fi
22526
22527else
22528    OBJC=
22529fi
22530
22531# Restore the flags to the user specified values.
22532# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22533CFLAGS="$ORG_CFLAGS"
22534CXXFLAGS="$ORG_CXXFLAGS"
22535OBJCFLAGS="$ORG_OBJCFLAGS"
22536
22537LD="$CC"
22538LDEXE="$CC"
22539LDCXX="$CXX"
22540LDEXECXX="$CXX"
22541
22542# LDEXE is the linker to use, when creating executables.
22543
22544# Linking C++ libraries.
22545
22546# Linking C++ executables.
22547
22548
22549if test "x$OPENJDK_TARGET_OS" != xwindows; then
22550    if test -n "$ac_tool_prefix"; then
22551  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22552set dummy ${ac_tool_prefix}ar; ac_word=$2
22553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22554$as_echo_n "checking for $ac_word... " >&6; }
22555if test "${ac_cv_prog_AR+set}" = set; then :
22556  $as_echo_n "(cached) " >&6
22557else
22558  if test -n "$AR"; then
22559  ac_cv_prog_AR="$AR" # Let the user override the test.
22560else
22561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22562for as_dir in $PATH
22563do
22564  IFS=$as_save_IFS
22565  test -z "$as_dir" && as_dir=.
22566    for ac_exec_ext in '' $ac_executable_extensions; do
22567  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22568    ac_cv_prog_AR="${ac_tool_prefix}ar"
22569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22570    break 2
22571  fi
22572done
22573  done
22574IFS=$as_save_IFS
22575
22576fi
22577fi
22578AR=$ac_cv_prog_AR
22579if test -n "$AR"; then
22580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22581$as_echo "$AR" >&6; }
22582else
22583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22584$as_echo "no" >&6; }
22585fi
22586
22587
22588fi
22589if test -z "$ac_cv_prog_AR"; then
22590  ac_ct_AR=$AR
22591  # Extract the first word of "ar", so it can be a program name with args.
22592set dummy ar; ac_word=$2
22593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22594$as_echo_n "checking for $ac_word... " >&6; }
22595if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22596  $as_echo_n "(cached) " >&6
22597else
22598  if test -n "$ac_ct_AR"; then
22599  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22600else
22601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22602for as_dir in $PATH
22603do
22604  IFS=$as_save_IFS
22605  test -z "$as_dir" && as_dir=.
22606    for ac_exec_ext in '' $ac_executable_extensions; do
22607  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22608    ac_cv_prog_ac_ct_AR="ar"
22609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22610    break 2
22611  fi
22612done
22613  done
22614IFS=$as_save_IFS
22615
22616fi
22617fi
22618ac_ct_AR=$ac_cv_prog_ac_ct_AR
22619if test -n "$ac_ct_AR"; then
22620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22621$as_echo "$ac_ct_AR" >&6; }
22622else
22623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22624$as_echo "no" >&6; }
22625fi
22626
22627  if test "x$ac_ct_AR" = x; then
22628    AR=""
22629  else
22630    case $cross_compiling:$ac_tool_warned in
22631yes:)
22632{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22633$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22634ac_tool_warned=yes ;;
22635esac
22636    AR=$ac_ct_AR
22637  fi
22638else
22639  AR="$ac_cv_prog_AR"
22640fi
22641
22642
22643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22644
22645  # First separate the path from the arguments. This will split at the first
22646  # space.
22647  complete="$AR"
22648  path="${complete%% *}"
22649  tmp="$complete EOL"
22650  arguments="${tmp#* }"
22651
22652  # Input might be given as Windows format, start by converting to
22653  # unix format.
22654  new_path=`$CYGPATH -u "$path"`
22655
22656  # Now try to locate executable using which
22657  new_path=`$WHICH "$new_path" 2> /dev/null`
22658  # bat and cmd files are not always considered executable in cygwin causing which
22659  # to not find them
22660  if test "x$new_path" = x \
22661           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22662           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22663    new_path=`$CYGPATH -u "$path"`
22664  fi
22665  if test "x$new_path" = x; then
22666    # Oops. Which didn't find the executable.
22667    # The splitting of arguments from the executable at a space might have been incorrect,
22668    # since paths with space are more likely in Windows. Give it another try with the whole
22669    # argument.
22670    path="$complete"
22671    arguments="EOL"
22672    new_path=`$CYGPATH -u "$path"`
22673    new_path=`$WHICH "$new_path" 2> /dev/null`
22674    # bat and cmd files are not always considered executable in cygwin causing which
22675    # to not find them
22676    if test "x$new_path" = x \
22677             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22678             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22679      new_path=`$CYGPATH -u "$path"`
22680    fi
22681    if test "x$new_path" = x; then
22682      # It's still not found. Now this is an unrecoverable error.
22683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22684$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22685      has_space=`$ECHO "$complete" | $GREP " "`
22686      if test "x$has_space" != x; then
22687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22689      fi
22690      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22691    fi
22692  fi
22693
22694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22697  # "foo.exe" is OK but "foo" is an error.
22698  #
22699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22700  # It is also a way to make sure we got the proper file name for the real test later on.
22701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22702  if test "x$test_shortpath" = x; then
22703    # Short path failed, file does not exist as specified.
22704    # Try adding .exe or .cmd
22705    if test -f "${new_path}.exe"; then
22706       input_to_shortpath="${new_path}.exe"
22707    elif test -f "${new_path}.cmd"; then
22708       input_to_shortpath="${new_path}.cmd"
22709    else
22710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22711$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22712      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22713$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22714      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22715    fi
22716  else
22717    input_to_shortpath="$new_path"
22718  fi
22719
22720  # Call helper function which possibly converts this using DOS-style short mode.
22721  # If so, the updated path is stored in $new_path.
22722  new_path="$input_to_shortpath"
22723
22724  input_path="$input_to_shortpath"
22725  # Check if we need to convert this using DOS-style short mode. If the path
22726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22727  # take no chances and rewrite it.
22728  # Note: m4 eats our [], so we need to use [ and ] instead.
22729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22730  if test "x$has_forbidden_chars" != x; then
22731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22735      # Going to short mode and back again did indeed matter. Since short mode is
22736      # case insensitive, let's make it lowercase to improve readability.
22737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22738      # Now convert it back to Unix-stile (cygpath)
22739      input_path=`$CYGPATH -u "$shortmode_path"`
22740      new_path="$input_path"
22741    fi
22742  fi
22743
22744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22745  if test "x$test_cygdrive_prefix" = x; then
22746    # As a simple fix, exclude /usr/bin since it's not a real path.
22747    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22749      # a path prefixed by /cygdrive for fixpath to work.
22750      new_path="$CYGWIN_ROOT_PATH$input_path"
22751    fi
22752  fi
22753
22754  # remove trailing .exe if any
22755  new_path="${new_path/%.exe/}"
22756
22757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22758
22759  # First separate the path from the arguments. This will split at the first
22760  # space.
22761  complete="$AR"
22762  path="${complete%% *}"
22763  tmp="$complete EOL"
22764  arguments="${tmp#* }"
22765
22766  # Input might be given as Windows format, start by converting to
22767  # unix format.
22768  new_path="$path"
22769
22770  windows_path="$new_path"
22771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22772    unix_path=`$CYGPATH -u "$windows_path"`
22773    new_path="$unix_path"
22774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22776    new_path="$unix_path"
22777  fi
22778
22779
22780  # Now try to locate executable using which
22781  new_path=`$WHICH "$new_path" 2> /dev/null`
22782
22783  if test "x$new_path" = x; then
22784    # Oops. Which didn't find the executable.
22785    # The splitting of arguments from the executable at a space might have been incorrect,
22786    # since paths with space are more likely in Windows. Give it another try with the whole
22787    # argument.
22788    path="$complete"
22789    arguments="EOL"
22790    new_path="$path"
22791
22792  windows_path="$new_path"
22793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22794    unix_path=`$CYGPATH -u "$windows_path"`
22795    new_path="$unix_path"
22796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22798    new_path="$unix_path"
22799  fi
22800
22801
22802    new_path=`$WHICH "$new_path" 2> /dev/null`
22803
22804    if test "x$new_path" = x; then
22805      # It's still not found. Now this is an unrecoverable error.
22806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22807$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22808      has_space=`$ECHO "$complete" | $GREP " "`
22809      if test "x$has_space" != x; then
22810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22812      fi
22813      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22814    fi
22815  fi
22816
22817  # Now new_path has a complete unix path to the binary
22818  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22819    # Keep paths in /bin as-is, but remove trailing .exe if any
22820    new_path="${new_path/%.exe/}"
22821    # Do not save /bin paths to all_fixpath_prefixes!
22822  else
22823    # Not in mixed or Windows style, start by that.
22824    new_path=`cmd //c echo $new_path`
22825
22826  input_path="$new_path"
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22835  fi
22836
22837    # Output is in $new_path
22838
22839  windows_path="$new_path"
22840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22841    unix_path=`$CYGPATH -u "$windows_path"`
22842    new_path="$unix_path"
22843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22845    new_path="$unix_path"
22846  fi
22847
22848    # remove trailing .exe if any
22849    new_path="${new_path/%.exe/}"
22850
22851    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22852    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22853  fi
22854
22855  else
22856    # We're on a posix platform. Hooray! :)
22857    # First separate the path from the arguments. This will split at the first
22858    # space.
22859    complete="$AR"
22860    path="${complete%% *}"
22861    tmp="$complete EOL"
22862    arguments="${tmp#* }"
22863
22864    # Cannot rely on the command "which" here since it doesn't always work.
22865    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22866    if test -z "$is_absolute_path"; then
22867      # Path to executable is not absolute. Find it.
22868      IFS_save="$IFS"
22869      IFS=:
22870      for p in $PATH; do
22871        if test -f "$p/$path" && test -x "$p/$path"; then
22872          new_path="$p/$path"
22873          break
22874        fi
22875      done
22876      IFS="$IFS_save"
22877    else
22878      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22879$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22880      new_path="$path"
22881    fi
22882
22883    if test "x$new_path" = x; then
22884        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22885$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22886        has_space=`$ECHO "$complete" | $GREP " "`
22887        if test "x$has_space" != x; then
22888          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22889$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22890        fi
22891        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22892      fi
22893  fi
22894
22895      # Now join together the path and the arguments once again
22896      if test "x$arguments" != xEOL; then
22897        new_complete="$new_path ${arguments% *}"
22898      else
22899        new_complete="$new_path"
22900      fi
22901
22902  if test "x$complete" != "x$new_complete"; then
22903      AR="$new_complete"
22904      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22905$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22906    fi
22907
22908fi
22909if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22910    ARFLAGS="-r"
22911else
22912    ARFLAGS=""
22913fi
22914
22915
22916# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22917HOTSPOT_CXX="$CXX"
22918HOTSPOT_LD="$LD"
22919
22920
22921
22922COMPILER_NAME=gcc
22923COMPILER_TYPE=CC
22924if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22925
22926    # For now, assume that we are always compiling using cl.exe.
22927    CC_OUT_OPTION=-Fo
22928    EXE_OUT_OPTION=-out:
22929    LD_OUT_OPTION=-out:
22930    AR_OUT_OPTION=-out:
22931    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22932    # program for something completely different.
22933    # Extract the first word of "link", so it can be a program name with args.
22934set dummy link; ac_word=$2
22935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22936$as_echo_n "checking for $ac_word... " >&6; }
22937if test "${ac_cv_prog_WINLD+set}" = set; then :
22938  $as_echo_n "(cached) " >&6
22939else
22940  if test -n "$WINLD"; then
22941  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22942else
22943  ac_prog_rejected=no
22944as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22945for as_dir in $PATH
22946do
22947  IFS=$as_save_IFS
22948  test -z "$as_dir" && as_dir=.
22949    for ac_exec_ext in '' $ac_executable_extensions; do
22950  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22951    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22952       ac_prog_rejected=yes
22953       continue
22954     fi
22955    ac_cv_prog_WINLD="link"
22956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22957    break 2
22958  fi
22959done
22960  done
22961IFS=$as_save_IFS
22962
22963if test $ac_prog_rejected = yes; then
22964  # We found a bogon in the path, so make sure we never use it.
22965  set dummy $ac_cv_prog_WINLD
22966  shift
22967  if test $# != 0; then
22968    # We chose a different compiler from the bogus one.
22969    # However, it has the same basename, so the bogon will be chosen
22970    # first if we set WINLD to just the basename; use the full file name.
22971    shift
22972    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22973  fi
22974fi
22975fi
22976fi
22977WINLD=$ac_cv_prog_WINLD
22978if test -n "$WINLD"; then
22979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22980$as_echo "$WINLD" >&6; }
22981else
22982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22983$as_echo "no" >&6; }
22984fi
22985
22986
22987    # Since we must ignore the first found link, WINLD will contain
22988    # the full path to the link.exe program.
22989
22990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22991
22992  # First separate the path from the arguments. This will split at the first
22993  # space.
22994  complete="$WINLD"
22995  path="${complete%% *}"
22996  tmp="$complete EOL"
22997  arguments="${tmp#* }"
22998
22999  # Input might be given as Windows format, start by converting to
23000  # unix format.
23001  new_path=`$CYGPATH -u "$path"`
23002
23003  # Now try to locate executable using which
23004  new_path=`$WHICH "$new_path" 2> /dev/null`
23005  # bat and cmd files are not always considered executable in cygwin causing which
23006  # to not find them
23007  if test "x$new_path" = x \
23008           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23009           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23010    new_path=`$CYGPATH -u "$path"`
23011  fi
23012  if test "x$new_path" = x; then
23013    # Oops. Which didn't find the executable.
23014    # The splitting of arguments from the executable at a space might have been incorrect,
23015    # since paths with space are more likely in Windows. Give it another try with the whole
23016    # argument.
23017    path="$complete"
23018    arguments="EOL"
23019    new_path=`$CYGPATH -u "$path"`
23020    new_path=`$WHICH "$new_path" 2> /dev/null`
23021    # bat and cmd files are not always considered executable in cygwin causing which
23022    # to not find them
23023    if test "x$new_path" = x \
23024             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23025             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23026      new_path=`$CYGPATH -u "$path"`
23027    fi
23028    if test "x$new_path" = x; then
23029      # It's still not found. Now this is an unrecoverable error.
23030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23031$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23032      has_space=`$ECHO "$complete" | $GREP " "`
23033      if test "x$has_space" != x; then
23034        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23035$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23036      fi
23037      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23038    fi
23039  fi
23040
23041  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23042  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23043  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23044  # "foo.exe" is OK but "foo" is an error.
23045  #
23046  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23047  # It is also a way to make sure we got the proper file name for the real test later on.
23048  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23049  if test "x$test_shortpath" = x; then
23050    # Short path failed, file does not exist as specified.
23051    # Try adding .exe or .cmd
23052    if test -f "${new_path}.exe"; then
23053       input_to_shortpath="${new_path}.exe"
23054    elif test -f "${new_path}.cmd"; then
23055       input_to_shortpath="${new_path}.cmd"
23056    else
23057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23058$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23059      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23060$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23061      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23062    fi
23063  else
23064    input_to_shortpath="$new_path"
23065  fi
23066
23067  # Call helper function which possibly converts this using DOS-style short mode.
23068  # If so, the updated path is stored in $new_path.
23069  new_path="$input_to_shortpath"
23070
23071  input_path="$input_to_shortpath"
23072  # Check if we need to convert this using DOS-style short mode. If the path
23073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23074  # take no chances and rewrite it.
23075  # Note: m4 eats our [], so we need to use [ and ] instead.
23076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23077  if test "x$has_forbidden_chars" != x; then
23078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23082      # Going to short mode and back again did indeed matter. Since short mode is
23083      # case insensitive, let's make it lowercase to improve readability.
23084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23085      # Now convert it back to Unix-stile (cygpath)
23086      input_path=`$CYGPATH -u "$shortmode_path"`
23087      new_path="$input_path"
23088    fi
23089  fi
23090
23091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23092  if test "x$test_cygdrive_prefix" = x; then
23093    # As a simple fix, exclude /usr/bin since it's not a real path.
23094    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23096      # a path prefixed by /cygdrive for fixpath to work.
23097      new_path="$CYGWIN_ROOT_PATH$input_path"
23098    fi
23099  fi
23100
23101  # remove trailing .exe if any
23102  new_path="${new_path/%.exe/}"
23103
23104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23105
23106  # First separate the path from the arguments. This will split at the first
23107  # space.
23108  complete="$WINLD"
23109  path="${complete%% *}"
23110  tmp="$complete EOL"
23111  arguments="${tmp#* }"
23112
23113  # Input might be given as Windows format, start by converting to
23114  # unix format.
23115  new_path="$path"
23116
23117  windows_path="$new_path"
23118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23119    unix_path=`$CYGPATH -u "$windows_path"`
23120    new_path="$unix_path"
23121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23123    new_path="$unix_path"
23124  fi
23125
23126
23127  # Now try to locate executable using which
23128  new_path=`$WHICH "$new_path" 2> /dev/null`
23129
23130  if test "x$new_path" = x; then
23131    # Oops. Which didn't find the executable.
23132    # The splitting of arguments from the executable at a space might have been incorrect,
23133    # since paths with space are more likely in Windows. Give it another try with the whole
23134    # argument.
23135    path="$complete"
23136    arguments="EOL"
23137    new_path="$path"
23138
23139  windows_path="$new_path"
23140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23141    unix_path=`$CYGPATH -u "$windows_path"`
23142    new_path="$unix_path"
23143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23145    new_path="$unix_path"
23146  fi
23147
23148
23149    new_path=`$WHICH "$new_path" 2> /dev/null`
23150
23151    if test "x$new_path" = x; then
23152      # It's still not found. Now this is an unrecoverable error.
23153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23154$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23155      has_space=`$ECHO "$complete" | $GREP " "`
23156      if test "x$has_space" != x; then
23157        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23158$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23159      fi
23160      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23161    fi
23162  fi
23163
23164  # Now new_path has a complete unix path to the binary
23165  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23166    # Keep paths in /bin as-is, but remove trailing .exe if any
23167    new_path="${new_path/%.exe/}"
23168    # Do not save /bin paths to all_fixpath_prefixes!
23169  else
23170    # Not in mixed or Windows style, start by that.
23171    new_path=`cmd //c echo $new_path`
23172
23173  input_path="$new_path"
23174  # Check if we need to convert this using DOS-style short mode. If the path
23175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23176  # take no chances and rewrite it.
23177  # Note: m4 eats our [], so we need to use [ and ] instead.
23178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23179  if test "x$has_forbidden_chars" != x; then
23180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23181    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23182  fi
23183
23184    # Output is in $new_path
23185
23186  windows_path="$new_path"
23187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23188    unix_path=`$CYGPATH -u "$windows_path"`
23189    new_path="$unix_path"
23190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23192    new_path="$unix_path"
23193  fi
23194
23195    # remove trailing .exe if any
23196    new_path="${new_path/%.exe/}"
23197
23198    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23199    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23200  fi
23201
23202  else
23203    # We're on a posix platform. Hooray! :)
23204    # First separate the path from the arguments. This will split at the first
23205    # space.
23206    complete="$WINLD"
23207    path="${complete%% *}"
23208    tmp="$complete EOL"
23209    arguments="${tmp#* }"
23210
23211    # Cannot rely on the command "which" here since it doesn't always work.
23212    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23213    if test -z "$is_absolute_path"; then
23214      # Path to executable is not absolute. Find it.
23215      IFS_save="$IFS"
23216      IFS=:
23217      for p in $PATH; do
23218        if test -f "$p/$path" && test -x "$p/$path"; then
23219          new_path="$p/$path"
23220          break
23221        fi
23222      done
23223      IFS="$IFS_save"
23224    else
23225      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23226$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23227      new_path="$path"
23228    fi
23229
23230    if test "x$new_path" = x; then
23231        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23232$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23233        has_space=`$ECHO "$complete" | $GREP " "`
23234        if test "x$has_space" != x; then
23235          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23236$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23237        fi
23238        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23239      fi
23240  fi
23241
23242      # Now join together the path and the arguments once again
23243      if test "x$arguments" != xEOL; then
23244        new_complete="$new_path ${arguments% *}"
23245      else
23246        new_complete="$new_path"
23247      fi
23248
23249  if test "x$complete" != "x$new_complete"; then
23250      WINLD="$new_complete"
23251      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23252$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23253    fi
23254
23255    printf "Windows linker was found at $WINLD\n"
23256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23257$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23258    "$WINLD" --version > /dev/null
23259    if test $? -eq 0 ; then
23260      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23261$as_echo "no" >&6; }
23262      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23263    else
23264      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23265$as_echo "yes" >&6; }
23266    fi
23267    LD="$WINLD"
23268    LDEXE="$WINLD"
23269    LDCXX="$WINLD"
23270    LDEXECXX="$WINLD"
23271
23272    # Extract the first word of "mt", so it can be a program name with args.
23273set dummy mt; ac_word=$2
23274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23275$as_echo_n "checking for $ac_word... " >&6; }
23276if test "${ac_cv_prog_MT+set}" = set; then :
23277  $as_echo_n "(cached) " >&6
23278else
23279  if test -n "$MT"; then
23280  ac_cv_prog_MT="$MT" # Let the user override the test.
23281else
23282  ac_prog_rejected=no
23283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23284for as_dir in $PATH
23285do
23286  IFS=$as_save_IFS
23287  test -z "$as_dir" && as_dir=.
23288    for ac_exec_ext in '' $ac_executable_extensions; do
23289  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23290    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23291       ac_prog_rejected=yes
23292       continue
23293     fi
23294    ac_cv_prog_MT="mt"
23295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23296    break 2
23297  fi
23298done
23299  done
23300IFS=$as_save_IFS
23301
23302if test $ac_prog_rejected = yes; then
23303  # We found a bogon in the path, so make sure we never use it.
23304  set dummy $ac_cv_prog_MT
23305  shift
23306  if test $# != 0; then
23307    # We chose a different compiler from the bogus one.
23308    # However, it has the same basename, so the bogon will be chosen
23309    # first if we set MT to just the basename; use the full file name.
23310    shift
23311    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23312  fi
23313fi
23314fi
23315fi
23316MT=$ac_cv_prog_MT
23317if test -n "$MT"; then
23318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23319$as_echo "$MT" >&6; }
23320else
23321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23322$as_echo "no" >&6; }
23323fi
23324
23325
23326
23327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23328
23329  # First separate the path from the arguments. This will split at the first
23330  # space.
23331  complete="$MT"
23332  path="${complete%% *}"
23333  tmp="$complete EOL"
23334  arguments="${tmp#* }"
23335
23336  # Input might be given as Windows format, start by converting to
23337  # unix format.
23338  new_path=`$CYGPATH -u "$path"`
23339
23340  # Now try to locate executable using which
23341  new_path=`$WHICH "$new_path" 2> /dev/null`
23342  # bat and cmd files are not always considered executable in cygwin causing which
23343  # to not find them
23344  if test "x$new_path" = x \
23345           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23346           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23347    new_path=`$CYGPATH -u "$path"`
23348  fi
23349  if test "x$new_path" = x; then
23350    # Oops. Which didn't find the executable.
23351    # The splitting of arguments from the executable at a space might have been incorrect,
23352    # since paths with space are more likely in Windows. Give it another try with the whole
23353    # argument.
23354    path="$complete"
23355    arguments="EOL"
23356    new_path=`$CYGPATH -u "$path"`
23357    new_path=`$WHICH "$new_path" 2> /dev/null`
23358    # bat and cmd files are not always considered executable in cygwin causing which
23359    # to not find them
23360    if test "x$new_path" = x \
23361             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23362             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23363      new_path=`$CYGPATH -u "$path"`
23364    fi
23365    if test "x$new_path" = x; then
23366      # It's still not found. Now this is an unrecoverable error.
23367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23368$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23369      has_space=`$ECHO "$complete" | $GREP " "`
23370      if test "x$has_space" != x; then
23371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23373      fi
23374      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23375    fi
23376  fi
23377
23378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23381  # "foo.exe" is OK but "foo" is an error.
23382  #
23383  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23384  # It is also a way to make sure we got the proper file name for the real test later on.
23385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23386  if test "x$test_shortpath" = x; then
23387    # Short path failed, file does not exist as specified.
23388    # Try adding .exe or .cmd
23389    if test -f "${new_path}.exe"; then
23390       input_to_shortpath="${new_path}.exe"
23391    elif test -f "${new_path}.cmd"; then
23392       input_to_shortpath="${new_path}.cmd"
23393    else
23394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23395$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23396      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23397$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23398      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23399    fi
23400  else
23401    input_to_shortpath="$new_path"
23402  fi
23403
23404  # Call helper function which possibly converts this using DOS-style short mode.
23405  # If so, the updated path is stored in $new_path.
23406  new_path="$input_to_shortpath"
23407
23408  input_path="$input_to_shortpath"
23409  # Check if we need to convert this using DOS-style short mode. If the path
23410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23411  # take no chances and rewrite it.
23412  # Note: m4 eats our [], so we need to use [ and ] instead.
23413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23414  if test "x$has_forbidden_chars" != x; then
23415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23419      # Going to short mode and back again did indeed matter. Since short mode is
23420      # case insensitive, let's make it lowercase to improve readability.
23421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23422      # Now convert it back to Unix-stile (cygpath)
23423      input_path=`$CYGPATH -u "$shortmode_path"`
23424      new_path="$input_path"
23425    fi
23426  fi
23427
23428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23429  if test "x$test_cygdrive_prefix" = x; then
23430    # As a simple fix, exclude /usr/bin since it's not a real path.
23431    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23433      # a path prefixed by /cygdrive for fixpath to work.
23434      new_path="$CYGWIN_ROOT_PATH$input_path"
23435    fi
23436  fi
23437
23438  # remove trailing .exe if any
23439  new_path="${new_path/%.exe/}"
23440
23441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23442
23443  # First separate the path from the arguments. This will split at the first
23444  # space.
23445  complete="$MT"
23446  path="${complete%% *}"
23447  tmp="$complete EOL"
23448  arguments="${tmp#* }"
23449
23450  # Input might be given as Windows format, start by converting to
23451  # unix format.
23452  new_path="$path"
23453
23454  windows_path="$new_path"
23455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23456    unix_path=`$CYGPATH -u "$windows_path"`
23457    new_path="$unix_path"
23458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23460    new_path="$unix_path"
23461  fi
23462
23463
23464  # Now try to locate executable using which
23465  new_path=`$WHICH "$new_path" 2> /dev/null`
23466
23467  if test "x$new_path" = x; then
23468    # Oops. Which didn't find the executable.
23469    # The splitting of arguments from the executable at a space might have been incorrect,
23470    # since paths with space are more likely in Windows. Give it another try with the whole
23471    # argument.
23472    path="$complete"
23473    arguments="EOL"
23474    new_path="$path"
23475
23476  windows_path="$new_path"
23477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23478    unix_path=`$CYGPATH -u "$windows_path"`
23479    new_path="$unix_path"
23480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23482    new_path="$unix_path"
23483  fi
23484
23485
23486    new_path=`$WHICH "$new_path" 2> /dev/null`
23487
23488    if test "x$new_path" = x; then
23489      # It's still not found. Now this is an unrecoverable error.
23490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23491$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23492      has_space=`$ECHO "$complete" | $GREP " "`
23493      if test "x$has_space" != x; then
23494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23496      fi
23497      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23498    fi
23499  fi
23500
23501  # Now new_path has a complete unix path to the binary
23502  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23503    # Keep paths in /bin as-is, but remove trailing .exe if any
23504    new_path="${new_path/%.exe/}"
23505    # Do not save /bin paths to all_fixpath_prefixes!
23506  else
23507    # Not in mixed or Windows style, start by that.
23508    new_path=`cmd //c echo $new_path`
23509
23510  input_path="$new_path"
23511  # Check if we need to convert this using DOS-style short mode. If the path
23512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23513  # take no chances and rewrite it.
23514  # Note: m4 eats our [], so we need to use [ and ] instead.
23515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23516  if test "x$has_forbidden_chars" != x; then
23517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23519  fi
23520
23521    # Output is in $new_path
23522
23523  windows_path="$new_path"
23524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23525    unix_path=`$CYGPATH -u "$windows_path"`
23526    new_path="$unix_path"
23527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23529    new_path="$unix_path"
23530  fi
23531
23532    # remove trailing .exe if any
23533    new_path="${new_path/%.exe/}"
23534
23535    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23536    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23537  fi
23538
23539  else
23540    # We're on a posix platform. Hooray! :)
23541    # First separate the path from the arguments. This will split at the first
23542    # space.
23543    complete="$MT"
23544    path="${complete%% *}"
23545    tmp="$complete EOL"
23546    arguments="${tmp#* }"
23547
23548    # Cannot rely on the command "which" here since it doesn't always work.
23549    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23550    if test -z "$is_absolute_path"; then
23551      # Path to executable is not absolute. Find it.
23552      IFS_save="$IFS"
23553      IFS=:
23554      for p in $PATH; do
23555        if test -f "$p/$path" && test -x "$p/$path"; then
23556          new_path="$p/$path"
23557          break
23558        fi
23559      done
23560      IFS="$IFS_save"
23561    else
23562      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23563$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23564      new_path="$path"
23565    fi
23566
23567    if test "x$new_path" = x; then
23568        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23569$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23570        has_space=`$ECHO "$complete" | $GREP " "`
23571        if test "x$has_space" != x; then
23572          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23573$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23574        fi
23575        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23576      fi
23577  fi
23578
23579      # Now join together the path and the arguments once again
23580      if test "x$arguments" != xEOL; then
23581        new_complete="$new_path ${arguments% *}"
23582      else
23583        new_complete="$new_path"
23584      fi
23585
23586  if test "x$complete" != "x$new_complete"; then
23587      MT="$new_complete"
23588      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23589$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23590    fi
23591
23592    # The resource compiler
23593    # Extract the first word of "rc", so it can be a program name with args.
23594set dummy rc; ac_word=$2
23595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23596$as_echo_n "checking for $ac_word... " >&6; }
23597if test "${ac_cv_prog_RC+set}" = set; then :
23598  $as_echo_n "(cached) " >&6
23599else
23600  if test -n "$RC"; then
23601  ac_cv_prog_RC="$RC" # Let the user override the test.
23602else
23603  ac_prog_rejected=no
23604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23605for as_dir in $PATH
23606do
23607  IFS=$as_save_IFS
23608  test -z "$as_dir" && as_dir=.
23609    for ac_exec_ext in '' $ac_executable_extensions; do
23610  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23611    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23612       ac_prog_rejected=yes
23613       continue
23614     fi
23615    ac_cv_prog_RC="rc"
23616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23617    break 2
23618  fi
23619done
23620  done
23621IFS=$as_save_IFS
23622
23623if test $ac_prog_rejected = yes; then
23624  # We found a bogon in the path, so make sure we never use it.
23625  set dummy $ac_cv_prog_RC
23626  shift
23627  if test $# != 0; then
23628    # We chose a different compiler from the bogus one.
23629    # However, it has the same basename, so the bogon will be chosen
23630    # first if we set RC to just the basename; use the full file name.
23631    shift
23632    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23633  fi
23634fi
23635fi
23636fi
23637RC=$ac_cv_prog_RC
23638if test -n "$RC"; then
23639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23640$as_echo "$RC" >&6; }
23641else
23642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23643$as_echo "no" >&6; }
23644fi
23645
23646
23647
23648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23649
23650  # First separate the path from the arguments. This will split at the first
23651  # space.
23652  complete="$RC"
23653  path="${complete%% *}"
23654  tmp="$complete EOL"
23655  arguments="${tmp#* }"
23656
23657  # Input might be given as Windows format, start by converting to
23658  # unix format.
23659  new_path=`$CYGPATH -u "$path"`
23660
23661  # Now try to locate executable using which
23662  new_path=`$WHICH "$new_path" 2> /dev/null`
23663  # bat and cmd files are not always considered executable in cygwin causing which
23664  # to not find them
23665  if test "x$new_path" = x \
23666           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23667           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23668    new_path=`$CYGPATH -u "$path"`
23669  fi
23670  if test "x$new_path" = x; then
23671    # Oops. Which didn't find the executable.
23672    # The splitting of arguments from the executable at a space might have been incorrect,
23673    # since paths with space are more likely in Windows. Give it another try with the whole
23674    # argument.
23675    path="$complete"
23676    arguments="EOL"
23677    new_path=`$CYGPATH -u "$path"`
23678    new_path=`$WHICH "$new_path" 2> /dev/null`
23679    # bat and cmd files are not always considered executable in cygwin causing which
23680    # to not find them
23681    if test "x$new_path" = x \
23682             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23683             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23684      new_path=`$CYGPATH -u "$path"`
23685    fi
23686    if test "x$new_path" = x; then
23687      # It's still not found. Now this is an unrecoverable error.
23688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23689$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23690      has_space=`$ECHO "$complete" | $GREP " "`
23691      if test "x$has_space" != x; then
23692        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23693$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23694      fi
23695      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23696    fi
23697  fi
23698
23699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23702  # "foo.exe" is OK but "foo" is an error.
23703  #
23704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23705  # It is also a way to make sure we got the proper file name for the real test later on.
23706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23707  if test "x$test_shortpath" = x; then
23708    # Short path failed, file does not exist as specified.
23709    # Try adding .exe or .cmd
23710    if test -f "${new_path}.exe"; then
23711       input_to_shortpath="${new_path}.exe"
23712    elif test -f "${new_path}.cmd"; then
23713       input_to_shortpath="${new_path}.cmd"
23714    else
23715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23716$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23717      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23718$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23719      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23720    fi
23721  else
23722    input_to_shortpath="$new_path"
23723  fi
23724
23725  # Call helper function which possibly converts this using DOS-style short mode.
23726  # If so, the updated path is stored in $new_path.
23727  new_path="$input_to_shortpath"
23728
23729  input_path="$input_to_shortpath"
23730  # Check if we need to convert this using DOS-style short mode. If the path
23731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23732  # take no chances and rewrite it.
23733  # Note: m4 eats our [], so we need to use [ and ] instead.
23734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23735  if test "x$has_forbidden_chars" != x; then
23736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23737    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23738    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23739    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23740      # Going to short mode and back again did indeed matter. Since short mode is
23741      # case insensitive, let's make it lowercase to improve readability.
23742      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23743      # Now convert it back to Unix-stile (cygpath)
23744      input_path=`$CYGPATH -u "$shortmode_path"`
23745      new_path="$input_path"
23746    fi
23747  fi
23748
23749  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23750  if test "x$test_cygdrive_prefix" = x; then
23751    # As a simple fix, exclude /usr/bin since it's not a real path.
23752    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23753      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23754      # a path prefixed by /cygdrive for fixpath to work.
23755      new_path="$CYGWIN_ROOT_PATH$input_path"
23756    fi
23757  fi
23758
23759  # remove trailing .exe if any
23760  new_path="${new_path/%.exe/}"
23761
23762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23763
23764  # First separate the path from the arguments. This will split at the first
23765  # space.
23766  complete="$RC"
23767  path="${complete%% *}"
23768  tmp="$complete EOL"
23769  arguments="${tmp#* }"
23770
23771  # Input might be given as Windows format, start by converting to
23772  # unix format.
23773  new_path="$path"
23774
23775  windows_path="$new_path"
23776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23777    unix_path=`$CYGPATH -u "$windows_path"`
23778    new_path="$unix_path"
23779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23781    new_path="$unix_path"
23782  fi
23783
23784
23785  # Now try to locate executable using which
23786  new_path=`$WHICH "$new_path" 2> /dev/null`
23787
23788  if test "x$new_path" = x; then
23789    # Oops. Which didn't find the executable.
23790    # The splitting of arguments from the executable at a space might have been incorrect,
23791    # since paths with space are more likely in Windows. Give it another try with the whole
23792    # argument.
23793    path="$complete"
23794    arguments="EOL"
23795    new_path="$path"
23796
23797  windows_path="$new_path"
23798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23799    unix_path=`$CYGPATH -u "$windows_path"`
23800    new_path="$unix_path"
23801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23803    new_path="$unix_path"
23804  fi
23805
23806
23807    new_path=`$WHICH "$new_path" 2> /dev/null`
23808
23809    if test "x$new_path" = x; then
23810      # It's still not found. Now this is an unrecoverable error.
23811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23812$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23813      has_space=`$ECHO "$complete" | $GREP " "`
23814      if test "x$has_space" != x; then
23815        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23816$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23817      fi
23818      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23819    fi
23820  fi
23821
23822  # Now new_path has a complete unix path to the binary
23823  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23824    # Keep paths in /bin as-is, but remove trailing .exe if any
23825    new_path="${new_path/%.exe/}"
23826    # Do not save /bin paths to all_fixpath_prefixes!
23827  else
23828    # Not in mixed or Windows style, start by that.
23829    new_path=`cmd //c echo $new_path`
23830
23831  input_path="$new_path"
23832  # Check if we need to convert this using DOS-style short mode. If the path
23833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23834  # take no chances and rewrite it.
23835  # Note: m4 eats our [], so we need to use [ and ] instead.
23836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23837  if test "x$has_forbidden_chars" != x; then
23838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23839    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23840  fi
23841
23842    # Output is in $new_path
23843
23844  windows_path="$new_path"
23845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23846    unix_path=`$CYGPATH -u "$windows_path"`
23847    new_path="$unix_path"
23848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23850    new_path="$unix_path"
23851  fi
23852
23853    # remove trailing .exe if any
23854    new_path="${new_path/%.exe/}"
23855
23856    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23857    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23858  fi
23859
23860  else
23861    # We're on a posix platform. Hooray! :)
23862    # First separate the path from the arguments. This will split at the first
23863    # space.
23864    complete="$RC"
23865    path="${complete%% *}"
23866    tmp="$complete EOL"
23867    arguments="${tmp#* }"
23868
23869    # Cannot rely on the command "which" here since it doesn't always work.
23870    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23871    if test -z "$is_absolute_path"; then
23872      # Path to executable is not absolute. Find it.
23873      IFS_save="$IFS"
23874      IFS=:
23875      for p in $PATH; do
23876        if test -f "$p/$path" && test -x "$p/$path"; then
23877          new_path="$p/$path"
23878          break
23879        fi
23880      done
23881      IFS="$IFS_save"
23882    else
23883      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23884$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23885      new_path="$path"
23886    fi
23887
23888    if test "x$new_path" = x; then
23889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23890$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23891        has_space=`$ECHO "$complete" | $GREP " "`
23892        if test "x$has_space" != x; then
23893          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23894$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23895        fi
23896        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23897      fi
23898  fi
23899
23900      # Now join together the path and the arguments once again
23901      if test "x$arguments" != xEOL; then
23902        new_complete="$new_path ${arguments% *}"
23903      else
23904        new_complete="$new_path"
23905      fi
23906
23907  if test "x$complete" != "x$new_complete"; then
23908      RC="$new_complete"
23909      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23910$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23911    fi
23912
23913
23914    # For hotspot, we need these in Windows mixed path,
23915    # so rewrite them all. Need added .exe suffix.
23916    HOTSPOT_CXX="$CXX.exe"
23917    HOTSPOT_LD="$LD.exe"
23918    HOTSPOT_MT="$MT.exe"
23919    HOTSPOT_RC="$RC.exe"
23920
23921  unix_path="$HOTSPOT_CXX"
23922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23923    windows_path=`$CYGPATH -m "$unix_path"`
23924    HOTSPOT_CXX="$windows_path"
23925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23926    windows_path=`cmd //c echo $unix_path`
23927    HOTSPOT_CXX="$windows_path"
23928  fi
23929
23930
23931  unix_path="$HOTSPOT_LD"
23932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23933    windows_path=`$CYGPATH -m "$unix_path"`
23934    HOTSPOT_LD="$windows_path"
23935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23936    windows_path=`cmd //c echo $unix_path`
23937    HOTSPOT_LD="$windows_path"
23938  fi
23939
23940
23941  unix_path="$HOTSPOT_MT"
23942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23943    windows_path=`$CYGPATH -m "$unix_path"`
23944    HOTSPOT_MT="$windows_path"
23945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23946    windows_path=`cmd //c echo $unix_path`
23947    HOTSPOT_MT="$windows_path"
23948  fi
23949
23950
23951  unix_path="$HOTSPOT_RC"
23952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23953    windows_path=`$CYGPATH -m "$unix_path"`
23954    HOTSPOT_RC="$windows_path"
23955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23956    windows_path=`cmd //c echo $unix_path`
23957    HOTSPOT_RC="$windows_path"
23958  fi
23959
23960
23961
23962
23963    RC_FLAGS="-nologo -l 0x409 -r"
23964    if test "x$VARIANT" = xOPT; then :
23965
23966        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23967
23968fi
23969    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23970    if test "x$JDK_UPDATE_VERSION" = x; then :
23971
23972        JDK_UPDATE_VERSION_NOTNULL=0
23973
23974fi
23975    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23976    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23977    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23978    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23979    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23980    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23981    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23982
23983    # lib.exe is used to create static libraries.
23984    # Extract the first word of "lib", so it can be a program name with args.
23985set dummy lib; ac_word=$2
23986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23987$as_echo_n "checking for $ac_word... " >&6; }
23988if test "${ac_cv_prog_WINAR+set}" = set; then :
23989  $as_echo_n "(cached) " >&6
23990else
23991  if test -n "$WINAR"; then
23992  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23993else
23994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23995for as_dir in $PATH
23996do
23997  IFS=$as_save_IFS
23998  test -z "$as_dir" && as_dir=.
23999    for ac_exec_ext in '' $ac_executable_extensions; do
24000  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24001    ac_cv_prog_WINAR="lib"
24002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24003    break 2
24004  fi
24005done
24006  done
24007IFS=$as_save_IFS
24008
24009fi
24010fi
24011WINAR=$ac_cv_prog_WINAR
24012if test -n "$WINAR"; then
24013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
24014$as_echo "$WINAR" >&6; }
24015else
24016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24017$as_echo "no" >&6; }
24018fi
24019
24020
24021
24022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24023
24024  # First separate the path from the arguments. This will split at the first
24025  # space.
24026  complete="$WINAR"
24027  path="${complete%% *}"
24028  tmp="$complete EOL"
24029  arguments="${tmp#* }"
24030
24031  # Input might be given as Windows format, start by converting to
24032  # unix format.
24033  new_path=`$CYGPATH -u "$path"`
24034
24035  # Now try to locate executable using which
24036  new_path=`$WHICH "$new_path" 2> /dev/null`
24037  # bat and cmd files are not always considered executable in cygwin causing which
24038  # to not find them
24039  if test "x$new_path" = x \
24040           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24041           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24042    new_path=`$CYGPATH -u "$path"`
24043  fi
24044  if test "x$new_path" = x; then
24045    # Oops. Which didn't find the executable.
24046    # The splitting of arguments from the executable at a space might have been incorrect,
24047    # since paths with space are more likely in Windows. Give it another try with the whole
24048    # argument.
24049    path="$complete"
24050    arguments="EOL"
24051    new_path=`$CYGPATH -u "$path"`
24052    new_path=`$WHICH "$new_path" 2> /dev/null`
24053    # bat and cmd files are not always considered executable in cygwin causing which
24054    # to not find them
24055    if test "x$new_path" = x \
24056             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24057             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24058      new_path=`$CYGPATH -u "$path"`
24059    fi
24060    if test "x$new_path" = x; then
24061      # It's still not found. Now this is an unrecoverable error.
24062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24063$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24064      has_space=`$ECHO "$complete" | $GREP " "`
24065      if test "x$has_space" != x; then
24066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24068      fi
24069      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24070    fi
24071  fi
24072
24073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24076  # "foo.exe" is OK but "foo" is an error.
24077  #
24078  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24079  # It is also a way to make sure we got the proper file name for the real test later on.
24080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24081  if test "x$test_shortpath" = x; then
24082    # Short path failed, file does not exist as specified.
24083    # Try adding .exe or .cmd
24084    if test -f "${new_path}.exe"; then
24085       input_to_shortpath="${new_path}.exe"
24086    elif test -f "${new_path}.cmd"; then
24087       input_to_shortpath="${new_path}.cmd"
24088    else
24089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24090$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24091      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24092$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24093      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24094    fi
24095  else
24096    input_to_shortpath="$new_path"
24097  fi
24098
24099  # Call helper function which possibly converts this using DOS-style short mode.
24100  # If so, the updated path is stored in $new_path.
24101  new_path="$input_to_shortpath"
24102
24103  input_path="$input_to_shortpath"
24104  # Check if we need to convert this using DOS-style short mode. If the path
24105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24106  # take no chances and rewrite it.
24107  # Note: m4 eats our [], so we need to use [ and ] instead.
24108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24109  if test "x$has_forbidden_chars" != x; then
24110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24114      # Going to short mode and back again did indeed matter. Since short mode is
24115      # case insensitive, let's make it lowercase to improve readability.
24116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24117      # Now convert it back to Unix-stile (cygpath)
24118      input_path=`$CYGPATH -u "$shortmode_path"`
24119      new_path="$input_path"
24120    fi
24121  fi
24122
24123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24124  if test "x$test_cygdrive_prefix" = x; then
24125    # As a simple fix, exclude /usr/bin since it's not a real path.
24126    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24128      # a path prefixed by /cygdrive for fixpath to work.
24129      new_path="$CYGWIN_ROOT_PATH$input_path"
24130    fi
24131  fi
24132
24133  # remove trailing .exe if any
24134  new_path="${new_path/%.exe/}"
24135
24136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24137
24138  # First separate the path from the arguments. This will split at the first
24139  # space.
24140  complete="$WINAR"
24141  path="${complete%% *}"
24142  tmp="$complete EOL"
24143  arguments="${tmp#* }"
24144
24145  # Input might be given as Windows format, start by converting to
24146  # unix format.
24147  new_path="$path"
24148
24149  windows_path="$new_path"
24150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24151    unix_path=`$CYGPATH -u "$windows_path"`
24152    new_path="$unix_path"
24153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24155    new_path="$unix_path"
24156  fi
24157
24158
24159  # Now try to locate executable using which
24160  new_path=`$WHICH "$new_path" 2> /dev/null`
24161
24162  if test "x$new_path" = x; then
24163    # Oops. Which didn't find the executable.
24164    # The splitting of arguments from the executable at a space might have been incorrect,
24165    # since paths with space are more likely in Windows. Give it another try with the whole
24166    # argument.
24167    path="$complete"
24168    arguments="EOL"
24169    new_path="$path"
24170
24171  windows_path="$new_path"
24172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24173    unix_path=`$CYGPATH -u "$windows_path"`
24174    new_path="$unix_path"
24175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24177    new_path="$unix_path"
24178  fi
24179
24180
24181    new_path=`$WHICH "$new_path" 2> /dev/null`
24182
24183    if test "x$new_path" = x; then
24184      # It's still not found. Now this is an unrecoverable error.
24185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24186$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24187      has_space=`$ECHO "$complete" | $GREP " "`
24188      if test "x$has_space" != x; then
24189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24191      fi
24192      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24193    fi
24194  fi
24195
24196  # Now new_path has a complete unix path to the binary
24197  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24198    # Keep paths in /bin as-is, but remove trailing .exe if any
24199    new_path="${new_path/%.exe/}"
24200    # Do not save /bin paths to all_fixpath_prefixes!
24201  else
24202    # Not in mixed or Windows style, start by that.
24203    new_path=`cmd //c echo $new_path`
24204
24205  input_path="$new_path"
24206  # Check if we need to convert this using DOS-style short mode. If the path
24207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24208  # take no chances and rewrite it.
24209  # Note: m4 eats our [], so we need to use [ and ] instead.
24210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24211  if test "x$has_forbidden_chars" != x; then
24212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24214  fi
24215
24216    # Output is in $new_path
24217
24218  windows_path="$new_path"
24219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24220    unix_path=`$CYGPATH -u "$windows_path"`
24221    new_path="$unix_path"
24222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24224    new_path="$unix_path"
24225  fi
24226
24227    # remove trailing .exe if any
24228    new_path="${new_path/%.exe/}"
24229
24230    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24231    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24232  fi
24233
24234  else
24235    # We're on a posix platform. Hooray! :)
24236    # First separate the path from the arguments. This will split at the first
24237    # space.
24238    complete="$WINAR"
24239    path="${complete%% *}"
24240    tmp="$complete EOL"
24241    arguments="${tmp#* }"
24242
24243    # Cannot rely on the command "which" here since it doesn't always work.
24244    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24245    if test -z "$is_absolute_path"; then
24246      # Path to executable is not absolute. Find it.
24247      IFS_save="$IFS"
24248      IFS=:
24249      for p in $PATH; do
24250        if test -f "$p/$path" && test -x "$p/$path"; then
24251          new_path="$p/$path"
24252          break
24253        fi
24254      done
24255      IFS="$IFS_save"
24256    else
24257      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24258$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24259      new_path="$path"
24260    fi
24261
24262    if test "x$new_path" = x; then
24263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24264$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24265        has_space=`$ECHO "$complete" | $GREP " "`
24266        if test "x$has_space" != x; then
24267          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24268$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24269        fi
24270        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24271      fi
24272  fi
24273
24274      # Now join together the path and the arguments once again
24275      if test "x$arguments" != xEOL; then
24276        new_complete="$new_path ${arguments% *}"
24277      else
24278        new_complete="$new_path"
24279      fi
24280
24281  if test "x$complete" != "x$new_complete"; then
24282      WINAR="$new_complete"
24283      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24284$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24285    fi
24286
24287    AR="$WINAR"
24288    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24289
24290    # Extract the first word of "dumpbin", so it can be a program name with args.
24291set dummy dumpbin; ac_word=$2
24292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24293$as_echo_n "checking for $ac_word... " >&6; }
24294if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
24295  $as_echo_n "(cached) " >&6
24296else
24297  if test -n "$DUMPBIN"; then
24298  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24299else
24300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24301for as_dir in $PATH
24302do
24303  IFS=$as_save_IFS
24304  test -z "$as_dir" && as_dir=.
24305    for ac_exec_ext in '' $ac_executable_extensions; do
24306  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24307    ac_cv_prog_DUMPBIN="dumpbin"
24308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24309    break 2
24310  fi
24311done
24312  done
24313IFS=$as_save_IFS
24314
24315fi
24316fi
24317DUMPBIN=$ac_cv_prog_DUMPBIN
24318if test -n "$DUMPBIN"; then
24319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24320$as_echo "$DUMPBIN" >&6; }
24321else
24322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24323$as_echo "no" >&6; }
24324fi
24325
24326
24327
24328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24329
24330  # First separate the path from the arguments. This will split at the first
24331  # space.
24332  complete="$DUMPBIN"
24333  path="${complete%% *}"
24334  tmp="$complete EOL"
24335  arguments="${tmp#* }"
24336
24337  # Input might be given as Windows format, start by converting to
24338  # unix format.
24339  new_path=`$CYGPATH -u "$path"`
24340
24341  # Now try to locate executable using which
24342  new_path=`$WHICH "$new_path" 2> /dev/null`
24343  # bat and cmd files are not always considered executable in cygwin causing which
24344  # to not find them
24345  if test "x$new_path" = x \
24346           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24347           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24348    new_path=`$CYGPATH -u "$path"`
24349  fi
24350  if test "x$new_path" = x; then
24351    # Oops. Which didn't find the executable.
24352    # The splitting of arguments from the executable at a space might have been incorrect,
24353    # since paths with space are more likely in Windows. Give it another try with the whole
24354    # argument.
24355    path="$complete"
24356    arguments="EOL"
24357    new_path=`$CYGPATH -u "$path"`
24358    new_path=`$WHICH "$new_path" 2> /dev/null`
24359    # bat and cmd files are not always considered executable in cygwin causing which
24360    # to not find them
24361    if test "x$new_path" = x \
24362             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24363             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24364      new_path=`$CYGPATH -u "$path"`
24365    fi
24366    if test "x$new_path" = x; then
24367      # It's still not found. Now this is an unrecoverable error.
24368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24369$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24370      has_space=`$ECHO "$complete" | $GREP " "`
24371      if test "x$has_space" != x; then
24372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24374      fi
24375      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24376    fi
24377  fi
24378
24379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24382  # "foo.exe" is OK but "foo" is an error.
24383  #
24384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24385  # It is also a way to make sure we got the proper file name for the real test later on.
24386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24387  if test "x$test_shortpath" = x; then
24388    # Short path failed, file does not exist as specified.
24389    # Try adding .exe or .cmd
24390    if test -f "${new_path}.exe"; then
24391       input_to_shortpath="${new_path}.exe"
24392    elif test -f "${new_path}.cmd"; then
24393       input_to_shortpath="${new_path}.cmd"
24394    else
24395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24396$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24397      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24398$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24399      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24400    fi
24401  else
24402    input_to_shortpath="$new_path"
24403  fi
24404
24405  # Call helper function which possibly converts this using DOS-style short mode.
24406  # If so, the updated path is stored in $new_path.
24407  new_path="$input_to_shortpath"
24408
24409  input_path="$input_to_shortpath"
24410  # Check if we need to convert this using DOS-style short mode. If the path
24411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24412  # take no chances and rewrite it.
24413  # Note: m4 eats our [], so we need to use [ and ] instead.
24414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24415  if test "x$has_forbidden_chars" != x; then
24416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24420      # Going to short mode and back again did indeed matter. Since short mode is
24421      # case insensitive, let's make it lowercase to improve readability.
24422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24423      # Now convert it back to Unix-stile (cygpath)
24424      input_path=`$CYGPATH -u "$shortmode_path"`
24425      new_path="$input_path"
24426    fi
24427  fi
24428
24429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24430  if test "x$test_cygdrive_prefix" = x; then
24431    # As a simple fix, exclude /usr/bin since it's not a real path.
24432    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24434      # a path prefixed by /cygdrive for fixpath to work.
24435      new_path="$CYGWIN_ROOT_PATH$input_path"
24436    fi
24437  fi
24438
24439  # remove trailing .exe if any
24440  new_path="${new_path/%.exe/}"
24441
24442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24443
24444  # First separate the path from the arguments. This will split at the first
24445  # space.
24446  complete="$DUMPBIN"
24447  path="${complete%% *}"
24448  tmp="$complete EOL"
24449  arguments="${tmp#* }"
24450
24451  # Input might be given as Windows format, start by converting to
24452  # unix format.
24453  new_path="$path"
24454
24455  windows_path="$new_path"
24456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24457    unix_path=`$CYGPATH -u "$windows_path"`
24458    new_path="$unix_path"
24459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24461    new_path="$unix_path"
24462  fi
24463
24464
24465  # Now try to locate executable using which
24466  new_path=`$WHICH "$new_path" 2> /dev/null`
24467
24468  if test "x$new_path" = x; then
24469    # Oops. Which didn't find the executable.
24470    # The splitting of arguments from the executable at a space might have been incorrect,
24471    # since paths with space are more likely in Windows. Give it another try with the whole
24472    # argument.
24473    path="$complete"
24474    arguments="EOL"
24475    new_path="$path"
24476
24477  windows_path="$new_path"
24478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24479    unix_path=`$CYGPATH -u "$windows_path"`
24480    new_path="$unix_path"
24481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24483    new_path="$unix_path"
24484  fi
24485
24486
24487    new_path=`$WHICH "$new_path" 2> /dev/null`
24488
24489    if test "x$new_path" = x; then
24490      # It's still not found. Now this is an unrecoverable error.
24491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24492$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24493      has_space=`$ECHO "$complete" | $GREP " "`
24494      if test "x$has_space" != x; then
24495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24497      fi
24498      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24499    fi
24500  fi
24501
24502  # Now new_path has a complete unix path to the binary
24503  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24504    # Keep paths in /bin as-is, but remove trailing .exe if any
24505    new_path="${new_path/%.exe/}"
24506    # Do not save /bin paths to all_fixpath_prefixes!
24507  else
24508    # Not in mixed or Windows style, start by that.
24509    new_path=`cmd //c echo $new_path`
24510
24511  input_path="$new_path"
24512  # Check if we need to convert this using DOS-style short mode. If the path
24513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24514  # take no chances and rewrite it.
24515  # Note: m4 eats our [], so we need to use [ and ] instead.
24516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24517  if test "x$has_forbidden_chars" != x; then
24518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24520  fi
24521
24522    # Output is in $new_path
24523
24524  windows_path="$new_path"
24525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24526    unix_path=`$CYGPATH -u "$windows_path"`
24527    new_path="$unix_path"
24528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24530    new_path="$unix_path"
24531  fi
24532
24533    # remove trailing .exe if any
24534    new_path="${new_path/%.exe/}"
24535
24536    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24537    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24538  fi
24539
24540  else
24541    # We're on a posix platform. Hooray! :)
24542    # First separate the path from the arguments. This will split at the first
24543    # space.
24544    complete="$DUMPBIN"
24545    path="${complete%% *}"
24546    tmp="$complete EOL"
24547    arguments="${tmp#* }"
24548
24549    # Cannot rely on the command "which" here since it doesn't always work.
24550    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24551    if test -z "$is_absolute_path"; then
24552      # Path to executable is not absolute. Find it.
24553      IFS_save="$IFS"
24554      IFS=:
24555      for p in $PATH; do
24556        if test -f "$p/$path" && test -x "$p/$path"; then
24557          new_path="$p/$path"
24558          break
24559        fi
24560      done
24561      IFS="$IFS_save"
24562    else
24563      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24564$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24565      new_path="$path"
24566    fi
24567
24568    if test "x$new_path" = x; then
24569        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24570$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24571        has_space=`$ECHO "$complete" | $GREP " "`
24572        if test "x$has_space" != x; then
24573          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24574$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24575        fi
24576        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24577      fi
24578  fi
24579
24580      # Now join together the path and the arguments once again
24581      if test "x$arguments" != xEOL; then
24582        new_complete="$new_path ${arguments% *}"
24583      else
24584        new_complete="$new_path"
24585      fi
24586
24587  if test "x$complete" != "x$new_complete"; then
24588      DUMPBIN="$new_complete"
24589      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24590$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24591    fi
24592
24593
24594    COMPILER_TYPE=CL
24595    CCXXFLAGS="$CCXXFLAGS -nologo"
24596
24597fi
24598
24599
24600
24601ac_ext=c
24602ac_cpp='$CPP $CPPFLAGS'
24603ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24604ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24605ac_compiler_gnu=$ac_cv_c_compiler_gnu
24606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24607$as_echo_n "checking how to run the C preprocessor... " >&6; }
24608# On Suns, sometimes $CPP names a directory.
24609if test -n "$CPP" && test -d "$CPP"; then
24610  CPP=
24611fi
24612if test -z "$CPP"; then
24613  if test "${ac_cv_prog_CPP+set}" = set; then :
24614  $as_echo_n "(cached) " >&6
24615else
24616      # Double quotes because CPP needs to be expanded
24617    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24618    do
24619      ac_preproc_ok=false
24620for ac_c_preproc_warn_flag in '' yes
24621do
24622  # Use a header file that comes with gcc, so configuring glibc
24623  # with a fresh cross-compiler works.
24624  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24625  # <limits.h> exists even on freestanding compilers.
24626  # On the NeXT, cc -E runs the code through the compiler's parser,
24627  # not just through cpp. "Syntax error" is here to catch this case.
24628  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24629/* end confdefs.h.  */
24630#ifdef __STDC__
24631# include <limits.h>
24632#else
24633# include <assert.h>
24634#endif
24635		     Syntax error
24636_ACEOF
24637if ac_fn_c_try_cpp "$LINENO"; then :
24638
24639else
24640  # Broken: fails on valid input.
24641continue
24642fi
24643rm -f conftest.err conftest.i conftest.$ac_ext
24644
24645  # OK, works on sane cases.  Now check whether nonexistent headers
24646  # can be detected and how.
24647  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24648/* end confdefs.h.  */
24649#include <ac_nonexistent.h>
24650_ACEOF
24651if ac_fn_c_try_cpp "$LINENO"; then :
24652  # Broken: success on invalid input.
24653continue
24654else
24655  # Passes both tests.
24656ac_preproc_ok=:
24657break
24658fi
24659rm -f conftest.err conftest.i conftest.$ac_ext
24660
24661done
24662# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24663rm -f conftest.i conftest.err conftest.$ac_ext
24664if $ac_preproc_ok; then :
24665  break
24666fi
24667
24668    done
24669    ac_cv_prog_CPP=$CPP
24670
24671fi
24672  CPP=$ac_cv_prog_CPP
24673else
24674  ac_cv_prog_CPP=$CPP
24675fi
24676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24677$as_echo "$CPP" >&6; }
24678ac_preproc_ok=false
24679for ac_c_preproc_warn_flag in '' yes
24680do
24681  # Use a header file that comes with gcc, so configuring glibc
24682  # with a fresh cross-compiler works.
24683  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24684  # <limits.h> exists even on freestanding compilers.
24685  # On the NeXT, cc -E runs the code through the compiler's parser,
24686  # not just through cpp. "Syntax error" is here to catch this case.
24687  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24688/* end confdefs.h.  */
24689#ifdef __STDC__
24690# include <limits.h>
24691#else
24692# include <assert.h>
24693#endif
24694		     Syntax error
24695_ACEOF
24696if ac_fn_c_try_cpp "$LINENO"; then :
24697
24698else
24699  # Broken: fails on valid input.
24700continue
24701fi
24702rm -f conftest.err conftest.i conftest.$ac_ext
24703
24704  # OK, works on sane cases.  Now check whether nonexistent headers
24705  # can be detected and how.
24706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24707/* end confdefs.h.  */
24708#include <ac_nonexistent.h>
24709_ACEOF
24710if ac_fn_c_try_cpp "$LINENO"; then :
24711  # Broken: success on invalid input.
24712continue
24713else
24714  # Passes both tests.
24715ac_preproc_ok=:
24716break
24717fi
24718rm -f conftest.err conftest.i conftest.$ac_ext
24719
24720done
24721# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24722rm -f conftest.i conftest.err conftest.$ac_ext
24723if $ac_preproc_ok; then :
24724
24725else
24726  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24727$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24728as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24729See \`config.log' for more details" "$LINENO" 5 ; }
24730fi
24731
24732ac_ext=cpp
24733ac_cpp='$CXXCPP $CPPFLAGS'
24734ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24735ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24736ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24737
24738
24739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24740
24741  # First separate the path from the arguments. This will split at the first
24742  # space.
24743  complete="$CPP"
24744  path="${complete%% *}"
24745  tmp="$complete EOL"
24746  arguments="${tmp#* }"
24747
24748  # Input might be given as Windows format, start by converting to
24749  # unix format.
24750  new_path=`$CYGPATH -u "$path"`
24751
24752  # Now try to locate executable using which
24753  new_path=`$WHICH "$new_path" 2> /dev/null`
24754  # bat and cmd files are not always considered executable in cygwin causing which
24755  # to not find them
24756  if test "x$new_path" = x \
24757           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24758           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24759    new_path=`$CYGPATH -u "$path"`
24760  fi
24761  if test "x$new_path" = x; then
24762    # Oops. Which didn't find the executable.
24763    # The splitting of arguments from the executable at a space might have been incorrect,
24764    # since paths with space are more likely in Windows. Give it another try with the whole
24765    # argument.
24766    path="$complete"
24767    arguments="EOL"
24768    new_path=`$CYGPATH -u "$path"`
24769    new_path=`$WHICH "$new_path" 2> /dev/null`
24770    # bat and cmd files are not always considered executable in cygwin causing which
24771    # to not find them
24772    if test "x$new_path" = x \
24773             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24774             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24775      new_path=`$CYGPATH -u "$path"`
24776    fi
24777    if test "x$new_path" = x; then
24778      # It's still not found. Now this is an unrecoverable error.
24779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24780$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24781      has_space=`$ECHO "$complete" | $GREP " "`
24782      if test "x$has_space" != x; then
24783        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24784$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24785      fi
24786      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24787    fi
24788  fi
24789
24790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24793  # "foo.exe" is OK but "foo" is an error.
24794  #
24795  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24796  # It is also a way to make sure we got the proper file name for the real test later on.
24797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24798  if test "x$test_shortpath" = x; then
24799    # Short path failed, file does not exist as specified.
24800    # Try adding .exe or .cmd
24801    if test -f "${new_path}.exe"; then
24802       input_to_shortpath="${new_path}.exe"
24803    elif test -f "${new_path}.cmd"; then
24804       input_to_shortpath="${new_path}.cmd"
24805    else
24806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24807$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24808      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24809$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24810      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24811    fi
24812  else
24813    input_to_shortpath="$new_path"
24814  fi
24815
24816  # Call helper function which possibly converts this using DOS-style short mode.
24817  # If so, the updated path is stored in $new_path.
24818  new_path="$input_to_shortpath"
24819
24820  input_path="$input_to_shortpath"
24821  # Check if we need to convert this using DOS-style short mode. If the path
24822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24823  # take no chances and rewrite it.
24824  # Note: m4 eats our [], so we need to use [ and ] instead.
24825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24826  if test "x$has_forbidden_chars" != x; then
24827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24831      # Going to short mode and back again did indeed matter. Since short mode is
24832      # case insensitive, let's make it lowercase to improve readability.
24833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24834      # Now convert it back to Unix-stile (cygpath)
24835      input_path=`$CYGPATH -u "$shortmode_path"`
24836      new_path="$input_path"
24837    fi
24838  fi
24839
24840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24841  if test "x$test_cygdrive_prefix" = x; then
24842    # As a simple fix, exclude /usr/bin since it's not a real path.
24843    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24845      # a path prefixed by /cygdrive for fixpath to work.
24846      new_path="$CYGWIN_ROOT_PATH$input_path"
24847    fi
24848  fi
24849
24850  # remove trailing .exe if any
24851  new_path="${new_path/%.exe/}"
24852
24853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24854
24855  # First separate the path from the arguments. This will split at the first
24856  # space.
24857  complete="$CPP"
24858  path="${complete%% *}"
24859  tmp="$complete EOL"
24860  arguments="${tmp#* }"
24861
24862  # Input might be given as Windows format, start by converting to
24863  # unix format.
24864  new_path="$path"
24865
24866  windows_path="$new_path"
24867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24868    unix_path=`$CYGPATH -u "$windows_path"`
24869    new_path="$unix_path"
24870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24872    new_path="$unix_path"
24873  fi
24874
24875
24876  # Now try to locate executable using which
24877  new_path=`$WHICH "$new_path" 2> /dev/null`
24878
24879  if test "x$new_path" = x; then
24880    # Oops. Which didn't find the executable.
24881    # The splitting of arguments from the executable at a space might have been incorrect,
24882    # since paths with space are more likely in Windows. Give it another try with the whole
24883    # argument.
24884    path="$complete"
24885    arguments="EOL"
24886    new_path="$path"
24887
24888  windows_path="$new_path"
24889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24890    unix_path=`$CYGPATH -u "$windows_path"`
24891    new_path="$unix_path"
24892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24894    new_path="$unix_path"
24895  fi
24896
24897
24898    new_path=`$WHICH "$new_path" 2> /dev/null`
24899
24900    if test "x$new_path" = x; then
24901      # It's still not found. Now this is an unrecoverable error.
24902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24903$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24904      has_space=`$ECHO "$complete" | $GREP " "`
24905      if test "x$has_space" != x; then
24906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24908      fi
24909      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24910    fi
24911  fi
24912
24913  # Now new_path has a complete unix path to the binary
24914  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24915    # Keep paths in /bin as-is, but remove trailing .exe if any
24916    new_path="${new_path/%.exe/}"
24917    # Do not save /bin paths to all_fixpath_prefixes!
24918  else
24919    # Not in mixed or Windows style, start by that.
24920    new_path=`cmd //c echo $new_path`
24921
24922  input_path="$new_path"
24923  # Check if we need to convert this using DOS-style short mode. If the path
24924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24925  # take no chances and rewrite it.
24926  # Note: m4 eats our [], so we need to use [ and ] instead.
24927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24928  if test "x$has_forbidden_chars" != x; then
24929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24931  fi
24932
24933    # Output is in $new_path
24934
24935  windows_path="$new_path"
24936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24937    unix_path=`$CYGPATH -u "$windows_path"`
24938    new_path="$unix_path"
24939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24941    new_path="$unix_path"
24942  fi
24943
24944    # remove trailing .exe if any
24945    new_path="${new_path/%.exe/}"
24946
24947    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24948    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24949  fi
24950
24951  else
24952    # We're on a posix platform. Hooray! :)
24953    # First separate the path from the arguments. This will split at the first
24954    # space.
24955    complete="$CPP"
24956    path="${complete%% *}"
24957    tmp="$complete EOL"
24958    arguments="${tmp#* }"
24959
24960    # Cannot rely on the command "which" here since it doesn't always work.
24961    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24962    if test -z "$is_absolute_path"; then
24963      # Path to executable is not absolute. Find it.
24964      IFS_save="$IFS"
24965      IFS=:
24966      for p in $PATH; do
24967        if test -f "$p/$path" && test -x "$p/$path"; then
24968          new_path="$p/$path"
24969          break
24970        fi
24971      done
24972      IFS="$IFS_save"
24973    else
24974      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24975$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24976      new_path="$path"
24977    fi
24978
24979    if test "x$new_path" = x; then
24980        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24981$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24982        has_space=`$ECHO "$complete" | $GREP " "`
24983        if test "x$has_space" != x; then
24984          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24985$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24986        fi
24987        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24988      fi
24989  fi
24990
24991      # Now join together the path and the arguments once again
24992      if test "x$arguments" != xEOL; then
24993        new_complete="$new_path ${arguments% *}"
24994      else
24995        new_complete="$new_path"
24996      fi
24997
24998  if test "x$complete" != "x$new_complete"; then
24999      CPP="$new_complete"
25000      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
25001$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
25002    fi
25003
25004
25005ac_ext=cpp
25006ac_cpp='$CXXCPP $CPPFLAGS'
25007ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25008ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25009ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
25011$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
25012if test -z "$CXXCPP"; then
25013  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
25014  $as_echo_n "(cached) " >&6
25015else
25016      # Double quotes because CXXCPP needs to be expanded
25017    for CXXCPP in "$CXX -E" "/lib/cpp"
25018    do
25019      ac_preproc_ok=false
25020for ac_cxx_preproc_warn_flag in '' yes
25021do
25022  # Use a header file that comes with gcc, so configuring glibc
25023  # with a fresh cross-compiler works.
25024  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25025  # <limits.h> exists even on freestanding compilers.
25026  # On the NeXT, cc -E runs the code through the compiler's parser,
25027  # not just through cpp. "Syntax error" is here to catch this case.
25028  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25029/* end confdefs.h.  */
25030#ifdef __STDC__
25031# include <limits.h>
25032#else
25033# include <assert.h>
25034#endif
25035		     Syntax error
25036_ACEOF
25037if ac_fn_cxx_try_cpp "$LINENO"; then :
25038
25039else
25040  # Broken: fails on valid input.
25041continue
25042fi
25043rm -f conftest.err conftest.i conftest.$ac_ext
25044
25045  # OK, works on sane cases.  Now check whether nonexistent headers
25046  # can be detected and how.
25047  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25048/* end confdefs.h.  */
25049#include <ac_nonexistent.h>
25050_ACEOF
25051if ac_fn_cxx_try_cpp "$LINENO"; then :
25052  # Broken: success on invalid input.
25053continue
25054else
25055  # Passes both tests.
25056ac_preproc_ok=:
25057break
25058fi
25059rm -f conftest.err conftest.i conftest.$ac_ext
25060
25061done
25062# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25063rm -f conftest.i conftest.err conftest.$ac_ext
25064if $ac_preproc_ok; then :
25065  break
25066fi
25067
25068    done
25069    ac_cv_prog_CXXCPP=$CXXCPP
25070
25071fi
25072  CXXCPP=$ac_cv_prog_CXXCPP
25073else
25074  ac_cv_prog_CXXCPP=$CXXCPP
25075fi
25076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25077$as_echo "$CXXCPP" >&6; }
25078ac_preproc_ok=false
25079for ac_cxx_preproc_warn_flag in '' yes
25080do
25081  # Use a header file that comes with gcc, so configuring glibc
25082  # with a fresh cross-compiler works.
25083  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25084  # <limits.h> exists even on freestanding compilers.
25085  # On the NeXT, cc -E runs the code through the compiler's parser,
25086  # not just through cpp. "Syntax error" is here to catch this case.
25087  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25088/* end confdefs.h.  */
25089#ifdef __STDC__
25090# include <limits.h>
25091#else
25092# include <assert.h>
25093#endif
25094		     Syntax error
25095_ACEOF
25096if ac_fn_cxx_try_cpp "$LINENO"; then :
25097
25098else
25099  # Broken: fails on valid input.
25100continue
25101fi
25102rm -f conftest.err conftest.i conftest.$ac_ext
25103
25104  # OK, works on sane cases.  Now check whether nonexistent headers
25105  # can be detected and how.
25106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25107/* end confdefs.h.  */
25108#include <ac_nonexistent.h>
25109_ACEOF
25110if ac_fn_cxx_try_cpp "$LINENO"; then :
25111  # Broken: success on invalid input.
25112continue
25113else
25114  # Passes both tests.
25115ac_preproc_ok=:
25116break
25117fi
25118rm -f conftest.err conftest.i conftest.$ac_ext
25119
25120done
25121# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25122rm -f conftest.i conftest.err conftest.$ac_ext
25123if $ac_preproc_ok; then :
25124
25125else
25126  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25128as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25129See \`config.log' for more details" "$LINENO" 5 ; }
25130fi
25131
25132ac_ext=cpp
25133ac_cpp='$CXXCPP $CPPFLAGS'
25134ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25135ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25136ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25137
25138
25139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25140
25141  # First separate the path from the arguments. This will split at the first
25142  # space.
25143  complete="$CXXCPP"
25144  path="${complete%% *}"
25145  tmp="$complete EOL"
25146  arguments="${tmp#* }"
25147
25148  # Input might be given as Windows format, start by converting to
25149  # unix format.
25150  new_path=`$CYGPATH -u "$path"`
25151
25152  # Now try to locate executable using which
25153  new_path=`$WHICH "$new_path" 2> /dev/null`
25154  # bat and cmd files are not always considered executable in cygwin causing which
25155  # to not find them
25156  if test "x$new_path" = x \
25157           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25158           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25159    new_path=`$CYGPATH -u "$path"`
25160  fi
25161  if test "x$new_path" = x; then
25162    # Oops. Which didn't find the executable.
25163    # The splitting of arguments from the executable at a space might have been incorrect,
25164    # since paths with space are more likely in Windows. Give it another try with the whole
25165    # argument.
25166    path="$complete"
25167    arguments="EOL"
25168    new_path=`$CYGPATH -u "$path"`
25169    new_path=`$WHICH "$new_path" 2> /dev/null`
25170    # bat and cmd files are not always considered executable in cygwin causing which
25171    # to not find them
25172    if test "x$new_path" = x \
25173             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25174             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25175      new_path=`$CYGPATH -u "$path"`
25176    fi
25177    if test "x$new_path" = x; then
25178      # It's still not found. Now this is an unrecoverable error.
25179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25180$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25181      has_space=`$ECHO "$complete" | $GREP " "`
25182      if test "x$has_space" != x; then
25183        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25184$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25185      fi
25186      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25187    fi
25188  fi
25189
25190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25193  # "foo.exe" is OK but "foo" is an error.
25194  #
25195  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25196  # It is also a way to make sure we got the proper file name for the real test later on.
25197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25198  if test "x$test_shortpath" = x; then
25199    # Short path failed, file does not exist as specified.
25200    # Try adding .exe or .cmd
25201    if test -f "${new_path}.exe"; then
25202       input_to_shortpath="${new_path}.exe"
25203    elif test -f "${new_path}.cmd"; then
25204       input_to_shortpath="${new_path}.cmd"
25205    else
25206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25207$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25208      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25209$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25210      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25211    fi
25212  else
25213    input_to_shortpath="$new_path"
25214  fi
25215
25216  # Call helper function which possibly converts this using DOS-style short mode.
25217  # If so, the updated path is stored in $new_path.
25218  new_path="$input_to_shortpath"
25219
25220  input_path="$input_to_shortpath"
25221  # Check if we need to convert this using DOS-style short mode. If the path
25222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25223  # take no chances and rewrite it.
25224  # Note: m4 eats our [], so we need to use [ and ] instead.
25225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25226  if test "x$has_forbidden_chars" != x; then
25227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25231      # Going to short mode and back again did indeed matter. Since short mode is
25232      # case insensitive, let's make it lowercase to improve readability.
25233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25234      # Now convert it back to Unix-stile (cygpath)
25235      input_path=`$CYGPATH -u "$shortmode_path"`
25236      new_path="$input_path"
25237    fi
25238  fi
25239
25240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25241  if test "x$test_cygdrive_prefix" = x; then
25242    # As a simple fix, exclude /usr/bin since it's not a real path.
25243    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25245      # a path prefixed by /cygdrive for fixpath to work.
25246      new_path="$CYGWIN_ROOT_PATH$input_path"
25247    fi
25248  fi
25249
25250  # remove trailing .exe if any
25251  new_path="${new_path/%.exe/}"
25252
25253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25254
25255  # First separate the path from the arguments. This will split at the first
25256  # space.
25257  complete="$CXXCPP"
25258  path="${complete%% *}"
25259  tmp="$complete EOL"
25260  arguments="${tmp#* }"
25261
25262  # Input might be given as Windows format, start by converting to
25263  # unix format.
25264  new_path="$path"
25265
25266  windows_path="$new_path"
25267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25268    unix_path=`$CYGPATH -u "$windows_path"`
25269    new_path="$unix_path"
25270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25272    new_path="$unix_path"
25273  fi
25274
25275
25276  # Now try to locate executable using which
25277  new_path=`$WHICH "$new_path" 2> /dev/null`
25278
25279  if test "x$new_path" = x; then
25280    # Oops. Which didn't find the executable.
25281    # The splitting of arguments from the executable at a space might have been incorrect,
25282    # since paths with space are more likely in Windows. Give it another try with the whole
25283    # argument.
25284    path="$complete"
25285    arguments="EOL"
25286    new_path="$path"
25287
25288  windows_path="$new_path"
25289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25290    unix_path=`$CYGPATH -u "$windows_path"`
25291    new_path="$unix_path"
25292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25294    new_path="$unix_path"
25295  fi
25296
25297
25298    new_path=`$WHICH "$new_path" 2> /dev/null`
25299
25300    if test "x$new_path" = x; then
25301      # It's still not found. Now this is an unrecoverable error.
25302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25303$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25304      has_space=`$ECHO "$complete" | $GREP " "`
25305      if test "x$has_space" != x; then
25306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25308      fi
25309      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25310    fi
25311  fi
25312
25313  # Now new_path has a complete unix path to the binary
25314  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25315    # Keep paths in /bin as-is, but remove trailing .exe if any
25316    new_path="${new_path/%.exe/}"
25317    # Do not save /bin paths to all_fixpath_prefixes!
25318  else
25319    # Not in mixed or Windows style, start by that.
25320    new_path=`cmd //c echo $new_path`
25321
25322  input_path="$new_path"
25323  # Check if we need to convert this using DOS-style short mode. If the path
25324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25325  # take no chances and rewrite it.
25326  # Note: m4 eats our [], so we need to use [ and ] instead.
25327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25328  if test "x$has_forbidden_chars" != x; then
25329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25331  fi
25332
25333    # Output is in $new_path
25334
25335  windows_path="$new_path"
25336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25337    unix_path=`$CYGPATH -u "$windows_path"`
25338    new_path="$unix_path"
25339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25341    new_path="$unix_path"
25342  fi
25343
25344    # remove trailing .exe if any
25345    new_path="${new_path/%.exe/}"
25346
25347    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25348    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25349  fi
25350
25351  else
25352    # We're on a posix platform. Hooray! :)
25353    # First separate the path from the arguments. This will split at the first
25354    # space.
25355    complete="$CXXCPP"
25356    path="${complete%% *}"
25357    tmp="$complete EOL"
25358    arguments="${tmp#* }"
25359
25360    # Cannot rely on the command "which" here since it doesn't always work.
25361    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25362    if test -z "$is_absolute_path"; then
25363      # Path to executable is not absolute. Find it.
25364      IFS_save="$IFS"
25365      IFS=:
25366      for p in $PATH; do
25367        if test -f "$p/$path" && test -x "$p/$path"; then
25368          new_path="$p/$path"
25369          break
25370        fi
25371      done
25372      IFS="$IFS_save"
25373    else
25374      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25375$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25376      new_path="$path"
25377    fi
25378
25379    if test "x$new_path" = x; then
25380        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25381$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25382        has_space=`$ECHO "$complete" | $GREP " "`
25383        if test "x$has_space" != x; then
25384          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25385$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25386        fi
25387        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25388      fi
25389  fi
25390
25391      # Now join together the path and the arguments once again
25392      if test "x$arguments" != xEOL; then
25393        new_complete="$new_path ${arguments% *}"
25394      else
25395        new_complete="$new_path"
25396      fi
25397
25398  if test "x$complete" != "x$new_complete"; then
25399      CXXCPP="$new_complete"
25400      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25401$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25402    fi
25403
25404
25405if test "x$COMPILE_TYPE" != "xcross"; then
25406    # If we are not cross compiling, use the same compilers for
25407    # building the build platform executables. The cross-compilation
25408    # case needed to be done earlier, but this can only be done after
25409    # the native tools have been localized.
25410    BUILD_CC="$CC"
25411    BUILD_CXX="$CXX"
25412    BUILD_LD="$LD"
25413fi
25414
25415# for solaris we really need solaris tools, and not gnu equivalent
25416#   these seems to normally reside in /usr/ccs/bin so add that to path before
25417#   starting to probe
25418#
25419#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25420#         so that it can be overriden --with-tools-dir
25421if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25422    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25423fi
25424
25425# Find the right assembler.
25426if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25427    # Extract the first word of "as", so it can be a program name with args.
25428set dummy as; ac_word=$2
25429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25430$as_echo_n "checking for $ac_word... " >&6; }
25431if test "${ac_cv_path_AS+set}" = set; then :
25432  $as_echo_n "(cached) " >&6
25433else
25434  case $AS in
25435  [\\/]* | ?:[\\/]*)
25436  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25437  ;;
25438  *)
25439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25440for as_dir in $PATH
25441do
25442  IFS=$as_save_IFS
25443  test -z "$as_dir" && as_dir=.
25444    for ac_exec_ext in '' $ac_executable_extensions; do
25445  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25446    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25448    break 2
25449  fi
25450done
25451  done
25452IFS=$as_save_IFS
25453
25454  ;;
25455esac
25456fi
25457AS=$ac_cv_path_AS
25458if test -n "$AS"; then
25459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25460$as_echo "$AS" >&6; }
25461else
25462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25463$as_echo "no" >&6; }
25464fi
25465
25466
25467
25468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25469
25470  # First separate the path from the arguments. This will split at the first
25471  # space.
25472  complete="$AS"
25473  path="${complete%% *}"
25474  tmp="$complete EOL"
25475  arguments="${tmp#* }"
25476
25477  # Input might be given as Windows format, start by converting to
25478  # unix format.
25479  new_path=`$CYGPATH -u "$path"`
25480
25481  # Now try to locate executable using which
25482  new_path=`$WHICH "$new_path" 2> /dev/null`
25483  # bat and cmd files are not always considered executable in cygwin causing which
25484  # to not find them
25485  if test "x$new_path" = x \
25486           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25487           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25488    new_path=`$CYGPATH -u "$path"`
25489  fi
25490  if test "x$new_path" = x; then
25491    # Oops. Which didn't find the executable.
25492    # The splitting of arguments from the executable at a space might have been incorrect,
25493    # since paths with space are more likely in Windows. Give it another try with the whole
25494    # argument.
25495    path="$complete"
25496    arguments="EOL"
25497    new_path=`$CYGPATH -u "$path"`
25498    new_path=`$WHICH "$new_path" 2> /dev/null`
25499    # bat and cmd files are not always considered executable in cygwin causing which
25500    # to not find them
25501    if test "x$new_path" = x \
25502             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25503             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25504      new_path=`$CYGPATH -u "$path"`
25505    fi
25506    if test "x$new_path" = x; then
25507      # It's still not found. Now this is an unrecoverable error.
25508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25509$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25510      has_space=`$ECHO "$complete" | $GREP " "`
25511      if test "x$has_space" != x; then
25512        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25513$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25514      fi
25515      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25516    fi
25517  fi
25518
25519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25522  # "foo.exe" is OK but "foo" is an error.
25523  #
25524  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25525  # It is also a way to make sure we got the proper file name for the real test later on.
25526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25527  if test "x$test_shortpath" = x; then
25528    # Short path failed, file does not exist as specified.
25529    # Try adding .exe or .cmd
25530    if test -f "${new_path}.exe"; then
25531       input_to_shortpath="${new_path}.exe"
25532    elif test -f "${new_path}.cmd"; then
25533       input_to_shortpath="${new_path}.cmd"
25534    else
25535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25536$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25537      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25538$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25539      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25540    fi
25541  else
25542    input_to_shortpath="$new_path"
25543  fi
25544
25545  # Call helper function which possibly converts this using DOS-style short mode.
25546  # If so, the updated path is stored in $new_path.
25547  new_path="$input_to_shortpath"
25548
25549  input_path="$input_to_shortpath"
25550  # Check if we need to convert this using DOS-style short mode. If the path
25551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25552  # take no chances and rewrite it.
25553  # Note: m4 eats our [], so we need to use [ and ] instead.
25554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25555  if test "x$has_forbidden_chars" != x; then
25556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25560      # Going to short mode and back again did indeed matter. Since short mode is
25561      # case insensitive, let's make it lowercase to improve readability.
25562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25563      # Now convert it back to Unix-stile (cygpath)
25564      input_path=`$CYGPATH -u "$shortmode_path"`
25565      new_path="$input_path"
25566    fi
25567  fi
25568
25569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25570  if test "x$test_cygdrive_prefix" = x; then
25571    # As a simple fix, exclude /usr/bin since it's not a real path.
25572    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25574      # a path prefixed by /cygdrive for fixpath to work.
25575      new_path="$CYGWIN_ROOT_PATH$input_path"
25576    fi
25577  fi
25578
25579  # remove trailing .exe if any
25580  new_path="${new_path/%.exe/}"
25581
25582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25583
25584  # First separate the path from the arguments. This will split at the first
25585  # space.
25586  complete="$AS"
25587  path="${complete%% *}"
25588  tmp="$complete EOL"
25589  arguments="${tmp#* }"
25590
25591  # Input might be given as Windows format, start by converting to
25592  # unix format.
25593  new_path="$path"
25594
25595  windows_path="$new_path"
25596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25597    unix_path=`$CYGPATH -u "$windows_path"`
25598    new_path="$unix_path"
25599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25601    new_path="$unix_path"
25602  fi
25603
25604
25605  # Now try to locate executable using which
25606  new_path=`$WHICH "$new_path" 2> /dev/null`
25607
25608  if test "x$new_path" = x; then
25609    # Oops. Which didn't find the executable.
25610    # The splitting of arguments from the executable at a space might have been incorrect,
25611    # since paths with space are more likely in Windows. Give it another try with the whole
25612    # argument.
25613    path="$complete"
25614    arguments="EOL"
25615    new_path="$path"
25616
25617  windows_path="$new_path"
25618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25619    unix_path=`$CYGPATH -u "$windows_path"`
25620    new_path="$unix_path"
25621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25623    new_path="$unix_path"
25624  fi
25625
25626
25627    new_path=`$WHICH "$new_path" 2> /dev/null`
25628
25629    if test "x$new_path" = x; then
25630      # It's still not found. Now this is an unrecoverable error.
25631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25632$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25633      has_space=`$ECHO "$complete" | $GREP " "`
25634      if test "x$has_space" != x; then
25635        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25636$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25637      fi
25638      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25639    fi
25640  fi
25641
25642  # Now new_path has a complete unix path to the binary
25643  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25644    # Keep paths in /bin as-is, but remove trailing .exe if any
25645    new_path="${new_path/%.exe/}"
25646    # Do not save /bin paths to all_fixpath_prefixes!
25647  else
25648    # Not in mixed or Windows style, start by that.
25649    new_path=`cmd //c echo $new_path`
25650
25651  input_path="$new_path"
25652  # Check if we need to convert this using DOS-style short mode. If the path
25653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25654  # take no chances and rewrite it.
25655  # Note: m4 eats our [], so we need to use [ and ] instead.
25656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25657  if test "x$has_forbidden_chars" != x; then
25658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25660  fi
25661
25662    # Output is in $new_path
25663
25664  windows_path="$new_path"
25665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25666    unix_path=`$CYGPATH -u "$windows_path"`
25667    new_path="$unix_path"
25668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25670    new_path="$unix_path"
25671  fi
25672
25673    # remove trailing .exe if any
25674    new_path="${new_path/%.exe/}"
25675
25676    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25677    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25678  fi
25679
25680  else
25681    # We're on a posix platform. Hooray! :)
25682    # First separate the path from the arguments. This will split at the first
25683    # space.
25684    complete="$AS"
25685    path="${complete%% *}"
25686    tmp="$complete EOL"
25687    arguments="${tmp#* }"
25688
25689    # Cannot rely on the command "which" here since it doesn't always work.
25690    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25691    if test -z "$is_absolute_path"; then
25692      # Path to executable is not absolute. Find it.
25693      IFS_save="$IFS"
25694      IFS=:
25695      for p in $PATH; do
25696        if test -f "$p/$path" && test -x "$p/$path"; then
25697          new_path="$p/$path"
25698          break
25699        fi
25700      done
25701      IFS="$IFS_save"
25702    else
25703      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25704$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25705      new_path="$path"
25706    fi
25707
25708    if test "x$new_path" = x; then
25709        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25710$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25711        has_space=`$ECHO "$complete" | $GREP " "`
25712        if test "x$has_space" != x; then
25713          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25714$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25715        fi
25716        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25717      fi
25718  fi
25719
25720      # Now join together the path and the arguments once again
25721      if test "x$arguments" != xEOL; then
25722        new_complete="$new_path ${arguments% *}"
25723      else
25724        new_complete="$new_path"
25725      fi
25726
25727  if test "x$complete" != "x$new_complete"; then
25728      AS="$new_complete"
25729      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25730$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25731    fi
25732
25733else
25734    AS="$CC -c"
25735fi
25736
25737
25738if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25739    # Extract the first word of "nm", so it can be a program name with args.
25740set dummy nm; ac_word=$2
25741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25742$as_echo_n "checking for $ac_word... " >&6; }
25743if test "${ac_cv_path_NM+set}" = set; then :
25744  $as_echo_n "(cached) " >&6
25745else
25746  case $NM in
25747  [\\/]* | ?:[\\/]*)
25748  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25749  ;;
25750  *)
25751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25752for as_dir in $PATH
25753do
25754  IFS=$as_save_IFS
25755  test -z "$as_dir" && as_dir=.
25756    for ac_exec_ext in '' $ac_executable_extensions; do
25757  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25758    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25760    break 2
25761  fi
25762done
25763  done
25764IFS=$as_save_IFS
25765
25766  ;;
25767esac
25768fi
25769NM=$ac_cv_path_NM
25770if test -n "$NM"; then
25771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25772$as_echo "$NM" >&6; }
25773else
25774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25775$as_echo "no" >&6; }
25776fi
25777
25778
25779
25780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25781
25782  # First separate the path from the arguments. This will split at the first
25783  # space.
25784  complete="$NM"
25785  path="${complete%% *}"
25786  tmp="$complete EOL"
25787  arguments="${tmp#* }"
25788
25789  # Input might be given as Windows format, start by converting to
25790  # unix format.
25791  new_path=`$CYGPATH -u "$path"`
25792
25793  # Now try to locate executable using which
25794  new_path=`$WHICH "$new_path" 2> /dev/null`
25795  # bat and cmd files are not always considered executable in cygwin causing which
25796  # to not find them
25797  if test "x$new_path" = x \
25798           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25799           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25800    new_path=`$CYGPATH -u "$path"`
25801  fi
25802  if test "x$new_path" = x; then
25803    # Oops. Which didn't find the executable.
25804    # The splitting of arguments from the executable at a space might have been incorrect,
25805    # since paths with space are more likely in Windows. Give it another try with the whole
25806    # argument.
25807    path="$complete"
25808    arguments="EOL"
25809    new_path=`$CYGPATH -u "$path"`
25810    new_path=`$WHICH "$new_path" 2> /dev/null`
25811    # bat and cmd files are not always considered executable in cygwin causing which
25812    # to not find them
25813    if test "x$new_path" = x \
25814             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25815             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25816      new_path=`$CYGPATH -u "$path"`
25817    fi
25818    if test "x$new_path" = x; then
25819      # It's still not found. Now this is an unrecoverable error.
25820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25821$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25822      has_space=`$ECHO "$complete" | $GREP " "`
25823      if test "x$has_space" != x; then
25824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25826      fi
25827      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25828    fi
25829  fi
25830
25831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25834  # "foo.exe" is OK but "foo" is an error.
25835  #
25836  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25837  # It is also a way to make sure we got the proper file name for the real test later on.
25838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25839  if test "x$test_shortpath" = x; then
25840    # Short path failed, file does not exist as specified.
25841    # Try adding .exe or .cmd
25842    if test -f "${new_path}.exe"; then
25843       input_to_shortpath="${new_path}.exe"
25844    elif test -f "${new_path}.cmd"; then
25845       input_to_shortpath="${new_path}.cmd"
25846    else
25847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25848$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25849      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25850$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25851      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25852    fi
25853  else
25854    input_to_shortpath="$new_path"
25855  fi
25856
25857  # Call helper function which possibly converts this using DOS-style short mode.
25858  # If so, the updated path is stored in $new_path.
25859  new_path="$input_to_shortpath"
25860
25861  input_path="$input_to_shortpath"
25862  # Check if we need to convert this using DOS-style short mode. If the path
25863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25864  # take no chances and rewrite it.
25865  # Note: m4 eats our [], so we need to use [ and ] instead.
25866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25867  if test "x$has_forbidden_chars" != x; then
25868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25872      # Going to short mode and back again did indeed matter. Since short mode is
25873      # case insensitive, let's make it lowercase to improve readability.
25874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25875      # Now convert it back to Unix-stile (cygpath)
25876      input_path=`$CYGPATH -u "$shortmode_path"`
25877      new_path="$input_path"
25878    fi
25879  fi
25880
25881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25882  if test "x$test_cygdrive_prefix" = x; then
25883    # As a simple fix, exclude /usr/bin since it's not a real path.
25884    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25886      # a path prefixed by /cygdrive for fixpath to work.
25887      new_path="$CYGWIN_ROOT_PATH$input_path"
25888    fi
25889  fi
25890
25891  # remove trailing .exe if any
25892  new_path="${new_path/%.exe/}"
25893
25894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25895
25896  # First separate the path from the arguments. This will split at the first
25897  # space.
25898  complete="$NM"
25899  path="${complete%% *}"
25900  tmp="$complete EOL"
25901  arguments="${tmp#* }"
25902
25903  # Input might be given as Windows format, start by converting to
25904  # unix format.
25905  new_path="$path"
25906
25907  windows_path="$new_path"
25908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25909    unix_path=`$CYGPATH -u "$windows_path"`
25910    new_path="$unix_path"
25911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25913    new_path="$unix_path"
25914  fi
25915
25916
25917  # Now try to locate executable using which
25918  new_path=`$WHICH "$new_path" 2> /dev/null`
25919
25920  if test "x$new_path" = x; then
25921    # Oops. Which didn't find the executable.
25922    # The splitting of arguments from the executable at a space might have been incorrect,
25923    # since paths with space are more likely in Windows. Give it another try with the whole
25924    # argument.
25925    path="$complete"
25926    arguments="EOL"
25927    new_path="$path"
25928
25929  windows_path="$new_path"
25930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25931    unix_path=`$CYGPATH -u "$windows_path"`
25932    new_path="$unix_path"
25933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25935    new_path="$unix_path"
25936  fi
25937
25938
25939    new_path=`$WHICH "$new_path" 2> /dev/null`
25940
25941    if test "x$new_path" = x; then
25942      # It's still not found. Now this is an unrecoverable error.
25943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25944$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25945      has_space=`$ECHO "$complete" | $GREP " "`
25946      if test "x$has_space" != x; then
25947        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25948$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25949      fi
25950      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25951    fi
25952  fi
25953
25954  # Now new_path has a complete unix path to the binary
25955  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25956    # Keep paths in /bin as-is, but remove trailing .exe if any
25957    new_path="${new_path/%.exe/}"
25958    # Do not save /bin paths to all_fixpath_prefixes!
25959  else
25960    # Not in mixed or Windows style, start by that.
25961    new_path=`cmd //c echo $new_path`
25962
25963  input_path="$new_path"
25964  # Check if we need to convert this using DOS-style short mode. If the path
25965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25966  # take no chances and rewrite it.
25967  # Note: m4 eats our [], so we need to use [ and ] instead.
25968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25969  if test "x$has_forbidden_chars" != x; then
25970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25971    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25972  fi
25973
25974    # Output is in $new_path
25975
25976  windows_path="$new_path"
25977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25978    unix_path=`$CYGPATH -u "$windows_path"`
25979    new_path="$unix_path"
25980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25982    new_path="$unix_path"
25983  fi
25984
25985    # remove trailing .exe if any
25986    new_path="${new_path/%.exe/}"
25987
25988    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25989    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25990  fi
25991
25992  else
25993    # We're on a posix platform. Hooray! :)
25994    # First separate the path from the arguments. This will split at the first
25995    # space.
25996    complete="$NM"
25997    path="${complete%% *}"
25998    tmp="$complete EOL"
25999    arguments="${tmp#* }"
26000
26001    # Cannot rely on the command "which" here since it doesn't always work.
26002    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26003    if test -z "$is_absolute_path"; then
26004      # Path to executable is not absolute. Find it.
26005      IFS_save="$IFS"
26006      IFS=:
26007      for p in $PATH; do
26008        if test -f "$p/$path" && test -x "$p/$path"; then
26009          new_path="$p/$path"
26010          break
26011        fi
26012      done
26013      IFS="$IFS_save"
26014    else
26015      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26016$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26017      new_path="$path"
26018    fi
26019
26020    if test "x$new_path" = x; then
26021        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26022$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26023        has_space=`$ECHO "$complete" | $GREP " "`
26024        if test "x$has_space" != x; then
26025          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26026$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26027        fi
26028        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26029      fi
26030  fi
26031
26032      # Now join together the path and the arguments once again
26033      if test "x$arguments" != xEOL; then
26034        new_complete="$new_path ${arguments% *}"
26035      else
26036        new_complete="$new_path"
26037      fi
26038
26039  if test "x$complete" != "x$new_complete"; then
26040      NM="$new_complete"
26041      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26042$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26043    fi
26044
26045    # Extract the first word of "gnm", so it can be a program name with args.
26046set dummy gnm; ac_word=$2
26047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26048$as_echo_n "checking for $ac_word... " >&6; }
26049if test "${ac_cv_path_GNM+set}" = set; then :
26050  $as_echo_n "(cached) " >&6
26051else
26052  case $GNM in
26053  [\\/]* | ?:[\\/]*)
26054  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26055  ;;
26056  *)
26057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26058for as_dir in $PATH
26059do
26060  IFS=$as_save_IFS
26061  test -z "$as_dir" && as_dir=.
26062    for ac_exec_ext in '' $ac_executable_extensions; do
26063  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26064    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26066    break 2
26067  fi
26068done
26069  done
26070IFS=$as_save_IFS
26071
26072  ;;
26073esac
26074fi
26075GNM=$ac_cv_path_GNM
26076if test -n "$GNM"; then
26077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26078$as_echo "$GNM" >&6; }
26079else
26080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26081$as_echo "no" >&6; }
26082fi
26083
26084
26085
26086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26087
26088  # First separate the path from the arguments. This will split at the first
26089  # space.
26090  complete="$GNM"
26091  path="${complete%% *}"
26092  tmp="$complete EOL"
26093  arguments="${tmp#* }"
26094
26095  # Input might be given as Windows format, start by converting to
26096  # unix format.
26097  new_path=`$CYGPATH -u "$path"`
26098
26099  # Now try to locate executable using which
26100  new_path=`$WHICH "$new_path" 2> /dev/null`
26101  # bat and cmd files are not always considered executable in cygwin causing which
26102  # to not find them
26103  if test "x$new_path" = x \
26104           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26105           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26106    new_path=`$CYGPATH -u "$path"`
26107  fi
26108  if test "x$new_path" = x; then
26109    # Oops. Which didn't find the executable.
26110    # The splitting of arguments from the executable at a space might have been incorrect,
26111    # since paths with space are more likely in Windows. Give it another try with the whole
26112    # argument.
26113    path="$complete"
26114    arguments="EOL"
26115    new_path=`$CYGPATH -u "$path"`
26116    new_path=`$WHICH "$new_path" 2> /dev/null`
26117    # bat and cmd files are not always considered executable in cygwin causing which
26118    # to not find them
26119    if test "x$new_path" = x \
26120             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26121             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26122      new_path=`$CYGPATH -u "$path"`
26123    fi
26124    if test "x$new_path" = x; then
26125      # It's still not found. Now this is an unrecoverable error.
26126      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26127$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26128      has_space=`$ECHO "$complete" | $GREP " "`
26129      if test "x$has_space" != x; then
26130        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26131$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26132      fi
26133      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26134    fi
26135  fi
26136
26137  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26138  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26139  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26140  # "foo.exe" is OK but "foo" is an error.
26141  #
26142  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26143  # It is also a way to make sure we got the proper file name for the real test later on.
26144  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26145  if test "x$test_shortpath" = x; then
26146    # Short path failed, file does not exist as specified.
26147    # Try adding .exe or .cmd
26148    if test -f "${new_path}.exe"; then
26149       input_to_shortpath="${new_path}.exe"
26150    elif test -f "${new_path}.cmd"; then
26151       input_to_shortpath="${new_path}.cmd"
26152    else
26153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26154$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26155      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26156$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26157      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26158    fi
26159  else
26160    input_to_shortpath="$new_path"
26161  fi
26162
26163  # Call helper function which possibly converts this using DOS-style short mode.
26164  # If so, the updated path is stored in $new_path.
26165  new_path="$input_to_shortpath"
26166
26167  input_path="$input_to_shortpath"
26168  # Check if we need to convert this using DOS-style short mode. If the path
26169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26170  # take no chances and rewrite it.
26171  # Note: m4 eats our [], so we need to use [ and ] instead.
26172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26173  if test "x$has_forbidden_chars" != x; then
26174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26178      # Going to short mode and back again did indeed matter. Since short mode is
26179      # case insensitive, let's make it lowercase to improve readability.
26180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26181      # Now convert it back to Unix-stile (cygpath)
26182      input_path=`$CYGPATH -u "$shortmode_path"`
26183      new_path="$input_path"
26184    fi
26185  fi
26186
26187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26188  if test "x$test_cygdrive_prefix" = x; then
26189    # As a simple fix, exclude /usr/bin since it's not a real path.
26190    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26192      # a path prefixed by /cygdrive for fixpath to work.
26193      new_path="$CYGWIN_ROOT_PATH$input_path"
26194    fi
26195  fi
26196
26197  # remove trailing .exe if any
26198  new_path="${new_path/%.exe/}"
26199
26200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26201
26202  # First separate the path from the arguments. This will split at the first
26203  # space.
26204  complete="$GNM"
26205  path="${complete%% *}"
26206  tmp="$complete EOL"
26207  arguments="${tmp#* }"
26208
26209  # Input might be given as Windows format, start by converting to
26210  # unix format.
26211  new_path="$path"
26212
26213  windows_path="$new_path"
26214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26215    unix_path=`$CYGPATH -u "$windows_path"`
26216    new_path="$unix_path"
26217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26219    new_path="$unix_path"
26220  fi
26221
26222
26223  # Now try to locate executable using which
26224  new_path=`$WHICH "$new_path" 2> /dev/null`
26225
26226  if test "x$new_path" = x; then
26227    # Oops. Which didn't find the executable.
26228    # The splitting of arguments from the executable at a space might have been incorrect,
26229    # since paths with space are more likely in Windows. Give it another try with the whole
26230    # argument.
26231    path="$complete"
26232    arguments="EOL"
26233    new_path="$path"
26234
26235  windows_path="$new_path"
26236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26237    unix_path=`$CYGPATH -u "$windows_path"`
26238    new_path="$unix_path"
26239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26241    new_path="$unix_path"
26242  fi
26243
26244
26245    new_path=`$WHICH "$new_path" 2> /dev/null`
26246
26247    if test "x$new_path" = x; then
26248      # It's still not found. Now this is an unrecoverable error.
26249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26250$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26251      has_space=`$ECHO "$complete" | $GREP " "`
26252      if test "x$has_space" != x; then
26253        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26254$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26255      fi
26256      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26257    fi
26258  fi
26259
26260  # Now new_path has a complete unix path to the binary
26261  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26262    # Keep paths in /bin as-is, but remove trailing .exe if any
26263    new_path="${new_path/%.exe/}"
26264    # Do not save /bin paths to all_fixpath_prefixes!
26265  else
26266    # Not in mixed or Windows style, start by that.
26267    new_path=`cmd //c echo $new_path`
26268
26269  input_path="$new_path"
26270  # Check if we need to convert this using DOS-style short mode. If the path
26271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26272  # take no chances and rewrite it.
26273  # Note: m4 eats our [], so we need to use [ and ] instead.
26274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26275  if test "x$has_forbidden_chars" != x; then
26276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26278  fi
26279
26280    # Output is in $new_path
26281
26282  windows_path="$new_path"
26283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26284    unix_path=`$CYGPATH -u "$windows_path"`
26285    new_path="$unix_path"
26286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26288    new_path="$unix_path"
26289  fi
26290
26291    # remove trailing .exe if any
26292    new_path="${new_path/%.exe/}"
26293
26294    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26295    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26296  fi
26297
26298  else
26299    # We're on a posix platform. Hooray! :)
26300    # First separate the path from the arguments. This will split at the first
26301    # space.
26302    complete="$GNM"
26303    path="${complete%% *}"
26304    tmp="$complete EOL"
26305    arguments="${tmp#* }"
26306
26307    # Cannot rely on the command "which" here since it doesn't always work.
26308    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26309    if test -z "$is_absolute_path"; then
26310      # Path to executable is not absolute. Find it.
26311      IFS_save="$IFS"
26312      IFS=:
26313      for p in $PATH; do
26314        if test -f "$p/$path" && test -x "$p/$path"; then
26315          new_path="$p/$path"
26316          break
26317        fi
26318      done
26319      IFS="$IFS_save"
26320    else
26321      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26322$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26323      new_path="$path"
26324    fi
26325
26326    if test "x$new_path" = x; then
26327        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26328$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26329        has_space=`$ECHO "$complete" | $GREP " "`
26330        if test "x$has_space" != x; then
26331          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26332$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26333        fi
26334        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26335      fi
26336  fi
26337
26338      # Now join together the path and the arguments once again
26339      if test "x$arguments" != xEOL; then
26340        new_complete="$new_path ${arguments% *}"
26341      else
26342        new_complete="$new_path"
26343      fi
26344
26345  if test "x$complete" != "x$new_complete"; then
26346      GNM="$new_complete"
26347      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26348$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26349    fi
26350
26351    # Extract the first word of "strip", so it can be a program name with args.
26352set dummy strip; ac_word=$2
26353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26354$as_echo_n "checking for $ac_word... " >&6; }
26355if test "${ac_cv_path_STRIP+set}" = set; then :
26356  $as_echo_n "(cached) " >&6
26357else
26358  case $STRIP in
26359  [\\/]* | ?:[\\/]*)
26360  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26361  ;;
26362  *)
26363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26364for as_dir in $PATH
26365do
26366  IFS=$as_save_IFS
26367  test -z "$as_dir" && as_dir=.
26368    for ac_exec_ext in '' $ac_executable_extensions; do
26369  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26370    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26372    break 2
26373  fi
26374done
26375  done
26376IFS=$as_save_IFS
26377
26378  ;;
26379esac
26380fi
26381STRIP=$ac_cv_path_STRIP
26382if test -n "$STRIP"; then
26383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26384$as_echo "$STRIP" >&6; }
26385else
26386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26387$as_echo "no" >&6; }
26388fi
26389
26390
26391
26392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26393
26394  # First separate the path from the arguments. This will split at the first
26395  # space.
26396  complete="$STRIP"
26397  path="${complete%% *}"
26398  tmp="$complete EOL"
26399  arguments="${tmp#* }"
26400
26401  # Input might be given as Windows format, start by converting to
26402  # unix format.
26403  new_path=`$CYGPATH -u "$path"`
26404
26405  # Now try to locate executable using which
26406  new_path=`$WHICH "$new_path" 2> /dev/null`
26407  # bat and cmd files are not always considered executable in cygwin causing which
26408  # to not find them
26409  if test "x$new_path" = x \
26410           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26411           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26412    new_path=`$CYGPATH -u "$path"`
26413  fi
26414  if test "x$new_path" = x; then
26415    # Oops. Which didn't find the executable.
26416    # The splitting of arguments from the executable at a space might have been incorrect,
26417    # since paths with space are more likely in Windows. Give it another try with the whole
26418    # argument.
26419    path="$complete"
26420    arguments="EOL"
26421    new_path=`$CYGPATH -u "$path"`
26422    new_path=`$WHICH "$new_path" 2> /dev/null`
26423    # bat and cmd files are not always considered executable in cygwin causing which
26424    # to not find them
26425    if test "x$new_path" = x \
26426             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26427             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26428      new_path=`$CYGPATH -u "$path"`
26429    fi
26430    if test "x$new_path" = x; then
26431      # It's still not found. Now this is an unrecoverable error.
26432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26433$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26434      has_space=`$ECHO "$complete" | $GREP " "`
26435      if test "x$has_space" != x; then
26436        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26437$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26438      fi
26439      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26440    fi
26441  fi
26442
26443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26446  # "foo.exe" is OK but "foo" is an error.
26447  #
26448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26449  # It is also a way to make sure we got the proper file name for the real test later on.
26450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26451  if test "x$test_shortpath" = x; then
26452    # Short path failed, file does not exist as specified.
26453    # Try adding .exe or .cmd
26454    if test -f "${new_path}.exe"; then
26455       input_to_shortpath="${new_path}.exe"
26456    elif test -f "${new_path}.cmd"; then
26457       input_to_shortpath="${new_path}.cmd"
26458    else
26459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26460$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26461      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26462$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26463      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26464    fi
26465  else
26466    input_to_shortpath="$new_path"
26467  fi
26468
26469  # Call helper function which possibly converts this using DOS-style short mode.
26470  # If so, the updated path is stored in $new_path.
26471  new_path="$input_to_shortpath"
26472
26473  input_path="$input_to_shortpath"
26474  # Check if we need to convert this using DOS-style short mode. If the path
26475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26476  # take no chances and rewrite it.
26477  # Note: m4 eats our [], so we need to use [ and ] instead.
26478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26479  if test "x$has_forbidden_chars" != x; then
26480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26481    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26482    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26483    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26484      # Going to short mode and back again did indeed matter. Since short mode is
26485      # case insensitive, let's make it lowercase to improve readability.
26486      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26487      # Now convert it back to Unix-stile (cygpath)
26488      input_path=`$CYGPATH -u "$shortmode_path"`
26489      new_path="$input_path"
26490    fi
26491  fi
26492
26493  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26494  if test "x$test_cygdrive_prefix" = x; then
26495    # As a simple fix, exclude /usr/bin since it's not a real path.
26496    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26497      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26498      # a path prefixed by /cygdrive for fixpath to work.
26499      new_path="$CYGWIN_ROOT_PATH$input_path"
26500    fi
26501  fi
26502
26503  # remove trailing .exe if any
26504  new_path="${new_path/%.exe/}"
26505
26506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26507
26508  # First separate the path from the arguments. This will split at the first
26509  # space.
26510  complete="$STRIP"
26511  path="${complete%% *}"
26512  tmp="$complete EOL"
26513  arguments="${tmp#* }"
26514
26515  # Input might be given as Windows format, start by converting to
26516  # unix format.
26517  new_path="$path"
26518
26519  windows_path="$new_path"
26520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26521    unix_path=`$CYGPATH -u "$windows_path"`
26522    new_path="$unix_path"
26523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26525    new_path="$unix_path"
26526  fi
26527
26528
26529  # Now try to locate executable using which
26530  new_path=`$WHICH "$new_path" 2> /dev/null`
26531
26532  if test "x$new_path" = x; then
26533    # Oops. Which didn't find the executable.
26534    # The splitting of arguments from the executable at a space might have been incorrect,
26535    # since paths with space are more likely in Windows. Give it another try with the whole
26536    # argument.
26537    path="$complete"
26538    arguments="EOL"
26539    new_path="$path"
26540
26541  windows_path="$new_path"
26542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26543    unix_path=`$CYGPATH -u "$windows_path"`
26544    new_path="$unix_path"
26545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26547    new_path="$unix_path"
26548  fi
26549
26550
26551    new_path=`$WHICH "$new_path" 2> /dev/null`
26552
26553    if test "x$new_path" = x; then
26554      # It's still not found. Now this is an unrecoverable error.
26555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26556$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26557      has_space=`$ECHO "$complete" | $GREP " "`
26558      if test "x$has_space" != x; then
26559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26561      fi
26562      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26563    fi
26564  fi
26565
26566  # Now new_path has a complete unix path to the binary
26567  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26568    # Keep paths in /bin as-is, but remove trailing .exe if any
26569    new_path="${new_path/%.exe/}"
26570    # Do not save /bin paths to all_fixpath_prefixes!
26571  else
26572    # Not in mixed or Windows style, start by that.
26573    new_path=`cmd //c echo $new_path`
26574
26575  input_path="$new_path"
26576  # Check if we need to convert this using DOS-style short mode. If the path
26577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26578  # take no chances and rewrite it.
26579  # Note: m4 eats our [], so we need to use [ and ] instead.
26580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26581  if test "x$has_forbidden_chars" != x; then
26582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26584  fi
26585
26586    # Output is in $new_path
26587
26588  windows_path="$new_path"
26589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26590    unix_path=`$CYGPATH -u "$windows_path"`
26591    new_path="$unix_path"
26592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26594    new_path="$unix_path"
26595  fi
26596
26597    # remove trailing .exe if any
26598    new_path="${new_path/%.exe/}"
26599
26600    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26601    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26602  fi
26603
26604  else
26605    # We're on a posix platform. Hooray! :)
26606    # First separate the path from the arguments. This will split at the first
26607    # space.
26608    complete="$STRIP"
26609    path="${complete%% *}"
26610    tmp="$complete EOL"
26611    arguments="${tmp#* }"
26612
26613    # Cannot rely on the command "which" here since it doesn't always work.
26614    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26615    if test -z "$is_absolute_path"; then
26616      # Path to executable is not absolute. Find it.
26617      IFS_save="$IFS"
26618      IFS=:
26619      for p in $PATH; do
26620        if test -f "$p/$path" && test -x "$p/$path"; then
26621          new_path="$p/$path"
26622          break
26623        fi
26624      done
26625      IFS="$IFS_save"
26626    else
26627      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26628$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26629      new_path="$path"
26630    fi
26631
26632    if test "x$new_path" = x; then
26633        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26634$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26635        has_space=`$ECHO "$complete" | $GREP " "`
26636        if test "x$has_space" != x; then
26637          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26638$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26639        fi
26640        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26641      fi
26642  fi
26643
26644      # Now join together the path and the arguments once again
26645      if test "x$arguments" != xEOL; then
26646        new_complete="$new_path ${arguments% *}"
26647      else
26648        new_complete="$new_path"
26649      fi
26650
26651  if test "x$complete" != "x$new_complete"; then
26652      STRIP="$new_complete"
26653      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26654$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26655    fi
26656
26657    # Extract the first word of "mcs", so it can be a program name with args.
26658set dummy mcs; ac_word=$2
26659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26660$as_echo_n "checking for $ac_word... " >&6; }
26661if test "${ac_cv_path_MCS+set}" = set; then :
26662  $as_echo_n "(cached) " >&6
26663else
26664  case $MCS in
26665  [\\/]* | ?:[\\/]*)
26666  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26667  ;;
26668  *)
26669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26670for as_dir in $PATH
26671do
26672  IFS=$as_save_IFS
26673  test -z "$as_dir" && as_dir=.
26674    for ac_exec_ext in '' $ac_executable_extensions; do
26675  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26676    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26678    break 2
26679  fi
26680done
26681  done
26682IFS=$as_save_IFS
26683
26684  ;;
26685esac
26686fi
26687MCS=$ac_cv_path_MCS
26688if test -n "$MCS"; then
26689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26690$as_echo "$MCS" >&6; }
26691else
26692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26693$as_echo "no" >&6; }
26694fi
26695
26696
26697
26698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26699
26700  # First separate the path from the arguments. This will split at the first
26701  # space.
26702  complete="$MCS"
26703  path="${complete%% *}"
26704  tmp="$complete EOL"
26705  arguments="${tmp#* }"
26706
26707  # Input might be given as Windows format, start by converting to
26708  # unix format.
26709  new_path=`$CYGPATH -u "$path"`
26710
26711  # Now try to locate executable using which
26712  new_path=`$WHICH "$new_path" 2> /dev/null`
26713  # bat and cmd files are not always considered executable in cygwin causing which
26714  # to not find them
26715  if test "x$new_path" = x \
26716           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26717           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26718    new_path=`$CYGPATH -u "$path"`
26719  fi
26720  if test "x$new_path" = x; then
26721    # Oops. Which didn't find the executable.
26722    # The splitting of arguments from the executable at a space might have been incorrect,
26723    # since paths with space are more likely in Windows. Give it another try with the whole
26724    # argument.
26725    path="$complete"
26726    arguments="EOL"
26727    new_path=`$CYGPATH -u "$path"`
26728    new_path=`$WHICH "$new_path" 2> /dev/null`
26729    # bat and cmd files are not always considered executable in cygwin causing which
26730    # to not find them
26731    if test "x$new_path" = x \
26732             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26733             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26734      new_path=`$CYGPATH -u "$path"`
26735    fi
26736    if test "x$new_path" = x; then
26737      # It's still not found. Now this is an unrecoverable error.
26738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26739$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26740      has_space=`$ECHO "$complete" | $GREP " "`
26741      if test "x$has_space" != x; then
26742        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26743$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26744      fi
26745      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26746    fi
26747  fi
26748
26749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26752  # "foo.exe" is OK but "foo" is an error.
26753  #
26754  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26755  # It is also a way to make sure we got the proper file name for the real test later on.
26756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26757  if test "x$test_shortpath" = x; then
26758    # Short path failed, file does not exist as specified.
26759    # Try adding .exe or .cmd
26760    if test -f "${new_path}.exe"; then
26761       input_to_shortpath="${new_path}.exe"
26762    elif test -f "${new_path}.cmd"; then
26763       input_to_shortpath="${new_path}.cmd"
26764    else
26765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26766$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26767      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26768$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26769      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26770    fi
26771  else
26772    input_to_shortpath="$new_path"
26773  fi
26774
26775  # Call helper function which possibly converts this using DOS-style short mode.
26776  # If so, the updated path is stored in $new_path.
26777  new_path="$input_to_shortpath"
26778
26779  input_path="$input_to_shortpath"
26780  # Check if we need to convert this using DOS-style short mode. If the path
26781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26782  # take no chances and rewrite it.
26783  # Note: m4 eats our [], so we need to use [ and ] instead.
26784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26785  if test "x$has_forbidden_chars" != x; then
26786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26790      # Going to short mode and back again did indeed matter. Since short mode is
26791      # case insensitive, let's make it lowercase to improve readability.
26792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26793      # Now convert it back to Unix-stile (cygpath)
26794      input_path=`$CYGPATH -u "$shortmode_path"`
26795      new_path="$input_path"
26796    fi
26797  fi
26798
26799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26800  if test "x$test_cygdrive_prefix" = x; then
26801    # As a simple fix, exclude /usr/bin since it's not a real path.
26802    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26804      # a path prefixed by /cygdrive for fixpath to work.
26805      new_path="$CYGWIN_ROOT_PATH$input_path"
26806    fi
26807  fi
26808
26809  # remove trailing .exe if any
26810  new_path="${new_path/%.exe/}"
26811
26812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26813
26814  # First separate the path from the arguments. This will split at the first
26815  # space.
26816  complete="$MCS"
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="$path"
26824
26825  windows_path="$new_path"
26826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26827    unix_path=`$CYGPATH -u "$windows_path"`
26828    new_path="$unix_path"
26829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26831    new_path="$unix_path"
26832  fi
26833
26834
26835  # Now try to locate executable using which
26836  new_path=`$WHICH "$new_path" 2> /dev/null`
26837
26838  if test "x$new_path" = x; then
26839    # Oops. Which didn't find the executable.
26840    # The splitting of arguments from the executable at a space might have been incorrect,
26841    # since paths with space are more likely in Windows. Give it another try with the whole
26842    # argument.
26843    path="$complete"
26844    arguments="EOL"
26845    new_path="$path"
26846
26847  windows_path="$new_path"
26848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26849    unix_path=`$CYGPATH -u "$windows_path"`
26850    new_path="$unix_path"
26851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26853    new_path="$unix_path"
26854  fi
26855
26856
26857    new_path=`$WHICH "$new_path" 2> /dev/null`
26858
26859    if test "x$new_path" = x; then
26860      # It's still not found. Now this is an unrecoverable error.
26861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26862$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26863      has_space=`$ECHO "$complete" | $GREP " "`
26864      if test "x$has_space" != x; then
26865        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26866$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26867      fi
26868      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26869    fi
26870  fi
26871
26872  # Now new_path has a complete unix path to the binary
26873  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26874    # Keep paths in /bin as-is, but remove trailing .exe if any
26875    new_path="${new_path/%.exe/}"
26876    # Do not save /bin paths to all_fixpath_prefixes!
26877  else
26878    # Not in mixed or Windows style, start by that.
26879    new_path=`cmd //c echo $new_path`
26880
26881  input_path="$new_path"
26882  # Check if we need to convert this using DOS-style short mode. If the path
26883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26884  # take no chances and rewrite it.
26885  # Note: m4 eats our [], so we need to use [ and ] instead.
26886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26887  if test "x$has_forbidden_chars" != x; then
26888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26890  fi
26891
26892    # Output is in $new_path
26893
26894  windows_path="$new_path"
26895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26896    unix_path=`$CYGPATH -u "$windows_path"`
26897    new_path="$unix_path"
26898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26900    new_path="$unix_path"
26901  fi
26902
26903    # remove trailing .exe if any
26904    new_path="${new_path/%.exe/}"
26905
26906    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26907    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26908  fi
26909
26910  else
26911    # We're on a posix platform. Hooray! :)
26912    # First separate the path from the arguments. This will split at the first
26913    # space.
26914    complete="$MCS"
26915    path="${complete%% *}"
26916    tmp="$complete EOL"
26917    arguments="${tmp#* }"
26918
26919    # Cannot rely on the command "which" here since it doesn't always work.
26920    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26921    if test -z "$is_absolute_path"; then
26922      # Path to executable is not absolute. Find it.
26923      IFS_save="$IFS"
26924      IFS=:
26925      for p in $PATH; do
26926        if test -f "$p/$path" && test -x "$p/$path"; then
26927          new_path="$p/$path"
26928          break
26929        fi
26930      done
26931      IFS="$IFS_save"
26932    else
26933      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26934$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26935      new_path="$path"
26936    fi
26937
26938    if test "x$new_path" = x; then
26939        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26940$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26941        has_space=`$ECHO "$complete" | $GREP " "`
26942        if test "x$has_space" != x; then
26943          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26944$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26945        fi
26946        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26947      fi
26948  fi
26949
26950      # Now join together the path and the arguments once again
26951      if test "x$arguments" != xEOL; then
26952        new_complete="$new_path ${arguments% *}"
26953      else
26954        new_complete="$new_path"
26955      fi
26956
26957  if test "x$complete" != "x$new_complete"; then
26958      MCS="$new_complete"
26959      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26960$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26961    fi
26962
26963elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26964    if test -n "$ac_tool_prefix"; then
26965  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26966set dummy ${ac_tool_prefix}nm; ac_word=$2
26967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26968$as_echo_n "checking for $ac_word... " >&6; }
26969if test "${ac_cv_prog_NM+set}" = set; then :
26970  $as_echo_n "(cached) " >&6
26971else
26972  if test -n "$NM"; then
26973  ac_cv_prog_NM="$NM" # Let the user override the test.
26974else
26975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26976for as_dir in $PATH
26977do
26978  IFS=$as_save_IFS
26979  test -z "$as_dir" && as_dir=.
26980    for ac_exec_ext in '' $ac_executable_extensions; do
26981  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26982    ac_cv_prog_NM="${ac_tool_prefix}nm"
26983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26984    break 2
26985  fi
26986done
26987  done
26988IFS=$as_save_IFS
26989
26990fi
26991fi
26992NM=$ac_cv_prog_NM
26993if test -n "$NM"; then
26994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26995$as_echo "$NM" >&6; }
26996else
26997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26998$as_echo "no" >&6; }
26999fi
27000
27001
27002fi
27003if test -z "$ac_cv_prog_NM"; then
27004  ac_ct_NM=$NM
27005  # Extract the first word of "nm", so it can be a program name with args.
27006set dummy nm; ac_word=$2
27007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27008$as_echo_n "checking for $ac_word... " >&6; }
27009if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
27010  $as_echo_n "(cached) " >&6
27011else
27012  if test -n "$ac_ct_NM"; then
27013  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
27014else
27015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27016for as_dir in $PATH
27017do
27018  IFS=$as_save_IFS
27019  test -z "$as_dir" && as_dir=.
27020    for ac_exec_ext in '' $ac_executable_extensions; do
27021  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27022    ac_cv_prog_ac_ct_NM="nm"
27023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27024    break 2
27025  fi
27026done
27027  done
27028IFS=$as_save_IFS
27029
27030fi
27031fi
27032ac_ct_NM=$ac_cv_prog_ac_ct_NM
27033if test -n "$ac_ct_NM"; then
27034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
27035$as_echo "$ac_ct_NM" >&6; }
27036else
27037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27038$as_echo "no" >&6; }
27039fi
27040
27041  if test "x$ac_ct_NM" = x; then
27042    NM=""
27043  else
27044    case $cross_compiling:$ac_tool_warned in
27045yes:)
27046{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27047$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27048ac_tool_warned=yes ;;
27049esac
27050    NM=$ac_ct_NM
27051  fi
27052else
27053  NM="$ac_cv_prog_NM"
27054fi
27055
27056
27057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27058
27059  # First separate the path from the arguments. This will split at the first
27060  # space.
27061  complete="$NM"
27062  path="${complete%% *}"
27063  tmp="$complete EOL"
27064  arguments="${tmp#* }"
27065
27066  # Input might be given as Windows format, start by converting to
27067  # unix format.
27068  new_path=`$CYGPATH -u "$path"`
27069
27070  # Now try to locate executable using which
27071  new_path=`$WHICH "$new_path" 2> /dev/null`
27072  # bat and cmd files are not always considered executable in cygwin causing which
27073  # to not find them
27074  if test "x$new_path" = x \
27075           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27076           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27077    new_path=`$CYGPATH -u "$path"`
27078  fi
27079  if test "x$new_path" = x; then
27080    # Oops. Which didn't find the executable.
27081    # The splitting of arguments from the executable at a space might have been incorrect,
27082    # since paths with space are more likely in Windows. Give it another try with the whole
27083    # argument.
27084    path="$complete"
27085    arguments="EOL"
27086    new_path=`$CYGPATH -u "$path"`
27087    new_path=`$WHICH "$new_path" 2> /dev/null`
27088    # bat and cmd files are not always considered executable in cygwin causing which
27089    # to not find them
27090    if test "x$new_path" = x \
27091             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27092             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27093      new_path=`$CYGPATH -u "$path"`
27094    fi
27095    if test "x$new_path" = x; then
27096      # It's still not found. Now this is an unrecoverable error.
27097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27098$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27099      has_space=`$ECHO "$complete" | $GREP " "`
27100      if test "x$has_space" != x; then
27101        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27102$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27103      fi
27104      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27105    fi
27106  fi
27107
27108  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27109  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27110  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27111  # "foo.exe" is OK but "foo" is an error.
27112  #
27113  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27114  # It is also a way to make sure we got the proper file name for the real test later on.
27115  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27116  if test "x$test_shortpath" = x; then
27117    # Short path failed, file does not exist as specified.
27118    # Try adding .exe or .cmd
27119    if test -f "${new_path}.exe"; then
27120       input_to_shortpath="${new_path}.exe"
27121    elif test -f "${new_path}.cmd"; then
27122       input_to_shortpath="${new_path}.cmd"
27123    else
27124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27125$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27126      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27127$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27128      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27129    fi
27130  else
27131    input_to_shortpath="$new_path"
27132  fi
27133
27134  # Call helper function which possibly converts this using DOS-style short mode.
27135  # If so, the updated path is stored in $new_path.
27136  new_path="$input_to_shortpath"
27137
27138  input_path="$input_to_shortpath"
27139  # Check if we need to convert this using DOS-style short mode. If the path
27140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27141  # take no chances and rewrite it.
27142  # Note: m4 eats our [], so we need to use [ and ] instead.
27143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27144  if test "x$has_forbidden_chars" != x; then
27145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27149      # Going to short mode and back again did indeed matter. Since short mode is
27150      # case insensitive, let's make it lowercase to improve readability.
27151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27152      # Now convert it back to Unix-stile (cygpath)
27153      input_path=`$CYGPATH -u "$shortmode_path"`
27154      new_path="$input_path"
27155    fi
27156  fi
27157
27158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27159  if test "x$test_cygdrive_prefix" = x; then
27160    # As a simple fix, exclude /usr/bin since it's not a real path.
27161    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27163      # a path prefixed by /cygdrive for fixpath to work.
27164      new_path="$CYGWIN_ROOT_PATH$input_path"
27165    fi
27166  fi
27167
27168  # remove trailing .exe if any
27169  new_path="${new_path/%.exe/}"
27170
27171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27172
27173  # First separate the path from the arguments. This will split at the first
27174  # space.
27175  complete="$NM"
27176  path="${complete%% *}"
27177  tmp="$complete EOL"
27178  arguments="${tmp#* }"
27179
27180  # Input might be given as Windows format, start by converting to
27181  # unix format.
27182  new_path="$path"
27183
27184  windows_path="$new_path"
27185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27186    unix_path=`$CYGPATH -u "$windows_path"`
27187    new_path="$unix_path"
27188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27190    new_path="$unix_path"
27191  fi
27192
27193
27194  # Now try to locate executable using which
27195  new_path=`$WHICH "$new_path" 2> /dev/null`
27196
27197  if test "x$new_path" = x; then
27198    # Oops. Which didn't find the executable.
27199    # The splitting of arguments from the executable at a space might have been incorrect,
27200    # since paths with space are more likely in Windows. Give it another try with the whole
27201    # argument.
27202    path="$complete"
27203    arguments="EOL"
27204    new_path="$path"
27205
27206  windows_path="$new_path"
27207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27208    unix_path=`$CYGPATH -u "$windows_path"`
27209    new_path="$unix_path"
27210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27212    new_path="$unix_path"
27213  fi
27214
27215
27216    new_path=`$WHICH "$new_path" 2> /dev/null`
27217
27218    if test "x$new_path" = x; then
27219      # It's still not found. Now this is an unrecoverable error.
27220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27221$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27222      has_space=`$ECHO "$complete" | $GREP " "`
27223      if test "x$has_space" != x; then
27224        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27225$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27226      fi
27227      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27228    fi
27229  fi
27230
27231  # Now new_path has a complete unix path to the binary
27232  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27233    # Keep paths in /bin as-is, but remove trailing .exe if any
27234    new_path="${new_path/%.exe/}"
27235    # Do not save /bin paths to all_fixpath_prefixes!
27236  else
27237    # Not in mixed or Windows style, start by that.
27238    new_path=`cmd //c echo $new_path`
27239
27240  input_path="$new_path"
27241  # Check if we need to convert this using DOS-style short mode. If the path
27242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27243  # take no chances and rewrite it.
27244  # Note: m4 eats our [], so we need to use [ and ] instead.
27245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27246  if test "x$has_forbidden_chars" != x; then
27247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27249  fi
27250
27251    # Output is in $new_path
27252
27253  windows_path="$new_path"
27254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27255    unix_path=`$CYGPATH -u "$windows_path"`
27256    new_path="$unix_path"
27257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27259    new_path="$unix_path"
27260  fi
27261
27262    # remove trailing .exe if any
27263    new_path="${new_path/%.exe/}"
27264
27265    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27266    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27267  fi
27268
27269  else
27270    # We're on a posix platform. Hooray! :)
27271    # First separate the path from the arguments. This will split at the first
27272    # space.
27273    complete="$NM"
27274    path="${complete%% *}"
27275    tmp="$complete EOL"
27276    arguments="${tmp#* }"
27277
27278    # Cannot rely on the command "which" here since it doesn't always work.
27279    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27280    if test -z "$is_absolute_path"; then
27281      # Path to executable is not absolute. Find it.
27282      IFS_save="$IFS"
27283      IFS=:
27284      for p in $PATH; do
27285        if test -f "$p/$path" && test -x "$p/$path"; then
27286          new_path="$p/$path"
27287          break
27288        fi
27289      done
27290      IFS="$IFS_save"
27291    else
27292      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27293$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27294      new_path="$path"
27295    fi
27296
27297    if test "x$new_path" = x; then
27298        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27299$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27300        has_space=`$ECHO "$complete" | $GREP " "`
27301        if test "x$has_space" != x; then
27302          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27303$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27304        fi
27305        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27306      fi
27307  fi
27308
27309      # Now join together the path and the arguments once again
27310      if test "x$arguments" != xEOL; then
27311        new_complete="$new_path ${arguments% *}"
27312      else
27313        new_complete="$new_path"
27314      fi
27315
27316  if test "x$complete" != "x$new_complete"; then
27317      NM="$new_complete"
27318      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27319$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27320    fi
27321
27322    GNM="$NM"
27323
27324    if test -n "$ac_tool_prefix"; then
27325  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27326set dummy ${ac_tool_prefix}strip; ac_word=$2
27327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27328$as_echo_n "checking for $ac_word... " >&6; }
27329if test "${ac_cv_prog_STRIP+set}" = set; then :
27330  $as_echo_n "(cached) " >&6
27331else
27332  if test -n "$STRIP"; then
27333  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27334else
27335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27336for as_dir in $PATH
27337do
27338  IFS=$as_save_IFS
27339  test -z "$as_dir" && as_dir=.
27340    for ac_exec_ext in '' $ac_executable_extensions; do
27341  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27342    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27344    break 2
27345  fi
27346done
27347  done
27348IFS=$as_save_IFS
27349
27350fi
27351fi
27352STRIP=$ac_cv_prog_STRIP
27353if test -n "$STRIP"; then
27354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27355$as_echo "$STRIP" >&6; }
27356else
27357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27358$as_echo "no" >&6; }
27359fi
27360
27361
27362fi
27363if test -z "$ac_cv_prog_STRIP"; then
27364  ac_ct_STRIP=$STRIP
27365  # Extract the first word of "strip", so it can be a program name with args.
27366set dummy strip; ac_word=$2
27367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27368$as_echo_n "checking for $ac_word... " >&6; }
27369if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
27370  $as_echo_n "(cached) " >&6
27371else
27372  if test -n "$ac_ct_STRIP"; then
27373  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27374else
27375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27376for as_dir in $PATH
27377do
27378  IFS=$as_save_IFS
27379  test -z "$as_dir" && as_dir=.
27380    for ac_exec_ext in '' $ac_executable_extensions; do
27381  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27382    ac_cv_prog_ac_ct_STRIP="strip"
27383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27384    break 2
27385  fi
27386done
27387  done
27388IFS=$as_save_IFS
27389
27390fi
27391fi
27392ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27393if test -n "$ac_ct_STRIP"; then
27394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27395$as_echo "$ac_ct_STRIP" >&6; }
27396else
27397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27398$as_echo "no" >&6; }
27399fi
27400
27401  if test "x$ac_ct_STRIP" = x; then
27402    STRIP=""
27403  else
27404    case $cross_compiling:$ac_tool_warned in
27405yes:)
27406{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27407$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27408ac_tool_warned=yes ;;
27409esac
27410    STRIP=$ac_ct_STRIP
27411  fi
27412else
27413  STRIP="$ac_cv_prog_STRIP"
27414fi
27415
27416
27417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27418
27419  # First separate the path from the arguments. This will split at the first
27420  # space.
27421  complete="$STRIP"
27422  path="${complete%% *}"
27423  tmp="$complete EOL"
27424  arguments="${tmp#* }"
27425
27426  # Input might be given as Windows format, start by converting to
27427  # unix format.
27428  new_path=`$CYGPATH -u "$path"`
27429
27430  # Now try to locate executable using which
27431  new_path=`$WHICH "$new_path" 2> /dev/null`
27432  # bat and cmd files are not always considered executable in cygwin causing which
27433  # to not find them
27434  if test "x$new_path" = x \
27435           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27436           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27437    new_path=`$CYGPATH -u "$path"`
27438  fi
27439  if test "x$new_path" = x; then
27440    # Oops. Which didn't find the executable.
27441    # The splitting of arguments from the executable at a space might have been incorrect,
27442    # since paths with space are more likely in Windows. Give it another try with the whole
27443    # argument.
27444    path="$complete"
27445    arguments="EOL"
27446    new_path=`$CYGPATH -u "$path"`
27447    new_path=`$WHICH "$new_path" 2> /dev/null`
27448    # bat and cmd files are not always considered executable in cygwin causing which
27449    # to not find them
27450    if test "x$new_path" = x \
27451             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27452             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27453      new_path=`$CYGPATH -u "$path"`
27454    fi
27455    if test "x$new_path" = x; then
27456      # It's still not found. Now this is an unrecoverable error.
27457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27458$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27459      has_space=`$ECHO "$complete" | $GREP " "`
27460      if test "x$has_space" != x; then
27461        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27462$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27463      fi
27464      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27465    fi
27466  fi
27467
27468  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27469  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27470  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27471  # "foo.exe" is OK but "foo" is an error.
27472  #
27473  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27474  # It is also a way to make sure we got the proper file name for the real test later on.
27475  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27476  if test "x$test_shortpath" = x; then
27477    # Short path failed, file does not exist as specified.
27478    # Try adding .exe or .cmd
27479    if test -f "${new_path}.exe"; then
27480       input_to_shortpath="${new_path}.exe"
27481    elif test -f "${new_path}.cmd"; then
27482       input_to_shortpath="${new_path}.cmd"
27483    else
27484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27485$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27486      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27487$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27488      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27489    fi
27490  else
27491    input_to_shortpath="$new_path"
27492  fi
27493
27494  # Call helper function which possibly converts this using DOS-style short mode.
27495  # If so, the updated path is stored in $new_path.
27496  new_path="$input_to_shortpath"
27497
27498  input_path="$input_to_shortpath"
27499  # Check if we need to convert this using DOS-style short mode. If the path
27500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27501  # take no chances and rewrite it.
27502  # Note: m4 eats our [], so we need to use [ and ] instead.
27503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27504  if test "x$has_forbidden_chars" != x; then
27505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27509      # Going to short mode and back again did indeed matter. Since short mode is
27510      # case insensitive, let's make it lowercase to improve readability.
27511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27512      # Now convert it back to Unix-stile (cygpath)
27513      input_path=`$CYGPATH -u "$shortmode_path"`
27514      new_path="$input_path"
27515    fi
27516  fi
27517
27518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27519  if test "x$test_cygdrive_prefix" = x; then
27520    # As a simple fix, exclude /usr/bin since it's not a real path.
27521    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27523      # a path prefixed by /cygdrive for fixpath to work.
27524      new_path="$CYGWIN_ROOT_PATH$input_path"
27525    fi
27526  fi
27527
27528  # remove trailing .exe if any
27529  new_path="${new_path/%.exe/}"
27530
27531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27532
27533  # First separate the path from the arguments. This will split at the first
27534  # space.
27535  complete="$STRIP"
27536  path="${complete%% *}"
27537  tmp="$complete EOL"
27538  arguments="${tmp#* }"
27539
27540  # Input might be given as Windows format, start by converting to
27541  # unix format.
27542  new_path="$path"
27543
27544  windows_path="$new_path"
27545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27546    unix_path=`$CYGPATH -u "$windows_path"`
27547    new_path="$unix_path"
27548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27550    new_path="$unix_path"
27551  fi
27552
27553
27554  # Now try to locate executable using which
27555  new_path=`$WHICH "$new_path" 2> /dev/null`
27556
27557  if test "x$new_path" = x; then
27558    # Oops. Which didn't find the executable.
27559    # The splitting of arguments from the executable at a space might have been incorrect,
27560    # since paths with space are more likely in Windows. Give it another try with the whole
27561    # argument.
27562    path="$complete"
27563    arguments="EOL"
27564    new_path="$path"
27565
27566  windows_path="$new_path"
27567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27568    unix_path=`$CYGPATH -u "$windows_path"`
27569    new_path="$unix_path"
27570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27572    new_path="$unix_path"
27573  fi
27574
27575
27576    new_path=`$WHICH "$new_path" 2> /dev/null`
27577
27578    if test "x$new_path" = x; then
27579      # It's still not found. Now this is an unrecoverable error.
27580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27581$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27582      has_space=`$ECHO "$complete" | $GREP " "`
27583      if test "x$has_space" != x; then
27584        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27585$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27586      fi
27587      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27588    fi
27589  fi
27590
27591  # Now new_path has a complete unix path to the binary
27592  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27593    # Keep paths in /bin as-is, but remove trailing .exe if any
27594    new_path="${new_path/%.exe/}"
27595    # Do not save /bin paths to all_fixpath_prefixes!
27596  else
27597    # Not in mixed or Windows style, start by that.
27598    new_path=`cmd //c echo $new_path`
27599
27600  input_path="$new_path"
27601  # Check if we need to convert this using DOS-style short mode. If the path
27602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27603  # take no chances and rewrite it.
27604  # Note: m4 eats our [], so we need to use [ and ] instead.
27605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27606  if test "x$has_forbidden_chars" != x; then
27607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27608    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27609  fi
27610
27611    # Output is in $new_path
27612
27613  windows_path="$new_path"
27614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27615    unix_path=`$CYGPATH -u "$windows_path"`
27616    new_path="$unix_path"
27617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27619    new_path="$unix_path"
27620  fi
27621
27622    # remove trailing .exe if any
27623    new_path="${new_path/%.exe/}"
27624
27625    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27626    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27627  fi
27628
27629  else
27630    # We're on a posix platform. Hooray! :)
27631    # First separate the path from the arguments. This will split at the first
27632    # space.
27633    complete="$STRIP"
27634    path="${complete%% *}"
27635    tmp="$complete EOL"
27636    arguments="${tmp#* }"
27637
27638    # Cannot rely on the command "which" here since it doesn't always work.
27639    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27640    if test -z "$is_absolute_path"; then
27641      # Path to executable is not absolute. Find it.
27642      IFS_save="$IFS"
27643      IFS=:
27644      for p in $PATH; do
27645        if test -f "$p/$path" && test -x "$p/$path"; then
27646          new_path="$p/$path"
27647          break
27648        fi
27649      done
27650      IFS="$IFS_save"
27651    else
27652      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27653$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27654      new_path="$path"
27655    fi
27656
27657    if test "x$new_path" = x; then
27658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27659$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27660        has_space=`$ECHO "$complete" | $GREP " "`
27661        if test "x$has_space" != x; then
27662          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27663$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27664        fi
27665        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27666      fi
27667  fi
27668
27669      # Now join together the path and the arguments once again
27670      if test "x$arguments" != xEOL; then
27671        new_complete="$new_path ${arguments% *}"
27672      else
27673        new_complete="$new_path"
27674      fi
27675
27676  if test "x$complete" != "x$new_complete"; then
27677      STRIP="$new_complete"
27678      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27679$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27680    fi
27681
27682fi
27683
27684# objcopy is used for moving debug symbols to separate files when
27685# full debug symbols are enabled.
27686if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27687    if test -n "$ac_tool_prefix"; then
27688  for ac_prog in gobjcopy objcopy
27689  do
27690    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27691set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27693$as_echo_n "checking for $ac_word... " >&6; }
27694if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
27695  $as_echo_n "(cached) " >&6
27696else
27697  if test -n "$OBJCOPY"; then
27698  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27699else
27700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27701for as_dir in $PATH
27702do
27703  IFS=$as_save_IFS
27704  test -z "$as_dir" && as_dir=.
27705    for ac_exec_ext in '' $ac_executable_extensions; do
27706  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27707    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27709    break 2
27710  fi
27711done
27712  done
27713IFS=$as_save_IFS
27714
27715fi
27716fi
27717OBJCOPY=$ac_cv_prog_OBJCOPY
27718if test -n "$OBJCOPY"; then
27719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27720$as_echo "$OBJCOPY" >&6; }
27721else
27722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27723$as_echo "no" >&6; }
27724fi
27725
27726
27727    test -n "$OBJCOPY" && break
27728  done
27729fi
27730if test -z "$OBJCOPY"; then
27731  ac_ct_OBJCOPY=$OBJCOPY
27732  for ac_prog in gobjcopy objcopy
27733do
27734  # Extract the first word of "$ac_prog", so it can be a program name with args.
27735set dummy $ac_prog; ac_word=$2
27736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27737$as_echo_n "checking for $ac_word... " >&6; }
27738if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
27739  $as_echo_n "(cached) " >&6
27740else
27741  if test -n "$ac_ct_OBJCOPY"; then
27742  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27743else
27744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27745for as_dir in $PATH
27746do
27747  IFS=$as_save_IFS
27748  test -z "$as_dir" && as_dir=.
27749    for ac_exec_ext in '' $ac_executable_extensions; do
27750  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27751    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27753    break 2
27754  fi
27755done
27756  done
27757IFS=$as_save_IFS
27758
27759fi
27760fi
27761ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27762if test -n "$ac_ct_OBJCOPY"; then
27763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27764$as_echo "$ac_ct_OBJCOPY" >&6; }
27765else
27766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27767$as_echo "no" >&6; }
27768fi
27769
27770
27771  test -n "$ac_ct_OBJCOPY" && break
27772done
27773
27774  if test "x$ac_ct_OBJCOPY" = x; then
27775    OBJCOPY=""
27776  else
27777    case $cross_compiling:$ac_tool_warned in
27778yes:)
27779{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27780$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27781ac_tool_warned=yes ;;
27782esac
27783    OBJCOPY=$ac_ct_OBJCOPY
27784  fi
27785fi
27786
27787    # Only call fixup if objcopy was found.
27788    if test -n "$OBJCOPY"; then
27789
27790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27791
27792  # First separate the path from the arguments. This will split at the first
27793  # space.
27794  complete="$OBJCOPY"
27795  path="${complete%% *}"
27796  tmp="$complete EOL"
27797  arguments="${tmp#* }"
27798
27799  # Input might be given as Windows format, start by converting to
27800  # unix format.
27801  new_path=`$CYGPATH -u "$path"`
27802
27803  # Now try to locate executable using which
27804  new_path=`$WHICH "$new_path" 2> /dev/null`
27805  # bat and cmd files are not always considered executable in cygwin causing which
27806  # to not find them
27807  if test "x$new_path" = x \
27808           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27809           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27810    new_path=`$CYGPATH -u "$path"`
27811  fi
27812  if test "x$new_path" = x; then
27813    # Oops. Which didn't find the executable.
27814    # The splitting of arguments from the executable at a space might have been incorrect,
27815    # since paths with space are more likely in Windows. Give it another try with the whole
27816    # argument.
27817    path="$complete"
27818    arguments="EOL"
27819    new_path=`$CYGPATH -u "$path"`
27820    new_path=`$WHICH "$new_path" 2> /dev/null`
27821    # bat and cmd files are not always considered executable in cygwin causing which
27822    # to not find them
27823    if test "x$new_path" = x \
27824             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27825             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27826      new_path=`$CYGPATH -u "$path"`
27827    fi
27828    if test "x$new_path" = x; then
27829      # It's still not found. Now this is an unrecoverable error.
27830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27831$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27832      has_space=`$ECHO "$complete" | $GREP " "`
27833      if test "x$has_space" != x; then
27834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27836      fi
27837      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27838    fi
27839  fi
27840
27841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27844  # "foo.exe" is OK but "foo" is an error.
27845  #
27846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27847  # It is also a way to make sure we got the proper file name for the real test later on.
27848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27849  if test "x$test_shortpath" = x; then
27850    # Short path failed, file does not exist as specified.
27851    # Try adding .exe or .cmd
27852    if test -f "${new_path}.exe"; then
27853       input_to_shortpath="${new_path}.exe"
27854    elif test -f "${new_path}.cmd"; then
27855       input_to_shortpath="${new_path}.cmd"
27856    else
27857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27858$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27859      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27860$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27861      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27862    fi
27863  else
27864    input_to_shortpath="$new_path"
27865  fi
27866
27867  # Call helper function which possibly converts this using DOS-style short mode.
27868  # If so, the updated path is stored in $new_path.
27869  new_path="$input_to_shortpath"
27870
27871  input_path="$input_to_shortpath"
27872  # Check if we need to convert this using DOS-style short mode. If the path
27873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27874  # take no chances and rewrite it.
27875  # Note: m4 eats our [], so we need to use [ and ] instead.
27876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27877  if test "x$has_forbidden_chars" != x; then
27878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27882      # Going to short mode and back again did indeed matter. Since short mode is
27883      # case insensitive, let's make it lowercase to improve readability.
27884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27885      # Now convert it back to Unix-stile (cygpath)
27886      input_path=`$CYGPATH -u "$shortmode_path"`
27887      new_path="$input_path"
27888    fi
27889  fi
27890
27891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27892  if test "x$test_cygdrive_prefix" = x; then
27893    # As a simple fix, exclude /usr/bin since it's not a real path.
27894    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27896      # a path prefixed by /cygdrive for fixpath to work.
27897      new_path="$CYGWIN_ROOT_PATH$input_path"
27898    fi
27899  fi
27900
27901  # remove trailing .exe if any
27902  new_path="${new_path/%.exe/}"
27903
27904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27905
27906  # First separate the path from the arguments. This will split at the first
27907  # space.
27908  complete="$OBJCOPY"
27909  path="${complete%% *}"
27910  tmp="$complete EOL"
27911  arguments="${tmp#* }"
27912
27913  # Input might be given as Windows format, start by converting to
27914  # unix format.
27915  new_path="$path"
27916
27917  windows_path="$new_path"
27918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27919    unix_path=`$CYGPATH -u "$windows_path"`
27920    new_path="$unix_path"
27921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27923    new_path="$unix_path"
27924  fi
27925
27926
27927  # Now try to locate executable using which
27928  new_path=`$WHICH "$new_path" 2> /dev/null`
27929
27930  if test "x$new_path" = x; then
27931    # Oops. Which didn't find the executable.
27932    # The splitting of arguments from the executable at a space might have been incorrect,
27933    # since paths with space are more likely in Windows. Give it another try with the whole
27934    # argument.
27935    path="$complete"
27936    arguments="EOL"
27937    new_path="$path"
27938
27939  windows_path="$new_path"
27940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27941    unix_path=`$CYGPATH -u "$windows_path"`
27942    new_path="$unix_path"
27943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27945    new_path="$unix_path"
27946  fi
27947
27948
27949    new_path=`$WHICH "$new_path" 2> /dev/null`
27950
27951    if test "x$new_path" = x; then
27952      # It's still not found. Now this is an unrecoverable error.
27953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27954$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27955      has_space=`$ECHO "$complete" | $GREP " "`
27956      if test "x$has_space" != x; then
27957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27959      fi
27960      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27961    fi
27962  fi
27963
27964  # Now new_path has a complete unix path to the binary
27965  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27966    # Keep paths in /bin as-is, but remove trailing .exe if any
27967    new_path="${new_path/%.exe/}"
27968    # Do not save /bin paths to all_fixpath_prefixes!
27969  else
27970    # Not in mixed or Windows style, start by that.
27971    new_path=`cmd //c echo $new_path`
27972
27973  input_path="$new_path"
27974  # Check if we need to convert this using DOS-style short mode. If the path
27975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27976  # take no chances and rewrite it.
27977  # Note: m4 eats our [], so we need to use [ and ] instead.
27978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27979  if test "x$has_forbidden_chars" != x; then
27980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27982  fi
27983
27984    # Output is in $new_path
27985
27986  windows_path="$new_path"
27987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27988    unix_path=`$CYGPATH -u "$windows_path"`
27989    new_path="$unix_path"
27990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27992    new_path="$unix_path"
27993  fi
27994
27995    # remove trailing .exe if any
27996    new_path="${new_path/%.exe/}"
27997
27998    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27999    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28000  fi
28001
28002  else
28003    # We're on a posix platform. Hooray! :)
28004    # First separate the path from the arguments. This will split at the first
28005    # space.
28006    complete="$OBJCOPY"
28007    path="${complete%% *}"
28008    tmp="$complete EOL"
28009    arguments="${tmp#* }"
28010
28011    # Cannot rely on the command "which" here since it doesn't always work.
28012    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28013    if test -z "$is_absolute_path"; then
28014      # Path to executable is not absolute. Find it.
28015      IFS_save="$IFS"
28016      IFS=:
28017      for p in $PATH; do
28018        if test -f "$p/$path" && test -x "$p/$path"; then
28019          new_path="$p/$path"
28020          break
28021        fi
28022      done
28023      IFS="$IFS_save"
28024    else
28025      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
28026$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
28027      new_path="$path"
28028    fi
28029
28030    if test "x$new_path" = x; then
28031        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28032$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28033        has_space=`$ECHO "$complete" | $GREP " "`
28034        if test "x$has_space" != x; then
28035          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28036$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28037        fi
28038        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28039      fi
28040  fi
28041
28042      # Now join together the path and the arguments once again
28043      if test "x$arguments" != xEOL; then
28044        new_complete="$new_path ${arguments% *}"
28045      else
28046        new_complete="$new_path"
28047      fi
28048
28049  if test "x$complete" != "x$new_complete"; then
28050      OBJCOPY="$new_complete"
28051      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28052$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28053    fi
28054
28055    fi
28056fi
28057
28058if test -n "$ac_tool_prefix"; then
28059  for ac_prog in gobjdump objdump
28060  do
28061    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28062set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28064$as_echo_n "checking for $ac_word... " >&6; }
28065if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
28066  $as_echo_n "(cached) " >&6
28067else
28068  if test -n "$OBJDUMP"; then
28069  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28070else
28071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28072for as_dir in $PATH
28073do
28074  IFS=$as_save_IFS
28075  test -z "$as_dir" && as_dir=.
28076    for ac_exec_ext in '' $ac_executable_extensions; do
28077  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28078    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28080    break 2
28081  fi
28082done
28083  done
28084IFS=$as_save_IFS
28085
28086fi
28087fi
28088OBJDUMP=$ac_cv_prog_OBJDUMP
28089if test -n "$OBJDUMP"; then
28090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28091$as_echo "$OBJDUMP" >&6; }
28092else
28093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28094$as_echo "no" >&6; }
28095fi
28096
28097
28098    test -n "$OBJDUMP" && break
28099  done
28100fi
28101if test -z "$OBJDUMP"; then
28102  ac_ct_OBJDUMP=$OBJDUMP
28103  for ac_prog in gobjdump objdump
28104do
28105  # Extract the first word of "$ac_prog", so it can be a program name with args.
28106set dummy $ac_prog; ac_word=$2
28107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28108$as_echo_n "checking for $ac_word... " >&6; }
28109if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
28110  $as_echo_n "(cached) " >&6
28111else
28112  if test -n "$ac_ct_OBJDUMP"; then
28113  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28114else
28115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28116for as_dir in $PATH
28117do
28118  IFS=$as_save_IFS
28119  test -z "$as_dir" && as_dir=.
28120    for ac_exec_ext in '' $ac_executable_extensions; do
28121  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28122    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28124    break 2
28125  fi
28126done
28127  done
28128IFS=$as_save_IFS
28129
28130fi
28131fi
28132ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28133if test -n "$ac_ct_OBJDUMP"; then
28134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28135$as_echo "$ac_ct_OBJDUMP" >&6; }
28136else
28137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28138$as_echo "no" >&6; }
28139fi
28140
28141
28142  test -n "$ac_ct_OBJDUMP" && break
28143done
28144
28145  if test "x$ac_ct_OBJDUMP" = x; then
28146    OBJDUMP=""
28147  else
28148    case $cross_compiling:$ac_tool_warned in
28149yes:)
28150{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28151$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28152ac_tool_warned=yes ;;
28153esac
28154    OBJDUMP=$ac_ct_OBJDUMP
28155  fi
28156fi
28157
28158if test "x$OBJDUMP" != x; then
28159  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28160
28161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28162
28163  # First separate the path from the arguments. This will split at the first
28164  # space.
28165  complete="$OBJDUMP"
28166  path="${complete%% *}"
28167  tmp="$complete EOL"
28168  arguments="${tmp#* }"
28169
28170  # Input might be given as Windows format, start by converting to
28171  # unix format.
28172  new_path=`$CYGPATH -u "$path"`
28173
28174  # Now try to locate executable using which
28175  new_path=`$WHICH "$new_path" 2> /dev/null`
28176  # bat and cmd files are not always considered executable in cygwin causing which
28177  # to not find them
28178  if test "x$new_path" = x \
28179           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28180           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28181    new_path=`$CYGPATH -u "$path"`
28182  fi
28183  if test "x$new_path" = x; then
28184    # Oops. Which didn't find the executable.
28185    # The splitting of arguments from the executable at a space might have been incorrect,
28186    # since paths with space are more likely in Windows. Give it another try with the whole
28187    # argument.
28188    path="$complete"
28189    arguments="EOL"
28190    new_path=`$CYGPATH -u "$path"`
28191    new_path=`$WHICH "$new_path" 2> /dev/null`
28192    # bat and cmd files are not always considered executable in cygwin causing which
28193    # to not find them
28194    if test "x$new_path" = x \
28195             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28196             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28197      new_path=`$CYGPATH -u "$path"`
28198    fi
28199    if test "x$new_path" = x; then
28200      # It's still not found. Now this is an unrecoverable error.
28201      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28202$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28203      has_space=`$ECHO "$complete" | $GREP " "`
28204      if test "x$has_space" != x; then
28205        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28206$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28207      fi
28208      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28209    fi
28210  fi
28211
28212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28215  # "foo.exe" is OK but "foo" is an error.
28216  #
28217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28218  # It is also a way to make sure we got the proper file name for the real test later on.
28219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28220  if test "x$test_shortpath" = x; then
28221    # Short path failed, file does not exist as specified.
28222    # Try adding .exe or .cmd
28223    if test -f "${new_path}.exe"; then
28224       input_to_shortpath="${new_path}.exe"
28225    elif test -f "${new_path}.cmd"; then
28226       input_to_shortpath="${new_path}.cmd"
28227    else
28228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28229$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28230      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28231$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28232      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28233    fi
28234  else
28235    input_to_shortpath="$new_path"
28236  fi
28237
28238  # Call helper function which possibly converts this using DOS-style short mode.
28239  # If so, the updated path is stored in $new_path.
28240  new_path="$input_to_shortpath"
28241
28242  input_path="$input_to_shortpath"
28243  # Check if we need to convert this using DOS-style short mode. If the path
28244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28245  # take no chances and rewrite it.
28246  # Note: m4 eats our [], so we need to use [ and ] instead.
28247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28248  if test "x$has_forbidden_chars" != x; then
28249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28253      # Going to short mode and back again did indeed matter. Since short mode is
28254      # case insensitive, let's make it lowercase to improve readability.
28255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28256      # Now convert it back to Unix-stile (cygpath)
28257      input_path=`$CYGPATH -u "$shortmode_path"`
28258      new_path="$input_path"
28259    fi
28260  fi
28261
28262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28263  if test "x$test_cygdrive_prefix" = x; then
28264    # As a simple fix, exclude /usr/bin since it's not a real path.
28265    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28267      # a path prefixed by /cygdrive for fixpath to work.
28268      new_path="$CYGWIN_ROOT_PATH$input_path"
28269    fi
28270  fi
28271
28272  # remove trailing .exe if any
28273  new_path="${new_path/%.exe/}"
28274
28275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28276
28277  # First separate the path from the arguments. This will split at the first
28278  # space.
28279  complete="$OBJDUMP"
28280  path="${complete%% *}"
28281  tmp="$complete EOL"
28282  arguments="${tmp#* }"
28283
28284  # Input might be given as Windows format, start by converting to
28285  # unix format.
28286  new_path="$path"
28287
28288  windows_path="$new_path"
28289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28290    unix_path=`$CYGPATH -u "$windows_path"`
28291    new_path="$unix_path"
28292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28294    new_path="$unix_path"
28295  fi
28296
28297
28298  # Now try to locate executable using which
28299  new_path=`$WHICH "$new_path" 2> /dev/null`
28300
28301  if test "x$new_path" = x; then
28302    # Oops. Which didn't find the executable.
28303    # The splitting of arguments from the executable at a space might have been incorrect,
28304    # since paths with space are more likely in Windows. Give it another try with the whole
28305    # argument.
28306    path="$complete"
28307    arguments="EOL"
28308    new_path="$path"
28309
28310  windows_path="$new_path"
28311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28312    unix_path=`$CYGPATH -u "$windows_path"`
28313    new_path="$unix_path"
28314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28316    new_path="$unix_path"
28317  fi
28318
28319
28320    new_path=`$WHICH "$new_path" 2> /dev/null`
28321
28322    if test "x$new_path" = x; then
28323      # It's still not found. Now this is an unrecoverable error.
28324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28325$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28326      has_space=`$ECHO "$complete" | $GREP " "`
28327      if test "x$has_space" != x; then
28328        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28329$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28330      fi
28331      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28332    fi
28333  fi
28334
28335  # Now new_path has a complete unix path to the binary
28336  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28337    # Keep paths in /bin as-is, but remove trailing .exe if any
28338    new_path="${new_path/%.exe/}"
28339    # Do not save /bin paths to all_fixpath_prefixes!
28340  else
28341    # Not in mixed or Windows style, start by that.
28342    new_path=`cmd //c echo $new_path`
28343
28344  input_path="$new_path"
28345  # Check if we need to convert this using DOS-style short mode. If the path
28346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28347  # take no chances and rewrite it.
28348  # Note: m4 eats our [], so we need to use [ and ] instead.
28349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28350  if test "x$has_forbidden_chars" != x; then
28351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28353  fi
28354
28355    # Output is in $new_path
28356
28357  windows_path="$new_path"
28358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28359    unix_path=`$CYGPATH -u "$windows_path"`
28360    new_path="$unix_path"
28361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28363    new_path="$unix_path"
28364  fi
28365
28366    # remove trailing .exe if any
28367    new_path="${new_path/%.exe/}"
28368
28369    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28370    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28371  fi
28372
28373  else
28374    # We're on a posix platform. Hooray! :)
28375    # First separate the path from the arguments. This will split at the first
28376    # space.
28377    complete="$OBJDUMP"
28378    path="${complete%% *}"
28379    tmp="$complete EOL"
28380    arguments="${tmp#* }"
28381
28382    # Cannot rely on the command "which" here since it doesn't always work.
28383    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28384    if test -z "$is_absolute_path"; then
28385      # Path to executable is not absolute. Find it.
28386      IFS_save="$IFS"
28387      IFS=:
28388      for p in $PATH; do
28389        if test -f "$p/$path" && test -x "$p/$path"; then
28390          new_path="$p/$path"
28391          break
28392        fi
28393      done
28394      IFS="$IFS_save"
28395    else
28396      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28397$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28398      new_path="$path"
28399    fi
28400
28401    if test "x$new_path" = x; then
28402        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28403$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28404        has_space=`$ECHO "$complete" | $GREP " "`
28405        if test "x$has_space" != x; then
28406          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28407$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28408        fi
28409        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28410      fi
28411  fi
28412
28413      # Now join together the path and the arguments once again
28414      if test "x$arguments" != xEOL; then
28415        new_complete="$new_path ${arguments% *}"
28416      else
28417        new_complete="$new_path"
28418      fi
28419
28420  if test "x$complete" != "x$new_complete"; then
28421      OBJDUMP="$new_complete"
28422      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28423$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28424    fi
28425
28426fi
28427
28428if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28429   # Extract the first word of "lipo", so it can be a program name with args.
28430set dummy lipo; ac_word=$2
28431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28432$as_echo_n "checking for $ac_word... " >&6; }
28433if test "${ac_cv_path_LIPO+set}" = set; then :
28434  $as_echo_n "(cached) " >&6
28435else
28436  case $LIPO in
28437  [\\/]* | ?:[\\/]*)
28438  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28439  ;;
28440  *)
28441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28442for as_dir in $PATH
28443do
28444  IFS=$as_save_IFS
28445  test -z "$as_dir" && as_dir=.
28446    for ac_exec_ext in '' $ac_executable_extensions; do
28447  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28448    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28450    break 2
28451  fi
28452done
28453  done
28454IFS=$as_save_IFS
28455
28456  ;;
28457esac
28458fi
28459LIPO=$ac_cv_path_LIPO
28460if test -n "$LIPO"; then
28461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28462$as_echo "$LIPO" >&6; }
28463else
28464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28465$as_echo "no" >&6; }
28466fi
28467
28468
28469
28470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28471
28472  # First separate the path from the arguments. This will split at the first
28473  # space.
28474  complete="$LIPO"
28475  path="${complete%% *}"
28476  tmp="$complete EOL"
28477  arguments="${tmp#* }"
28478
28479  # Input might be given as Windows format, start by converting to
28480  # unix format.
28481  new_path=`$CYGPATH -u "$path"`
28482
28483  # Now try to locate executable using which
28484  new_path=`$WHICH "$new_path" 2> /dev/null`
28485  # bat and cmd files are not always considered executable in cygwin causing which
28486  # to not find them
28487  if test "x$new_path" = x \
28488           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28489           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28490    new_path=`$CYGPATH -u "$path"`
28491  fi
28492  if test "x$new_path" = x; then
28493    # Oops. Which didn't find the executable.
28494    # The splitting of arguments from the executable at a space might have been incorrect,
28495    # since paths with space are more likely in Windows. Give it another try with the whole
28496    # argument.
28497    path="$complete"
28498    arguments="EOL"
28499    new_path=`$CYGPATH -u "$path"`
28500    new_path=`$WHICH "$new_path" 2> /dev/null`
28501    # bat and cmd files are not always considered executable in cygwin causing which
28502    # to not find them
28503    if test "x$new_path" = x \
28504             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28505             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28506      new_path=`$CYGPATH -u "$path"`
28507    fi
28508    if test "x$new_path" = x; then
28509      # It's still not found. Now this is an unrecoverable error.
28510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28511$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28512      has_space=`$ECHO "$complete" | $GREP " "`
28513      if test "x$has_space" != x; then
28514        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28515$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28516      fi
28517      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28518    fi
28519  fi
28520
28521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28524  # "foo.exe" is OK but "foo" is an error.
28525  #
28526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28527  # It is also a way to make sure we got the proper file name for the real test later on.
28528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28529  if test "x$test_shortpath" = x; then
28530    # Short path failed, file does not exist as specified.
28531    # Try adding .exe or .cmd
28532    if test -f "${new_path}.exe"; then
28533       input_to_shortpath="${new_path}.exe"
28534    elif test -f "${new_path}.cmd"; then
28535       input_to_shortpath="${new_path}.cmd"
28536    else
28537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28538$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28539      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28540$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28541      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28542    fi
28543  else
28544    input_to_shortpath="$new_path"
28545  fi
28546
28547  # Call helper function which possibly converts this using DOS-style short mode.
28548  # If so, the updated path is stored in $new_path.
28549  new_path="$input_to_shortpath"
28550
28551  input_path="$input_to_shortpath"
28552  # Check if we need to convert this using DOS-style short mode. If the path
28553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28554  # take no chances and rewrite it.
28555  # Note: m4 eats our [], so we need to use [ and ] instead.
28556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28557  if test "x$has_forbidden_chars" != x; then
28558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28559    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28560    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28561    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28562      # Going to short mode and back again did indeed matter. Since short mode is
28563      # case insensitive, let's make it lowercase to improve readability.
28564      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28565      # Now convert it back to Unix-stile (cygpath)
28566      input_path=`$CYGPATH -u "$shortmode_path"`
28567      new_path="$input_path"
28568    fi
28569  fi
28570
28571  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28572  if test "x$test_cygdrive_prefix" = x; then
28573    # As a simple fix, exclude /usr/bin since it's not a real path.
28574    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28575      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28576      # a path prefixed by /cygdrive for fixpath to work.
28577      new_path="$CYGWIN_ROOT_PATH$input_path"
28578    fi
28579  fi
28580
28581  # remove trailing .exe if any
28582  new_path="${new_path/%.exe/}"
28583
28584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28585
28586  # First separate the path from the arguments. This will split at the first
28587  # space.
28588  complete="$LIPO"
28589  path="${complete%% *}"
28590  tmp="$complete EOL"
28591  arguments="${tmp#* }"
28592
28593  # Input might be given as Windows format, start by converting to
28594  # unix format.
28595  new_path="$path"
28596
28597  windows_path="$new_path"
28598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28599    unix_path=`$CYGPATH -u "$windows_path"`
28600    new_path="$unix_path"
28601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28603    new_path="$unix_path"
28604  fi
28605
28606
28607  # Now try to locate executable using which
28608  new_path=`$WHICH "$new_path" 2> /dev/null`
28609
28610  if test "x$new_path" = x; then
28611    # Oops. Which didn't find the executable.
28612    # The splitting of arguments from the executable at a space might have been incorrect,
28613    # since paths with space are more likely in Windows. Give it another try with the whole
28614    # argument.
28615    path="$complete"
28616    arguments="EOL"
28617    new_path="$path"
28618
28619  windows_path="$new_path"
28620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28621    unix_path=`$CYGPATH -u "$windows_path"`
28622    new_path="$unix_path"
28623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28625    new_path="$unix_path"
28626  fi
28627
28628
28629    new_path=`$WHICH "$new_path" 2> /dev/null`
28630
28631    if test "x$new_path" = x; then
28632      # It's still not found. Now this is an unrecoverable error.
28633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28634$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28635      has_space=`$ECHO "$complete" | $GREP " "`
28636      if test "x$has_space" != x; then
28637        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28638$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28639      fi
28640      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28641    fi
28642  fi
28643
28644  # Now new_path has a complete unix path to the binary
28645  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28646    # Keep paths in /bin as-is, but remove trailing .exe if any
28647    new_path="${new_path/%.exe/}"
28648    # Do not save /bin paths to all_fixpath_prefixes!
28649  else
28650    # Not in mixed or Windows style, start by that.
28651    new_path=`cmd //c echo $new_path`
28652
28653  input_path="$new_path"
28654  # Check if we need to convert this using DOS-style short mode. If the path
28655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28656  # take no chances and rewrite it.
28657  # Note: m4 eats our [], so we need to use [ and ] instead.
28658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28659  if test "x$has_forbidden_chars" != x; then
28660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28662  fi
28663
28664    # Output is in $new_path
28665
28666  windows_path="$new_path"
28667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28668    unix_path=`$CYGPATH -u "$windows_path"`
28669    new_path="$unix_path"
28670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28672    new_path="$unix_path"
28673  fi
28674
28675    # remove trailing .exe if any
28676    new_path="${new_path/%.exe/}"
28677
28678    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28679    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28680  fi
28681
28682  else
28683    # We're on a posix platform. Hooray! :)
28684    # First separate the path from the arguments. This will split at the first
28685    # space.
28686    complete="$LIPO"
28687    path="${complete%% *}"
28688    tmp="$complete EOL"
28689    arguments="${tmp#* }"
28690
28691    # Cannot rely on the command "which" here since it doesn't always work.
28692    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28693    if test -z "$is_absolute_path"; then
28694      # Path to executable is not absolute. Find it.
28695      IFS_save="$IFS"
28696      IFS=:
28697      for p in $PATH; do
28698        if test -f "$p/$path" && test -x "$p/$path"; then
28699          new_path="$p/$path"
28700          break
28701        fi
28702      done
28703      IFS="$IFS_save"
28704    else
28705      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28706$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28707      new_path="$path"
28708    fi
28709
28710    if test "x$new_path" = x; then
28711        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28712$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28713        has_space=`$ECHO "$complete" | $GREP " "`
28714        if test "x$has_space" != x; then
28715          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28716$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28717        fi
28718        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28719      fi
28720  fi
28721
28722      # Now join together the path and the arguments once again
28723      if test "x$arguments" != xEOL; then
28724        new_complete="$new_path ${arguments% *}"
28725      else
28726        new_complete="$new_path"
28727      fi
28728
28729  if test "x$complete" != "x$new_complete"; then
28730      LIPO="$new_complete"
28731      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28732$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28733    fi
28734
28735fi
28736
28737
28738
28739# Restore old path without tools dir
28740PATH="$OLD_PATH"
28741
28742
28743# FIXME: Currently we must test this after paths but before flags. Fix!
28744
28745# And we can test some aspects on the target using configure macros.
28746
28747
28748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28749$as_echo_n "checking for ANSI C header files... " >&6; }
28750if test "${ac_cv_header_stdc+set}" = set; then :
28751  $as_echo_n "(cached) " >&6
28752else
28753  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28754/* end confdefs.h.  */
28755#include <stdlib.h>
28756#include <stdarg.h>
28757#include <string.h>
28758#include <float.h>
28759
28760int
28761main ()
28762{
28763
28764  ;
28765  return 0;
28766}
28767_ACEOF
28768if ac_fn_cxx_try_compile "$LINENO"; then :
28769  ac_cv_header_stdc=yes
28770else
28771  ac_cv_header_stdc=no
28772fi
28773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28774
28775if test $ac_cv_header_stdc = yes; then
28776  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28777  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28778/* end confdefs.h.  */
28779#include <string.h>
28780
28781_ACEOF
28782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28783  $EGREP "memchr" >/dev/null 2>&1; then :
28784
28785else
28786  ac_cv_header_stdc=no
28787fi
28788rm -f conftest*
28789
28790fi
28791
28792if test $ac_cv_header_stdc = yes; then
28793  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28794  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28795/* end confdefs.h.  */
28796#include <stdlib.h>
28797
28798_ACEOF
28799if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28800  $EGREP "free" >/dev/null 2>&1; then :
28801
28802else
28803  ac_cv_header_stdc=no
28804fi
28805rm -f conftest*
28806
28807fi
28808
28809if test $ac_cv_header_stdc = yes; then
28810  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28811  if test "$cross_compiling" = yes; then :
28812  :
28813else
28814  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28815/* end confdefs.h.  */
28816#include <ctype.h>
28817#include <stdlib.h>
28818#if ((' ' & 0x0FF) == 0x020)
28819# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28820# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28821#else
28822# define ISLOWER(c) \
28823		   (('a' <= (c) && (c) <= 'i') \
28824		     || ('j' <= (c) && (c) <= 'r') \
28825		     || ('s' <= (c) && (c) <= 'z'))
28826# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28827#endif
28828
28829#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28830int
28831main ()
28832{
28833  int i;
28834  for (i = 0; i < 256; i++)
28835    if (XOR (islower (i), ISLOWER (i))
28836	|| toupper (i) != TOUPPER (i))
28837      return 2;
28838  return 0;
28839}
28840_ACEOF
28841if ac_fn_cxx_try_run "$LINENO"; then :
28842
28843else
28844  ac_cv_header_stdc=no
28845fi
28846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28847  conftest.$ac_objext conftest.beam conftest.$ac_ext
28848fi
28849
28850fi
28851fi
28852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28853$as_echo "$ac_cv_header_stdc" >&6; }
28854if test $ac_cv_header_stdc = yes; then
28855
28856$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28857
28858fi
28859
28860# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28861for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28862		  inttypes.h stdint.h unistd.h
28863do :
28864  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28865ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28866"
28867if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28868  cat >>confdefs.h <<_ACEOF
28869#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28870_ACEOF
28871
28872fi
28873
28874done
28875
28876
28877
28878###############################################################################
28879#
28880# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28881# (The JVM can use 32 or 64 bit Java pointers but that decision
28882# is made at runtime.)
28883#
28884
28885if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28886  # Always specify -m flags on Solaris
28887
28888  # keep track of c/cxx flags that we added outselves...
28889  #   to prevent emitting warning...
28890  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28891  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28892  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28893
28894  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28895  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28896  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28897
28898  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28899  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28900  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28901
28902elif test "x$COMPILE_TYPE" = xreduced; then
28903  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28904    # Specify -m if running reduced on other Posix platforms
28905
28906  # keep track of c/cxx flags that we added outselves...
28907  #   to prevent emitting warning...
28908  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28909  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28910  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28911
28912  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28913  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28914  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28915
28916  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28917  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28918  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28919
28920  fi
28921fi
28922
28923# Make compilation sanity check
28924for ac_header in stdio.h
28925do :
28926  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28927if test "x$ac_cv_header_stdio_h" = x""yes; then :
28928  cat >>confdefs.h <<_ACEOF
28929#define HAVE_STDIO_H 1
28930_ACEOF
28931
28932else
28933
28934  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28935$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28936  if test "x$COMPILE_TYPE" = xreduced; then
28937    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28938$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28939  elif test "x$COMPILE_TYPE" = xcross; then
28940    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28941$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28942  fi
28943  as_fn_error $? "Cannot continue." "$LINENO" 5
28944
28945fi
28946
28947done
28948
28949
28950# The cast to long int works around a bug in the HP C Compiler
28951# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28952# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28953# This bug is HP SR number 8606223364.
28954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28955$as_echo_n "checking size of int *... " >&6; }
28956if test "${ac_cv_sizeof_int_p+set}" = set; then :
28957  $as_echo_n "(cached) " >&6
28958else
28959  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28960
28961else
28962  if test "$ac_cv_type_int_p" = yes; then
28963     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28965as_fn_error 77 "cannot compute sizeof (int *)
28966See \`config.log' for more details" "$LINENO" 5 ; }
28967   else
28968     ac_cv_sizeof_int_p=0
28969   fi
28970fi
28971
28972fi
28973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28974$as_echo "$ac_cv_sizeof_int_p" >&6; }
28975
28976
28977
28978cat >>confdefs.h <<_ACEOF
28979#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28980_ACEOF
28981
28982
28983
28984if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28985  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28986  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28987fi
28988
28989if test "x$SIZEOF_INT_P" = x; then
28990    # The test failed, lets stick to the assumed value.
28991    { $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
28992$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28993else
28994    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28995
28996    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28997        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
28998    fi
28999fi
29000
29001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
29002$as_echo_n "checking for target address size... " >&6; }
29003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
29004$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
29005
29006
29007###############################################################################
29008#
29009# Is the target little of big endian?
29010#
29011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
29012$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
29013if test "${ac_cv_c_bigendian+set}" = set; then :
29014  $as_echo_n "(cached) " >&6
29015else
29016  ac_cv_c_bigendian=unknown
29017    # See if we're dealing with a universal compiler.
29018    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29019/* end confdefs.h.  */
29020#ifndef __APPLE_CC__
29021	       not a universal capable compiler
29022	     #endif
29023	     typedef int dummy;
29024
29025_ACEOF
29026if ac_fn_cxx_try_compile "$LINENO"; then :
29027
29028	# Check for potential -arch flags.  It is not universal unless
29029	# there are at least two -arch flags with different values.
29030	ac_arch=
29031	ac_prev=
29032	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29033	 if test -n "$ac_prev"; then
29034	   case $ac_word in
29035	     i?86 | x86_64 | ppc | ppc64)
29036	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29037		 ac_arch=$ac_word
29038	       else
29039		 ac_cv_c_bigendian=universal
29040		 break
29041	       fi
29042	       ;;
29043	   esac
29044	   ac_prev=
29045	 elif test "x$ac_word" = "x-arch"; then
29046	   ac_prev=arch
29047	 fi
29048       done
29049fi
29050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29051    if test $ac_cv_c_bigendian = unknown; then
29052      # See if sys/param.h defines the BYTE_ORDER macro.
29053      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29054/* end confdefs.h.  */
29055#include <sys/types.h>
29056	     #include <sys/param.h>
29057
29058int
29059main ()
29060{
29061#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29062		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29063		     && LITTLE_ENDIAN)
29064	      bogus endian macros
29065	     #endif
29066
29067  ;
29068  return 0;
29069}
29070_ACEOF
29071if ac_fn_cxx_try_compile "$LINENO"; then :
29072  # It does; now see whether it defined to BIG_ENDIAN or not.
29073	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29074/* end confdefs.h.  */
29075#include <sys/types.h>
29076		#include <sys/param.h>
29077
29078int
29079main ()
29080{
29081#if BYTE_ORDER != BIG_ENDIAN
29082		 not big endian
29083		#endif
29084
29085  ;
29086  return 0;
29087}
29088_ACEOF
29089if ac_fn_cxx_try_compile "$LINENO"; then :
29090  ac_cv_c_bigendian=yes
29091else
29092  ac_cv_c_bigendian=no
29093fi
29094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29095fi
29096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29097    fi
29098    if test $ac_cv_c_bigendian = unknown; then
29099      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29100      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29101/* end confdefs.h.  */
29102#include <limits.h>
29103
29104int
29105main ()
29106{
29107#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29108	      bogus endian macros
29109	     #endif
29110
29111  ;
29112  return 0;
29113}
29114_ACEOF
29115if ac_fn_cxx_try_compile "$LINENO"; then :
29116  # It does; now see whether it defined to _BIG_ENDIAN or not.
29117	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29118/* end confdefs.h.  */
29119#include <limits.h>
29120
29121int
29122main ()
29123{
29124#ifndef _BIG_ENDIAN
29125		 not big endian
29126		#endif
29127
29128  ;
29129  return 0;
29130}
29131_ACEOF
29132if ac_fn_cxx_try_compile "$LINENO"; then :
29133  ac_cv_c_bigendian=yes
29134else
29135  ac_cv_c_bigendian=no
29136fi
29137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29138fi
29139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29140    fi
29141    if test $ac_cv_c_bigendian = unknown; then
29142      # Compile a test program.
29143      if test "$cross_compiling" = yes; then :
29144  # Try to guess by grepping values from an object file.
29145	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29146/* end confdefs.h.  */
29147short int ascii_mm[] =
29148		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29149		short int ascii_ii[] =
29150		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29151		int use_ascii (int i) {
29152		  return ascii_mm[i] + ascii_ii[i];
29153		}
29154		short int ebcdic_ii[] =
29155		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29156		short int ebcdic_mm[] =
29157		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29158		int use_ebcdic (int i) {
29159		  return ebcdic_mm[i] + ebcdic_ii[i];
29160		}
29161		extern int foo;
29162
29163int
29164main ()
29165{
29166return use_ascii (foo) == use_ebcdic (foo);
29167  ;
29168  return 0;
29169}
29170_ACEOF
29171if ac_fn_cxx_try_compile "$LINENO"; then :
29172  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29173	      ac_cv_c_bigendian=yes
29174	    fi
29175	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29176	      if test "$ac_cv_c_bigendian" = unknown; then
29177		ac_cv_c_bigendian=no
29178	      else
29179		# finding both strings is unlikely to happen, but who knows?
29180		ac_cv_c_bigendian=unknown
29181	      fi
29182	    fi
29183fi
29184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29185else
29186  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29187/* end confdefs.h.  */
29188$ac_includes_default
29189int
29190main ()
29191{
29192
29193	     /* Are we little or big endian?  From Harbison&Steele.  */
29194	     union
29195	     {
29196	       long int l;
29197	       char c[sizeof (long int)];
29198	     } u;
29199	     u.l = 1;
29200	     return u.c[sizeof (long int) - 1] == 1;
29201
29202  ;
29203  return 0;
29204}
29205_ACEOF
29206if ac_fn_cxx_try_run "$LINENO"; then :
29207  ac_cv_c_bigendian=no
29208else
29209  ac_cv_c_bigendian=yes
29210fi
29211rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29212  conftest.$ac_objext conftest.beam conftest.$ac_ext
29213fi
29214
29215    fi
29216fi
29217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29218$as_echo "$ac_cv_c_bigendian" >&6; }
29219 case $ac_cv_c_bigendian in #(
29220   yes)
29221     ENDIAN="big";; #(
29222   no)
29223     ENDIAN="little" ;; #(
29224   universal)
29225     ENDIAN="universal_endianness"
29226     ;; #(
29227   *)
29228     ENDIAN="unknown" ;;
29229 esac
29230
29231
29232if test "x$ENDIAN" = xuniversal_endianness; then
29233    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29234fi
29235if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29236    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
29237fi
29238
29239
29240# Configure flags for the tools
29241
29242
29243###############################################################################
29244#
29245# How to compile shared libraries.
29246#
29247
29248if test "x$GCC" = xyes; then
29249    COMPILER_NAME=gcc
29250    PICFLAG="-fPIC"
29251    LIBRARY_PREFIX=lib
29252    SHARED_LIBRARY='lib$1.so'
29253    STATIC_LIBRARY='lib$1.a'
29254    SHARED_LIBRARY_FLAGS="-shared"
29255    SHARED_LIBRARY_SUFFIX='.so'
29256    STATIC_LIBRARY_SUFFIX='.a'
29257    OBJ_SUFFIX='.o'
29258    EXE_SUFFIX=''
29259    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29260    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29261    C_FLAG_REORDER=''
29262    CXX_FLAG_REORDER=''
29263    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29264    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29265    LD="$CC"
29266    LDEXE="$CC"
29267    LDCXX="$CXX"
29268    LDEXECXX="$CXX"
29269    POST_STRIP_CMD="$STRIP -g"
29270
29271    # Linking is different on MacOSX
29272    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29273        # Might change in the future to clang.
29274        COMPILER_NAME=gcc
29275        SHARED_LIBRARY='lib$1.dylib'
29276        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29277        SHARED_LIBRARY_SUFFIX='.dylib'
29278        EXE_SUFFIX=''
29279        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29280        SET_SHARED_LIBRARY_MAPFILE=''
29281        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29282        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29283        POST_STRIP_CMD="$STRIP -S"
29284    fi
29285else
29286    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29287        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29288        COMPILER_NAME=ossc
29289        PICFLAG="-KPIC"
29290        LIBRARY_PREFIX=lib
29291        SHARED_LIBRARY='lib$1.so'
29292        STATIC_LIBRARY='lib$1.a'
29293        SHARED_LIBRARY_FLAGS="-G"
29294        SHARED_LIBRARY_SUFFIX='.so'
29295        STATIC_LIBRARY_SUFFIX='.a'
29296        OBJ_SUFFIX='.o'
29297        EXE_SUFFIX=''
29298        SET_SHARED_LIBRARY_NAME=''
29299        SET_SHARED_LIBRARY_MAPFILE='-M$1'
29300	C_FLAG_REORDER='-xF'
29301	CXX_FLAG_REORDER='-xF'
29302        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29303        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29304        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29305        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29306        CFLAGS_JDKLIB_EXTRA='-xstrconst'
29307        POST_STRIP_CMD="$STRIP -x"
29308        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29309    fi
29310    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29311        # If it is not gcc, then assume it is the MS Visual Studio compiler
29312        COMPILER_NAME=cl
29313        PICFLAG=""
29314        LIBRARY_PREFIX=
29315        SHARED_LIBRARY='$1.dll'
29316        STATIC_LIBRARY='$1.lib'
29317        SHARED_LIBRARY_FLAGS="-LD"
29318        SHARED_LIBRARY_SUFFIX='.dll'
29319        STATIC_LIBRARY_SUFFIX='.lib'
29320        OBJ_SUFFIX='.obj'
29321        EXE_SUFFIX='.exe'
29322        SET_SHARED_LIBRARY_NAME=''
29323        SET_SHARED_LIBRARY_MAPFILE=''
29324        SET_SHARED_LIBRARY_ORIGIN=''
29325        SET_EXECUTABLE_ORIGIN=''
29326    fi
29327fi
29328
29329
29330
29331
29332
29333
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347# The (cross) compiler is now configured, we can now test capabilities
29348# of the target platform.
29349
29350
29351
29352###############################################################################
29353#
29354# Setup the opt flags for different compilers
29355# and different operating systems.
29356#
29357
29358#
29359# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29360#
29361if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29362    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29363    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29364    CFLAGS="$CFLAGS -mstackrealign"
29365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29366$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29367    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29368/* end confdefs.h.  */
29369int main() { return 0; }
29370_ACEOF
29371if ac_fn_cxx_try_link "$LINENO"; then :
29372
29373		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29374$as_echo "yes" >&6; }
29375
29376else
29377
29378		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29379$as_echo "no" >&6; }
29380	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29381
29382fi
29383rm -f core conftest.err conftest.$ac_objext \
29384    conftest$ac_exeext conftest.$ac_ext
29385fi
29386
29387C_FLAG_DEPS="-MMD -MF"
29388CXX_FLAG_DEPS="-MMD -MF"
29389
29390case $COMPILER_TYPE in
29391  CC )
29392    case $COMPILER_NAME in
29393      gcc )
29394      	case $OPENJDK_TARGET_OS in
29395	  macosx )
29396	    # On MacOSX we optimize for size, something
29397	    # we should do for all platforms?
29398	    C_O_FLAG_HI="-Os"
29399	    C_O_FLAG_NORM="-Os"
29400	    C_O_FLAG_NONE=""
29401	    ;;
29402	  *)
29403	    C_O_FLAG_HI="-O3"
29404	    C_O_FLAG_NORM="-O2"
29405	    C_O_FLAG_NONE="-O0"
29406	    ;;
29407	esac
29408        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29409        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29410        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29411        CFLAGS_DEBUG_SYMBOLS="-g"
29412        CXXFLAGS_DEBUG_SYMBOLS="-g"
29413        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29414            CFLAGS_DEBUG_SYMBOLS="-g1"
29415            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29416        fi
29417        ;;
29418      ossc )
29419        #
29420        # Forte has different names for this with their C++ compiler...
29421        #
29422        C_FLAG_DEPS="-xMMD -xMF"
29423        CXX_FLAG_DEPS="-xMMD -xMF"
29424
29425        # Extra options used with HIGHEST
29426        #
29427        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29428        #          done with care, there are some assumptions below that need to
29429        #          be understood about the use of pointers, and IEEE behavior.
29430        #
29431        # Use non-standard floating point mode (not IEEE 754)
29432        CC_HIGHEST="$CC_HIGHEST -fns"
29433        # Do some simplification of floating point arithmetic (not IEEE 754)
29434        CC_HIGHEST="$CC_HIGHEST -fsimple"
29435        # Use single precision floating point with 'float'
29436        CC_HIGHEST="$CC_HIGHEST -fsingle"
29437        # Assume memory references via basic pointer types do not alias
29438        #   (Source with excessing pointer casting and data access with mixed
29439        #    pointer types are not recommended)
29440        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29441        # Use intrinsic or inline versions for math/std functions
29442        #   (If you expect perfect errno behavior, do not use this)
29443        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29444        # Loop data dependency optimizations (need -xO3 or higher)
29445        CC_HIGHEST="$CC_HIGHEST -xdepend"
29446        # Pointer parameters to functions do not overlap
29447        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29448        #    If you pass in multiple pointers to the same data, do not use this)
29449        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29450        # Inline some library routines
29451        #   (If you expect perfect errno behavior, do not use this)
29452        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29453        # Use optimized math routines
29454        #   (If you expect perfect errno behavior, do not use this)
29455        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29456        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29457
29458        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29459          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29460          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29461        fi
29462
29463        case $OPENJDK_TARGET_CPU_ARCH in
29464          x86)
29465            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29466            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29467            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29468            C_O_FLAG_NONE="-xregs=no%frameptr"
29469            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29470            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29471            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29472            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29473            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29474               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29475               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29476            fi
29477            ;;
29478          sparc)
29479            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29480            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29481            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29482            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29483            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29484            C_O_FLAG_NONE=""
29485            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29486            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29487            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29488            CXX_O_FLAG_NONE=""
29489            ;;
29490        esac
29491
29492    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29493    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29494    esac
29495    ;;
29496  CL )
29497    C_O_FLAG_HIGHEST="-O2"
29498    C_O_FLAG_HI="-O1"
29499    C_O_FLAG_NORM="-O1"
29500    C_O_FLAG_NONE="-Od"
29501    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29502    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29503    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29504    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29505    ;;
29506esac
29507
29508if test -z "$C_O_FLAG_HIGHEST"; then
29509   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29510fi
29511
29512if test -z "$CXX_O_FLAG_HIGHEST"; then
29513   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29514fi
29515
29516
29517
29518
29519
29520
29521
29522
29523
29524
29525
29526
29527
29528
29529if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29530   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29531$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29532fi
29533
29534if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29535   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29536$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29537fi
29538
29539if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29540   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29541$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29542fi
29543
29544
29545# Check whether --with-extra-cflags was given.
29546if test "${with_extra_cflags+set}" = set; then :
29547  withval=$with_extra_cflags;
29548fi
29549
29550
29551
29552# Check whether --with-extra-cxxflags was given.
29553if test "${with_extra_cxxflags+set}" = set; then :
29554  withval=$with_extra_cxxflags;
29555fi
29556
29557
29558
29559# Check whether --with-extra-ldflags was given.
29560if test "${with_extra_ldflags+set}" = set; then :
29561  withval=$with_extra_ldflags;
29562fi
29563
29564
29565CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29566CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29567LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29568
29569# Hotspot needs these set in their legacy form
29570LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29571LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29572LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29573
29574
29575
29576
29577
29578###############################################################################
29579#
29580# Now setup the CFLAGS and LDFLAGS for the JDK build.
29581# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29582#
29583case $COMPILER_NAME in
29584      gcc )
29585      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29586                          -pipe \
29587                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29588	  case $OPENJDK_TARGET_CPU_ARCH in
29589	  arm )
29590            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29591	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29592	  ;;
29593	  ppc )
29594            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29595	  ;;
29596	  * )
29597	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29598	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29599          ;;
29600	  esac
29601          ;;
29602      ossc )
29603          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29604          case $OPENJDK_TARGET_CPU_ARCH in
29605          x86 )
29606            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29607       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29608          ;;
29609          esac
29610
29611      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29612      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29613
29614          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29615          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29616          ;;
29617      cl )
29618          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29619               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29620	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29621	       -DWIN32 -DIAL"
29622          case $OPENJDK_TARGET_CPU in
29623              x86 )
29624                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29625                  ;;
29626              x86_64 )
29627                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29628                  ;;
29629          esac
29630          ;;
29631esac
29632
29633###############################################################################
29634
29635# Adjust flags according to debug level.
29636case $DEBUG_LEVEL in
29637      fastdebug )
29638              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29639              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29640	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29641	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29642	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29643	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29644              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29645              ;;
29646      slowdebug )
29647              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29648              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29649	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29650	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29651	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29652	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29653              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29654              ;;
29655esac
29656
29657CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29658
29659# The package path is used only on macosx?
29660PACKAGE_PATH=/opt/local
29661
29662
29663if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29664    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29665    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29666    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29667    #   Note: -Dmacro         is the same as    #define macro 1
29668    #         -Dmacro=	    is the same as    #define macro
29669    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29670        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29671    else
29672        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29673    fi
29674else
29675    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29676fi
29677if test "x$OPENJDK_TARGET_OS" = xlinux; then
29678    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29679fi
29680if test "x$OPENJDK_TARGET_OS" = xwindows; then
29681    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29682fi
29683if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29684    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29685fi
29686if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29687    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29688    # Setting these parameters makes it an error to link to macosx APIs that are
29689    # newer than the given OS version and makes the linked binaries compatible even
29690    # if built on a newer version of the OS.
29691    # The expected format is X.Y.Z
29692    MACOSX_VERSION_MIN=10.7.0
29693
29694    # The macro takes the version with no dots, ex: 1070
29695    # Let the flags variables get resolved in make for easier override on make
29696    # command line.
29697    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29698    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29699fi
29700if test "x$OPENJDK_TARGET_OS" = xbsd; then
29701    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29702fi
29703if test "x$DEBUG_LEVEL" = xrelease; then
29704    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29705    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29706        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29707    fi
29708else
29709    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29710fi
29711
29712CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29713CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29714
29715CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29716        -I${JDK_OUTPUTDIR}/include \
29717        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29718        -I${JDK_TOPDIR}/src/share/javavm/export \
29719        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29720        -I${JDK_TOPDIR}/src/share/native/common \
29721        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29722
29723# The shared libraries are compiled using the picflag.
29724CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29725CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29726
29727# Executable flags
29728CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29729CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29730
29731# Now this is odd. The JDK native libraries have to link against libjvm.so
29732# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29733# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29734# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29735# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29736# libraries will link to whatever is in memory. Yuck.
29737#
29738# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29739if test "x$COMPILER_NAME" = xcl; then
29740    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29741    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29742        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29743    fi
29744    # TODO: make -debug optional "--disable-full-debug-symbols"
29745    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29746    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29747    LDFLAGS_JDKLIB_SUFFIX=""
29748    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29749        LDFLAGS_STACK_SIZE=1048576
29750    else
29751        LDFLAGS_STACK_SIZE=327680
29752    fi
29753    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29754else
29755    if test "x$COMPILER_NAME" = xgcc; then
29756        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29757        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29758        if test -n "$HAS_GNU_HASH"; then
29759            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29760        fi
29761        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29762          # And since we now know that the linker is gnu, then add -z defs, to forbid
29763          # undefined symbols in object files.
29764          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29765          if test "x$DEBUG_LEVEL" = "xrelease"; then
29766              # When building release libraries, tell the linker optimize them.
29767              # Should this be supplied to the OSS linker as well?
29768              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29769          fi
29770        fi
29771    fi
29772    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29773                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29774
29775    # On some platforms (mac) the linker warns about non existing -L dirs.
29776    # Add server first if available. Linking aginst client does not always produce the same results.
29777    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29778    # Default to server for other variants.
29779    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29780        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29781    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29782        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29783    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29784        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29785    else
29786        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29787    fi
29788
29789    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29790    if test "x$COMPILER_NAME" = xossc; then
29791        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29792    fi
29793
29794    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29795    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29796        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29797    fi
29798fi
29799
29800
29801
29802
29803
29804
29805
29806
29807
29808
29809
29810
29811
29812
29813
29814  # Some Zero and Shark settings.
29815  # ZERO_ARCHFLAG tells the compiler which mode to build for
29816  case "${OPENJDK_TARGET_CPU}" in
29817    s390)
29818      ZERO_ARCHFLAG="-m31"
29819      ;;
29820    *)
29821      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29822  esac
29823
29824  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29825$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29826  supports=yes
29827
29828  saved_cflags="$CFLAGS"
29829  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29830  ac_ext=c
29831ac_cpp='$CPP $CPPFLAGS'
29832ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29833ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29834ac_compiler_gnu=$ac_cv_c_compiler_gnu
29835
29836  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29837/* end confdefs.h.  */
29838
29839    int i;
29840
29841_ACEOF
29842if ac_fn_c_try_compile "$LINENO"; then :
29843
29844else
29845  supports=no
29846fi
29847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29848  ac_ext=cpp
29849ac_cpp='$CXXCPP $CPPFLAGS'
29850ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29851ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29852ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29853
29854  CFLAGS="$saved_cflags"
29855
29856  saved_cxxflags="$CXXFLAGS"
29857  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29858  ac_ext=cpp
29859ac_cpp='$CXXCPP $CPPFLAGS'
29860ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29861ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29862ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29863
29864  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29865/* end confdefs.h.  */
29866
29867    int i;
29868
29869_ACEOF
29870if ac_fn_cxx_try_compile "$LINENO"; then :
29871
29872else
29873  supports=no
29874fi
29875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29876  ac_ext=cpp
29877ac_cpp='$CXXCPP $CPPFLAGS'
29878ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29879ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29880ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29881
29882  CXXFLAGS="$saved_cxxflags"
29883
29884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29885$as_echo "$supports" >&6; }
29886  if test "x$supports" = "xyes" ; then
29887    :
29888  else
29889    ZERO_ARCHFLAG=""
29890  fi
29891
29892
29893
29894  # Check that the compiler supports -mX flags
29895  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29896
29897  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29898$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29899  supports=yes
29900
29901  saved_cflags="$CFLAGS"
29902  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29903  ac_ext=c
29904ac_cpp='$CPP $CPPFLAGS'
29905ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29906ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29907ac_compiler_gnu=$ac_cv_c_compiler_gnu
29908
29909  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29910/* end confdefs.h.  */
29911
29912    int i;
29913
29914_ACEOF
29915if ac_fn_c_try_compile "$LINENO"; then :
29916
29917else
29918  supports=no
29919fi
29920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29921  ac_ext=cpp
29922ac_cpp='$CXXCPP $CPPFLAGS'
29923ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29924ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29925ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29926
29927  CFLAGS="$saved_cflags"
29928
29929  saved_cxxflags="$CXXFLAGS"
29930  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29931  ac_ext=cpp
29932ac_cpp='$CXXCPP $CPPFLAGS'
29933ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29934ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29935ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29936
29937  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29938/* end confdefs.h.  */
29939
29940    int i;
29941
29942_ACEOF
29943if ac_fn_cxx_try_compile "$LINENO"; then :
29944
29945else
29946  supports=no
29947fi
29948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29949  ac_ext=cpp
29950ac_cpp='$CXXCPP $CPPFLAGS'
29951ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29952ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29953ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29954
29955  CXXFLAGS="$saved_cxxflags"
29956
29957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29958$as_echo "$supports" >&6; }
29959  if test "x$supports" = "xyes" ; then
29960    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29961  else
29962    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29963  fi
29964
29965
29966
29967
29968# Setup debug symbols (need objcopy from the toolchain for that)
29969
29970#
29971# ENABLE_DEBUG_SYMBOLS
29972# This must be done after the toolchain is setup, since we're looking at objcopy.
29973#
29974# Check whether --enable-debug-symbols was given.
29975if test "${enable_debug_symbols+set}" = set; then :
29976  enableval=$enable_debug_symbols;
29977fi
29978
29979
29980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29981$as_echo_n "checking if we should generate debug symbols... " >&6; }
29982
29983if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29984   # explicit enabling of enable-debug-symbols and can't find objcopy
29985   #   this is an error
29986   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29987fi
29988
29989if test "x$enable_debug_symbols" = "xyes"; then
29990  ENABLE_DEBUG_SYMBOLS=true
29991elif test "x$enable_debug_symbols" = "xno"; then
29992  ENABLE_DEBUG_SYMBOLS=false
29993else
29994  # default on macosx is false
29995  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29996    ENABLE_DEBUG_SYMBOLS=false
29997  # Default is on if objcopy is found, otherwise off
29998  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29999    ENABLE_DEBUG_SYMBOLS=true
30000  else
30001    ENABLE_DEBUG_SYMBOLS=false
30002  fi
30003fi
30004
30005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
30006$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
30007
30008#
30009# ZIP_DEBUGINFO_FILES
30010#
30011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
30012$as_echo_n "checking if we should zip debug-info files... " >&6; }
30013# Check whether --enable-zip-debug-info was given.
30014if test "${enable_zip_debug_info+set}" = set; then :
30015  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
30016else
30017  enable_zip_debug_info="yes"
30018fi
30019
30020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
30021$as_echo "${enable_zip_debug_info}" >&6; }
30022
30023if test "x${enable_zip_debug_info}" = "xno"; then
30024   ZIP_DEBUGINFO_FILES=false
30025else
30026   ZIP_DEBUGINFO_FILES=true
30027fi
30028
30029
30030
30031
30032
30033
30034
30035###############################################################################
30036#
30037# Check dependencies for external and internal libraries.
30038#
30039###############################################################################
30040
30041
30042
30043###############################################################################
30044#
30045# OS specific settings that we never will need to probe.
30046#
30047if test "x$OPENJDK_TARGET_OS" = xlinux; then
30048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30049$as_echo_n "checking what is not needed on Linux?... " >&6; }
30050    PULSE_NOT_NEEDED=yes
30051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30052$as_echo "pulse" >&6; }
30053fi
30054
30055if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30056    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30057$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30058    ALSA_NOT_NEEDED=yes
30059    PULSE_NOT_NEEDED=yes
30060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30061$as_echo "alsa pulse" >&6; }
30062fi
30063
30064if test "x$OPENJDK_TARGET_OS" = xwindows; then
30065    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30066$as_echo_n "checking what is not needed on Windows?... " >&6; }
30067    CUPS_NOT_NEEDED=yes
30068    ALSA_NOT_NEEDED=yes
30069    PULSE_NOT_NEEDED=yes
30070    X11_NOT_NEEDED=yes
30071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30072$as_echo "alsa cups pulse x11" >&6; }
30073fi
30074
30075if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30077$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30078    ALSA_NOT_NEEDED=yes
30079    PULSE_NOT_NEEDED=yes
30080    X11_NOT_NEEDED=yes
30081    FREETYPE2_NOT_NEEDED=yes
30082    # If the java runtime framework is disabled, then we need X11.
30083    # This will be adjusted below.
30084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30085$as_echo "alsa pulse x11" >&6; }
30086fi
30087
30088if test "x$OPENJDK_TARGET_OS" = xbsd; then
30089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30090$as_echo_n "checking what is not needed on bsd?... " >&6; }
30091    ALSA_NOT_NEEDED=yes
30092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30093$as_echo "alsa" >&6; }
30094fi
30095
30096if test "x$OPENJDK" = "xfalse"; then
30097    FREETYPE2_NOT_NEEDED=yes
30098fi
30099
30100if test "x$SUPPORT_HEADFUL" = xno; then
30101    X11_NOT_NEEDED=yes
30102fi
30103
30104###############################################################################
30105#
30106# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
30107# that uses this API.
30108#
30109# Check whether --enable-macosx-runtime-support was given.
30110if test "${enable_macosx_runtime_support+set}" = set; then :
30111  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
30112else
30113  MACOSX_RUNTIME_SUPPORT="no"
30114fi
30115
30116
30117USE_MACOSX_RUNTIME_SUPPORT=no
30118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
30119$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
30120if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30121    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
30122        MACOSX_RUNTIME_SUPPORT=yes
30123        USE_MACOSX_RUNTIME_SUPPORT=yes
30124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
30125$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
30126    else
30127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
30128$as_echo "yes, but explicitly disabled." >&6; }
30129    fi
30130else
30131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30132$as_echo "no" >&6; }
30133fi
30134
30135if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
30136    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
30137$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
30138    X11_NOT_NEEDED=
30139    FREETYPE2_NOT_NEEDED=
30140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30141$as_echo "alsa pulse" >&6; }
30142fi
30143
30144
30145
30146###############################################################################
30147#
30148# Check for X Windows
30149#
30150
30151# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30152# Make a simple check for the libraries at the sysroot, and setup --x-includes and
30153# --x-libraries for the sysroot, if that seems to be correct.
30154if test "x$SYS_ROOT" != "x/"; then
30155  if test "x$x_includes" = xNONE; then
30156    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30157      x_includes="$SYS_ROOT/usr/X11R6/include"
30158    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30159      x_includes="$SYS_ROOT/usr/include"
30160    fi
30161  fi
30162  if test "x$x_libraries" = xNONE; then
30163    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30164      x_libraries="$SYS_ROOT/usr/X11R6/lib"
30165    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30166      x_libraries="$SYS_ROOT/usr/lib64"
30167    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30168      x_libraries="$SYS_ROOT/usr/lib"
30169    fi
30170  fi
30171fi
30172
30173# Now let autoconf do it's magic
30174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30175$as_echo_n "checking for X... " >&6; }
30176
30177
30178# Check whether --with-x was given.
30179if test "${with_x+set}" = set; then :
30180  withval=$with_x;
30181fi
30182
30183# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30184if test "x$with_x" = xno; then
30185  # The user explicitly disabled X.
30186  have_x=disabled
30187else
30188  case $x_includes,$x_libraries in #(
30189    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
30190    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
30191  $as_echo_n "(cached) " >&6
30192else
30193  # One or both of the vars are not set, and there is no cached value.
30194ac_x_includes=no ac_x_libraries=no
30195rm -f -r conftest.dir
30196if mkdir conftest.dir; then
30197  cd conftest.dir
30198  cat >Imakefile <<'_ACEOF'
30199incroot:
30200	@echo incroot='${INCROOT}'
30201usrlibdir:
30202	@echo usrlibdir='${USRLIBDIR}'
30203libdir:
30204	@echo libdir='${LIBDIR}'
30205_ACEOF
30206  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30207    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30208    for ac_var in incroot usrlibdir libdir; do
30209      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30210    done
30211    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30212    for ac_extension in a so sl dylib la dll; do
30213      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30214	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30215	ac_im_usrlibdir=$ac_im_libdir; break
30216      fi
30217    done
30218    # Screen out bogus values from the imake configuration.  They are
30219    # bogus both because they are the default anyway, and because
30220    # using them would break gcc on systems where it needs fixed includes.
30221    case $ac_im_incroot in
30222	/usr/include) ac_x_includes= ;;
30223	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30224    esac
30225    case $ac_im_usrlibdir in
30226	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30227	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30228    esac
30229  fi
30230  cd ..
30231  rm -f -r conftest.dir
30232fi
30233
30234# Standard set of common directories for X headers.
30235# Check X11 before X11Rn because it is often a symlink to the current release.
30236ac_x_header_dirs='
30237/usr/X11/include
30238/usr/X11R7/include
30239/usr/X11R6/include
30240/usr/X11R5/include
30241/usr/X11R4/include
30242
30243/usr/include/X11
30244/usr/include/X11R7
30245/usr/include/X11R6
30246/usr/include/X11R5
30247/usr/include/X11R4
30248
30249/usr/local/X11/include
30250/usr/local/X11R7/include
30251/usr/local/X11R6/include
30252/usr/local/X11R5/include
30253/usr/local/X11R4/include
30254
30255/usr/local/include/X11
30256/usr/local/include/X11R7
30257/usr/local/include/X11R6
30258/usr/local/include/X11R5
30259/usr/local/include/X11R4
30260
30261/usr/X386/include
30262/usr/x386/include
30263/usr/XFree86/include/X11
30264
30265/usr/include
30266/usr/local/include
30267/usr/unsupported/include
30268/usr/athena/include
30269/usr/local/x11r5/include
30270/usr/lpp/Xamples/include
30271
30272/usr/openwin/include
30273/usr/openwin/share/include'
30274
30275if test "$ac_x_includes" = no; then
30276  # Guess where to find include files, by looking for Xlib.h.
30277  # First, try using that file with no special directory specified.
30278  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30279/* end confdefs.h.  */
30280#include <X11/Xlib.h>
30281_ACEOF
30282if ac_fn_cxx_try_cpp "$LINENO"; then :
30283  # We can compile using X headers with no special include directory.
30284ac_x_includes=
30285else
30286  for ac_dir in $ac_x_header_dirs; do
30287  if test -r "$ac_dir/X11/Xlib.h"; then
30288    ac_x_includes=$ac_dir
30289    break
30290  fi
30291done
30292fi
30293rm -f conftest.err conftest.i conftest.$ac_ext
30294fi # $ac_x_includes = no
30295
30296if test "$ac_x_libraries" = no; then
30297  # Check for the libraries.
30298  # See if we find them without any special options.
30299  # Don't add to $LIBS permanently.
30300  ac_save_LIBS=$LIBS
30301  LIBS="-lX11 $LIBS"
30302  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30303/* end confdefs.h.  */
30304#include <X11/Xlib.h>
30305int
30306main ()
30307{
30308XrmInitialize ()
30309  ;
30310  return 0;
30311}
30312_ACEOF
30313if ac_fn_cxx_try_link "$LINENO"; then :
30314  LIBS=$ac_save_LIBS
30315# We can link X programs with no special library path.
30316ac_x_libraries=
30317else
30318  LIBS=$ac_save_LIBS
30319for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30320do
30321  # Don't even attempt the hair of trying to link an X program!
30322  for ac_extension in a so sl dylib la dll; do
30323    if test -r "$ac_dir/libX11.$ac_extension"; then
30324      ac_x_libraries=$ac_dir
30325      break 2
30326    fi
30327  done
30328done
30329fi
30330rm -f core conftest.err conftest.$ac_objext \
30331    conftest$ac_exeext conftest.$ac_ext
30332fi # $ac_x_libraries = no
30333
30334case $ac_x_includes,$ac_x_libraries in #(
30335  no,* | *,no | *\'*)
30336    # Didn't find X, or a directory has "'" in its name.
30337    ac_cv_have_x="have_x=no";; #(
30338  *)
30339    # Record where we found X for the cache.
30340    ac_cv_have_x="have_x=yes\
30341	ac_x_includes='$ac_x_includes'\
30342	ac_x_libraries='$ac_x_libraries'"
30343esac
30344fi
30345;; #(
30346    *) have_x=yes;;
30347  esac
30348  eval "$ac_cv_have_x"
30349fi # $with_x != no
30350
30351if test "$have_x" != yes; then
30352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30353$as_echo "$have_x" >&6; }
30354  no_x=yes
30355else
30356  # If each of the values was on the command line, it overrides each guess.
30357  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30358  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30359  # Update the cache value to reflect the command line values.
30360  ac_cv_have_x="have_x=yes\
30361	ac_x_includes='$x_includes'\
30362	ac_x_libraries='$x_libraries'"
30363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30364$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30365fi
30366
30367if test "$no_x" = yes; then
30368  # Not all programs may use this symbol, but it does not hurt to define it.
30369
30370$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30371
30372  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30373else
30374  if test -n "$x_includes"; then
30375    X_CFLAGS="$X_CFLAGS -I$x_includes"
30376  fi
30377
30378  # It would also be nice to do this for all -L options, not just this one.
30379  if test -n "$x_libraries"; then
30380    X_LIBS="$X_LIBS -L$x_libraries"
30381    # For Solaris; some versions of Sun CC require a space after -R and
30382    # others require no space.  Words are not sufficient . . . .
30383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30384$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30385    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30386    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30387    ac_cxx_werror_flag=yes
30388    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30389/* end confdefs.h.  */
30390
30391int
30392main ()
30393{
30394
30395  ;
30396  return 0;
30397}
30398_ACEOF
30399if ac_fn_cxx_try_link "$LINENO"; then :
30400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30401$as_echo "no" >&6; }
30402       X_LIBS="$X_LIBS -R$x_libraries"
30403else
30404  LIBS="$ac_xsave_LIBS -R $x_libraries"
30405       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30406/* end confdefs.h.  */
30407
30408int
30409main ()
30410{
30411
30412  ;
30413  return 0;
30414}
30415_ACEOF
30416if ac_fn_cxx_try_link "$LINENO"; then :
30417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30418$as_echo "yes" >&6; }
30419	  X_LIBS="$X_LIBS -R $x_libraries"
30420else
30421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30422$as_echo "neither works" >&6; }
30423fi
30424rm -f core conftest.err conftest.$ac_objext \
30425    conftest$ac_exeext conftest.$ac_ext
30426fi
30427rm -f core conftest.err conftest.$ac_objext \
30428    conftest$ac_exeext conftest.$ac_ext
30429    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30430    LIBS=$ac_xsave_LIBS
30431  fi
30432
30433  # Check for system-dependent libraries X programs must link with.
30434  # Do this before checking for the system-independent R6 libraries
30435  # (-lICE), since we may need -lsocket or whatever for X linking.
30436
30437  if test "$ISC" = yes; then
30438    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30439  else
30440    # Martyn Johnson says this is needed for Ultrix, if the X
30441    # libraries were built with DECnet support.  And Karl Berry says
30442    # the Alpha needs dnet_stub (dnet does not exist).
30443    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30444    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30445/* end confdefs.h.  */
30446
30447/* Override any GCC internal prototype to avoid an error.
30448   Use char because int might match the return type of a GCC
30449   builtin and then its argument prototype would still apply.  */
30450#ifdef __cplusplus
30451extern "C"
30452#endif
30453char XOpenDisplay ();
30454int
30455main ()
30456{
30457return XOpenDisplay ();
30458  ;
30459  return 0;
30460}
30461_ACEOF
30462if ac_fn_cxx_try_link "$LINENO"; then :
30463
30464else
30465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30466$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30467if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
30468  $as_echo_n "(cached) " >&6
30469else
30470  ac_check_lib_save_LIBS=$LIBS
30471LIBS="-ldnet  $LIBS"
30472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30473/* end confdefs.h.  */
30474
30475/* Override any GCC internal prototype to avoid an error.
30476   Use char because int might match the return type of a GCC
30477   builtin and then its argument prototype would still apply.  */
30478#ifdef __cplusplus
30479extern "C"
30480#endif
30481char dnet_ntoa ();
30482int
30483main ()
30484{
30485return dnet_ntoa ();
30486  ;
30487  return 0;
30488}
30489_ACEOF
30490if ac_fn_cxx_try_link "$LINENO"; then :
30491  ac_cv_lib_dnet_dnet_ntoa=yes
30492else
30493  ac_cv_lib_dnet_dnet_ntoa=no
30494fi
30495rm -f core conftest.err conftest.$ac_objext \
30496    conftest$ac_exeext conftest.$ac_ext
30497LIBS=$ac_check_lib_save_LIBS
30498fi
30499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30500$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30501if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
30502  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30503fi
30504
30505    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30506      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30507$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30508if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
30509  $as_echo_n "(cached) " >&6
30510else
30511  ac_check_lib_save_LIBS=$LIBS
30512LIBS="-ldnet_stub  $LIBS"
30513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30514/* end confdefs.h.  */
30515
30516/* Override any GCC internal prototype to avoid an error.
30517   Use char because int might match the return type of a GCC
30518   builtin and then its argument prototype would still apply.  */
30519#ifdef __cplusplus
30520extern "C"
30521#endif
30522char dnet_ntoa ();
30523int
30524main ()
30525{
30526return dnet_ntoa ();
30527  ;
30528  return 0;
30529}
30530_ACEOF
30531if ac_fn_cxx_try_link "$LINENO"; then :
30532  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30533else
30534  ac_cv_lib_dnet_stub_dnet_ntoa=no
30535fi
30536rm -f core conftest.err conftest.$ac_objext \
30537    conftest$ac_exeext conftest.$ac_ext
30538LIBS=$ac_check_lib_save_LIBS
30539fi
30540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30541$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30542if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
30543  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30544fi
30545
30546    fi
30547fi
30548rm -f core conftest.err conftest.$ac_objext \
30549    conftest$ac_exeext conftest.$ac_ext
30550    LIBS="$ac_xsave_LIBS"
30551
30552    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30553    # to get the SysV transport functions.
30554    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30555    # needs -lnsl.
30556    # The nsl library prevents programs from opening the X display
30557    # on Irix 5.2, according to T.E. Dickey.
30558    # The functions gethostbyname, getservbyname, and inet_addr are
30559    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30560    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30561if test "x$ac_cv_func_gethostbyname" = x""yes; then :
30562
30563fi
30564
30565    if test $ac_cv_func_gethostbyname = no; then
30566      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30567$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30568if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
30569  $as_echo_n "(cached) " >&6
30570else
30571  ac_check_lib_save_LIBS=$LIBS
30572LIBS="-lnsl  $LIBS"
30573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30574/* end confdefs.h.  */
30575
30576/* Override any GCC internal prototype to avoid an error.
30577   Use char because int might match the return type of a GCC
30578   builtin and then its argument prototype would still apply.  */
30579#ifdef __cplusplus
30580extern "C"
30581#endif
30582char gethostbyname ();
30583int
30584main ()
30585{
30586return gethostbyname ();
30587  ;
30588  return 0;
30589}
30590_ACEOF
30591if ac_fn_cxx_try_link "$LINENO"; then :
30592  ac_cv_lib_nsl_gethostbyname=yes
30593else
30594  ac_cv_lib_nsl_gethostbyname=no
30595fi
30596rm -f core conftest.err conftest.$ac_objext \
30597    conftest$ac_exeext conftest.$ac_ext
30598LIBS=$ac_check_lib_save_LIBS
30599fi
30600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30601$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30602if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
30603  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30604fi
30605
30606      if test $ac_cv_lib_nsl_gethostbyname = no; then
30607	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30608$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30609if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
30610  $as_echo_n "(cached) " >&6
30611else
30612  ac_check_lib_save_LIBS=$LIBS
30613LIBS="-lbsd  $LIBS"
30614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30615/* end confdefs.h.  */
30616
30617/* Override any GCC internal prototype to avoid an error.
30618   Use char because int might match the return type of a GCC
30619   builtin and then its argument prototype would still apply.  */
30620#ifdef __cplusplus
30621extern "C"
30622#endif
30623char gethostbyname ();
30624int
30625main ()
30626{
30627return gethostbyname ();
30628  ;
30629  return 0;
30630}
30631_ACEOF
30632if ac_fn_cxx_try_link "$LINENO"; then :
30633  ac_cv_lib_bsd_gethostbyname=yes
30634else
30635  ac_cv_lib_bsd_gethostbyname=no
30636fi
30637rm -f core conftest.err conftest.$ac_objext \
30638    conftest$ac_exeext conftest.$ac_ext
30639LIBS=$ac_check_lib_save_LIBS
30640fi
30641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30642$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30643if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
30644  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30645fi
30646
30647      fi
30648    fi
30649
30650    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30651    # socket/setsockopt and other routines are undefined under SCO ODT
30652    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30653    # on later versions), says Simon Leinen: it contains gethostby*
30654    # variants that don't use the name server (or something).  -lsocket
30655    # must be given before -lnsl if both are needed.  We assume that
30656    # if connect needs -lnsl, so does gethostbyname.
30657    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30658if test "x$ac_cv_func_connect" = x""yes; then :
30659
30660fi
30661
30662    if test $ac_cv_func_connect = no; then
30663      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30664$as_echo_n "checking for connect in -lsocket... " >&6; }
30665if test "${ac_cv_lib_socket_connect+set}" = set; then :
30666  $as_echo_n "(cached) " >&6
30667else
30668  ac_check_lib_save_LIBS=$LIBS
30669LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30671/* end confdefs.h.  */
30672
30673/* Override any GCC internal prototype to avoid an error.
30674   Use char because int might match the return type of a GCC
30675   builtin and then its argument prototype would still apply.  */
30676#ifdef __cplusplus
30677extern "C"
30678#endif
30679char connect ();
30680int
30681main ()
30682{
30683return connect ();
30684  ;
30685  return 0;
30686}
30687_ACEOF
30688if ac_fn_cxx_try_link "$LINENO"; then :
30689  ac_cv_lib_socket_connect=yes
30690else
30691  ac_cv_lib_socket_connect=no
30692fi
30693rm -f core conftest.err conftest.$ac_objext \
30694    conftest$ac_exeext conftest.$ac_ext
30695LIBS=$ac_check_lib_save_LIBS
30696fi
30697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30698$as_echo "$ac_cv_lib_socket_connect" >&6; }
30699if test "x$ac_cv_lib_socket_connect" = x""yes; then :
30700  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30701fi
30702
30703    fi
30704
30705    # Guillermo Gomez says -lposix is necessary on A/UX.
30706    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30707if test "x$ac_cv_func_remove" = x""yes; then :
30708
30709fi
30710
30711    if test $ac_cv_func_remove = no; then
30712      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30713$as_echo_n "checking for remove in -lposix... " >&6; }
30714if test "${ac_cv_lib_posix_remove+set}" = set; then :
30715  $as_echo_n "(cached) " >&6
30716else
30717  ac_check_lib_save_LIBS=$LIBS
30718LIBS="-lposix  $LIBS"
30719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30720/* end confdefs.h.  */
30721
30722/* Override any GCC internal prototype to avoid an error.
30723   Use char because int might match the return type of a GCC
30724   builtin and then its argument prototype would still apply.  */
30725#ifdef __cplusplus
30726extern "C"
30727#endif
30728char remove ();
30729int
30730main ()
30731{
30732return remove ();
30733  ;
30734  return 0;
30735}
30736_ACEOF
30737if ac_fn_cxx_try_link "$LINENO"; then :
30738  ac_cv_lib_posix_remove=yes
30739else
30740  ac_cv_lib_posix_remove=no
30741fi
30742rm -f core conftest.err conftest.$ac_objext \
30743    conftest$ac_exeext conftest.$ac_ext
30744LIBS=$ac_check_lib_save_LIBS
30745fi
30746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30747$as_echo "$ac_cv_lib_posix_remove" >&6; }
30748if test "x$ac_cv_lib_posix_remove" = x""yes; then :
30749  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30750fi
30751
30752    fi
30753
30754    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30755    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30756if test "x$ac_cv_func_shmat" = x""yes; then :
30757
30758fi
30759
30760    if test $ac_cv_func_shmat = no; then
30761      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30762$as_echo_n "checking for shmat in -lipc... " >&6; }
30763if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
30764  $as_echo_n "(cached) " >&6
30765else
30766  ac_check_lib_save_LIBS=$LIBS
30767LIBS="-lipc  $LIBS"
30768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30769/* end confdefs.h.  */
30770
30771/* Override any GCC internal prototype to avoid an error.
30772   Use char because int might match the return type of a GCC
30773   builtin and then its argument prototype would still apply.  */
30774#ifdef __cplusplus
30775extern "C"
30776#endif
30777char shmat ();
30778int
30779main ()
30780{
30781return shmat ();
30782  ;
30783  return 0;
30784}
30785_ACEOF
30786if ac_fn_cxx_try_link "$LINENO"; then :
30787  ac_cv_lib_ipc_shmat=yes
30788else
30789  ac_cv_lib_ipc_shmat=no
30790fi
30791rm -f core conftest.err conftest.$ac_objext \
30792    conftest$ac_exeext conftest.$ac_ext
30793LIBS=$ac_check_lib_save_LIBS
30794fi
30795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30796$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30797if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
30798  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30799fi
30800
30801    fi
30802  fi
30803
30804  # Check for libraries that X11R6 Xt/Xaw programs need.
30805  ac_save_LDFLAGS=$LDFLAGS
30806  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30807  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30808  # check for ICE first), but we must link in the order -lSM -lICE or
30809  # we get undefined symbols.  So assume we have SM if we have ICE.
30810  # These have to be linked with before -lX11, unlike the other
30811  # libraries we check for below, so use a different variable.
30812  # John Interrante, Karl Berry
30813  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30814$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30815if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
30816  $as_echo_n "(cached) " >&6
30817else
30818  ac_check_lib_save_LIBS=$LIBS
30819LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30821/* end confdefs.h.  */
30822
30823/* Override any GCC internal prototype to avoid an error.
30824   Use char because int might match the return type of a GCC
30825   builtin and then its argument prototype would still apply.  */
30826#ifdef __cplusplus
30827extern "C"
30828#endif
30829char IceConnectionNumber ();
30830int
30831main ()
30832{
30833return IceConnectionNumber ();
30834  ;
30835  return 0;
30836}
30837_ACEOF
30838if ac_fn_cxx_try_link "$LINENO"; then :
30839  ac_cv_lib_ICE_IceConnectionNumber=yes
30840else
30841  ac_cv_lib_ICE_IceConnectionNumber=no
30842fi
30843rm -f core conftest.err conftest.$ac_objext \
30844    conftest$ac_exeext conftest.$ac_ext
30845LIBS=$ac_check_lib_save_LIBS
30846fi
30847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30848$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30849if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
30850  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30851fi
30852
30853  LDFLAGS=$ac_save_LDFLAGS
30854
30855fi
30856
30857
30858# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30859# this doesn't make sense so we remove it.
30860if test "x$COMPILE_TYPE" = xcross; then
30861  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30862fi
30863
30864if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30865
30866    # Print a helpful message on how to acquire the necessary build dependency.
30867    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30868    MISSING_DEPENDENCY=x11
30869    PKGHANDLER_COMMAND=
30870
30871    case $PKGHANDLER in
30872	apt-get)
30873                apt_help     $MISSING_DEPENDENCY ;;
30874    yum)
30875                yum_help     $MISSING_DEPENDENCY ;;
30876	port)
30877                port_help    $MISSING_DEPENDENCY ;;
30878	pkgutil)
30879                pkgutil_help $MISSING_DEPENDENCY ;;
30880	pkgadd)
30881                pkgadd_help  $MISSING_DEPENDENCY ;;
30882    * )
30883      break ;;
30884    esac
30885
30886    if test "x$PKGHANDLER_COMMAND" != x; then
30887        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30888    fi
30889
30890    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30891fi
30892
30893# Some of the old makefiles require a setting of OPENWIN_HOME
30894# Since the X11R6 directory has disappeared on later Linuxes,
30895# we need to probe for it.
30896if test "x$OPENJDK_TARGET_OS" = xlinux; then
30897    if test -d "$SYS_ROOT/usr/X11R6"; then
30898        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30899    elif test -d "$SYS_ROOT/usr/include/X11"; then
30900        OPENWIN_HOME="$SYS_ROOT/usr"
30901    fi
30902fi
30903if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30904    OPENWIN_HOME="/usr/openwin"
30905fi
30906
30907
30908
30909#
30910# Weird Sol10 something check...TODO change to try compile
30911#
30912if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30913  if test "`uname -r`" = "5.10"; then
30914     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30915     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30916     fi
30917  fi
30918fi
30919
30920ac_ext=c
30921ac_cpp='$CPP $CPPFLAGS'
30922ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30923ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30924ac_compiler_gnu=$ac_cv_c_compiler_gnu
30925
30926OLD_CFLAGS="$CFLAGS"
30927CFLAGS="$CFLAGS $X_CFLAGS"
30928
30929# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30930for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30931do :
30932  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30933ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30934                   # include <X11/Xutil.h>
30935
30936"
30937if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30938  cat >>confdefs.h <<_ACEOF
30939#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30940_ACEOF
30941 X11_A_OK=yes
30942else
30943  X11_A_OK=no; break
30944fi
30945
30946done
30947
30948
30949CFLAGS="$OLD_CFLAGS"
30950ac_ext=cpp
30951ac_cpp='$CXXCPP $CPPFLAGS'
30952ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30953ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30954ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30955
30956
30957if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30958
30959    # Print a helpful message on how to acquire the necessary build dependency.
30960    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30961    MISSING_DEPENDENCY=x11
30962    PKGHANDLER_COMMAND=
30963
30964    case $PKGHANDLER in
30965	apt-get)
30966                apt_help     $MISSING_DEPENDENCY ;;
30967    yum)
30968                yum_help     $MISSING_DEPENDENCY ;;
30969	port)
30970                port_help    $MISSING_DEPENDENCY ;;
30971	pkgutil)
30972                pkgutil_help $MISSING_DEPENDENCY ;;
30973	pkgadd)
30974                pkgadd_help  $MISSING_DEPENDENCY ;;
30975    * )
30976      break ;;
30977    esac
30978
30979    if test "x$PKGHANDLER_COMMAND" != x; then
30980        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30981    fi
30982
30983    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30984fi
30985
30986
30987
30988
30989
30990
30991###############################################################################
30992#
30993# The common unix printing system cups is used to print from java.
30994#
30995
30996# Check whether --with-cups was given.
30997if test "${with_cups+set}" = set; then :
30998  withval=$with_cups;
30999fi
31000
31001
31002# Check whether --with-cups-include was given.
31003if test "${with_cups_include+set}" = set; then :
31004  withval=$with_cups_include;
31005fi
31006
31007
31008if test "x$CUPS_NOT_NEEDED" = xyes; then
31009	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
31010		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
31011$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
31012	fi
31013	CUPS_CFLAGS=
31014else
31015	CUPS_FOUND=no
31016
31017	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
31018	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
31019	fi
31020
31021	if test "x${with_cups}" != x; then
31022	    CUPS_CFLAGS="-I${with_cups}/include"
31023	    CUPS_FOUND=yes
31024	fi
31025	if test "x${with_cups_include}" != x; then
31026	    CUPS_CFLAGS="-I${with_cups_include}"
31027	    CUPS_FOUND=yes
31028	fi
31029	if test "x$CUPS_FOUND" = xno; then
31030
31031
31032    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31033        # Source the builddeps file again, to make sure it uses the latest variables!
31034        . $builddepsfile
31035        # Look for a target and build machine specific resource!
31036        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31037        if test "x$resource" = x; then
31038            # Ok, lets instead look for a target specific resource
31039            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31040        fi
31041        if test "x$resource" = x; then
31042            # Ok, lets instead look for a build specific resource
31043            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31044        fi
31045        if test "x$resource" = x; then
31046            # Ok, lets instead look for a generic resource
31047            # (The cups comes from M4 and not the shell, thus no need for eval here.)
31048            resource=${builddep_cups}
31049        fi
31050        if test "x$resource" != x; then
31051            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31052$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31053	    # If the resource in the builddeps.conf file is an existing directory,
31054	    # for example /java/linux/cups
31055	    if test -d ${resource}; then
31056	       depdir=${resource}
31057	    else
31058
31059# cups is for example mymodule
31060# $resource is for example libs/general/libmymod_1_2_3.zip
31061# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31062# $with_builddeps_dir is for example /localhome/builddeps
31063# depdir is the name of the variable into which we store the depdir, eg MYMOD
31064# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31065# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31066    filename=`basename $resource`
31067    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31068    filebase=${filename%%.*}
31069    extension=${filename#*.}
31070    installdir=$with_builddeps_dir/$filebase
31071    if test ! -f $installdir/$filename.unpacked; then
31072        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31073$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31074        if test ! -d $installdir; then
31075            mkdir -p $installdir
31076        fi
31077        if test ! -d $installdir; then
31078            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31079        fi
31080        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31081        touch $tmpfile
31082        if test ! -f $tmpfile; then
31083            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31084        fi
31085
31086    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31087    # $tmpfile is the local file name for the downloaded file.
31088    VALID_TOOL=no
31089    if test "x$BDEPS_FTP" = xwget; then
31090       VALID_TOOL=yes
31091       wget -O $tmpfile $with_builddeps_server/$resource
31092    fi
31093    if test "x$BDEPS_FTP" = xlftp; then
31094       VALID_TOOL=yes
31095       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31096    fi
31097    if test "x$BDEPS_FTP" = xftp; then
31098        VALID_TOOL=yes
31099        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31100        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31101        FTPUSERPWD=${FTPSERVER%%@*}
31102        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31103            FTPUSER=${userpwd%%:*}
31104            FTPPWD=${userpwd#*@}
31105            FTPSERVER=${FTPSERVER#*@}
31106        else
31107            FTPUSER=ftp
31108            FTPPWD=ftp
31109        fi
31110        # the "pass" command does not work on some
31111        # ftp clients (read ftp.exe) but if it works,
31112        # passive mode is better!
31113        (\
31114            echo "user $FTPUSER $FTPPWD"        ;\
31115            echo "pass"                         ;\
31116            echo "bin"                          ;\
31117            echo "get $FTPPATH $tmpfile"              ;\
31118        ) | ftp -in $FTPSERVER
31119    fi
31120    if test "x$VALID_TOOL" != xyes; then
31121       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31122    fi
31123
31124        mv $tmpfile $installdir/$filename
31125        if test ! -s $installdir/$filename; then
31126            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31127        fi
31128        case "$extension" in
31129            zip)  echo "Unzipping $installdir/$filename..."
31130               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31131            ;;
31132            tar.gz) echo "Untaring $installdir/$filename..."
31133               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31134            ;;
31135            tgz) echo "Untaring $installdir/$filename..."
31136               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31137            ;;
31138            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31139            ;;
31140        esac
31141    fi
31142    if test -f $installdir/$filename.unpacked; then
31143        depdir=$installdir
31144    fi
31145
31146	    fi
31147            # Source the builddeps file again, because in the previous command, the depdir
31148            # was updated to point at the current build dependency install directory.
31149            . $builddepsfile
31150            # Now extract variables from the builddeps.conf files.
31151            theroot=${builddep_cups_ROOT}
31152            thecflags=${builddep_cups_CFLAGS}
31153            thelibs=${builddep_cups_LIBS}
31154            if test "x$depdir" = x; then
31155                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31156            fi
31157            CUPS=$depdir
31158            if test "x$theroot" != x; then
31159               CUPS="$theroot"
31160            fi
31161            if test "x$thecflags" != x; then
31162               CUPS_CFLAGS="$thecflags"
31163            fi
31164            if test "x$thelibs" != x; then
31165               CUPS_LIBS="$thelibs"
31166            fi
31167            CUPS_FOUND=yes
31168
31169        fi
31170
31171    fi
31172
31173	fi
31174	if test "x$CUPS_FOUND" = xno; then
31175	    # Are the cups headers installed in the default /usr/include location?
31176	    for ac_header in cups/cups.h cups/ppd.h
31177do :
31178  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31179ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31180if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31181  cat >>confdefs.h <<_ACEOF
31182#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31183_ACEOF
31184 CUPS_FOUND=yes
31185	                      CUPS_CFLAGS=
31186	                      DEFAULT_CUPS=yes
31187fi
31188
31189done
31190
31191	fi
31192	if test "x$CUPS_FOUND" = xno; then
31193	    # Getting nervous now? Lets poke around for standard Solaris third-party
31194	    # package installation locations.
31195	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31196$as_echo_n "checking for cups headers... " >&6; }
31197	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31198	       # An SFW package seems to be installed!
31199	       CUPS_FOUND=yes
31200	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31201	    elif test -s /opt/csw/include/cups/cups.h; then
31202	       # A CSW package seems to be installed!
31203	       CUPS_FOUND=yes
31204	       CUPS_CFLAGS="-I/opt/csw/include"
31205	    fi
31206	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31207$as_echo "$CUPS_FOUND" >&6; }
31208	fi
31209	if test "x$CUPS_FOUND" = xno; then
31210
31211    # Print a helpful message on how to acquire the necessary build dependency.
31212    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31213    MISSING_DEPENDENCY=cups
31214    PKGHANDLER_COMMAND=
31215
31216    case $PKGHANDLER in
31217	apt-get)
31218                apt_help     $MISSING_DEPENDENCY ;;
31219    yum)
31220                yum_help     $MISSING_DEPENDENCY ;;
31221	port)
31222                port_help    $MISSING_DEPENDENCY ;;
31223	pkgutil)
31224                pkgutil_help $MISSING_DEPENDENCY ;;
31225	pkgadd)
31226                pkgadd_help  $MISSING_DEPENDENCY ;;
31227    * )
31228      break ;;
31229    esac
31230
31231    if test "x$PKGHANDLER_COMMAND" != x; then
31232        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31233    fi
31234
31235	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31236	fi
31237fi
31238
31239
31240
31241
31242
31243
31244###############################################################################
31245#
31246# The ubiquitous freetype2 library is used to render fonts.
31247#
31248
31249# Check whether --with-freetype was given.
31250if test "${with_freetype+set}" = set; then :
31251  withval=$with_freetype;
31252fi
31253
31254
31255# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31256USING_SYSTEM_FT_LIB=false
31257
31258if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31259	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31260		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31261$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31262	fi
31263	FREETYPE2_CFLAGS=
31264	FREETYPE2_LIBS=
31265        FREETYPE2_LIB_PATH=
31266else
31267	FREETYPE2_FOUND=no
31268
31269	if test "x$with_freetype" != x; then
31270
31271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31272
31273  # Input might be given as Windows format, start by converting to
31274  # unix format.
31275  path="$with_freetype"
31276  new_path=`$CYGPATH -u "$path"`
31277
31278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31281  # "foo.exe" is OK but "foo" is an error.
31282  #
31283  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31284  # It is also a way to make sure we got the proper file name for the real test later on.
31285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31286  if test "x$test_shortpath" = x; then
31287    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31288$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31289    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31290  fi
31291
31292  # Call helper function which possibly converts this using DOS-style short mode.
31293  # If so, the updated path is stored in $new_path.
31294
31295  input_path="$new_path"
31296  # Check if we need to convert this using DOS-style short mode. If the path
31297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31298  # take no chances and rewrite it.
31299  # Note: m4 eats our [], so we need to use [ and ] instead.
31300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31301  if test "x$has_forbidden_chars" != x; then
31302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31306      # Going to short mode and back again did indeed matter. Since short mode is
31307      # case insensitive, let's make it lowercase to improve readability.
31308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31309      # Now convert it back to Unix-stile (cygpath)
31310      input_path=`$CYGPATH -u "$shortmode_path"`
31311      new_path="$input_path"
31312    fi
31313  fi
31314
31315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31316  if test "x$test_cygdrive_prefix" = x; then
31317    # As a simple fix, exclude /usr/bin since it's not a real path.
31318    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31320      # a path prefixed by /cygdrive for fixpath to work.
31321      new_path="$CYGWIN_ROOT_PATH$input_path"
31322    fi
31323  fi
31324
31325
31326  if test "x$path" != "x$new_path"; then
31327    with_freetype="$new_path"
31328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31329$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31330  fi
31331
31332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31333
31334  path="$with_freetype"
31335  has_colon=`$ECHO $path | $GREP ^.:`
31336  new_path="$path"
31337  if test "x$has_colon" = x; then
31338    # Not in mixed or Windows style, start by that.
31339    new_path=`cmd //c echo $path`
31340  fi
31341
31342
31343  input_path="$new_path"
31344  # Check if we need to convert this using DOS-style short mode. If the path
31345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31346  # take no chances and rewrite it.
31347  # Note: m4 eats our [], so we need to use [ and ] instead.
31348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31349  if test "x$has_forbidden_chars" != x; then
31350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31352  fi
31353
31354
31355  windows_path="$new_path"
31356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31357    unix_path=`$CYGPATH -u "$windows_path"`
31358    new_path="$unix_path"
31359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31361    new_path="$unix_path"
31362  fi
31363
31364  if test "x$path" != "x$new_path"; then
31365    with_freetype="$new_path"
31366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31367$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31368  fi
31369
31370  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31371  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31372
31373  else
31374    # We're on a posix platform. Hooray! :)
31375    path="$with_freetype"
31376    has_space=`$ECHO "$path" | $GREP " "`
31377    if test "x$has_space" != x; then
31378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31379$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31380      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31381    fi
31382
31383    # Use eval to expand a potential ~
31384    eval path="$path"
31385    if test ! -f "$path" && test ! -d "$path"; then
31386      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31387    fi
31388
31389    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31390  fi
31391
31392	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31393            FREETYPE2_LIB_PATH="$with_freetype/lib"
31394            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31395                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31396                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31397            fi
31398            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31399                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31400            fi
31401	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31402            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31403                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31404            fi
31405 	    FREETYPE2_FOUND=yes
31406   	    if test "x$FREETYPE2_FOUND" = xyes; then
31407	        # Verify that the directories exist
31408                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31409		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31410		fi
31411	        # List the contents of the lib.
31412		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31413                if test "x$FREETYPELIB" = x; then
31414		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31415		fi
31416	        # Check one h-file
31417                if ! test -s "$with_freetype/include/ft2build.h"; then
31418		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31419		fi
31420            fi
31421        fi
31422	if test "x$FREETYPE2_FOUND" = xno; then
31423
31424
31425    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31426        # Source the builddeps file again, to make sure it uses the latest variables!
31427        . $builddepsfile
31428        # Look for a target and build machine specific resource!
31429        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31430        if test "x$resource" = x; then
31431            # Ok, lets instead look for a target specific resource
31432            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31433        fi
31434        if test "x$resource" = x; then
31435            # Ok, lets instead look for a build specific resource
31436            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31437        fi
31438        if test "x$resource" = x; then
31439            # Ok, lets instead look for a generic resource
31440            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31441            resource=${builddep_freetype2}
31442        fi
31443        if test "x$resource" != x; then
31444            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31445$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31446	    # If the resource in the builddeps.conf file is an existing directory,
31447	    # for example /java/linux/cups
31448	    if test -d ${resource}; then
31449	       depdir=${resource}
31450	    else
31451
31452# freetype2 is for example mymodule
31453# $resource is for example libs/general/libmymod_1_2_3.zip
31454# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31455# $with_builddeps_dir is for example /localhome/builddeps
31456# depdir is the name of the variable into which we store the depdir, eg MYMOD
31457# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31458# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31459    filename=`basename $resource`
31460    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31461    filebase=${filename%%.*}
31462    extension=${filename#*.}
31463    installdir=$with_builddeps_dir/$filebase
31464    if test ! -f $installdir/$filename.unpacked; then
31465        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31466$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31467        if test ! -d $installdir; then
31468            mkdir -p $installdir
31469        fi
31470        if test ! -d $installdir; then
31471            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31472        fi
31473        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31474        touch $tmpfile
31475        if test ! -f $tmpfile; then
31476            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31477        fi
31478
31479    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31480    # $tmpfile is the local file name for the downloaded file.
31481    VALID_TOOL=no
31482    if test "x$BDEPS_FTP" = xwget; then
31483       VALID_TOOL=yes
31484       wget -O $tmpfile $with_builddeps_server/$resource
31485    fi
31486    if test "x$BDEPS_FTP" = xlftp; then
31487       VALID_TOOL=yes
31488       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31489    fi
31490    if test "x$BDEPS_FTP" = xftp; then
31491        VALID_TOOL=yes
31492        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31493        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31494        FTPUSERPWD=${FTPSERVER%%@*}
31495        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31496            FTPUSER=${userpwd%%:*}
31497            FTPPWD=${userpwd#*@}
31498            FTPSERVER=${FTPSERVER#*@}
31499        else
31500            FTPUSER=ftp
31501            FTPPWD=ftp
31502        fi
31503        # the "pass" command does not work on some
31504        # ftp clients (read ftp.exe) but if it works,
31505        # passive mode is better!
31506        (\
31507            echo "user $FTPUSER $FTPPWD"        ;\
31508            echo "pass"                         ;\
31509            echo "bin"                          ;\
31510            echo "get $FTPPATH $tmpfile"              ;\
31511        ) | ftp -in $FTPSERVER
31512    fi
31513    if test "x$VALID_TOOL" != xyes; then
31514       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31515    fi
31516
31517        mv $tmpfile $installdir/$filename
31518        if test ! -s $installdir/$filename; then
31519            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31520        fi
31521        case "$extension" in
31522            zip)  echo "Unzipping $installdir/$filename..."
31523               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31524            ;;
31525            tar.gz) echo "Untaring $installdir/$filename..."
31526               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31527            ;;
31528            tgz) echo "Untaring $installdir/$filename..."
31529               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31530            ;;
31531            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31532            ;;
31533        esac
31534    fi
31535    if test -f $installdir/$filename.unpacked; then
31536        depdir=$installdir
31537    fi
31538
31539	    fi
31540            # Source the builddeps file again, because in the previous command, the depdir
31541            # was updated to point at the current build dependency install directory.
31542            . $builddepsfile
31543            # Now extract variables from the builddeps.conf files.
31544            theroot=${builddep_freetype2_ROOT}
31545            thecflags=${builddep_freetype2_CFLAGS}
31546            thelibs=${builddep_freetype2_LIBS}
31547            if test "x$depdir" = x; then
31548                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31549            fi
31550            FREETYPE2=$depdir
31551            if test "x$theroot" != x; then
31552               FREETYPE2="$theroot"
31553            fi
31554            if test "x$thecflags" != x; then
31555               FREETYPE2_CFLAGS="$thecflags"
31556            fi
31557            if test "x$thelibs" != x; then
31558               FREETYPE2_LIBS="$thelibs"
31559            fi
31560            FREETYPE2_FOUND=yes
31561            else FREETYPE2_FOUND=no
31562
31563        fi
31564        else FREETYPE2_FOUND=no
31565
31566    fi
31567
31568            USING_SYSTEM_FT_LIB=true
31569	fi
31570	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31571            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31572
31573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31574
31575  # Input might be given as Windows format, start by converting to
31576  # unix format.
31577  path="$FREETYPELOCATION"
31578  new_path=`$CYGPATH -u "$path"`
31579
31580  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31581  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31582  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31583  # "foo.exe" is OK but "foo" is an error.
31584  #
31585  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31586  # It is also a way to make sure we got the proper file name for the real test later on.
31587  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31588  if test "x$test_shortpath" = x; then
31589    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31590$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31591    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31592  fi
31593
31594  # Call helper function which possibly converts this using DOS-style short mode.
31595  # If so, the updated path is stored in $new_path.
31596
31597  input_path="$new_path"
31598  # Check if we need to convert this using DOS-style short mode. If the path
31599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31600  # take no chances and rewrite it.
31601  # Note: m4 eats our [], so we need to use [ and ] instead.
31602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31603  if test "x$has_forbidden_chars" != x; then
31604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31605    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31606    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31607    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31608      # Going to short mode and back again did indeed matter. Since short mode is
31609      # case insensitive, let's make it lowercase to improve readability.
31610      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31611      # Now convert it back to Unix-stile (cygpath)
31612      input_path=`$CYGPATH -u "$shortmode_path"`
31613      new_path="$input_path"
31614    fi
31615  fi
31616
31617  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31618  if test "x$test_cygdrive_prefix" = x; then
31619    # As a simple fix, exclude /usr/bin since it's not a real path.
31620    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31621      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31622      # a path prefixed by /cygdrive for fixpath to work.
31623      new_path="$CYGWIN_ROOT_PATH$input_path"
31624    fi
31625  fi
31626
31627
31628  if test "x$path" != "x$new_path"; then
31629    FREETYPELOCATION="$new_path"
31630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31631$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31632  fi
31633
31634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31635
31636  path="$FREETYPELOCATION"
31637  has_colon=`$ECHO $path | $GREP ^.:`
31638  new_path="$path"
31639  if test "x$has_colon" = x; then
31640    # Not in mixed or Windows style, start by that.
31641    new_path=`cmd //c echo $path`
31642  fi
31643
31644
31645  input_path="$new_path"
31646  # Check if we need to convert this using DOS-style short mode. If the path
31647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31648  # take no chances and rewrite it.
31649  # Note: m4 eats our [], so we need to use [ and ] instead.
31650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31651  if test "x$has_forbidden_chars" != x; then
31652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31653    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31654  fi
31655
31656
31657  windows_path="$new_path"
31658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31659    unix_path=`$CYGPATH -u "$windows_path"`
31660    new_path="$unix_path"
31661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31663    new_path="$unix_path"
31664  fi
31665
31666  if test "x$path" != "x$new_path"; then
31667    FREETYPELOCATION="$new_path"
31668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31669$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31670  fi
31671
31672  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31673  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31674
31675  else
31676    # We're on a posix platform. Hooray! :)
31677    path="$FREETYPELOCATION"
31678    has_space=`$ECHO "$path" | $GREP " "`
31679    if test "x$has_space" != x; then
31680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31681$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31682      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31683    fi
31684
31685    # Use eval to expand a potential ~
31686    eval path="$path"
31687    if test ! -f "$path" && test ! -d "$path"; then
31688      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31689    fi
31690
31691    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31692  fi
31693
31694	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31695$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31696	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31697	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31698	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31699 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31700                if ! test -s "$FREETYPE2_LIBS"; then
31701		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31702		fi
31703                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31704		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31705		fi
31706                USING_SYSTEM_FT_LIB=true
31707                FREETYPE2_FOUND=yes
31708	    fi
31709	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31710$as_echo "$FREETYPE2_FOUND" >&6; }
31711        fi
31712	if test "x$FREETYPE2_FOUND" = xno; then
31713
31714pkg_failed=no
31715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31716$as_echo_n "checking for FREETYPE2... " >&6; }
31717
31718if test -n "$FREETYPE2_CFLAGS"; then
31719    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31720 elif test -n "$PKG_CONFIG"; then
31721    if test -n "$PKG_CONFIG" && \
31722    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31723  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31724  ac_status=$?
31725  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31726  test $ac_status = 0; }; then
31727  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31728else
31729  pkg_failed=yes
31730fi
31731 else
31732    pkg_failed=untried
31733fi
31734if test -n "$FREETYPE2_LIBS"; then
31735    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31736 elif test -n "$PKG_CONFIG"; then
31737    if test -n "$PKG_CONFIG" && \
31738    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31739  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31740  ac_status=$?
31741  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31742  test $ac_status = 0; }; then
31743  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31744else
31745  pkg_failed=yes
31746fi
31747 else
31748    pkg_failed=untried
31749fi
31750
31751
31752
31753if test $pkg_failed = yes; then
31754
31755if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31756        _pkg_short_errors_supported=yes
31757else
31758        _pkg_short_errors_supported=no
31759fi
31760        if test $_pkg_short_errors_supported = yes; then
31761	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31762        else
31763	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31764        fi
31765	# Put the nasty error message in config.log where it belongs
31766	echo "$FREETYPE2_PKG_ERRORS" >&5
31767
31768	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31769$as_echo "no" >&6; }
31770                FREETYPE2_FOUND=no
31771elif test $pkg_failed = untried; then
31772	FREETYPE2_FOUND=no
31773else
31774	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31775	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31777$as_echo "yes" >&6; }
31778	FREETYPE2_FOUND=yes
31779fi
31780            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31781            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31782            USING_SYSTEM_FT_LIB=true
31783            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31784            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31785              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31786            fi
31787	fi
31788	if test "x$FREETYPE2_FOUND" = xno; then
31789	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31790$as_echo_n "checking for freetype in some standard locations... " >&6; }
31791
31792	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31793	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31794	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31795	    fi
31796	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31797	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31798	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31799	    fi
31800
31801	    PREV_CXXCFLAGS="$CXXFLAGS"
31802	    PREV_LDFLAGS="$LDFLAGS"
31803	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31804	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31805	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31806/* end confdefs.h.  */
31807#include<ft2build.h>
31808	                    #include FT_FREETYPE_H
31809	                   int main() { return 0; }
31810
31811_ACEOF
31812if ac_fn_cxx_try_link "$LINENO"; then :
31813
31814	                      # Yes, the default cflags and libs did the trick.
31815	                      FREETYPE2_FOUND=yes
31816	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31817	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31818
31819else
31820
31821	                      FREETYPE2_FOUND=no
31822
31823fi
31824rm -f core conftest.err conftest.$ac_objext \
31825    conftest$ac_exeext conftest.$ac_ext
31826            CXXCFLAGS="$PREV_CXXFLAGS"
31827	    LDFLAGS="$PREV_LDFLAGS"
31828	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31829$as_echo "$FREETYPE2_FOUND" >&6; }
31830            USING_SYSTEM_FT_LIB=true
31831	fi
31832	if test "x$FREETYPE2_FOUND" = xno; then
31833
31834    # Print a helpful message on how to acquire the necessary build dependency.
31835    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31836    MISSING_DEPENDENCY=freetype2
31837    PKGHANDLER_COMMAND=
31838
31839    case $PKGHANDLER in
31840	apt-get)
31841                apt_help     $MISSING_DEPENDENCY ;;
31842    yum)
31843                yum_help     $MISSING_DEPENDENCY ;;
31844	port)
31845                port_help    $MISSING_DEPENDENCY ;;
31846	pkgutil)
31847                pkgutil_help $MISSING_DEPENDENCY ;;
31848	pkgadd)
31849                pkgadd_help  $MISSING_DEPENDENCY ;;
31850    * )
31851      break ;;
31852    esac
31853
31854    if test "x$PKGHANDLER_COMMAND" != x; then
31855        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31856    fi
31857
31858		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31859	fi
31860
31861        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31862            # AC_CHECK_LIB does not support use of cl.exe
31863            PREV_LDFLAGS="$LDFLAGS"
31864            LDFLAGS="$FREETYPE2_LIBS"
31865            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31866$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31867if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
31868  $as_echo_n "(cached) " >&6
31869else
31870  ac_check_lib_save_LIBS=$LIBS
31871LIBS="-lfreetype  $LIBS"
31872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31873/* end confdefs.h.  */
31874
31875/* Override any GCC internal prototype to avoid an error.
31876   Use char because int might match the return type of a GCC
31877   builtin and then its argument prototype would still apply.  */
31878#ifdef __cplusplus
31879extern "C"
31880#endif
31881char FT_Init_FreeType ();
31882int
31883main ()
31884{
31885return FT_Init_FreeType ();
31886  ;
31887  return 0;
31888}
31889_ACEOF
31890if ac_fn_cxx_try_link "$LINENO"; then :
31891  ac_cv_lib_freetype_FT_Init_FreeType=yes
31892else
31893  ac_cv_lib_freetype_FT_Init_FreeType=no
31894fi
31895rm -f core conftest.err conftest.$ac_objext \
31896    conftest$ac_exeext conftest.$ac_ext
31897LIBS=$ac_check_lib_save_LIBS
31898fi
31899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31900$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31901if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
31902  FREETYPE2_FOUND=true
31903else
31904  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31905fi
31906
31907            LDFLAGS="$PREV_LDFLAGS"
31908        fi
31909fi
31910
31911
31912
31913
31914
31915
31916
31917
31918
31919###############################################################################
31920#
31921# Check for alsa headers and libraries. Used on Linux/GNU systems.
31922#
31923
31924# Check whether --with-alsa was given.
31925if test "${with_alsa+set}" = set; then :
31926  withval=$with_alsa;
31927fi
31928
31929
31930# Check whether --with-alsa-include was given.
31931if test "${with_alsa_include+set}" = set; then :
31932  withval=$with_alsa_include;
31933fi
31934
31935
31936# Check whether --with-alsa-lib was given.
31937if test "${with_alsa_lib+set}" = set; then :
31938  withval=$with_alsa_lib;
31939fi
31940
31941
31942if test "x$ALSA_NOT_NEEDED" = xyes; then
31943	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31944		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31945$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31946	fi
31947	ALSA_CFLAGS=
31948	ALSA_LIBS=
31949else
31950	ALSA_FOUND=no
31951
31952	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31953	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31954	fi
31955
31956	if test "x${with_alsa}" != x; then
31957	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31958	    ALSA_CFLAGS="-I${with_alsa}/include"
31959	    ALSA_FOUND=yes
31960	fi
31961	if test "x${with_alsa_include}" != x; then
31962	    ALSA_CFLAGS="-I${with_alsa_include}"
31963	    ALSA_FOUND=yes
31964	fi
31965	if test "x${with_alsa_lib}" != x; then
31966	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31967	    ALSA_FOUND=yes
31968	fi
31969	if test "x$ALSA_FOUND" = xno; then
31970
31971
31972    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31973        # Source the builddeps file again, to make sure it uses the latest variables!
31974        . $builddepsfile
31975        # Look for a target and build machine specific resource!
31976        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31977        if test "x$resource" = x; then
31978            # Ok, lets instead look for a target specific resource
31979            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31980        fi
31981        if test "x$resource" = x; then
31982            # Ok, lets instead look for a build specific resource
31983            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31984        fi
31985        if test "x$resource" = x; then
31986            # Ok, lets instead look for a generic resource
31987            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31988            resource=${builddep_alsa}
31989        fi
31990        if test "x$resource" != x; then
31991            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31992$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31993	    # If the resource in the builddeps.conf file is an existing directory,
31994	    # for example /java/linux/cups
31995	    if test -d ${resource}; then
31996	       depdir=${resource}
31997	    else
31998
31999# alsa is for example mymodule
32000# $resource is for example libs/general/libmymod_1_2_3.zip
32001# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
32002# $with_builddeps_dir is for example /localhome/builddeps
32003# depdir is the name of the variable into which we store the depdir, eg MYMOD
32004# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
32005# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
32006    filename=`basename $resource`
32007    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
32008    filebase=${filename%%.*}
32009    extension=${filename#*.}
32010    installdir=$with_builddeps_dir/$filebase
32011    if test ! -f $installdir/$filename.unpacked; then
32012        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
32013$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
32014        if test ! -d $installdir; then
32015            mkdir -p $installdir
32016        fi
32017        if test ! -d $installdir; then
32018            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
32019        fi
32020        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
32021        touch $tmpfile
32022        if test ! -f $tmpfile; then
32023            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
32024        fi
32025
32026    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
32027    # $tmpfile is the local file name for the downloaded file.
32028    VALID_TOOL=no
32029    if test "x$BDEPS_FTP" = xwget; then
32030       VALID_TOOL=yes
32031       wget -O $tmpfile $with_builddeps_server/$resource
32032    fi
32033    if test "x$BDEPS_FTP" = xlftp; then
32034       VALID_TOOL=yes
32035       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
32036    fi
32037    if test "x$BDEPS_FTP" = xftp; then
32038        VALID_TOOL=yes
32039        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
32040        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
32041        FTPUSERPWD=${FTPSERVER%%@*}
32042        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
32043            FTPUSER=${userpwd%%:*}
32044            FTPPWD=${userpwd#*@}
32045            FTPSERVER=${FTPSERVER#*@}
32046        else
32047            FTPUSER=ftp
32048            FTPPWD=ftp
32049        fi
32050        # the "pass" command does not work on some
32051        # ftp clients (read ftp.exe) but if it works,
32052        # passive mode is better!
32053        (\
32054            echo "user $FTPUSER $FTPPWD"        ;\
32055            echo "pass"                         ;\
32056            echo "bin"                          ;\
32057            echo "get $FTPPATH $tmpfile"              ;\
32058        ) | ftp -in $FTPSERVER
32059    fi
32060    if test "x$VALID_TOOL" != xyes; then
32061       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
32062    fi
32063
32064        mv $tmpfile $installdir/$filename
32065        if test ! -s $installdir/$filename; then
32066            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
32067        fi
32068        case "$extension" in
32069            zip)  echo "Unzipping $installdir/$filename..."
32070               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
32071            ;;
32072            tar.gz) echo "Untaring $installdir/$filename..."
32073               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32074            ;;
32075            tgz) echo "Untaring $installdir/$filename..."
32076               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32077            ;;
32078            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
32079            ;;
32080        esac
32081    fi
32082    if test -f $installdir/$filename.unpacked; then
32083        depdir=$installdir
32084    fi
32085
32086	    fi
32087            # Source the builddeps file again, because in the previous command, the depdir
32088            # was updated to point at the current build dependency install directory.
32089            . $builddepsfile
32090            # Now extract variables from the builddeps.conf files.
32091            theroot=${builddep_alsa_ROOT}
32092            thecflags=${builddep_alsa_CFLAGS}
32093            thelibs=${builddep_alsa_LIBS}
32094            if test "x$depdir" = x; then
32095                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
32096            fi
32097            ALSA=$depdir
32098            if test "x$theroot" != x; then
32099               ALSA="$theroot"
32100            fi
32101            if test "x$thecflags" != x; then
32102               ALSA_CFLAGS="$thecflags"
32103            fi
32104            if test "x$thelibs" != x; then
32105               ALSA_LIBS="$thelibs"
32106            fi
32107            ALSA_FOUND=yes
32108            else ALSA_FOUND=no
32109
32110        fi
32111        else ALSA_FOUND=no
32112
32113    fi
32114
32115	fi
32116	if test "x$ALSA_FOUND" = xno; then
32117
32118pkg_failed=no
32119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
32120$as_echo_n "checking for ALSA... " >&6; }
32121
32122if test -n "$ALSA_CFLAGS"; then
32123    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32124 elif test -n "$PKG_CONFIG"; then
32125    if test -n "$PKG_CONFIG" && \
32126    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32127  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32128  ac_status=$?
32129  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32130  test $ac_status = 0; }; then
32131  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32132else
32133  pkg_failed=yes
32134fi
32135 else
32136    pkg_failed=untried
32137fi
32138if test -n "$ALSA_LIBS"; then
32139    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32140 elif test -n "$PKG_CONFIG"; then
32141    if test -n "$PKG_CONFIG" && \
32142    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32143  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32144  ac_status=$?
32145  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32146  test $ac_status = 0; }; then
32147  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32148else
32149  pkg_failed=yes
32150fi
32151 else
32152    pkg_failed=untried
32153fi
32154
32155
32156
32157if test $pkg_failed = yes; then
32158
32159if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32160        _pkg_short_errors_supported=yes
32161else
32162        _pkg_short_errors_supported=no
32163fi
32164        if test $_pkg_short_errors_supported = yes; then
32165	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32166        else
32167	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32168        fi
32169	# Put the nasty error message in config.log where it belongs
32170	echo "$ALSA_PKG_ERRORS" >&5
32171
32172	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32173$as_echo "no" >&6; }
32174                ALSA_FOUND=no
32175elif test $pkg_failed = untried; then
32176	ALSA_FOUND=no
32177else
32178	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32179	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32181$as_echo "yes" >&6; }
32182	ALSA_FOUND=yes
32183fi
32184	fi
32185	if test "x$ALSA_FOUND" = xno; then
32186	    for ac_header in alsa/asoundlib.h
32187do :
32188  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
32189if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
32190  cat >>confdefs.h <<_ACEOF
32191#define HAVE_ALSA_ASOUNDLIB_H 1
32192_ACEOF
32193 ALSA_FOUND=yes
32194	                      ALSA_CFLAGS=-Iignoreme
32195	                      ALSA_LIBS=-lasound
32196	                      DEFAULT_ALSA=yes
32197else
32198  ALSA_FOUND=no
32199fi
32200
32201done
32202
32203	fi
32204	if test "x$ALSA_FOUND" = xno; then
32205
32206    # Print a helpful message on how to acquire the necessary build dependency.
32207    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32208    MISSING_DEPENDENCY=alsa
32209    PKGHANDLER_COMMAND=
32210
32211    case $PKGHANDLER in
32212	apt-get)
32213                apt_help     $MISSING_DEPENDENCY ;;
32214    yum)
32215                yum_help     $MISSING_DEPENDENCY ;;
32216	port)
32217                port_help    $MISSING_DEPENDENCY ;;
32218	pkgutil)
32219                pkgutil_help $MISSING_DEPENDENCY ;;
32220	pkgadd)
32221                pkgadd_help  $MISSING_DEPENDENCY ;;
32222    * )
32223      break ;;
32224    esac
32225
32226    if test "x$PKGHANDLER_COMMAND" != x; then
32227        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32228    fi
32229
32230	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32231	fi
32232fi
32233
32234
32235
32236
32237
32238
32239
32240###############################################################################
32241#
32242# Check for the jpeg library
32243#
32244
32245USE_EXTERNAL_LIBJPEG=true
32246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32247$as_echo_n "checking for main in -ljpeg... " >&6; }
32248if test "${ac_cv_lib_jpeg_main+set}" = set; then :
32249  $as_echo_n "(cached) " >&6
32250else
32251  ac_check_lib_save_LIBS=$LIBS
32252LIBS="-ljpeg  $LIBS"
32253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32254/* end confdefs.h.  */
32255
32256
32257int
32258main ()
32259{
32260return main ();
32261  ;
32262  return 0;
32263}
32264_ACEOF
32265if ac_fn_cxx_try_link "$LINENO"; then :
32266  ac_cv_lib_jpeg_main=yes
32267else
32268  ac_cv_lib_jpeg_main=no
32269fi
32270rm -f core conftest.err conftest.$ac_objext \
32271    conftest$ac_exeext conftest.$ac_ext
32272LIBS=$ac_check_lib_save_LIBS
32273fi
32274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32275$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32276if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
32277  cat >>confdefs.h <<_ACEOF
32278#define HAVE_LIBJPEG 1
32279_ACEOF
32280
32281  LIBS="-ljpeg $LIBS"
32282
32283else
32284   USE_EXTERNAL_LIBJPEG=false
32285               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32286$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32287
32288fi
32289
32290
32291
32292###############################################################################
32293#
32294# Check for the gif library
32295#
32296
32297
32298# Check whether --with-giflib was given.
32299if test "${with_giflib+set}" = set; then :
32300  withval=$with_giflib;
32301fi
32302
32303
32304
32305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32306$as_echo_n "checking for which giflib to use... " >&6; }
32307
32308# default is bundled
32309DEFAULT_GIFLIB=bundled
32310
32311#
32312# if user didn't specify, use DEFAULT_GIFLIB
32313#
32314if test "x${with_giflib}" = "x"; then
32315    with_giflib=${DEFAULT_GIFLIB}
32316fi
32317
32318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32319$as_echo "${with_giflib}" >&6; }
32320
32321if test "x${with_giflib}" = "xbundled"; then
32322    USE_EXTERNAL_LIBGIF=false
32323elif test "x${with_giflib}" = "xsystem"; then
32324    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32325if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
32326
32327else
32328   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32329fi
32330
32331
32332    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32333$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32334if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
32335  $as_echo_n "(cached) " >&6
32336else
32337  ac_check_lib_save_LIBS=$LIBS
32338LIBS="-lgif  $LIBS"
32339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32340/* end confdefs.h.  */
32341
32342/* Override any GCC internal prototype to avoid an error.
32343   Use char because int might match the return type of a GCC
32344   builtin and then its argument prototype would still apply.  */
32345#ifdef __cplusplus
32346extern "C"
32347#endif
32348char DGifGetCode ();
32349int
32350main ()
32351{
32352return DGifGetCode ();
32353  ;
32354  return 0;
32355}
32356_ACEOF
32357if ac_fn_cxx_try_link "$LINENO"; then :
32358  ac_cv_lib_gif_DGifGetCode=yes
32359else
32360  ac_cv_lib_gif_DGifGetCode=no
32361fi
32362rm -f core conftest.err conftest.$ac_objext \
32363    conftest$ac_exeext conftest.$ac_ext
32364LIBS=$ac_check_lib_save_LIBS
32365fi
32366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32367$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32368if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
32369  cat >>confdefs.h <<_ACEOF
32370#define HAVE_LIBGIF 1
32371_ACEOF
32372
32373  LIBS="-lgif $LIBS"
32374
32375else
32376   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32377fi
32378
32379
32380    USE_EXTERNAL_LIBGIF=true
32381else
32382    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32383fi
32384
32385
32386###############################################################################
32387#
32388# Check for the zlib library
32389#
32390
32391
32392# Check whether --with-zlib was given.
32393if test "${with_zlib+set}" = set; then :
32394  withval=$with_zlib;
32395fi
32396
32397
32398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32399$as_echo_n "checking for compress in -lz... " >&6; }
32400if test "${ac_cv_lib_z_compress+set}" = set; then :
32401  $as_echo_n "(cached) " >&6
32402else
32403  ac_check_lib_save_LIBS=$LIBS
32404LIBS="-lz  $LIBS"
32405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32406/* end confdefs.h.  */
32407
32408/* Override any GCC internal prototype to avoid an error.
32409   Use char because int might match the return type of a GCC
32410   builtin and then its argument prototype would still apply.  */
32411#ifdef __cplusplus
32412extern "C"
32413#endif
32414char compress ();
32415int
32416main ()
32417{
32418return compress ();
32419  ;
32420  return 0;
32421}
32422_ACEOF
32423if ac_fn_cxx_try_link "$LINENO"; then :
32424  ac_cv_lib_z_compress=yes
32425else
32426  ac_cv_lib_z_compress=no
32427fi
32428rm -f core conftest.err conftest.$ac_objext \
32429    conftest$ac_exeext conftest.$ac_ext
32430LIBS=$ac_check_lib_save_LIBS
32431fi
32432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32433$as_echo "$ac_cv_lib_z_compress" >&6; }
32434if test "x$ac_cv_lib_z_compress" = x""yes; then :
32435   ZLIB_FOUND=yes
32436else
32437   ZLIB_FOUND=no
32438fi
32439
32440
32441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32442$as_echo_n "checking for which zlib to use... " >&6; }
32443
32444DEFAULT_ZLIB=bundled
32445if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32446#
32447# On macosx default is system...on others default is
32448#
32449    DEFAULT_ZLIB=system
32450fi
32451
32452if test "x${ZLIB_FOUND}" != "xyes"; then
32453#
32454# If we don't find any system...set default to bundled
32455#
32456    DEFAULT_ZLIB=bundled
32457fi
32458
32459#
32460# If user didn't specify, use DEFAULT_ZLIB
32461#
32462if test "x${with_zlib}" = "x"; then
32463    with_zlib=${DEFAULT_ZLIB}
32464fi
32465
32466if test "x${with_zlib}" = "xbundled"; then
32467    USE_EXTERNAL_LIBZ=false
32468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32469$as_echo "bundled" >&6; }
32470elif test "x${with_zlib}" = "xsystem"; then
32471    if test "x${ZLIB_FOUND}" = "xyes"; then
32472        USE_EXTERNAL_LIBZ=true
32473        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32474$as_echo "system" >&6; }
32475    else
32476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32477$as_echo "system not found" >&6; }
32478        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32479    fi
32480else
32481    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32482fi
32483
32484
32485
32486###############################################################################
32487LIBZIP_CAN_USE_MMAP=true
32488
32489
32490
32491###############################################################################
32492#
32493# Check if altzone exists in time.h
32494#
32495
32496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32497/* end confdefs.h.  */
32498#include <time.h>
32499int
32500main ()
32501{
32502return (int)altzone;
32503  ;
32504  return 0;
32505}
32506_ACEOF
32507if ac_fn_cxx_try_link "$LINENO"; then :
32508  has_altzone=yes
32509else
32510  has_altzone=no
32511fi
32512rm -f core conftest.err conftest.$ac_objext \
32513    conftest$ac_exeext conftest.$ac_ext
32514if test "x$has_altzone" = xyes; then
32515
32516$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32517
32518fi
32519
32520###############################################################################
32521#
32522# Check the maths library
32523#
32524
32525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32526$as_echo_n "checking for cos in -lm... " >&6; }
32527if test "${ac_cv_lib_m_cos+set}" = set; then :
32528  $as_echo_n "(cached) " >&6
32529else
32530  ac_check_lib_save_LIBS=$LIBS
32531LIBS="-lm  $LIBS"
32532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32533/* end confdefs.h.  */
32534
32535/* Override any GCC internal prototype to avoid an error.
32536   Use char because int might match the return type of a GCC
32537   builtin and then its argument prototype would still apply.  */
32538#ifdef __cplusplus
32539extern "C"
32540#endif
32541char cos ();
32542int
32543main ()
32544{
32545return cos ();
32546  ;
32547  return 0;
32548}
32549_ACEOF
32550if ac_fn_cxx_try_link "$LINENO"; then :
32551  ac_cv_lib_m_cos=yes
32552else
32553  ac_cv_lib_m_cos=no
32554fi
32555rm -f core conftest.err conftest.$ac_objext \
32556    conftest$ac_exeext conftest.$ac_ext
32557LIBS=$ac_check_lib_save_LIBS
32558fi
32559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32560$as_echo "$ac_cv_lib_m_cos" >&6; }
32561if test "x$ac_cv_lib_m_cos" = x""yes; then :
32562  cat >>confdefs.h <<_ACEOF
32563#define HAVE_LIBM 1
32564_ACEOF
32565
32566  LIBS="-lm $LIBS"
32567
32568else
32569
32570                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32571$as_echo "$as_me: Maths library was not found" >&6;}
32572
32573fi
32574
32575
32576
32577###############################################################################
32578#
32579# Check for libdl.so
32580
32581save_LIBS="$LIBS"
32582LIBS=""
32583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32584$as_echo_n "checking for dlopen in -ldl... " >&6; }
32585if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
32586  $as_echo_n "(cached) " >&6
32587else
32588  ac_check_lib_save_LIBS=$LIBS
32589LIBS="-ldl  $LIBS"
32590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32591/* end confdefs.h.  */
32592
32593/* Override any GCC internal prototype to avoid an error.
32594   Use char because int might match the return type of a GCC
32595   builtin and then its argument prototype would still apply.  */
32596#ifdef __cplusplus
32597extern "C"
32598#endif
32599char dlopen ();
32600int
32601main ()
32602{
32603return dlopen ();
32604  ;
32605  return 0;
32606}
32607_ACEOF
32608if ac_fn_cxx_try_link "$LINENO"; then :
32609  ac_cv_lib_dl_dlopen=yes
32610else
32611  ac_cv_lib_dl_dlopen=no
32612fi
32613rm -f core conftest.err conftest.$ac_objext \
32614    conftest$ac_exeext conftest.$ac_ext
32615LIBS=$ac_check_lib_save_LIBS
32616fi
32617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32618$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32619if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
32620  cat >>confdefs.h <<_ACEOF
32621#define HAVE_LIBDL 1
32622_ACEOF
32623
32624  LIBS="-ldl $LIBS"
32625
32626fi
32627
32628LIBDL="$LIBS"
32629
32630LIBS="$save_LIBS"
32631
32632
32633
32634###############################################################################
32635#
32636# statically link libstdc++ before C++ ABI is stablized on Linux unless
32637# dynamic build is configured on command line.
32638#
32639
32640# Check whether --with-stdc++lib was given.
32641if test "${with_stdc__lib+set}" = set; then :
32642  withval=$with_stdc__lib;
32643    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32644        && test "x$with_stdc__lib" != xdefault; then
32645      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32646    fi
32647
32648else
32649  with_stdc__lib=default
32650
32651fi
32652
32653
32654if test "x$OPENJDK_TARGET_OS" = xlinux; then
32655    # Test if -lstdc++ works.
32656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32657$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32658    ac_ext=cpp
32659ac_cpp='$CXXCPP $CPPFLAGS'
32660ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32661ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32662ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32663
32664    OLD_CXXFLAGS="$CXXFLAGS"
32665    CXXFLAGS="$CXXFLAGS -lstdc++"
32666    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32667/* end confdefs.h.  */
32668
32669int
32670main ()
32671{
32672return 0;
32673  ;
32674  return 0;
32675}
32676_ACEOF
32677if ac_fn_cxx_try_link "$LINENO"; then :
32678  has_dynamic_libstdcxx=yes
32679else
32680  has_dynamic_libstdcxx=no
32681fi
32682rm -f core conftest.err conftest.$ac_objext \
32683    conftest$ac_exeext conftest.$ac_ext
32684    CXXFLAGS="$OLD_CXXFLAGS"
32685    ac_ext=cpp
32686ac_cpp='$CXXCPP $CPPFLAGS'
32687ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32688ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32689ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32690
32691    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32692$as_echo "$has_dynamic_libstdcxx" >&6; }
32693
32694    # Test if stdc++ can be linked statically.
32695    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32696$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32697    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32698    ac_ext=cpp
32699ac_cpp='$CXXCPP $CPPFLAGS'
32700ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32701ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32702ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32703
32704    OLD_LIBS="$LIBS"
32705    OLD_CXX="$CXX"
32706    LIBS="$STATIC_STDCXX_FLAGS"
32707    CXX="$CC"
32708    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32709/* end confdefs.h.  */
32710
32711int
32712main ()
32713{
32714return 0;
32715  ;
32716  return 0;
32717}
32718_ACEOF
32719if ac_fn_cxx_try_link "$LINENO"; then :
32720  has_static_libstdcxx=yes
32721else
32722  has_static_libstdcxx=no
32723fi
32724rm -f core conftest.err conftest.$ac_objext \
32725    conftest$ac_exeext conftest.$ac_ext
32726    LIBS="$OLD_LIBS"
32727    CXX="$OLD_CXX"
32728    ac_ext=cpp
32729ac_cpp='$CXXCPP $CPPFLAGS'
32730ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32731ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32732ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32733
32734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32735$as_echo "$has_static_libstdcxx" >&6; }
32736
32737    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32738        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32739    fi
32740
32741    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32742        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32743    fi
32744
32745    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32746        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32747    fi
32748
32749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32750$as_echo_n "checking how to link with libstdc++... " >&6; }
32751    # If dynamic was requested, it's available since it would fail above otherwise.
32752    # If dynamic wasn't requested, go with static unless it isn't available.
32753    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32754        LIBCXX="$LIBCXX -lstdc++"
32755        LDCXX="$CXX"
32756        STATIC_CXX_SETTING="STATIC_CXX=false"
32757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32758$as_echo "dynamic" >&6; }
32759    else
32760        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32761        LDCXX="$CC"
32762        STATIC_CXX_SETTING="STATIC_CXX=true"
32763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32764$as_echo "static" >&6; }
32765    fi
32766fi
32767
32768
32769if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32770    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32771
32772pkg_failed=no
32773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32774$as_echo_n "checking for LIBFFI... " >&6; }
32775
32776if test -n "$LIBFFI_CFLAGS"; then
32777    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32778 elif test -n "$PKG_CONFIG"; then
32779    if test -n "$PKG_CONFIG" && \
32780    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32781  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32782  ac_status=$?
32783  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32784  test $ac_status = 0; }; then
32785  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32786else
32787  pkg_failed=yes
32788fi
32789 else
32790    pkg_failed=untried
32791fi
32792if test -n "$LIBFFI_LIBS"; then
32793    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32794 elif test -n "$PKG_CONFIG"; then
32795    if test -n "$PKG_CONFIG" && \
32796    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32797  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32798  ac_status=$?
32799  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32800  test $ac_status = 0; }; then
32801  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32802else
32803  pkg_failed=yes
32804fi
32805 else
32806    pkg_failed=untried
32807fi
32808
32809
32810
32811if test $pkg_failed = yes; then
32812
32813if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32814        _pkg_short_errors_supported=yes
32815else
32816        _pkg_short_errors_supported=no
32817fi
32818        if test $_pkg_short_errors_supported = yes; then
32819	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32820        else
32821	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32822        fi
32823	# Put the nasty error message in config.log where it belongs
32824	echo "$LIBFFI_PKG_ERRORS" >&5
32825
32826	as_fn_error $? "Package requirements (libffi) were not met:
32827
32828$LIBFFI_PKG_ERRORS
32829
32830Consider adjusting the PKG_CONFIG_PATH environment variable if you
32831installed software in a non-standard prefix.
32832
32833Alternatively, you may set the environment variables LIBFFI_CFLAGS
32834and LIBFFI_LIBS to avoid the need to call pkg-config.
32835See the pkg-config man page for more details.
32836" "$LINENO" 5
32837elif test $pkg_failed = untried; then
32838	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32839$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32840as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32841is in your PATH or set the PKG_CONFIG environment variable to the full
32842path to pkg-config.
32843
32844Alternatively, you may set the environment variables LIBFFI_CFLAGS
32845and LIBFFI_LIBS to avoid the need to call pkg-config.
32846See the pkg-config man page for more details.
32847
32848To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32849See \`config.log' for more details" "$LINENO" 5 ; }
32850else
32851	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32852	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32853        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32854$as_echo "yes" >&6; }
32855	:
32856fi
32857
32858fi
32859
32860if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32861    # Extract the first word of "llvm-config", so it can be a program name with args.
32862set dummy llvm-config; ac_word=$2
32863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32864$as_echo_n "checking for $ac_word... " >&6; }
32865if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
32866  $as_echo_n "(cached) " >&6
32867else
32868  if test -n "$LLVM_CONFIG"; then
32869  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32870else
32871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32872for as_dir in $PATH
32873do
32874  IFS=$as_save_IFS
32875  test -z "$as_dir" && as_dir=.
32876    for ac_exec_ext in '' $ac_executable_extensions; do
32877  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32878    ac_cv_prog_LLVM_CONFIG="llvm-config"
32879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32880    break 2
32881  fi
32882done
32883  done
32884IFS=$as_save_IFS
32885
32886fi
32887fi
32888LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32889if test -n "$LLVM_CONFIG"; then
32890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32891$as_echo "$LLVM_CONFIG" >&6; }
32892else
32893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32894$as_echo "no" >&6; }
32895fi
32896
32897
32898
32899    if test "x$LLVM_CONFIG" != xllvm-config; then
32900        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32901    fi
32902
32903    llvm_components="jit mcjit engine nativecodegen native"
32904    unset LLVM_CFLAGS
32905    for flag in $("$LLVM_CONFIG" --cxxflags); do
32906      if echo "${flag}" | grep -q '^-[ID]'; then
32907        if test "${flag}" != "-D_DEBUG" ; then
32908          if test "${LLVM_CFLAGS}" != "" ; then
32909            LLVM_CFLAGS="${LLVM_CFLAGS} "
32910          fi
32911          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32912        fi
32913      fi
32914    done
32915    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32916    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32917
32918    unset LLVM_LDFLAGS
32919    for flag in $("${LLVM_CONFIG}" --ldflags); do
32920      if echo "${flag}" | grep -q '^-L'; then
32921        if test "${LLVM_LDFLAGS}" != ""; then
32922          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32923        fi
32924        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32925      fi
32926    done
32927
32928    unset LLVM_LIBS
32929    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32930      if echo "${flag}" | grep -q '^-l'; then
32931        if test "${LLVM_LIBS}" != ""; then
32932          LLVM_LIBS="${LLVM_LIBS} "
32933        fi
32934        LLVM_LIBS="${LLVM_LIBS}${flag}"
32935      fi
32936    done
32937
32938
32939
32940
32941fi
32942
32943# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32944if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32945    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32946fi
32947
32948# TODO better (platform agnostic) test
32949if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32950    LIBCXX="-lstdc++"
32951fi
32952
32953
32954
32955
32956
32957# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32958
32959# When using cygwin or msys, we need a wrapper binary that renames
32960# /cygdrive/c/ arguments into c:/ arguments and peeks into
32961# @files and rewrites these too! This wrapper binary is
32962# called fixpath.
32963FIXPATH=
32964if test "x$OPENJDK_BUILD_OS" = xwindows; then
32965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32966$as_echo_n "checking if fixpath can be created... " >&6; }
32967    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32968    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32969    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32970      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32971      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32972      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32973      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32974    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32975      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32976      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32977
32978      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32979      # @ was chosen as separator to minimize risk of other tools messing around with it
32980      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32981      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32982
32983      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32984    fi
32985    rm -f $OUTPUT_ROOT/fixpath*
32986    cd $OUTPUT_ROOT
32987    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32988    cd $CURDIR
32989
32990    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32992$as_echo "no" >&6; }
32993        cat $OUTPUT_ROOT/fixpath1.log
32994        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32995    fi
32996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32997$as_echo "yes" >&6; }
32998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32999$as_echo_n "checking if fixpath.exe works... " >&6; }
33000    cd $OUTPUT_ROOT
33001    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
33002    cd $CURDIR
33003    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
33004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33005$as_echo "no" >&6; }
33006        cat $OUTPUT_ROOT/fixpath2.log
33007        as_fn_error $? "fixpath did not work!" "$LINENO" 5
33008    fi
33009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33010$as_echo "yes" >&6; }
33011    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
33012fi
33013
33014
33015
33016
33017###############################################################################
33018#
33019# We need to do some final tweaking, when everything else is done.
33020#
33021###############################################################################
33022
33023
33024HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
33025
33026
33027# The name of the Service Agent jar.
33028SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
33029if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
33030  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
33031fi
33032
33033
33034
33035
33036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
33037$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
33038
33039if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
33040    ENABLE_INTREE_EC=yes
33041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33042$as_echo "yes" >&6; }
33043else
33044    ENABLE_INTREE_EC=no
33045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33046$as_echo "no" >&6; }
33047fi
33048
33049
33050
33051
33052###############################################################################
33053#
33054# Configure parts of the build that only affect the build performance,
33055# not the result.
33056#
33057###############################################################################
33058
33059
33060  # How many cores do we have on this build system?
33061
33062# Check whether --with-num-cores was given.
33063if test "${with_num_cores+set}" = set; then :
33064  withval=$with_num_cores;
33065fi
33066
33067  if test "x$with_num_cores" = x; then
33068    # The number of cores were not specified, try to probe them.
33069
33070    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
33071$as_echo_n "checking for number of cores... " >&6; }
33072    NUM_CORES=1
33073    FOUND_CORES=no
33074
33075    if test -f /proc/cpuinfo; then
33076        # Looks like a Linux (or cygwin) system
33077        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
33078        FOUND_CORES=yes
33079    elif test -x /usr/sbin/psrinfo; then
33080        # Looks like a Solaris system
33081        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
33082        FOUND_CORES=yes
33083    elif test -x /usr/sbin/system_profiler; then
33084        # Looks like a MacOSX system
33085        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
33086        FOUND_CORES=yes
33087    elif test -n "$NUMBER_OF_PROCESSORS"; then
33088        # On windows, look in the env
33089        NUM_CORES=$NUMBER_OF_PROCESSORS
33090        FOUND_CORES=yes
33091    fi
33092
33093    if test "x$FOUND_CORES" = xyes; then
33094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
33095$as_echo "$NUM_CORES" >&6; }
33096    else
33097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
33098$as_echo "could not detect number of cores, defaulting to 1" >&6; }
33099        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
33100$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
33101    fi
33102
33103
33104  else
33105    NUM_CORES=$with_num_cores
33106  fi
33107
33108
33109
33110  # How much memory do we have on this build system?
33111
33112# Check whether --with-memory-size was given.
33113if test "${with_memory_size+set}" = set; then :
33114  withval=$with_memory_size;
33115fi
33116
33117  if test "x$with_memory_size" = x; then
33118    # The memory size was not specified, try to probe it.
33119
33120    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
33121$as_echo_n "checking for memory size... " >&6; }
33122    # Default to 1024 MB
33123    MEMORY_SIZE=1024
33124    FOUND_MEM=no
33125
33126    if test -f /proc/meminfo; then
33127        # Looks like a Linux (or cygwin) system
33128        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33129        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33130        FOUND_MEM=yes
33131    elif test -x /usr/sbin/prtconf; then
33132        # Looks like a Solaris system
33133        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33134        FOUND_MEM=yes
33135    elif test -x /usr/sbin/system_profiler; then
33136        # Looks like a MacOSX system
33137        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33138        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33139        FOUND_MEM=yes
33140    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33141        # Windows, but without cygwin
33142        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33143        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33144        FOUND_MEM=yes
33145    fi
33146
33147    if test "x$FOUND_MEM" = xyes; then
33148        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
33149$as_echo "$MEMORY_SIZE MB" >&6; }
33150    else
33151        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
33152$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33153        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
33154$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33155    fi
33156
33157  else
33158    MEMORY_SIZE=$with_memory_size
33159  fi
33160
33161
33162
33163  # Provide a decent default number of parallel jobs for make depending on
33164  # number of cores, amount of memory and machine architecture.
33165
33166# Check whether --with-jobs was given.
33167if test "${with_jobs+set}" = set; then :
33168  withval=$with_jobs;
33169fi
33170
33171  if test "x$with_jobs" = x; then
33172    # Number of jobs was not specified, calculate.
33173    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
33174$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
33175    # Approximate memory in GB, rounding up a bit.
33176    memory_gb=`expr $MEMORY_SIZE / 1100`
33177    # Pick the lowest of memory in gb and number of cores.
33178    if test "$memory_gb" -lt "$NUM_CORES"; then
33179      JOBS="$memory_gb"
33180    else
33181      JOBS="$NUM_CORES"
33182      # On bigger machines, leave some room for other processes to run
33183      if test "$JOBS" -gt "4"; then
33184        JOBS=`expr $JOBS '*' 90 / 100`
33185      fi
33186    fi
33187    # Cap number of jobs to 16
33188    if test "$JOBS" -gt "16"; then
33189      JOBS=16
33190    fi
33191    if test "$JOBS" -eq "0"; then
33192      JOBS=1
33193    fi
33194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
33195$as_echo "$JOBS" >&6; }
33196  else
33197    JOBS=$with_jobs
33198  fi
33199
33200
33201
33202# Setup smart javac (after cores and memory have been setup)
33203
33204
33205# Check whether --with-sjavac-server-java was given.
33206if test "${with_sjavac_server_java+set}" = set; then :
33207  withval=$with_sjavac_server_java;
33208fi
33209
33210
33211if test "x$with_sjavac_server_java" != x; then
33212    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33213    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33214    if test "x$FOUND_VERSION" = x; then
33215        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33216    fi
33217else
33218    SJAVAC_SERVER_JAVA=""
33219    # Hotspot specific options.
33220
33221    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33222    $ECHO "Command: $JAVA -verbosegc -version" >&5
33223    OUTPUT=`$JAVA -verbosegc -version 2>&1`
33224    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33225    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33226    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33227        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33228	JVM_ARG_OK=true
33229    else
33230	$ECHO "Arg failed:" >&5
33231	$ECHO "$OUTPUT" >&5
33232	JVM_ARG_OK=false
33233    fi
33234
33235    # JRockit specific options.
33236
33237    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33238    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33239    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
33240    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33241    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33242    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33243        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33244	JVM_ARG_OK=true
33245    else
33246	$ECHO "Arg failed:" >&5
33247	$ECHO "$OUTPUT" >&5
33248	JVM_ARG_OK=false
33249    fi
33250
33251    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33252fi
33253
33254
33255if test "$MEMORY_SIZE" -gt "2500"; then
33256
33257    $ECHO "Check if jvm arg is ok: -d64" >&5
33258    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33259    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33260    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33261    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33262    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33263        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33264	JVM_ARG_OK=true
33265    else
33266	$ECHO "Arg failed:" >&5
33267	$ECHO "$OUTPUT" >&5
33268	JVM_ARG_OK=false
33269    fi
33270
33271    if test "$JVM_ARG_OK" = true; then
33272        JVM_64BIT=true
33273	JVM_ARG_OK=false
33274    fi
33275    fi
33276
33277if test "$JVM_64BIT" = true; then
33278    if test "$MEMORY_SIZE" -gt "17000"; then
33279
33280    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33281    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33282    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33283    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33284    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33285    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33286        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33287	JVM_ARG_OK=true
33288    else
33289	$ECHO "Arg failed:" >&5
33290	$ECHO "$OUTPUT" >&5
33291	JVM_ARG_OK=false
33292    fi
33293
33294    fi
33295    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33296
33297    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33298    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33299    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33300    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33301    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33302    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33303        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33304	JVM_ARG_OK=true
33305    else
33306	$ECHO "Arg failed:" >&5
33307	$ECHO "$OUTPUT" >&5
33308	JVM_ARG_OK=false
33309    fi
33310
33311    fi
33312    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33313
33314    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33315    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33316    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33317    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33318    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33319    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33320        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33321	JVM_ARG_OK=true
33322    else
33323	$ECHO "Arg failed:" >&5
33324	$ECHO "$OUTPUT" >&5
33325	JVM_ARG_OK=false
33326    fi
33327
33328    fi
33329    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33330
33331    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33332    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33333    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33334    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33335    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33336    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33337        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33338	JVM_ARG_OK=true
33339    else
33340	$ECHO "Arg failed:" >&5
33341	$ECHO "$OUTPUT" >&5
33342	JVM_ARG_OK=false
33343    fi
33344
33345    fi
33346fi
33347if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33348
33349    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33350    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33351    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33352    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33353    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33354    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33355        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33356	JVM_ARG_OK=true
33357    else
33358	$ECHO "Arg failed:" >&5
33359	$ECHO "$OUTPUT" >&5
33360	JVM_ARG_OK=false
33361    fi
33362
33363fi
33364if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33365
33366    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33367    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33368    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33369    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33370    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33371    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33372        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33373	JVM_ARG_OK=true
33374    else
33375	$ECHO "Arg failed:" >&5
33376	$ECHO "$OUTPUT" >&5
33377	JVM_ARG_OK=false
33378    fi
33379
33380fi
33381if test "$JVM_ARG_OK" = false; then
33382
33383    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33384    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33385    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33386    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33387    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33388    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33389        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33390	JVM_ARG_OK=true
33391    else
33392	$ECHO "Arg failed:" >&5
33393	$ECHO "$OUTPUT" >&5
33394	JVM_ARG_OK=false
33395    fi
33396
33397fi
33398
33399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33400$as_echo_n "checking whether to use sjavac... " >&6; }
33401# Check whether --enable-sjavac was given.
33402if test "${enable_sjavac+set}" = set; then :
33403  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33404else
33405  ENABLE_SJAVAC='no'
33406fi
33407
33408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33409$as_echo "$ENABLE_SJAVAC" >&6; }
33410
33411
33412if test "x$ENABLE_SJAVAC" = xyes; then
33413    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33414else
33415    SJAVAC_SERVER_DIR=
33416fi
33417
33418
33419
33420
33421# Can the C/C++ compiler use precompiled headers?
33422
33423
33424###############################################################################
33425#
33426# Can the C/C++ compiler use precompiled headers?
33427#
33428# Check whether --enable-precompiled-headers was given.
33429if test "${enable_precompiled_headers+set}" = set; then :
33430  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33431else
33432  ENABLE_PRECOMPH=yes
33433fi
33434
33435
33436USE_PRECOMPILED_HEADER=1
33437if test "x$ENABLE_PRECOMPH" = xno; then
33438    USE_PRECOMPILED_HEADER=0
33439fi
33440
33441if test "x$ENABLE_PRECOMPH" = xyes; then
33442    # Check that the compiler actually supports precomp headers.
33443    if test "x$GCC" = xyes; then
33444         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33445$as_echo_n "checking that precompiled headers work... " >&6; }
33446         echo "int alfa();" > conftest.h
33447         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33448         if test ! -f conftest.hpp.gch; then
33449             USE_PRECOMPILED_HEADER=0
33450             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33451$as_echo "no" >&6; }
33452         else
33453             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33454$as_echo "yes" >&6; }
33455         fi
33456         rm -f conftest.h conftest.hpp.gch
33457    fi
33458fi
33459
33460
33461
33462
33463# Setup use of ccache, if available
33464
33465    # Check whether --enable-ccache was given.
33466if test "${enable_ccache+set}" = set; then :
33467  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33468else
33469  ENABLE_CCACHE=yes
33470fi
33471
33472    if test "x$ENABLE_CCACHE" = xyes; then
33473        OLD_PATH="$PATH"
33474        if test "x$TOOLS_DIR" != x; then
33475          PATH=$TOOLS_DIR:$PATH
33476        fi
33477        # Extract the first word of "ccache", so it can be a program name with args.
33478set dummy ccache; ac_word=$2
33479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33480$as_echo_n "checking for $ac_word... " >&6; }
33481if test "${ac_cv_path_CCACHE+set}" = set; then :
33482  $as_echo_n "(cached) " >&6
33483else
33484  case $CCACHE in
33485  [\\/]* | ?:[\\/]*)
33486  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33487  ;;
33488  *)
33489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33490for as_dir in $PATH
33491do
33492  IFS=$as_save_IFS
33493  test -z "$as_dir" && as_dir=.
33494    for ac_exec_ext in '' $ac_executable_extensions; do
33495  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33496    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33498    break 2
33499  fi
33500done
33501  done
33502IFS=$as_save_IFS
33503
33504  ;;
33505esac
33506fi
33507CCACHE=$ac_cv_path_CCACHE
33508if test -n "$CCACHE"; then
33509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33510$as_echo "$CCACHE" >&6; }
33511else
33512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33513$as_echo "no" >&6; }
33514fi
33515
33516
33517        PATH="$OLD_PATH"
33518    else
33519        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33520$as_echo_n "checking for ccache... " >&6; }
33521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33522$as_echo "explicitly disabled" >&6; }
33523        CCACHE=
33524    fi
33525
33526
33527
33528# Check whether --with-ccache-dir was given.
33529if test "${with_ccache_dir+set}" = set; then :
33530  withval=$with_ccache_dir;
33531fi
33532
33533
33534    if test "x$with_ccache_dir" != x; then
33535        # When using a non home ccache directory, assume the use is to share ccache files
33536        # with other users. Thus change the umask.
33537        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33538    fi
33539    CCACHE_FOUND=""
33540    if test "x$CCACHE" != x; then
33541
33542    if test "x$CCACHE" != x; then
33543        CCACHE_FOUND="true"
33544        # Only use ccache if it is 3.1.4 or later, which supports
33545        # precompiled headers.
33546        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33547$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33548        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33549        if test "x$HAS_GOOD_CCACHE" = x; then
33550            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33551$as_echo "no, disabling ccache" >&6; }
33552            CCACHE=
33553        else
33554            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33555$as_echo "yes" >&6; }
33556            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33557$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33558            PUSHED_FLAGS="$CXXFLAGS"
33559            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33560            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33561/* end confdefs.h.  */
33562
33563int
33564main ()
33565{
33566
33567  ;
33568  return 0;
33569}
33570_ACEOF
33571if ac_fn_cxx_try_compile "$LINENO"; then :
33572  CC_KNOWS_CCACHE_TRICK=yes
33573else
33574  CC_KNOWS_CCACHE_TRICK=no
33575fi
33576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33577            CXXFLAGS="$PUSHED_FLAGS"
33578            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33579                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33580$as_echo "yes" >&6; }
33581            else
33582                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33583$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33584                CCACHE=
33585            fi
33586        fi
33587    fi
33588
33589    if test "x$CCACHE" != x; then
33590        CCACHE_SLOPPINESS=time_macros
33591        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33592        CCACHE_FLAGS=-fpch-preprocess
33593
33594        if test "x$SET_CCACHE_DIR" != x; then
33595            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33596	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33597        fi
33598    fi
33599
33600    fi
33601
33602
33603###############################################################################
33604#
33605# And now the finish...
33606#
33607###############################################################################
33608
33609# Check for some common pitfalls
33610
33611  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33612    file_to_test="$SRC_ROOT/LICENSE"
33613    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33614      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
33615    fi
33616  fi
33617
33618
33619
33620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33621$as_echo_n "checking if build directory is on local disk... " >&6; }
33622
33623	# df -l lists only local disks; if the given directory is not found then
33624	# a non-zero exit code is given
33625  if test "x$DF" = x; then
33626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33627      # msys does not have df; use Windows "net use" instead.
33628      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33629      if test "x$IS_NETWORK_DISK" = x; then
33630        OUTPUT_DIR_IS_LOCAL="yes"
33631      else
33632        OUTPUT_DIR_IS_LOCAL="no"
33633      fi
33634    else
33635      # No df here, say it's local
33636      OUTPUT_DIR_IS_LOCAL="yes"
33637    fi
33638  else
33639    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33640      OUTPUT_DIR_IS_LOCAL="yes"
33641    else
33642      OUTPUT_DIR_IS_LOCAL="no"
33643    fi
33644  fi
33645
33646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33647$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33648
33649
33650
33651# Check if the user has any old-style ALT_ variables set.
33652FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33653
33654# Before generating output files, test if they exist. If they do, this is a reconfigure.
33655# Since we can't properly handle the dependencies for this, warn the user about the situation
33656if test -e $OUTPUT_ROOT/spec.gmk; then
33657  IS_RECONFIGURE=yes
33658else
33659  IS_RECONFIGURE=no
33660fi
33661
33662if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33663  HIDE_PERFORMANCE_HINTS=yes
33664else
33665  HIDE_PERFORMANCE_HINTS=no
33666  # Hide it the next time around...
33667  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33668fi
33669
33670
33671
33672# At the end, call the custom hook. (Dummy macro if no custom sources available)
33673
33674
33675# We're messing a bit with internal autoconf variables to put the config.status
33676# in the output directory instead of the current directory.
33677CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33678# Create the actual output files. Now the main work of configure is done.
33679cat >confcache <<\_ACEOF
33680# This file is a shell script that caches the results of configure
33681# tests run on this system so they can be shared between configure
33682# scripts and configure runs, see configure's option --config-cache.
33683# It is not useful on other systems.  If it contains results you don't
33684# want to keep, you may remove or edit it.
33685#
33686# config.status only pays attention to the cache file if you give it
33687# the --recheck option to rerun configure.
33688#
33689# `ac_cv_env_foo' variables (set or unset) will be overridden when
33690# loading this file, other *unset* `ac_cv_foo' will be assigned the
33691# following values.
33692
33693_ACEOF
33694
33695# The following way of writing the cache mishandles newlines in values,
33696# but we know of no workaround that is simple, portable, and efficient.
33697# So, we kill variables containing newlines.
33698# Ultrix sh set writes to stderr and can't be redirected directly,
33699# and sets the high bit in the cache file unless we assign to the vars.
33700(
33701  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33702    eval ac_val=\$$ac_var
33703    case $ac_val in #(
33704    *${as_nl}*)
33705      case $ac_var in #(
33706      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33707$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33708      esac
33709      case $ac_var in #(
33710      _ | IFS | as_nl) ;; #(
33711      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33712      *) { eval $ac_var=; unset $ac_var;} ;;
33713      esac ;;
33714    esac
33715  done
33716
33717  (set) 2>&1 |
33718    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33719    *${as_nl}ac_space=\ *)
33720      # `set' does not quote correctly, so add quotes: double-quote
33721      # substitution turns \\\\ into \\, and sed turns \\ into \.
33722      sed -n \
33723	"s/'/'\\\\''/g;
33724	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33725      ;; #(
33726    *)
33727      # `set' quotes correctly as required by POSIX, so do not add quotes.
33728      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33729      ;;
33730    esac |
33731    sort
33732) |
33733  sed '
33734     /^ac_cv_env_/b end
33735     t clear
33736     :clear
33737     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33738     t end
33739     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33740     :end' >>confcache
33741if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33742  if test -w "$cache_file"; then
33743    test "x$cache_file" != "x/dev/null" &&
33744      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33745$as_echo "$as_me: updating cache $cache_file" >&6;}
33746    cat confcache >$cache_file
33747  else
33748    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33749$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33750  fi
33751fi
33752rm -f confcache
33753
33754test "x$prefix" = xNONE && prefix=$ac_default_prefix
33755# Let make expand exec_prefix.
33756test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33757
33758DEFS=-DHAVE_CONFIG_H
33759
33760ac_libobjs=
33761ac_ltlibobjs=
33762U=
33763for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33764  # 1. Remove the extension, and $U if already installed.
33765  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33766  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33767  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33768  #    will be set to the directory where LIBOBJS objects are built.
33769  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33770  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33771done
33772LIBOBJS=$ac_libobjs
33773
33774LTLIBOBJS=$ac_ltlibobjs
33775
33776
33777
33778: ${CONFIG_STATUS=./config.status}
33779ac_write_fail=0
33780ac_clean_files_save=$ac_clean_files
33781ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33782{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33783$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33784as_write_fail=0
33785cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33786#! $SHELL
33787# Generated by $as_me.
33788# Run this file to recreate the current configuration.
33789# Compiler output produced by configure, useful for debugging
33790# configure, is in config.log if it exists.
33791
33792debug=false
33793ac_cs_recheck=false
33794ac_cs_silent=false
33795
33796SHELL=\${CONFIG_SHELL-$SHELL}
33797export SHELL
33798_ASEOF
33799cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33800## -------------------- ##
33801## M4sh Initialization. ##
33802## -------------------- ##
33803
33804# Be more Bourne compatible
33805DUALCASE=1; export DUALCASE # for MKS sh
33806if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33807  emulate sh
33808  NULLCMD=:
33809  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33810  # is contrary to our usage.  Disable this feature.
33811  alias -g '${1+"$@"}'='"$@"'
33812  setopt NO_GLOB_SUBST
33813else
33814  case `(set -o) 2>/dev/null` in #(
33815  *posix*) :
33816    set -o posix ;; #(
33817  *) :
33818     ;;
33819esac
33820fi
33821
33822
33823as_nl='
33824'
33825export as_nl
33826# Printing a long string crashes Solaris 7 /usr/bin/printf.
33827as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33828as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33829as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33830# Prefer a ksh shell builtin over an external printf program on Solaris,
33831# but without wasting forks for bash or zsh.
33832if test -z "$BASH_VERSION$ZSH_VERSION" \
33833    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33834  as_echo='print -r --'
33835  as_echo_n='print -rn --'
33836elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33837  as_echo='printf %s\n'
33838  as_echo_n='printf %s'
33839else
33840  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33841    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33842    as_echo_n='/usr/ucb/echo -n'
33843  else
33844    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33845    as_echo_n_body='eval
33846      arg=$1;
33847      case $arg in #(
33848      *"$as_nl"*)
33849	expr "X$arg" : "X\\(.*\\)$as_nl";
33850	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33851      esac;
33852      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33853    '
33854    export as_echo_n_body
33855    as_echo_n='sh -c $as_echo_n_body as_echo'
33856  fi
33857  export as_echo_body
33858  as_echo='sh -c $as_echo_body as_echo'
33859fi
33860
33861# The user is always right.
33862if test "${PATH_SEPARATOR+set}" != set; then
33863  PATH_SEPARATOR=:
33864  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33865    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33866      PATH_SEPARATOR=';'
33867  }
33868fi
33869
33870
33871# IFS
33872# We need space, tab and new line, in precisely that order.  Quoting is
33873# there to prevent editors from complaining about space-tab.
33874# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33875# splitting by setting IFS to empty value.)
33876IFS=" ""	$as_nl"
33877
33878# Find who we are.  Look in the path if we contain no directory separator.
33879case $0 in #((
33880  *[\\/]* ) as_myself=$0 ;;
33881  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33882for as_dir in $PATH
33883do
33884  IFS=$as_save_IFS
33885  test -z "$as_dir" && as_dir=.
33886    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33887  done
33888IFS=$as_save_IFS
33889
33890     ;;
33891esac
33892# We did not find ourselves, most probably we were run as `sh COMMAND'
33893# in which case we are not to be found in the path.
33894if test "x$as_myself" = x; then
33895  as_myself=$0
33896fi
33897if test ! -f "$as_myself"; then
33898  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33899  exit 1
33900fi
33901
33902# Unset variables that we do not need and which cause bugs (e.g. in
33903# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33904# suppresses any "Segmentation fault" message there.  '((' could
33905# trigger a bug in pdksh 5.2.14.
33906for as_var in BASH_ENV ENV MAIL MAILPATH
33907do eval test x\${$as_var+set} = xset \
33908  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33909done
33910PS1='$ '
33911PS2='> '
33912PS4='+ '
33913
33914# NLS nuisances.
33915LC_ALL=C
33916export LC_ALL
33917LANGUAGE=C
33918export LANGUAGE
33919
33920# CDPATH.
33921(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33922
33923
33924# as_fn_error STATUS ERROR [LINENO LOG_FD]
33925# ----------------------------------------
33926# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33927# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33928# script with STATUS, using 1 if that was 0.
33929as_fn_error ()
33930{
33931  as_status=$1; test $as_status -eq 0 && as_status=1
33932  if test "$4"; then
33933    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33934    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33935  fi
33936  $as_echo "$as_me: error: $2" >&2
33937  as_fn_exit $as_status
33938} # as_fn_error
33939
33940
33941# as_fn_set_status STATUS
33942# -----------------------
33943# Set $? to STATUS, without forking.
33944as_fn_set_status ()
33945{
33946  return $1
33947} # as_fn_set_status
33948
33949# as_fn_exit STATUS
33950# -----------------
33951# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33952as_fn_exit ()
33953{
33954  set +e
33955  as_fn_set_status $1
33956  exit $1
33957} # as_fn_exit
33958
33959# as_fn_unset VAR
33960# ---------------
33961# Portably unset VAR.
33962as_fn_unset ()
33963{
33964  { eval $1=; unset $1;}
33965}
33966as_unset=as_fn_unset
33967# as_fn_append VAR VALUE
33968# ----------------------
33969# Append the text in VALUE to the end of the definition contained in VAR. Take
33970# advantage of any shell optimizations that allow amortized linear growth over
33971# repeated appends, instead of the typical quadratic growth present in naive
33972# implementations.
33973if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33974  eval 'as_fn_append ()
33975  {
33976    eval $1+=\$2
33977  }'
33978else
33979  as_fn_append ()
33980  {
33981    eval $1=\$$1\$2
33982  }
33983fi # as_fn_append
33984
33985# as_fn_arith ARG...
33986# ------------------
33987# Perform arithmetic evaluation on the ARGs, and store the result in the
33988# global $as_val. Take advantage of shells that can avoid forks. The arguments
33989# must be portable across $(()) and expr.
33990if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33991  eval 'as_fn_arith ()
33992  {
33993    as_val=$(( $* ))
33994  }'
33995else
33996  as_fn_arith ()
33997  {
33998    as_val=`expr "$@" || test $? -eq 1`
33999  }
34000fi # as_fn_arith
34001
34002
34003if expr a : '\(a\)' >/dev/null 2>&1 &&
34004   test "X`expr 00001 : '.*\(...\)'`" = X001; then
34005  as_expr=expr
34006else
34007  as_expr=false
34008fi
34009
34010if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
34011  as_basename=basename
34012else
34013  as_basename=false
34014fi
34015
34016if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
34017  as_dirname=dirname
34018else
34019  as_dirname=false
34020fi
34021
34022as_me=`$as_basename -- "$0" ||
34023$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
34024	 X"$0" : 'X\(//\)$' \| \
34025	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
34026$as_echo X/"$0" |
34027    sed '/^.*\/\([^/][^/]*\)\/*$/{
34028	    s//\1/
34029	    q
34030	  }
34031	  /^X\/\(\/\/\)$/{
34032	    s//\1/
34033	    q
34034	  }
34035	  /^X\/\(\/\).*/{
34036	    s//\1/
34037	    q
34038	  }
34039	  s/.*/./; q'`
34040
34041# Avoid depending upon Character Ranges.
34042as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34043as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34044as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34045as_cr_digits='0123456789'
34046as_cr_alnum=$as_cr_Letters$as_cr_digits
34047
34048ECHO_C= ECHO_N= ECHO_T=
34049case `echo -n x` in #(((((
34050-n*)
34051  case `echo 'xy\c'` in
34052  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
34053  xy)  ECHO_C='\c';;
34054  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
34055       ECHO_T='	';;
34056  esac;;
34057*)
34058  ECHO_N='-n';;
34059esac
34060
34061rm -f conf$$ conf$$.exe conf$$.file
34062if test -d conf$$.dir; then
34063  rm -f conf$$.dir/conf$$.file
34064else
34065  rm -f conf$$.dir
34066  mkdir conf$$.dir 2>/dev/null
34067fi
34068if (echo >conf$$.file) 2>/dev/null; then
34069  if ln -s conf$$.file conf$$ 2>/dev/null; then
34070    as_ln_s='ln -s'
34071    # ... but there are two gotchas:
34072    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34073    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34074    # In both cases, we have to default to `cp -p'.
34075    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34076      as_ln_s='cp -p'
34077  elif ln conf$$.file conf$$ 2>/dev/null; then
34078    as_ln_s=ln
34079  else
34080    as_ln_s='cp -p'
34081  fi
34082else
34083  as_ln_s='cp -p'
34084fi
34085rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34086rmdir conf$$.dir 2>/dev/null
34087
34088
34089# as_fn_mkdir_p
34090# -------------
34091# Create "$as_dir" as a directory, including parents if necessary.
34092as_fn_mkdir_p ()
34093{
34094
34095  case $as_dir in #(
34096  -*) as_dir=./$as_dir;;
34097  esac
34098  test -d "$as_dir" || eval $as_mkdir_p || {
34099    as_dirs=
34100    while :; do
34101      case $as_dir in #(
34102      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34103      *) as_qdir=$as_dir;;
34104      esac
34105      as_dirs="'$as_qdir' $as_dirs"
34106      as_dir=`$as_dirname -- "$as_dir" ||
34107$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34108	 X"$as_dir" : 'X\(//\)[^/]' \| \
34109	 X"$as_dir" : 'X\(//\)$' \| \
34110	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34111$as_echo X"$as_dir" |
34112    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34113	    s//\1/
34114	    q
34115	  }
34116	  /^X\(\/\/\)[^/].*/{
34117	    s//\1/
34118	    q
34119	  }
34120	  /^X\(\/\/\)$/{
34121	    s//\1/
34122	    q
34123	  }
34124	  /^X\(\/\).*/{
34125	    s//\1/
34126	    q
34127	  }
34128	  s/.*/./; q'`
34129      test -d "$as_dir" && break
34130    done
34131    test -z "$as_dirs" || eval "mkdir $as_dirs"
34132  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34133
34134
34135} # as_fn_mkdir_p
34136if mkdir -p . 2>/dev/null; then
34137  as_mkdir_p='mkdir -p "$as_dir"'
34138else
34139  test -d ./-p && rmdir ./-p
34140  as_mkdir_p=false
34141fi
34142
34143if test -x / >/dev/null 2>&1; then
34144  as_test_x='test -x'
34145else
34146  if ls -dL / >/dev/null 2>&1; then
34147    as_ls_L_option=L
34148  else
34149    as_ls_L_option=
34150  fi
34151  as_test_x='
34152    eval sh -c '\''
34153      if test -d "$1"; then
34154	test -d "$1/.";
34155      else
34156	case $1 in #(
34157	-*)set "./$1";;
34158	esac;
34159	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
34160	???[sx]*):;;*)false;;esac;fi
34161    '\'' sh
34162  '
34163fi
34164as_executable_p=$as_test_x
34165
34166# Sed expression to map a string onto a valid CPP name.
34167as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34168
34169# Sed expression to map a string onto a valid variable name.
34170as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34171
34172
34173exec 6>&1
34174## ----------------------------------- ##
34175## Main body of $CONFIG_STATUS script. ##
34176## ----------------------------------- ##
34177_ASEOF
34178test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34179
34180cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34181# Save the log message, to keep $0 and so on meaningful, and to
34182# report actual input values of CONFIG_FILES etc. instead of their
34183# values after options handling.
34184ac_log="
34185This file was extended by OpenJDK $as_me jdk8, which was
34186generated by GNU Autoconf 2.67.  Invocation command line was
34187
34188  CONFIG_FILES    = $CONFIG_FILES
34189  CONFIG_HEADERS  = $CONFIG_HEADERS
34190  CONFIG_LINKS    = $CONFIG_LINKS
34191  CONFIG_COMMANDS = $CONFIG_COMMANDS
34192  $ $0 $@
34193
34194on `(hostname || uname -n) 2>/dev/null | sed 1q`
34195"
34196
34197_ACEOF
34198
34199case $ac_config_files in *"
34200"*) set x $ac_config_files; shift; ac_config_files=$*;;
34201esac
34202
34203case $ac_config_headers in *"
34204"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34205esac
34206
34207
34208cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34209# Files that config.status was made for.
34210config_files="$ac_config_files"
34211config_headers="$ac_config_headers"
34212
34213_ACEOF
34214
34215cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34216ac_cs_usage="\
34217\`$as_me' instantiates files and other configuration actions
34218from templates according to the current configuration.  Unless the files
34219and actions are specified as TAGs, all are instantiated by default.
34220
34221Usage: $0 [OPTION]... [TAG]...
34222
34223  -h, --help       print this help, then exit
34224  -V, --version    print version number and configuration settings, then exit
34225      --config     print configuration, then exit
34226  -q, --quiet, --silent
34227                   do not print progress messages
34228  -d, --debug      don't remove temporary files
34229      --recheck    update $as_me by reconfiguring in the same conditions
34230      --file=FILE[:TEMPLATE]
34231                   instantiate the configuration file FILE
34232      --header=FILE[:TEMPLATE]
34233                   instantiate the configuration header FILE
34234
34235Configuration files:
34236$config_files
34237
34238Configuration headers:
34239$config_headers
34240
34241Report bugs to <build-dev@openjdk.java.net>.
34242OpenJDK home page: <http://openjdk.java.net>."
34243
34244_ACEOF
34245cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34246ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34247ac_cs_version="\\
34248OpenJDK config.status jdk8
34249configured by $0, generated by GNU Autoconf 2.67,
34250  with options \\"\$ac_cs_config\\"
34251
34252Copyright (C) 2010 Free Software Foundation, Inc.
34253This config.status script is free software; the Free Software Foundation
34254gives unlimited permission to copy, distribute and modify it."
34255
34256ac_pwd='$ac_pwd'
34257srcdir='$srcdir'
34258AWK='$AWK'
34259test -n "\$AWK" || AWK=awk
34260_ACEOF
34261
34262cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34263# The default lists apply if the user does not specify any file.
34264ac_need_defaults=:
34265while test $# != 0
34266do
34267  case $1 in
34268  --*=?*)
34269    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34270    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34271    ac_shift=:
34272    ;;
34273  --*=)
34274    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34275    ac_optarg=
34276    ac_shift=:
34277    ;;
34278  *)
34279    ac_option=$1
34280    ac_optarg=$2
34281    ac_shift=shift
34282    ;;
34283  esac
34284
34285  case $ac_option in
34286  # Handling of the options.
34287  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34288    ac_cs_recheck=: ;;
34289  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34290    $as_echo "$ac_cs_version"; exit ;;
34291  --config | --confi | --conf | --con | --co | --c )
34292    $as_echo "$ac_cs_config"; exit ;;
34293  --debug | --debu | --deb | --de | --d | -d )
34294    debug=: ;;
34295  --file | --fil | --fi | --f )
34296    $ac_shift
34297    case $ac_optarg in
34298    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34299    '') as_fn_error $? "missing file argument" ;;
34300    esac
34301    as_fn_append CONFIG_FILES " '$ac_optarg'"
34302    ac_need_defaults=false;;
34303  --header | --heade | --head | --hea )
34304    $ac_shift
34305    case $ac_optarg in
34306    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34307    esac
34308    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34309    ac_need_defaults=false;;
34310  --he | --h)
34311    # Conflict between --help and --header
34312    as_fn_error $? "ambiguous option: \`$1'
34313Try \`$0 --help' for more information.";;
34314  --help | --hel | -h )
34315    $as_echo "$ac_cs_usage"; exit ;;
34316  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34317  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34318    ac_cs_silent=: ;;
34319
34320  # This is an error.
34321  -*) as_fn_error $? "unrecognized option: \`$1'
34322Try \`$0 --help' for more information." ;;
34323
34324  *) as_fn_append ac_config_targets " $1"
34325     ac_need_defaults=false ;;
34326
34327  esac
34328  shift
34329done
34330
34331ac_configure_extra_args=
34332
34333if $ac_cs_silent; then
34334  exec 6>/dev/null
34335  ac_configure_extra_args="$ac_configure_extra_args --silent"
34336fi
34337
34338_ACEOF
34339cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34340if \$ac_cs_recheck; then
34341  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34342  shift
34343  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34344  CONFIG_SHELL='$SHELL'
34345  export CONFIG_SHELL
34346  exec "\$@"
34347fi
34348
34349_ACEOF
34350cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34351exec 5>>config.log
34352{
34353  echo
34354  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34355## Running $as_me. ##
34356_ASBOX
34357  $as_echo "$ac_log"
34358} >&5
34359
34360_ACEOF
34361cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34362_ACEOF
34363
34364cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34365
34366# Handling of arguments.
34367for ac_config_target in $ac_config_targets
34368do
34369  case $ac_config_target in
34370    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34371    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34372    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34373    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34374    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34375    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34376    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34377
34378  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
34379  esac
34380done
34381
34382
34383# If the user did not use the arguments to specify the items to instantiate,
34384# then the envvar interface is used.  Set only those that are not.
34385# We use the long form for the default assignment because of an extremely
34386# bizarre bug on SunOS 4.1.3.
34387if $ac_need_defaults; then
34388  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34389  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34390fi
34391
34392# Have a temporary directory for convenience.  Make it in the build tree
34393# simply because there is no reason against having it here, and in addition,
34394# creating and moving files from /tmp can sometimes cause problems.
34395# Hook for its removal unless debugging.
34396# Note that there is a small window in which the directory will not be cleaned:
34397# after its creation but before its name has been assigned to `$tmp'.
34398$debug ||
34399{
34400  tmp=
34401  trap 'exit_status=$?
34402  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34403' 0
34404  trap 'as_fn_exit 1' 1 2 13 15
34405}
34406# Create a (secure) tmp directory for tmp files.
34407
34408{
34409  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34410  test -n "$tmp" && test -d "$tmp"
34411}  ||
34412{
34413  tmp=./conf$$-$RANDOM
34414  (umask 077 && mkdir "$tmp")
34415} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34416
34417# Set up the scripts for CONFIG_FILES section.
34418# No need to generate them if there are no CONFIG_FILES.
34419# This happens for instance with `./config.status config.h'.
34420if test -n "$CONFIG_FILES"; then
34421
34422
34423ac_cr=`echo X | tr X '\015'`
34424# On cygwin, bash can eat \r inside `` if the user requested igncr.
34425# But we know of no other shell where ac_cr would be empty at this
34426# point, so we can use a bashism as a fallback.
34427if test "x$ac_cr" = x; then
34428  eval ac_cr=\$\'\\r\'
34429fi
34430ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34431if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34432  ac_cs_awk_cr='\\r'
34433else
34434  ac_cs_awk_cr=$ac_cr
34435fi
34436
34437echo 'BEGIN {' >"$tmp/subs1.awk" &&
34438_ACEOF
34439
34440
34441{
34442  echo "cat >conf$$subs.awk <<_ACEOF" &&
34443  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34444  echo "_ACEOF"
34445} >conf$$subs.sh ||
34446  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34447ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34448ac_delim='%!_!# '
34449for ac_last_try in false false false false false :; do
34450  . ./conf$$subs.sh ||
34451    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34452
34453  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34454  if test $ac_delim_n = $ac_delim_num; then
34455    break
34456  elif $ac_last_try; then
34457    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34458  else
34459    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34460  fi
34461done
34462rm -f conf$$subs.sh
34463
34464cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34465cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34466_ACEOF
34467sed -n '
34468h
34469s/^/S["/; s/!.*/"]=/
34470p
34471g
34472s/^[^!]*!//
34473:repl
34474t repl
34475s/'"$ac_delim"'$//
34476t delim
34477:nl
34478h
34479s/\(.\{148\}\)..*/\1/
34480t more1
34481s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34482p
34483n
34484b repl
34485:more1
34486s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34487p
34488g
34489s/.\{148\}//
34490t nl
34491:delim
34492h
34493s/\(.\{148\}\)..*/\1/
34494t more2
34495s/["\\]/\\&/g; s/^/"/; s/$/"/
34496p
34497b
34498:more2
34499s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34500p
34501g
34502s/.\{148\}//
34503t delim
34504' <conf$$subs.awk | sed '
34505/^[^""]/{
34506  N
34507  s/\n//
34508}
34509' >>$CONFIG_STATUS || ac_write_fail=1
34510rm -f conf$$subs.awk
34511cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34512_ACAWK
34513cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34514  for (key in S) S_is_set[key] = 1
34515  FS = ""
34516
34517}
34518{
34519  line = $ 0
34520  nfields = split(line, field, "@")
34521  substed = 0
34522  len = length(field[1])
34523  for (i = 2; i < nfields; i++) {
34524    key = field[i]
34525    keylen = length(key)
34526    if (S_is_set[key]) {
34527      value = S[key]
34528      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34529      len += length(value) + length(field[++i])
34530      substed = 1
34531    } else
34532      len += 1 + keylen
34533  }
34534
34535  print line
34536}
34537
34538_ACAWK
34539_ACEOF
34540cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34541if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34542  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34543else
34544  cat
34545fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34546  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34547_ACEOF
34548
34549# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34550# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34551# trailing colons and then remove the whole line if VPATH becomes empty
34552# (actually we leave an empty line to preserve line numbers).
34553if test "x$srcdir" = x.; then
34554  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34555h
34556s///
34557s/^/:/
34558s/[	 ]*$/:/
34559s/:\$(srcdir):/:/g
34560s/:\${srcdir}:/:/g
34561s/:@srcdir@:/:/g
34562s/^:*//
34563s/:*$//
34564x
34565s/\(=[	 ]*\).*/\1/
34566G
34567s/\n//
34568s/^[^=]*=[	 ]*$//
34569}'
34570fi
34571
34572cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34573fi # test -n "$CONFIG_FILES"
34574
34575# Set up the scripts for CONFIG_HEADERS section.
34576# No need to generate them if there are no CONFIG_HEADERS.
34577# This happens for instance with `./config.status Makefile'.
34578if test -n "$CONFIG_HEADERS"; then
34579cat >"$tmp/defines.awk" <<\_ACAWK ||
34580BEGIN {
34581_ACEOF
34582
34583# Transform confdefs.h into an awk script `defines.awk', embedded as
34584# here-document in config.status, that substitutes the proper values into
34585# config.h.in to produce config.h.
34586
34587# Create a delimiter string that does not exist in confdefs.h, to ease
34588# handling of long lines.
34589ac_delim='%!_!# '
34590for ac_last_try in false false :; do
34591  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34592  if test -z "$ac_t"; then
34593    break
34594  elif $ac_last_try; then
34595    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34596  else
34597    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34598  fi
34599done
34600
34601# For the awk script, D is an array of macro values keyed by name,
34602# likewise P contains macro parameters if any.  Preserve backslash
34603# newline sequences.
34604
34605ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34606sed -n '
34607s/.\{148\}/&'"$ac_delim"'/g
34608t rset
34609:rset
34610s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34611t def
34612d
34613:def
34614s/\\$//
34615t bsnl
34616s/["\\]/\\&/g
34617s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34618D["\1"]=" \3"/p
34619s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34620d
34621:bsnl
34622s/["\\]/\\&/g
34623s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34624D["\1"]=" \3\\\\\\n"\\/p
34625t cont
34626s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34627t cont
34628d
34629:cont
34630n
34631s/.\{148\}/&'"$ac_delim"'/g
34632t clear
34633:clear
34634s/\\$//
34635t bsnlc
34636s/["\\]/\\&/g; s/^/"/; s/$/"/p
34637d
34638:bsnlc
34639s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34640b cont
34641' <confdefs.h | sed '
34642s/'"$ac_delim"'/"\\\
34643"/g' >>$CONFIG_STATUS || ac_write_fail=1
34644
34645cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34646  for (key in D) D_is_set[key] = 1
34647  FS = ""
34648}
34649/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34650  line = \$ 0
34651  split(line, arg, " ")
34652  if (arg[1] == "#") {
34653    defundef = arg[2]
34654    mac1 = arg[3]
34655  } else {
34656    defundef = substr(arg[1], 2)
34657    mac1 = arg[2]
34658  }
34659  split(mac1, mac2, "(") #)
34660  macro = mac2[1]
34661  prefix = substr(line, 1, index(line, defundef) - 1)
34662  if (D_is_set[macro]) {
34663    # Preserve the white space surrounding the "#".
34664    print prefix "define", macro P[macro] D[macro]
34665    next
34666  } else {
34667    # Replace #undef with comments.  This is necessary, for example,
34668    # in the case of _POSIX_SOURCE, which is predefined and required
34669    # on some systems where configure will not decide to define it.
34670    if (defundef == "undef") {
34671      print "/*", prefix defundef, macro, "*/"
34672      next
34673    }
34674  }
34675}
34676{ print }
34677_ACAWK
34678_ACEOF
34679cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34680  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34681fi # test -n "$CONFIG_HEADERS"
34682
34683
34684eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34685shift
34686for ac_tag
34687do
34688  case $ac_tag in
34689  :[FHLC]) ac_mode=$ac_tag; continue;;
34690  esac
34691  case $ac_mode$ac_tag in
34692  :[FHL]*:*);;
34693  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
34694  :[FH]-) ac_tag=-:-;;
34695  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34696  esac
34697  ac_save_IFS=$IFS
34698  IFS=:
34699  set x $ac_tag
34700  IFS=$ac_save_IFS
34701  shift
34702  ac_file=$1
34703  shift
34704
34705  case $ac_mode in
34706  :L) ac_source=$1;;
34707  :[FH])
34708    ac_file_inputs=
34709    for ac_f
34710    do
34711      case $ac_f in
34712      -) ac_f="$tmp/stdin";;
34713      *) # Look for the file first in the build tree, then in the source tree
34714	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34715	 # because $ac_f cannot contain `:'.
34716	 test -f "$ac_f" ||
34717	   case $ac_f in
34718	   [\\/$]*) false;;
34719	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34720	   esac ||
34721	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
34722      esac
34723      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34724      as_fn_append ac_file_inputs " '$ac_f'"
34725    done
34726
34727    # Let's still pretend it is `configure' which instantiates (i.e., don't
34728    # use $as_me), people would be surprised to read:
34729    #    /* config.h.  Generated by config.status.  */
34730    configure_input='Generated from '`
34731	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34732	`' by configure.'
34733    if test x"$ac_file" != x-; then
34734      configure_input="$ac_file.  $configure_input"
34735      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34736$as_echo "$as_me: creating $ac_file" >&6;}
34737    fi
34738    # Neutralize special characters interpreted by sed in replacement strings.
34739    case $configure_input in #(
34740    *\&* | *\|* | *\\* )
34741       ac_sed_conf_input=`$as_echo "$configure_input" |
34742       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34743    *) ac_sed_conf_input=$configure_input;;
34744    esac
34745
34746    case $ac_tag in
34747    *:-:* | *:-) cat >"$tmp/stdin" \
34748      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
34749    esac
34750    ;;
34751  esac
34752
34753  ac_dir=`$as_dirname -- "$ac_file" ||
34754$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34755	 X"$ac_file" : 'X\(//\)[^/]' \| \
34756	 X"$ac_file" : 'X\(//\)$' \| \
34757	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34758$as_echo X"$ac_file" |
34759    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34760	    s//\1/
34761	    q
34762	  }
34763	  /^X\(\/\/\)[^/].*/{
34764	    s//\1/
34765	    q
34766	  }
34767	  /^X\(\/\/\)$/{
34768	    s//\1/
34769	    q
34770	  }
34771	  /^X\(\/\).*/{
34772	    s//\1/
34773	    q
34774	  }
34775	  s/.*/./; q'`
34776  as_dir="$ac_dir"; as_fn_mkdir_p
34777  ac_builddir=.
34778
34779case "$ac_dir" in
34780.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34781*)
34782  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34783  # A ".." for each directory in $ac_dir_suffix.
34784  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34785  case $ac_top_builddir_sub in
34786  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34787  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34788  esac ;;
34789esac
34790ac_abs_top_builddir=$ac_pwd
34791ac_abs_builddir=$ac_pwd$ac_dir_suffix
34792# for backward compatibility:
34793ac_top_builddir=$ac_top_build_prefix
34794
34795case $srcdir in
34796  .)  # We are building in place.
34797    ac_srcdir=.
34798    ac_top_srcdir=$ac_top_builddir_sub
34799    ac_abs_top_srcdir=$ac_pwd ;;
34800  [\\/]* | ?:[\\/]* )  # Absolute name.
34801    ac_srcdir=$srcdir$ac_dir_suffix;
34802    ac_top_srcdir=$srcdir
34803    ac_abs_top_srcdir=$srcdir ;;
34804  *) # Relative name.
34805    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34806    ac_top_srcdir=$ac_top_build_prefix$srcdir
34807    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34808esac
34809ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34810
34811
34812  case $ac_mode in
34813  :F)
34814  #
34815  # CONFIG_FILE
34816  #
34817
34818_ACEOF
34819
34820cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34821# If the template does not know about datarootdir, expand it.
34822# FIXME: This hack should be removed a few years after 2.60.
34823ac_datarootdir_hack=; ac_datarootdir_seen=
34824ac_sed_dataroot='
34825/datarootdir/ {
34826  p
34827  q
34828}
34829/@datadir@/p
34830/@docdir@/p
34831/@infodir@/p
34832/@localedir@/p
34833/@mandir@/p'
34834case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34835*datarootdir*) ac_datarootdir_seen=yes;;
34836*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34837  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34838$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34839_ACEOF
34840cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34841  ac_datarootdir_hack='
34842  s&@datadir@&$datadir&g
34843  s&@docdir@&$docdir&g
34844  s&@infodir@&$infodir&g
34845  s&@localedir@&$localedir&g
34846  s&@mandir@&$mandir&g
34847  s&\\\${datarootdir}&$datarootdir&g' ;;
34848esac
34849_ACEOF
34850
34851# Neutralize VPATH when `$srcdir' = `.'.
34852# Shell code in configure.ac might set extrasub.
34853# FIXME: do we really want to maintain this feature?
34854cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34855ac_sed_extra="$ac_vpsub
34856$extrasub
34857_ACEOF
34858cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34859:t
34860/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34861s|@configure_input@|$ac_sed_conf_input|;t t
34862s&@top_builddir@&$ac_top_builddir_sub&;t t
34863s&@top_build_prefix@&$ac_top_build_prefix&;t t
34864s&@srcdir@&$ac_srcdir&;t t
34865s&@abs_srcdir@&$ac_abs_srcdir&;t t
34866s&@top_srcdir@&$ac_top_srcdir&;t t
34867s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34868s&@builddir@&$ac_builddir&;t t
34869s&@abs_builddir@&$ac_abs_builddir&;t t
34870s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34871$ac_datarootdir_hack
34872"
34873eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
34874  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34875
34876test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34877  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
34878  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
34879  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34880which seems to be undefined.  Please make sure it is defined" >&5
34881$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34882which seems to be undefined.  Please make sure it is defined" >&2;}
34883
34884  rm -f "$tmp/stdin"
34885  case $ac_file in
34886  -) cat "$tmp/out" && rm -f "$tmp/out";;
34887  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
34888  esac \
34889  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34890 ;;
34891  :H)
34892  #
34893  # CONFIG_HEADER
34894  #
34895  if test x"$ac_file" != x-; then
34896    {
34897      $as_echo "/* $configure_input  */" \
34898      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
34899    } >"$tmp/config.h" \
34900      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34901    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
34902      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34903$as_echo "$as_me: $ac_file is unchanged" >&6;}
34904    else
34905      rm -f "$ac_file"
34906      mv "$tmp/config.h" "$ac_file" \
34907	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34908    fi
34909  else
34910    $as_echo "/* $configure_input  */" \
34911      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
34912      || as_fn_error $? "could not create -" "$LINENO" 5
34913  fi
34914 ;;
34915
34916
34917  esac
34918
34919done # for ac_tag
34920
34921
34922as_fn_exit 0
34923_ACEOF
34924ac_clean_files=$ac_clean_files_save
34925
34926test $ac_write_fail = 0 ||
34927  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34928
34929
34930# configure is writing to config.log, and then calls config.status.
34931# config.status does its own redirection, appending to config.log.
34932# Unfortunately, on DOS this fails, as config.log is still kept open
34933# by configure, so config.status won't be able to write to it; its
34934# output is simply discarded.  So we exec the FD to /dev/null,
34935# effectively closing config.log, so it can be properly (re)opened and
34936# appended to by config.status.  When coming back to configure, we
34937# need to make the FD available again.
34938if test "$no_create" != yes; then
34939  ac_cs_success=:
34940  ac_config_status_args=
34941  test "$silent" = yes &&
34942    ac_config_status_args="$ac_config_status_args --quiet"
34943  exec 5>/dev/null
34944  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34945  exec 5>>config.log
34946  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34947  # would make configure fail if this is the last instruction.
34948  $ac_cs_success || as_fn_exit 1
34949fi
34950if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34951  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34952$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34953fi
34954
34955
34956# Make the compare script executable
34957$CHMOD +x $OUTPUT_ROOT/compare.sh
34958
34959# Finally output some useful information to the user
34960
34961# Finally output some useful information to the user
34962
34963if test "x$CCACHE_FOUND" != x; then
34964	if  test "x$HAS_GOOD_CCACHE" = x; then
34965		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34966		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34967	else
34968		CCACHE_STATUS="installed and in use"
34969	fi
34970else
34971	if test "x$GCC" = xyes; then
34972		CCACHE_STATUS="not installed (consider installing)"
34973		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34974	else
34975		CCACHE_STATUS="not available for your system"
34976	fi
34977fi
34978
34979printf "\n"
34980printf "====================================================\n"
34981printf "A new configuration has been successfully created in\n"
34982printf "$OUTPUT_ROOT\n"
34983if test "x$CONFIGURE_COMMAND_LINE" != x; then
34984	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34985else
34986	printf "using default settings.\n"
34987fi
34988
34989printf "\n"
34990printf "Configuration summary:\n"
34991printf "* Debug level:    $DEBUG_LEVEL\n"
34992printf "* JDK variant:    $JDK_VARIANT\n"
34993printf "* JVM variants:   $with_jvm_variants\n"
34994printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34995
34996printf "\n"
34997printf "Tools summary:\n"
34998if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34999  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
35000fi
35001printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
35002printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
35003printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
35004
35005printf "\n"
35006printf "Build performance summary:\n"
35007printf "* Cores to use:   $JOBS\n"
35008printf "* Memory limit:   $MEMORY_SIZE MB\n"
35009printf "* ccache status:  $CCACHE_STATUS\n"
35010printf "\n"
35011
35012if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
35013	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
35014	printf "$CCACHE_HELP_MSG\n"
35015
35016    # Print a helpful message on how to acquire the necessary build dependency.
35017    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
35018    MISSING_DEPENDENCY=ccache
35019    PKGHANDLER_COMMAND=
35020
35021    case $PKGHANDLER in
35022	apt-get)
35023                apt_help     $MISSING_DEPENDENCY ;;
35024    yum)
35025                yum_help     $MISSING_DEPENDENCY ;;
35026	port)
35027                port_help    $MISSING_DEPENDENCY ;;
35028	pkgutil)
35029                pkgutil_help $MISSING_DEPENDENCY ;;
35030	pkgadd)
35031                pkgadd_help  $MISSING_DEPENDENCY ;;
35032    * )
35033      break ;;
35034    esac
35035
35036    if test "x$PKGHANDLER_COMMAND" != x; then
35037        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35038    fi
35039
35040	printf "$HELP_MSG\n"
35041	printf "\n"
35042fi
35043
35044if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
35045	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
35046	printf "will result in longer build times.\n"
35047	printf "\n"
35048fi
35049
35050if test "x$FOUND_ALT_VARIABLES" != "x"; then
35051	printf "WARNING: You have old-style ALT_ environment variables set.\n"
35052	printf "These are not respected, and will be ignored. It is recommended\n"
35053	printf "that you clean your environment. The following variables are set:\n"
35054	printf "$FOUND_ALT_VARIABLES\n"
35055	printf "\n"
35056fi
35057
35058if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
35059	printf "WARNING: Your build output directory is not on a local disk.\n"
35060	printf "This will severely degrade build performance!\n"
35061	printf "It is recommended that you create an output directory on a local disk,\n"
35062	printf "and run the configure script again from that directory.\n"
35063	printf "\n"
35064fi
35065
35066if test "x$IS_RECONFIGURE" = "xyes"; then
35067	printf "WARNING: The result of this configuration has overridden an older\n"
35068	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
35069	printf "proper build. Failure to do so might result in strange build problems.\n"
35070	printf "\n"
35071fi
35072
35073