generated-configure.sh revision 517:7d7dd520ebfd
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_CORES
603SJAVAC_SERVER_JAVA
604MEMORY_SIZE
605CONCURRENT_BUILD_JOBS
606NUM_CORES
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611STATIC_CXX_SETTING
612LIBDL
613LIBM
614LIBZIP_CAN_USE_MMAP
615USE_EXTERNAL_LIBZ
616USE_EXTERNAL_LIBGIF
617USE_EXTERNAL_LIBJPEG
618ALSA_LIBS
619ALSA_CFLAGS
620FREETYPE2_LIB_PATH
621USING_SYSTEM_FT_LIB
622FREETYPE2_LIBS
623FREETYPE2_CFLAGS
624CUPS_CFLAGS
625OPENWIN_HOME
626X_EXTRA_LIBS
627X_LIBS
628X_PRE_LIBS
629X_CFLAGS
630XMKMF
631CXXFLAGS_DEBUG_SYMBOLS
632CFLAGS_DEBUG_SYMBOLS
633ZIP_DEBUGINFO_FILES
634ENABLE_DEBUG_SYMBOLS
635LDFLAGS_CXX_JDK
636LDFLAGS_JDKEXE_SUFFIX
637LDFLAGS_JDKLIB_SUFFIX
638LDFLAGS_JDKEXE
639LDFLAGS_JDKLIB
640CXXFLAGS_JDKEXE
641CXXFLAGS_JDKLIB
642CFLAGS_JDKEXE
643CFLAGS_JDKLIB
644PACKAGE_PATH
645LEGACY_EXTRA_LDFLAGS
646LEGACY_EXTRA_CXXFLAGS
647LEGACY_EXTRA_CFLAGS
648CXX_FLAG_DEPS
649C_FLAG_DEPS
650CXX_O_FLAG_NONE
651CXX_O_FLAG_NORM
652CXX_O_FLAG_HI
653CXX_O_FLAG_HIGHEST
654C_O_FLAG_NONE
655C_O_FLAG_NORM
656C_O_FLAG_HI
657C_O_FLAG_HIGHEST
658POST_MCS_CMD
659POST_STRIP_CMD
660SET_EXECUTABLE_ORIGIN
661SET_SHARED_LIBRARY_ORIGIN
662CXX_FLAG_REORDER
663C_FLAG_REORDER
664SET_SHARED_LIBRARY_MAPFILE
665SET_SHARED_LIBRARY_NAME
666SHARED_LIBRARY_FLAGS
667EXE_SUFFIX
668STATIC_LIBRARY_SUFFIX
669SHARED_LIBRARY_SUFFIX
670LIBRARY_PREFIX
671STATIC_LIBRARY
672SHARED_LIBRARY
673OBJ_SUFFIX
674LIPO
675ac_ct_OBJDUMP
676OBJDUMP
677ac_ct_OBJCOPY
678OBJCOPY
679MCS
680STRIP
681NM
682AS
683CXXCPP
684CPP
685COMPILER_TYPE
686RC_FLAGS
687DUMPBIN
688WINAR
689HOTSPOT_RC
690HOTSPOT_MT
691RC
692MT
693WINLD
694HOTSPOT_LD
695HOTSPOT_CXX
696ARFLAGS
697AR
698LDEXECXX
699LDCXX
700LDEXE
701LD
702ac_ct_OBJC
703OBJCFLAGS
704OBJC
705ac_ct_CXX
706CXXFLAGS
707CXX
708ac_ct_PROPER_COMPILER_CXX
709PROPER_COMPILER_CXX
710POTENTIAL_CXX
711OBJEXT
712EXEEXT
713ac_ct_CC
714CPPFLAGS
715LDFLAGS
716CFLAGS
717CC
718ac_ct_PROPER_COMPILER_CC
719PROPER_COMPILER_CC
720POTENTIAL_CC
721BUILD_LD
722BUILD_CXX
723BUILD_CC
724MSVCR_DLL
725VS_PATH
726VS_LIB
727VS_INCLUDE
728CYGWIN_LINK
729AR_OUT_OPTION
730LD_OUT_OPTION
731EXE_OUT_OPTION
732CC_OUT_OPTION
733BUILD_HOTSPOT
734HOTSPOT_DIST
735BUILD_OUTPUT
736OVERRIDE_SRC_ROOT
737ADD_SRC_ROOT
738JDK_TOPDIR
739HOTSPOT_TOPDIR
740JAXWS_TOPDIR
741JAXP_TOPDIR
742CORBA_TOPDIR
743LANGTOOLS_TOPDIR
744BOOT_JDK_JVMARGS
745JAVAC_FLAGS
746BOOT_JDK_SOURCETARGET
747BOOT_JDK
748BOOT_TOOLSJAR
749BOOT_RTJAR
750JAVA_CHECK
751JAVAC_CHECK
752COOKED_BUILD_NUMBER
753FULL_VERSION
754RELEASE
755JDK_VERSION
756RUNTIME_NAME
757COPYRIGHT_YEAR
758MACOSX_BUNDLE_ID_BASE
759MACOSX_BUNDLE_NAME_BASE
760COMPANY_NAME
761JDK_RC_PLATFORM_NAME
762PRODUCT_SUFFIX
763PRODUCT_NAME
764LAUNCHER_NAME
765MILESTONE
766JDK_BUILD_NUMBER
767JDK_UPDATE_VERSION
768JDK_MICRO_VERSION
769JDK_MINOR_VERSION
770JDK_MAJOR_VERSION
771COMPRESS_JARS
772UNLIMITED_CRYPTO
773CACERTS_FILE
774TEST_IN_BUILD
775BUILD_HEADLESS
776SUPPORT_HEADFUL
777SUPPORT_HEADLESS
778SET_OPENJDK
779BDEPS_FTP
780BDEPS_UNZIP
781OS_VERSION_MICRO
782OS_VERSION_MINOR
783OS_VERSION_MAJOR
784PKG_CONFIG
785COMM
786TIME
787STAT
788HG
789READELF
790OTOOL
791LDD
792ZIP
793UNZIP
794FIND_DELETE
795MAKE
796CHECK_TOOLSDIR_MAKE
797CHECK_TOOLSDIR_GMAKE
798CHECK_MAKE
799CHECK_GMAKE
800PKGHANDLER
801OUTPUT_ROOT
802CONF_NAME
803SPEC
804BUILD_VARIANT_RELEASE
805DEBUG_CLASSFILES
806FASTDEBUG
807VARIANT
808DEBUG_LEVEL
809MACOSX_UNIVERSAL
810JVM_VARIANT_ZEROSHARK
811JVM_VARIANT_ZERO
812JVM_VARIANT_KERNEL
813JVM_VARIANT_CLIENT
814JVM_VARIANT_SERVER
815JVM_VARIANTS
816JDK_VARIANT
817BUILD_LOG_WRAPPER
818BUILD_LOG_PREVIOUS
819BUILD_LOG
820SYS_ROOT
821PATH_SEP
822SRC_ROOT
823DEFINE_CROSS_COMPILE_ARCH
824LP64
825OPENJDK_TARGET_OS_API_DIR
826OPENJDK_TARGET_CPU_JLI_CFLAGS
827OPENJDK_TARGET_CPU_OSARCH
828OPENJDK_TARGET_CPU_ISADIR
829OPENJDK_TARGET_CPU_LIBDIR
830OPENJDK_TARGET_CPU_LEGACY_LIB
831OPENJDK_TARGET_CPU_LEGACY
832REQUIRED_OS_VERSION
833REQUIRED_OS_NAME
834COMPILE_TYPE
835OPENJDK_TARGET_CPU_ENDIAN
836OPENJDK_TARGET_CPU_BITS
837OPENJDK_TARGET_CPU_ARCH
838OPENJDK_TARGET_CPU
839OPENJDK_TARGET_OS_API
840OPENJDK_TARGET_OS
841OPENJDK_BUILD_CPU_ENDIAN
842OPENJDK_BUILD_CPU_BITS
843OPENJDK_BUILD_CPU_ARCH
844OPENJDK_BUILD_CPU
845OPENJDK_BUILD_OS_API
846OPENJDK_BUILD_OS
847OPENJDK_BUILD_AUTOCONF_NAME
848OPENJDK_TARGET_AUTOCONF_NAME
849target_os
850target_vendor
851target_cpu
852target
853host_os
854host_vendor
855host_cpu
856host
857build_os
858build_vendor
859build_cpu
860build
861SETFILE
862DF
863READLINK
864CYGPATH
865NAWK
866SED
867FGREP
868EGREP
869GREP
870AWK
871XARGS
872WHICH
873WC
874UNIQ
875UNAME
876TR
877TOUCH
878TEE
879TAR
880TAIL
881SORT
882SH
883RM
884THEPWDCMD
885PRINTF
886MV
887MKTEMP
888MKDIR
889LS
890LN
891HEAD
892FIND
893FILE
894EXPR
895ECHO
896DIRNAME
897DIFF
898DATE
899CUT
900CP
901CMP
902CHMOD
903CAT
904BASH
905BASENAME
906DATE_WHEN_CONFIGURED
907CONFIGURE_COMMAND_LINE
908CUSTOM_MAKE_DIR
909target_alias
910host_alias
911build_alias
912LIBS
913ECHO_T
914ECHO_N
915ECHO_C
916DEFS
917mandir
918localedir
919libdir
920psdir
921pdfdir
922dvidir
923htmldir
924infodir
925docdir
926oldincludedir
927includedir
928localstatedir
929sharedstatedir
930sysconfdir
931datadir
932datarootdir
933libexecdir
934sbindir
935bindir
936program_transform_name
937prefix
938exec_prefix
939PACKAGE_URL
940PACKAGE_BUGREPORT
941PACKAGE_STRING
942PACKAGE_VERSION
943PACKAGE_TARNAME
944PACKAGE_NAME
945PATH_SEPARATOR
946SHELL'
947ac_subst_files=''
948ac_user_opts='
949enable_option_checking
950with_custom_make_dir
951with_target_bits
952with_sys_root
953with_tools_dir
954with_devkit
955with_jdk_variant
956with_jvm_variants
957enable_debug
958with_debug_level
959with_conf_name
960with_builddeps_conf
961with_builddeps_server
962with_builddeps_dir
963with_builddeps_group
964enable_openjdk_only
965enable_headful
966enable_hotspot_test_in_build
967with_cacerts_file
968enable_unlimited_crypto
969with_boot_jdk
970with_boot_jdk_jvmargs
971with_add_source_root
972with_override_source_root
973with_adds_and_overrides
974with_override_langtools
975with_override_corba
976with_override_jaxp
977with_override_jaxws
978with_override_hotspot
979with_override_jdk
980with_import_hotspot
981with_msvcr_dll
982with_extra_cflags
983with_extra_cxxflags
984with_extra_ldflags
985enable_debug_symbols
986enable_zip_debug_info
987enable_macosx_runtime_support
988with_x
989with_cups
990with_cups_include
991with_freetype
992with_alsa
993with_alsa_include
994with_alsa_lib
995with_zlib
996with_stdc__lib
997with_num_cores
998with_memory_size
999with_sjavac_server_java
1000with_sjavac_server_cores
1001enable_sjavac
1002enable_precompiled_headers
1003enable_ccache
1004with_ccache_dir
1005'
1006      ac_precious_vars='build_alias
1007host_alias
1008target_alias
1009PKG_CONFIG
1010CC
1011CFLAGS
1012LDFLAGS
1013LIBS
1014CPPFLAGS
1015CXX
1016CXXFLAGS
1017CCC
1018OBJC
1019OBJCFLAGS
1020CPP
1021CXXCPP
1022XMKMF
1023FREETYPE2_CFLAGS
1024FREETYPE2_LIBS
1025ALSA_CFLAGS
1026ALSA_LIBS'
1027
1028
1029# Initialize some variables set by options.
1030ac_init_help=
1031ac_init_version=false
1032ac_unrecognized_opts=
1033ac_unrecognized_sep=
1034# The variables have the same names as the options, with
1035# dashes changed to underlines.
1036cache_file=/dev/null
1037exec_prefix=NONE
1038no_create=
1039no_recursion=
1040prefix=NONE
1041program_prefix=NONE
1042program_suffix=NONE
1043program_transform_name=s,x,x,
1044silent=
1045site=
1046srcdir=
1047verbose=
1048x_includes=NONE
1049x_libraries=NONE
1050
1051# Installation directory options.
1052# These are left unexpanded so users can "make install exec_prefix=/foo"
1053# and all the variables that are supposed to be based on exec_prefix
1054# by default will actually change.
1055# Use braces instead of parens because sh, perl, etc. also accept them.
1056# (The list follows the same order as the GNU Coding Standards.)
1057bindir='${exec_prefix}/bin'
1058sbindir='${exec_prefix}/sbin'
1059libexecdir='${exec_prefix}/libexec'
1060datarootdir='${prefix}/share'
1061datadir='${datarootdir}'
1062sysconfdir='${prefix}/etc'
1063sharedstatedir='${prefix}/com'
1064localstatedir='${prefix}/var'
1065includedir='${prefix}/include'
1066oldincludedir='/usr/include'
1067docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1068infodir='${datarootdir}/info'
1069htmldir='${docdir}'
1070dvidir='${docdir}'
1071pdfdir='${docdir}'
1072psdir='${docdir}'
1073libdir='${exec_prefix}/lib'
1074localedir='${datarootdir}/locale'
1075mandir='${datarootdir}/man'
1076
1077ac_prev=
1078ac_dashdash=
1079for ac_option
1080do
1081  # If the previous option needs an argument, assign it.
1082  if test -n "$ac_prev"; then
1083    eval $ac_prev=\$ac_option
1084    ac_prev=
1085    continue
1086  fi
1087
1088  case $ac_option in
1089  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1090  *=)   ac_optarg= ;;
1091  *)    ac_optarg=yes ;;
1092  esac
1093
1094  # Accept the important Cygnus configure options, so we can diagnose typos.
1095
1096  case $ac_dashdash$ac_option in
1097  --)
1098    ac_dashdash=yes ;;
1099
1100  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1101    ac_prev=bindir ;;
1102  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1103    bindir=$ac_optarg ;;
1104
1105  -build | --build | --buil | --bui | --bu)
1106    ac_prev=build_alias ;;
1107  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1108    build_alias=$ac_optarg ;;
1109
1110  -cache-file | --cache-file | --cache-fil | --cache-fi \
1111  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1112    ac_prev=cache_file ;;
1113  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1114  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1115    cache_file=$ac_optarg ;;
1116
1117  --config-cache | -C)
1118    cache_file=config.cache ;;
1119
1120  -datadir | --datadir | --datadi | --datad)
1121    ac_prev=datadir ;;
1122  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1123    datadir=$ac_optarg ;;
1124
1125  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1126  | --dataroo | --dataro | --datar)
1127    ac_prev=datarootdir ;;
1128  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1129  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1130    datarootdir=$ac_optarg ;;
1131
1132  -disable-* | --disable-*)
1133    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1134    # Reject names that are not valid shell variable names.
1135    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1136      as_fn_error $? "invalid feature name: $ac_useropt"
1137    ac_useropt_orig=$ac_useropt
1138    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1139    case $ac_user_opts in
1140      *"
1141"enable_$ac_useropt"
1142"*) ;;
1143      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1144	 ac_unrecognized_sep=', ';;
1145    esac
1146    eval enable_$ac_useropt=no ;;
1147
1148  -docdir | --docdir | --docdi | --doc | --do)
1149    ac_prev=docdir ;;
1150  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1151    docdir=$ac_optarg ;;
1152
1153  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1154    ac_prev=dvidir ;;
1155  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1156    dvidir=$ac_optarg ;;
1157
1158  -enable-* | --enable-*)
1159    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1160    # Reject names that are not valid shell variable names.
1161    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1162      as_fn_error $? "invalid feature name: $ac_useropt"
1163    ac_useropt_orig=$ac_useropt
1164    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1165    case $ac_user_opts in
1166      *"
1167"enable_$ac_useropt"
1168"*) ;;
1169      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1170	 ac_unrecognized_sep=', ';;
1171    esac
1172    eval enable_$ac_useropt=\$ac_optarg ;;
1173
1174  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1175  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1176  | --exec | --exe | --ex)
1177    ac_prev=exec_prefix ;;
1178  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1179  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1180  | --exec=* | --exe=* | --ex=*)
1181    exec_prefix=$ac_optarg ;;
1182
1183  -gas | --gas | --ga | --g)
1184    # Obsolete; use --with-gas.
1185    with_gas=yes ;;
1186
1187  -help | --help | --hel | --he | -h)
1188    ac_init_help=long ;;
1189  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1190    ac_init_help=recursive ;;
1191  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1192    ac_init_help=short ;;
1193
1194  -host | --host | --hos | --ho)
1195    ac_prev=host_alias ;;
1196  -host=* | --host=* | --hos=* | --ho=*)
1197    host_alias=$ac_optarg ;;
1198
1199  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1200    ac_prev=htmldir ;;
1201  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1202  | --ht=*)
1203    htmldir=$ac_optarg ;;
1204
1205  -includedir | --includedir | --includedi | --included | --include \
1206  | --includ | --inclu | --incl | --inc)
1207    ac_prev=includedir ;;
1208  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1209  | --includ=* | --inclu=* | --incl=* | --inc=*)
1210    includedir=$ac_optarg ;;
1211
1212  -infodir | --infodir | --infodi | --infod | --info | --inf)
1213    ac_prev=infodir ;;
1214  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1215    infodir=$ac_optarg ;;
1216
1217  -libdir | --libdir | --libdi | --libd)
1218    ac_prev=libdir ;;
1219  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1220    libdir=$ac_optarg ;;
1221
1222  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1223  | --libexe | --libex | --libe)
1224    ac_prev=libexecdir ;;
1225  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1226  | --libexe=* | --libex=* | --libe=*)
1227    libexecdir=$ac_optarg ;;
1228
1229  -localedir | --localedir | --localedi | --localed | --locale)
1230    ac_prev=localedir ;;
1231  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1232    localedir=$ac_optarg ;;
1233
1234  -localstatedir | --localstatedir | --localstatedi | --localstated \
1235  | --localstate | --localstat | --localsta | --localst | --locals)
1236    ac_prev=localstatedir ;;
1237  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1238  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1239    localstatedir=$ac_optarg ;;
1240
1241  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1242    ac_prev=mandir ;;
1243  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1244    mandir=$ac_optarg ;;
1245
1246  -nfp | --nfp | --nf)
1247    # Obsolete; use --without-fp.
1248    with_fp=no ;;
1249
1250  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1251  | --no-cr | --no-c | -n)
1252    no_create=yes ;;
1253
1254  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1255  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1256    no_recursion=yes ;;
1257
1258  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1259  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1260  | --oldin | --oldi | --old | --ol | --o)
1261    ac_prev=oldincludedir ;;
1262  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1263  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1264  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1265    oldincludedir=$ac_optarg ;;
1266
1267  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1268    ac_prev=prefix ;;
1269  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1270    prefix=$ac_optarg ;;
1271
1272  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1273  | --program-pre | --program-pr | --program-p)
1274    ac_prev=program_prefix ;;
1275  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1276  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1277    program_prefix=$ac_optarg ;;
1278
1279  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1280  | --program-suf | --program-su | --program-s)
1281    ac_prev=program_suffix ;;
1282  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1283  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1284    program_suffix=$ac_optarg ;;
1285
1286  -program-transform-name | --program-transform-name \
1287  | --program-transform-nam | --program-transform-na \
1288  | --program-transform-n | --program-transform- \
1289  | --program-transform | --program-transfor \
1290  | --program-transfo | --program-transf \
1291  | --program-trans | --program-tran \
1292  | --progr-tra | --program-tr | --program-t)
1293    ac_prev=program_transform_name ;;
1294  -program-transform-name=* | --program-transform-name=* \
1295  | --program-transform-nam=* | --program-transform-na=* \
1296  | --program-transform-n=* | --program-transform-=* \
1297  | --program-transform=* | --program-transfor=* \
1298  | --program-transfo=* | --program-transf=* \
1299  | --program-trans=* | --program-tran=* \
1300  | --progr-tra=* | --program-tr=* | --program-t=*)
1301    program_transform_name=$ac_optarg ;;
1302
1303  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1304    ac_prev=pdfdir ;;
1305  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1306    pdfdir=$ac_optarg ;;
1307
1308  -psdir | --psdir | --psdi | --psd | --ps)
1309    ac_prev=psdir ;;
1310  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1311    psdir=$ac_optarg ;;
1312
1313  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1314  | -silent | --silent | --silen | --sile | --sil)
1315    silent=yes ;;
1316
1317  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1318    ac_prev=sbindir ;;
1319  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1320  | --sbi=* | --sb=*)
1321    sbindir=$ac_optarg ;;
1322
1323  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1324  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1325  | --sharedst | --shareds | --shared | --share | --shar \
1326  | --sha | --sh)
1327    ac_prev=sharedstatedir ;;
1328  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1329  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1330  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1331  | --sha=* | --sh=*)
1332    sharedstatedir=$ac_optarg ;;
1333
1334  -site | --site | --sit)
1335    ac_prev=site ;;
1336  -site=* | --site=* | --sit=*)
1337    site=$ac_optarg ;;
1338
1339  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1340    ac_prev=srcdir ;;
1341  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1342    srcdir=$ac_optarg ;;
1343
1344  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1345  | --syscon | --sysco | --sysc | --sys | --sy)
1346    ac_prev=sysconfdir ;;
1347  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1348  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1349    sysconfdir=$ac_optarg ;;
1350
1351  -target | --target | --targe | --targ | --tar | --ta | --t)
1352    ac_prev=target_alias ;;
1353  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1354    target_alias=$ac_optarg ;;
1355
1356  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1357    verbose=yes ;;
1358
1359  -version | --version | --versio | --versi | --vers | -V)
1360    ac_init_version=: ;;
1361
1362  -with-* | --with-*)
1363    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1364    # Reject names that are not valid shell variable names.
1365    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1366      as_fn_error $? "invalid package name: $ac_useropt"
1367    ac_useropt_orig=$ac_useropt
1368    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1369    case $ac_user_opts in
1370      *"
1371"with_$ac_useropt"
1372"*) ;;
1373      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1374	 ac_unrecognized_sep=', ';;
1375    esac
1376    eval with_$ac_useropt=\$ac_optarg ;;
1377
1378  -without-* | --without-*)
1379    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1380    # Reject names that are not valid shell variable names.
1381    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1382      as_fn_error $? "invalid package name: $ac_useropt"
1383    ac_useropt_orig=$ac_useropt
1384    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1385    case $ac_user_opts in
1386      *"
1387"with_$ac_useropt"
1388"*) ;;
1389      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1390	 ac_unrecognized_sep=', ';;
1391    esac
1392    eval with_$ac_useropt=no ;;
1393
1394  --x)
1395    # Obsolete; use --with-x.
1396    with_x=yes ;;
1397
1398  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1399  | --x-incl | --x-inc | --x-in | --x-i)
1400    ac_prev=x_includes ;;
1401  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1402  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1403    x_includes=$ac_optarg ;;
1404
1405  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1406  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1407    ac_prev=x_libraries ;;
1408  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1409  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1410    x_libraries=$ac_optarg ;;
1411
1412  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1413Try \`$0 --help' for more information"
1414    ;;
1415
1416  *=*)
1417    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1418    # Reject names that are not valid shell variable names.
1419    case $ac_envvar in #(
1420      '' | [0-9]* | *[!_$as_cr_alnum]* )
1421      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1422    esac
1423    eval $ac_envvar=\$ac_optarg
1424    export $ac_envvar ;;
1425
1426  *)
1427    # FIXME: should be removed in autoconf 3.0.
1428    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1429    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1430      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1431    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1432    ;;
1433
1434  esac
1435done
1436
1437if test -n "$ac_prev"; then
1438  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1439  as_fn_error $? "missing argument to $ac_option"
1440fi
1441
1442if test -n "$ac_unrecognized_opts"; then
1443  case $enable_option_checking in
1444    no) ;;
1445    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1446    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1447  esac
1448fi
1449
1450# Check all directory arguments for consistency.
1451for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1452		datadir sysconfdir sharedstatedir localstatedir includedir \
1453		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1454		libdir localedir mandir
1455do
1456  eval ac_val=\$$ac_var
1457  # Remove trailing slashes.
1458  case $ac_val in
1459    */ )
1460      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1461      eval $ac_var=\$ac_val;;
1462  esac
1463  # Be sure to have absolute directory names.
1464  case $ac_val in
1465    [\\/$]* | ?:[\\/]* )  continue;;
1466    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1467  esac
1468  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1469done
1470
1471# There might be people who depend on the old broken behavior: `$host'
1472# used to hold the argument of --host etc.
1473# FIXME: To remove some day.
1474build=$build_alias
1475host=$host_alias
1476target=$target_alias
1477
1478# FIXME: To remove some day.
1479if test "x$host_alias" != x; then
1480  if test "x$build_alias" = x; then
1481    cross_compiling=maybe
1482    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1483    If a cross compiler is detected then cross compile mode will be used" >&2
1484  elif test "x$build_alias" != "x$host_alias"; then
1485    cross_compiling=yes
1486  fi
1487fi
1488
1489ac_tool_prefix=
1490test -n "$host_alias" && ac_tool_prefix=$host_alias-
1491
1492test "$silent" = yes && exec 6>/dev/null
1493
1494
1495ac_pwd=`pwd` && test -n "$ac_pwd" &&
1496ac_ls_di=`ls -di .` &&
1497ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1498  as_fn_error $? "working directory cannot be determined"
1499test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1500  as_fn_error $? "pwd does not report name of working directory"
1501
1502
1503# Find the source files, if location was not specified.
1504if test -z "$srcdir"; then
1505  ac_srcdir_defaulted=yes
1506  # Try the directory containing this script, then the parent directory.
1507  ac_confdir=`$as_dirname -- "$as_myself" ||
1508$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1509	 X"$as_myself" : 'X\(//\)[^/]' \| \
1510	 X"$as_myself" : 'X\(//\)$' \| \
1511	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1512$as_echo X"$as_myself" |
1513    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1514	    s//\1/
1515	    q
1516	  }
1517	  /^X\(\/\/\)[^/].*/{
1518	    s//\1/
1519	    q
1520	  }
1521	  /^X\(\/\/\)$/{
1522	    s//\1/
1523	    q
1524	  }
1525	  /^X\(\/\).*/{
1526	    s//\1/
1527	    q
1528	  }
1529	  s/.*/./; q'`
1530  srcdir=$ac_confdir
1531  if test ! -r "$srcdir/$ac_unique_file"; then
1532    srcdir=..
1533  fi
1534else
1535  ac_srcdir_defaulted=no
1536fi
1537if test ! -r "$srcdir/$ac_unique_file"; then
1538  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1539  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1540fi
1541ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1542ac_abs_confdir=`(
1543	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1544	pwd)`
1545# When building in place, set srcdir=.
1546if test "$ac_abs_confdir" = "$ac_pwd"; then
1547  srcdir=.
1548fi
1549# Remove unnecessary trailing slashes from srcdir.
1550# Double slashes in file names in object file debugging info
1551# mess up M-x gdb in Emacs.
1552case $srcdir in
1553*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1554esac
1555for ac_var in $ac_precious_vars; do
1556  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1557  eval ac_env_${ac_var}_value=\$${ac_var}
1558  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1559  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1560done
1561
1562#
1563# Report the --help message.
1564#
1565if test "$ac_init_help" = "long"; then
1566  # Omit some internal or obsolete options to make the list less imposing.
1567  # This message is too long to be a string in the A/UX 3.1 sh.
1568  cat <<_ACEOF
1569\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1570
1571Usage: $0 [OPTION]... [VAR=VALUE]...
1572
1573To assign environment variables (e.g., CC, CFLAGS...), specify them as
1574VAR=VALUE.  See below for descriptions of some of the useful variables.
1575
1576Defaults for the options are specified in brackets.
1577
1578Configuration:
1579  -h, --help              display this help and exit
1580      --help=short        display options specific to this package
1581      --help=recursive    display the short help of all the included packages
1582  -V, --version           display version information and exit
1583  -q, --quiet, --silent   do not print \`checking ...' messages
1584      --cache-file=FILE   cache test results in FILE [disabled]
1585  -C, --config-cache      alias for \`--cache-file=config.cache'
1586  -n, --no-create         do not create output files
1587      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1588
1589Installation directories:
1590  --prefix=PREFIX         install architecture-independent files in PREFIX
1591                          [$ac_default_prefix]
1592  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1593                          [PREFIX]
1594
1595By default, \`make install' will install all the files in
1596\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1597an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1598for instance \`--prefix=\$HOME'.
1599
1600For better control, use the options below.
1601
1602Fine tuning of the installation directories:
1603  --bindir=DIR            user executables [EPREFIX/bin]
1604  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1605  --libexecdir=DIR        program executables [EPREFIX/libexec]
1606  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1607  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1608  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1609  --libdir=DIR            object code libraries [EPREFIX/lib]
1610  --includedir=DIR        C header files [PREFIX/include]
1611  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1612  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1613  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1614  --infodir=DIR           info documentation [DATAROOTDIR/info]
1615  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1616  --mandir=DIR            man documentation [DATAROOTDIR/man]
1617  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1618  --htmldir=DIR           html documentation [DOCDIR]
1619  --dvidir=DIR            dvi documentation [DOCDIR]
1620  --pdfdir=DIR            pdf documentation [DOCDIR]
1621  --psdir=DIR             ps documentation [DOCDIR]
1622_ACEOF
1623
1624  cat <<\_ACEOF
1625
1626X features:
1627  --x-includes=DIR    X include files are in DIR
1628  --x-libraries=DIR   X library files are in DIR
1629
1630System types:
1631  --build=BUILD     configure for building on BUILD [guessed]
1632  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1633  --target=TARGET   configure for building compilers for TARGET [HOST]
1634_ACEOF
1635fi
1636
1637if test -n "$ac_init_help"; then
1638  case $ac_init_help in
1639     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1640   esac
1641  cat <<\_ACEOF
1642
1643Optional Features:
1644  --disable-option-checking  ignore unrecognized --enable/--with options
1645  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1646  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1647  --enable-debug          set the debug level to fastdebug (shorthand for
1648                          --with-debug-level=fastdebug) [disabled]
1649  --enable-openjdk-only   supress building closed source even if present
1650                          [disabled]
1651  --disable-headful       disable building headful support (graphical UI
1652                          support) [enabled]
1653  --enable-hotspot-test-in-build
1654                          run the Queens test after Hotspot build [disabled]
1655  --enable-unlimited-crypto
1656                          Enable unlimited crypto policy [disabled]
1657  --disable-debug-symbols disable generation of debug symbols [enabled]
1658  --disable-zip-debug-info
1659                          disable zipping of debug-info files [enabled]
1660  --disable-macosx-runtime-support
1661                          disable the use of MacOSX Java runtime support
1662                          framework [enabled]
1663  --enable-sjavac         use sjavac to do fast incremental compiles
1664                          [disabled]
1665  --disable-precompiled-headers
1666                          disable using precompiled headers when compiling C++
1667                          [enabled]
1668  --disable-ccache        disable using ccache to speed up recompilations
1669                          [enabled]
1670
1671Optional Packages:
1672  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1673  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1674  --with-custom-make-dir  use this directory for custom build/make files
1675  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1676                          support it), e.g. --with-target-bits=32 [guessed]
1677  --with-sys-root         pass this sys-root to the compilers and tools (for
1678                          cross-compiling)
1679  --with-tools-dir        search this directory for compilers and tools (for
1680                          cross-compiling)
1681  --with-devkit           use this directory as base for tools-dir and
1682                          sys-root (for cross-compiling)
1683  --with-jdk-variant      JDK variant to build (normal) [normal]
1684  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1685                          client, kernel, zero, zeroshark) [server]
1686  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1687                          [release]
1688  --with-conf-name        use this as the name of the configuration [generated
1689                          from important configuration options]
1690  --with-builddeps-conf   use this configuration file for the builddeps
1691  --with-builddeps-server download and use build dependencies from this server
1692                          url
1693  --with-builddeps-dir    store downloaded build dependencies here
1694                          [/localhome/builddeps]
1695  --with-builddeps-group  chgrp the downloaded build dependencies to this
1696                          group
1697  --with-cacerts-file     specify alternative cacerts file
1698  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1699  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1700                          invocations of the Boot JDK, overriding the default
1701                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1702                          -enableassertions"
1703  --with-add-source-root  for each and every source directory, look in this
1704                          additional source root for the same directory; if it
1705                          exists and have files in it, include it in the build
1706  --with-override-source-root
1707                          for each and every source directory, look in this
1708                          override source root for the same directory; if it
1709                          exists, use that directory instead and ignore the
1710                          directory in the original source root
1711  --with-adds-and-overrides
1712                          use the subdirs 'adds' and 'overrides' in the
1713                          specified directory as add-source-root and
1714                          override-source-root
1715  --with-override-langtools
1716                          use this langtools dir for the build
1717  --with-override-corba   use this corba dir for the build
1718  --with-override-jaxp    use this jaxp dir for the build
1719  --with-override-jaxws   use this jaxws dir for the build
1720  --with-override-hotspot use this hotspot dir for the build
1721  --with-override-jdk     use this jdk dir for the build
1722  --with-import-hotspot   import hotspot binaries from this jdk image or
1723                          hotspot build dist dir instead of building from
1724                          source
1725  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1726                          only) [probed]
1727  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1728  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1729  --with-extra-ldflags    extra flags to be used when linking jdk
1730  --with-x                use the X Window System
1731  --with-cups             specify prefix directory for the cups package
1732                          (expecting the headers under PATH/include)
1733  --with-cups-include     specify directory for the cups include files
1734  --with-freetype         specify prefix directory for the freetype2 package
1735                          (expecting the libraries under PATH/lib and the
1736                          headers under PATH/include)
1737  --with-alsa             specify prefix directory for the alsa package
1738                          (expecting the libraries under PATH/lib and the
1739                          headers under PATH/include)
1740  --with-alsa-include     specify directory for the alsa include files
1741  --with-alsa-lib         specify directory for the alsa library
1742  --with-zlib             use zlib from build system or OpenJDK source
1743                          (system, bundled) [bundled]
1744  --with-stdc++lib=<static>,<dynamic>,<default>
1745                          force linking of the C++ runtime on Linux to either
1746                          static or dynamic, default is static with dynamic as
1747                          fallback
1748  --with-num-cores        number of cores in the build system, e.g.
1749                          --with-num-cores=8 [probed]
1750  --with-memory-size      memory (in MB) available in the build system, e.g.
1751                          --with-memory-size=1024 [probed]
1752  --with-sjavac-server-java
1753                          use this java binary for running the sjavac
1754                          background server [Boot JDK java]
1755  --with-sjavac-server-cores
1756                          use at most this number of concurrent threads on the
1757                          sjavac server [probed]
1758  --with-ccache-dir       where to store ccache files [~/.ccache]
1759
1760Some influential environment variables:
1761  PKG_CONFIG  path to pkg-config utility
1762  CC          C compiler command
1763  CFLAGS      C compiler flags
1764  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1765              nonstandard directory <lib dir>
1766  LIBS        libraries to pass to the linker, e.g. -l<library>
1767  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1768              you have headers in a nonstandard directory <include dir>
1769  CXX         C++ compiler command
1770  CXXFLAGS    C++ compiler flags
1771  OBJC        Objective C compiler command
1772  OBJCFLAGS   Objective C compiler flags
1773  CPP         C preprocessor
1774  CXXCPP      C++ preprocessor
1775  XMKMF       Path to xmkmf, Makefile generator for X Window System
1776  FREETYPE2_CFLAGS
1777              C compiler flags for FREETYPE2, overriding pkg-config
1778  FREETYPE2_LIBS
1779              linker flags for FREETYPE2, overriding pkg-config
1780  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1781  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1782
1783Use these variables to override the choices made by `configure' or to help
1784it to find libraries and programs with nonstandard names/locations.
1785
1786Report bugs to <build-dev@openjdk.java.net>.
1787OpenJDK home page: <http://openjdk.java.net>.
1788_ACEOF
1789ac_status=$?
1790fi
1791
1792if test "$ac_init_help" = "recursive"; then
1793  # If there are subdirs, report their specific --help.
1794  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1795    test -d "$ac_dir" ||
1796      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1797      continue
1798    ac_builddir=.
1799
1800case "$ac_dir" in
1801.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1802*)
1803  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1804  # A ".." for each directory in $ac_dir_suffix.
1805  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1806  case $ac_top_builddir_sub in
1807  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1808  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1809  esac ;;
1810esac
1811ac_abs_top_builddir=$ac_pwd
1812ac_abs_builddir=$ac_pwd$ac_dir_suffix
1813# for backward compatibility:
1814ac_top_builddir=$ac_top_build_prefix
1815
1816case $srcdir in
1817  .)  # We are building in place.
1818    ac_srcdir=.
1819    ac_top_srcdir=$ac_top_builddir_sub
1820    ac_abs_top_srcdir=$ac_pwd ;;
1821  [\\/]* | ?:[\\/]* )  # Absolute name.
1822    ac_srcdir=$srcdir$ac_dir_suffix;
1823    ac_top_srcdir=$srcdir
1824    ac_abs_top_srcdir=$srcdir ;;
1825  *) # Relative name.
1826    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1827    ac_top_srcdir=$ac_top_build_prefix$srcdir
1828    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1829esac
1830ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1831
1832    cd "$ac_dir" || { ac_status=$?; continue; }
1833    # Check for guested configure.
1834    if test -f "$ac_srcdir/configure.gnu"; then
1835      echo &&
1836      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1837    elif test -f "$ac_srcdir/configure"; then
1838      echo &&
1839      $SHELL "$ac_srcdir/configure" --help=recursive
1840    else
1841      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1842    fi || ac_status=$?
1843    cd "$ac_pwd" || { ac_status=$?; break; }
1844  done
1845fi
1846
1847test -n "$ac_init_help" && exit $ac_status
1848if $ac_init_version; then
1849  cat <<\_ACEOF
1850OpenJDK configure jdk8
1851generated by GNU Autoconf 2.67
1852
1853Copyright (C) 2010 Free Software Foundation, Inc.
1854This configure script is free software; the Free Software Foundation
1855gives unlimited permission to copy, distribute and modify it.
1856_ACEOF
1857  exit
1858fi
1859
1860## ------------------------ ##
1861## Autoconf initialization. ##
1862## ------------------------ ##
1863
1864# ac_fn_c_try_compile LINENO
1865# --------------------------
1866# Try to compile conftest.$ac_ext, and return whether this succeeded.
1867ac_fn_c_try_compile ()
1868{
1869  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1870  rm -f conftest.$ac_objext
1871  if { { ac_try="$ac_compile"
1872case "(($ac_try" in
1873  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1874  *) ac_try_echo=$ac_try;;
1875esac
1876eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1877$as_echo "$ac_try_echo"; } >&5
1878  (eval "$ac_compile") 2>conftest.err
1879  ac_status=$?
1880  if test -s conftest.err; then
1881    grep -v '^ *+' conftest.err >conftest.er1
1882    cat conftest.er1 >&5
1883    mv -f conftest.er1 conftest.err
1884  fi
1885  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1886  test $ac_status = 0; } && {
1887	 test -z "$ac_c_werror_flag" ||
1888	 test ! -s conftest.err
1889       } && test -s conftest.$ac_objext; then :
1890  ac_retval=0
1891else
1892  $as_echo "$as_me: failed program was:" >&5
1893sed 's/^/| /' conftest.$ac_ext >&5
1894
1895	ac_retval=1
1896fi
1897  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1898  as_fn_set_status $ac_retval
1899
1900} # ac_fn_c_try_compile
1901
1902# ac_fn_cxx_try_compile LINENO
1903# ----------------------------
1904# Try to compile conftest.$ac_ext, and return whether this succeeded.
1905ac_fn_cxx_try_compile ()
1906{
1907  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908  rm -f conftest.$ac_objext
1909  if { { ac_try="$ac_compile"
1910case "(($ac_try" in
1911  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1912  *) ac_try_echo=$ac_try;;
1913esac
1914eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1915$as_echo "$ac_try_echo"; } >&5
1916  (eval "$ac_compile") 2>conftest.err
1917  ac_status=$?
1918  if test -s conftest.err; then
1919    grep -v '^ *+' conftest.err >conftest.er1
1920    cat conftest.er1 >&5
1921    mv -f conftest.er1 conftest.err
1922  fi
1923  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1924  test $ac_status = 0; } && {
1925	 test -z "$ac_cxx_werror_flag" ||
1926	 test ! -s conftest.err
1927       } && test -s conftest.$ac_objext; then :
1928  ac_retval=0
1929else
1930  $as_echo "$as_me: failed program was:" >&5
1931sed 's/^/| /' conftest.$ac_ext >&5
1932
1933	ac_retval=1
1934fi
1935  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1936  as_fn_set_status $ac_retval
1937
1938} # ac_fn_cxx_try_compile
1939
1940# ac_fn_objc_try_compile LINENO
1941# -----------------------------
1942# Try to compile conftest.$ac_ext, and return whether this succeeded.
1943ac_fn_objc_try_compile ()
1944{
1945  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946  rm -f conftest.$ac_objext
1947  if { { ac_try="$ac_compile"
1948case "(($ac_try" in
1949  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1950  *) ac_try_echo=$ac_try;;
1951esac
1952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1953$as_echo "$ac_try_echo"; } >&5
1954  (eval "$ac_compile") 2>conftest.err
1955  ac_status=$?
1956  if test -s conftest.err; then
1957    grep -v '^ *+' conftest.err >conftest.er1
1958    cat conftest.er1 >&5
1959    mv -f conftest.er1 conftest.err
1960  fi
1961  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1962  test $ac_status = 0; } && {
1963	 test -z "$ac_objc_werror_flag" ||
1964	 test ! -s conftest.err
1965       } && test -s conftest.$ac_objext; then :
1966  ac_retval=0
1967else
1968  $as_echo "$as_me: failed program was:" >&5
1969sed 's/^/| /' conftest.$ac_ext >&5
1970
1971	ac_retval=1
1972fi
1973  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1974  as_fn_set_status $ac_retval
1975
1976} # ac_fn_objc_try_compile
1977
1978# ac_fn_c_try_cpp LINENO
1979# ----------------------
1980# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1981ac_fn_c_try_cpp ()
1982{
1983  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984  if { { ac_try="$ac_cpp conftest.$ac_ext"
1985case "(($ac_try" in
1986  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1987  *) ac_try_echo=$ac_try;;
1988esac
1989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1990$as_echo "$ac_try_echo"; } >&5
1991  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1992  ac_status=$?
1993  if test -s conftest.err; then
1994    grep -v '^ *+' conftest.err >conftest.er1
1995    cat conftest.er1 >&5
1996    mv -f conftest.er1 conftest.err
1997  fi
1998  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1999  test $ac_status = 0; } > conftest.i && {
2000	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2001	 test ! -s conftest.err
2002       }; then :
2003  ac_retval=0
2004else
2005  $as_echo "$as_me: failed program was:" >&5
2006sed 's/^/| /' conftest.$ac_ext >&5
2007
2008    ac_retval=1
2009fi
2010  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2011  as_fn_set_status $ac_retval
2012
2013} # ac_fn_c_try_cpp
2014
2015# ac_fn_cxx_try_cpp LINENO
2016# ------------------------
2017# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2018ac_fn_cxx_try_cpp ()
2019{
2020  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2021  if { { ac_try="$ac_cpp conftest.$ac_ext"
2022case "(($ac_try" in
2023  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2024  *) ac_try_echo=$ac_try;;
2025esac
2026eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2027$as_echo "$ac_try_echo"; } >&5
2028  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2029  ac_status=$?
2030  if test -s conftest.err; then
2031    grep -v '^ *+' conftest.err >conftest.er1
2032    cat conftest.er1 >&5
2033    mv -f conftest.er1 conftest.err
2034  fi
2035  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2036  test $ac_status = 0; } > conftest.i && {
2037	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2038	 test ! -s conftest.err
2039       }; then :
2040  ac_retval=0
2041else
2042  $as_echo "$as_me: failed program was:" >&5
2043sed 's/^/| /' conftest.$ac_ext >&5
2044
2045    ac_retval=1
2046fi
2047  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2048  as_fn_set_status $ac_retval
2049
2050} # ac_fn_cxx_try_cpp
2051
2052# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2053# ---------------------------------------------------------
2054# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2055# the include files in INCLUDES and setting the cache variable VAR
2056# accordingly.
2057ac_fn_cxx_check_header_mongrel ()
2058{
2059  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060  if eval "test \"\${$3+set}\"" = set; then :
2061  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2062$as_echo_n "checking for $2... " >&6; }
2063if eval "test \"\${$3+set}\"" = set; then :
2064  $as_echo_n "(cached) " >&6
2065fi
2066eval ac_res=\$$3
2067	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2068$as_echo "$ac_res" >&6; }
2069else
2070  # Is the header compilable?
2071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2072$as_echo_n "checking $2 usability... " >&6; }
2073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2074/* end confdefs.h.  */
2075$4
2076#include <$2>
2077_ACEOF
2078if ac_fn_cxx_try_compile "$LINENO"; then :
2079  ac_header_compiler=yes
2080else
2081  ac_header_compiler=no
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2085$as_echo "$ac_header_compiler" >&6; }
2086
2087# Is the header present?
2088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2089$as_echo_n "checking $2 presence... " >&6; }
2090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091/* end confdefs.h.  */
2092#include <$2>
2093_ACEOF
2094if ac_fn_cxx_try_cpp "$LINENO"; then :
2095  ac_header_preproc=yes
2096else
2097  ac_header_preproc=no
2098fi
2099rm -f conftest.err conftest.i conftest.$ac_ext
2100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2101$as_echo "$ac_header_preproc" >&6; }
2102
2103# So?  What about this header?
2104case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2105  yes:no: )
2106    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2107$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2108    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2109$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2110    ;;
2111  no:yes:* )
2112    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2113$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2114    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2115$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2116    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2117$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2118    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2119$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2120    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2121$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2122( $as_echo "## ----------------------------------------- ##
2123## Report this to build-dev@openjdk.java.net ##
2124## ----------------------------------------- ##"
2125     ) | sed "s/^/$as_me: WARNING:     /" >&2
2126    ;;
2127esac
2128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2129$as_echo_n "checking for $2... " >&6; }
2130if eval "test \"\${$3+set}\"" = set; then :
2131  $as_echo_n "(cached) " >&6
2132else
2133  eval "$3=\$ac_header_compiler"
2134fi
2135eval ac_res=\$$3
2136	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2137$as_echo "$ac_res" >&6; }
2138fi
2139  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2140
2141} # ac_fn_cxx_check_header_mongrel
2142
2143# ac_fn_cxx_try_run LINENO
2144# ------------------------
2145# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2146# that executables *can* be run.
2147ac_fn_cxx_try_run ()
2148{
2149  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2150  if { { ac_try="$ac_link"
2151case "(($ac_try" in
2152  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2153  *) ac_try_echo=$ac_try;;
2154esac
2155eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2156$as_echo "$ac_try_echo"; } >&5
2157  (eval "$ac_link") 2>&5
2158  ac_status=$?
2159  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2160  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2161  { { case "(($ac_try" in
2162  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2163  *) ac_try_echo=$ac_try;;
2164esac
2165eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2166$as_echo "$ac_try_echo"; } >&5
2167  (eval "$ac_try") 2>&5
2168  ac_status=$?
2169  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2170  test $ac_status = 0; }; }; then :
2171  ac_retval=0
2172else
2173  $as_echo "$as_me: program exited with status $ac_status" >&5
2174       $as_echo "$as_me: failed program was:" >&5
2175sed 's/^/| /' conftest.$ac_ext >&5
2176
2177       ac_retval=$ac_status
2178fi
2179  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2180  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2181  as_fn_set_status $ac_retval
2182
2183} # ac_fn_cxx_try_run
2184
2185# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2186# ---------------------------------------------------------
2187# Tests whether HEADER exists and can be compiled using the include files in
2188# INCLUDES, setting the cache variable VAR accordingly.
2189ac_fn_cxx_check_header_compile ()
2190{
2191  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2192  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2193$as_echo_n "checking for $2... " >&6; }
2194if eval "test \"\${$3+set}\"" = set; then :
2195  $as_echo_n "(cached) " >&6
2196else
2197  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198/* end confdefs.h.  */
2199$4
2200#include <$2>
2201_ACEOF
2202if ac_fn_cxx_try_compile "$LINENO"; then :
2203  eval "$3=yes"
2204else
2205  eval "$3=no"
2206fi
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208fi
2209eval ac_res=\$$3
2210	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2211$as_echo "$ac_res" >&6; }
2212  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2213
2214} # ac_fn_cxx_check_header_compile
2215
2216# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2217# ----------------------------------------------
2218# Tries to find the compile-time value of EXPR in a program that includes
2219# INCLUDES, setting VAR accordingly. Returns whether the value could be
2220# computed
2221ac_fn_cxx_compute_int ()
2222{
2223  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2224  if test "$cross_compiling" = yes; then
2225    # Depending upon the size, compute the lo and hi bounds.
2226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h.  */
2228$4
2229int
2230main ()
2231{
2232static int test_array [1 - 2 * !(($2) >= 0)];
2233test_array [0] = 0
2234
2235  ;
2236  return 0;
2237}
2238_ACEOF
2239if ac_fn_cxx_try_compile "$LINENO"; then :
2240  ac_lo=0 ac_mid=0
2241  while :; do
2242    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2243/* end confdefs.h.  */
2244$4
2245int
2246main ()
2247{
2248static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2249test_array [0] = 0
2250
2251  ;
2252  return 0;
2253}
2254_ACEOF
2255if ac_fn_cxx_try_compile "$LINENO"; then :
2256  ac_hi=$ac_mid; break
2257else
2258  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2259			if test $ac_lo -le $ac_mid; then
2260			  ac_lo= ac_hi=
2261			  break
2262			fi
2263			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2264fi
2265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2266  done
2267else
2268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2269/* end confdefs.h.  */
2270$4
2271int
2272main ()
2273{
2274static int test_array [1 - 2 * !(($2) < 0)];
2275test_array [0] = 0
2276
2277  ;
2278  return 0;
2279}
2280_ACEOF
2281if ac_fn_cxx_try_compile "$LINENO"; then :
2282  ac_hi=-1 ac_mid=-1
2283  while :; do
2284    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285/* end confdefs.h.  */
2286$4
2287int
2288main ()
2289{
2290static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2291test_array [0] = 0
2292
2293  ;
2294  return 0;
2295}
2296_ACEOF
2297if ac_fn_cxx_try_compile "$LINENO"; then :
2298  ac_lo=$ac_mid; break
2299else
2300  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2301			if test $ac_mid -le $ac_hi; then
2302			  ac_lo= ac_hi=
2303			  break
2304			fi
2305			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2306fi
2307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2308  done
2309else
2310  ac_lo= ac_hi=
2311fi
2312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313fi
2314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2315# Binary search between lo and hi bounds.
2316while test "x$ac_lo" != "x$ac_hi"; do
2317  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319/* end confdefs.h.  */
2320$4
2321int
2322main ()
2323{
2324static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2325test_array [0] = 0
2326
2327  ;
2328  return 0;
2329}
2330_ACEOF
2331if ac_fn_cxx_try_compile "$LINENO"; then :
2332  ac_hi=$ac_mid
2333else
2334  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2335fi
2336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2337done
2338case $ac_lo in #((
2339?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2340'') ac_retval=1 ;;
2341esac
2342  else
2343    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2344/* end confdefs.h.  */
2345$4
2346static long int longval () { return $2; }
2347static unsigned long int ulongval () { return $2; }
2348#include <stdio.h>
2349#include <stdlib.h>
2350int
2351main ()
2352{
2353
2354  FILE *f = fopen ("conftest.val", "w");
2355  if (! f)
2356    return 1;
2357  if (($2) < 0)
2358    {
2359      long int i = longval ();
2360      if (i != ($2))
2361	return 1;
2362      fprintf (f, "%ld", i);
2363    }
2364  else
2365    {
2366      unsigned long int i = ulongval ();
2367      if (i != ($2))
2368	return 1;
2369      fprintf (f, "%lu", i);
2370    }
2371  /* Do not output a trailing newline, as this causes \r\n confusion
2372     on some platforms.  */
2373  return ferror (f) || fclose (f) != 0;
2374
2375  ;
2376  return 0;
2377}
2378_ACEOF
2379if ac_fn_cxx_try_run "$LINENO"; then :
2380  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2381else
2382  ac_retval=1
2383fi
2384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2385  conftest.$ac_objext conftest.beam conftest.$ac_ext
2386rm -f conftest.val
2387
2388  fi
2389  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2390  as_fn_set_status $ac_retval
2391
2392} # ac_fn_cxx_compute_int
2393
2394# ac_fn_cxx_try_link LINENO
2395# -------------------------
2396# Try to link conftest.$ac_ext, and return whether this succeeded.
2397ac_fn_cxx_try_link ()
2398{
2399  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2400  rm -f conftest.$ac_objext conftest$ac_exeext
2401  if { { ac_try="$ac_link"
2402case "(($ac_try" in
2403  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2404  *) ac_try_echo=$ac_try;;
2405esac
2406eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2407$as_echo "$ac_try_echo"; } >&5
2408  (eval "$ac_link") 2>conftest.err
2409  ac_status=$?
2410  if test -s conftest.err; then
2411    grep -v '^ *+' conftest.err >conftest.er1
2412    cat conftest.er1 >&5
2413    mv -f conftest.er1 conftest.err
2414  fi
2415  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2416  test $ac_status = 0; } && {
2417	 test -z "$ac_cxx_werror_flag" ||
2418	 test ! -s conftest.err
2419       } && test -s conftest$ac_exeext && {
2420	 test "$cross_compiling" = yes ||
2421	 $as_test_x conftest$ac_exeext
2422       }; then :
2423  ac_retval=0
2424else
2425  $as_echo "$as_me: failed program was:" >&5
2426sed 's/^/| /' conftest.$ac_ext >&5
2427
2428	ac_retval=1
2429fi
2430  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2431  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2432  # interfere with the next link command; also delete a directory that is
2433  # left behind by Apple's compiler.  We do this before executing the actions.
2434  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2435  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2436  as_fn_set_status $ac_retval
2437
2438} # ac_fn_cxx_try_link
2439
2440# ac_fn_cxx_check_func LINENO FUNC VAR
2441# ------------------------------------
2442# Tests whether FUNC exists, setting the cache variable VAR accordingly
2443ac_fn_cxx_check_func ()
2444{
2445  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2447$as_echo_n "checking for $2... " >&6; }
2448if eval "test \"\${$3+set}\"" = set; then :
2449  $as_echo_n "(cached) " >&6
2450else
2451  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2452/* end confdefs.h.  */
2453/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2454   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2455#define $2 innocuous_$2
2456
2457/* System header to define __stub macros and hopefully few prototypes,
2458    which can conflict with char $2 (); below.
2459    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2460    <limits.h> exists even on freestanding compilers.  */
2461
2462#ifdef __STDC__
2463# include <limits.h>
2464#else
2465# include <assert.h>
2466#endif
2467
2468#undef $2
2469
2470/* Override any GCC internal prototype to avoid an error.
2471   Use char because int might match the return type of a GCC
2472   builtin and then its argument prototype would still apply.  */
2473#ifdef __cplusplus
2474extern "C"
2475#endif
2476char $2 ();
2477/* The GNU C library defines this for functions which it implements
2478    to always fail with ENOSYS.  Some functions are actually named
2479    something starting with __ and the normal name is an alias.  */
2480#if defined __stub_$2 || defined __stub___$2
2481choke me
2482#endif
2483
2484int
2485main ()
2486{
2487return $2 ();
2488  ;
2489  return 0;
2490}
2491_ACEOF
2492if ac_fn_cxx_try_link "$LINENO"; then :
2493  eval "$3=yes"
2494else
2495  eval "$3=no"
2496fi
2497rm -f core conftest.err conftest.$ac_objext \
2498    conftest$ac_exeext conftest.$ac_ext
2499fi
2500eval ac_res=\$$3
2501	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2502$as_echo "$ac_res" >&6; }
2503  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2504
2505} # ac_fn_cxx_check_func
2506
2507# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2508# -------------------------------------------------------
2509# Tests whether HEADER exists and can be compiled using the include files in
2510# INCLUDES, setting the cache variable VAR accordingly.
2511ac_fn_c_check_header_compile ()
2512{
2513  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2515$as_echo_n "checking for $2... " >&6; }
2516if eval "test \"\${$3+set}\"" = set; then :
2517  $as_echo_n "(cached) " >&6
2518else
2519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2520/* end confdefs.h.  */
2521$4
2522#include <$2>
2523_ACEOF
2524if ac_fn_c_try_compile "$LINENO"; then :
2525  eval "$3=yes"
2526else
2527  eval "$3=no"
2528fi
2529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2530fi
2531eval ac_res=\$$3
2532	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2533$as_echo "$ac_res" >&6; }
2534  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2535
2536} # ac_fn_c_check_header_compile
2537cat >config.log <<_ACEOF
2538This file contains any messages produced by compilers while
2539running configure, to aid debugging if configure makes a mistake.
2540
2541It was created by OpenJDK $as_me jdk8, which was
2542generated by GNU Autoconf 2.67.  Invocation command line was
2543
2544  $ $0 $@
2545
2546_ACEOF
2547exec 5>>config.log
2548{
2549cat <<_ASUNAME
2550## --------- ##
2551## Platform. ##
2552## --------- ##
2553
2554hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2555uname -m = `(uname -m) 2>/dev/null || echo unknown`
2556uname -r = `(uname -r) 2>/dev/null || echo unknown`
2557uname -s = `(uname -s) 2>/dev/null || echo unknown`
2558uname -v = `(uname -v) 2>/dev/null || echo unknown`
2559
2560/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2561/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2562
2563/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2564/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2565/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2566/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2567/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2568/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2569/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2570
2571_ASUNAME
2572
2573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2574for as_dir in $PATH
2575do
2576  IFS=$as_save_IFS
2577  test -z "$as_dir" && as_dir=.
2578    $as_echo "PATH: $as_dir"
2579  done
2580IFS=$as_save_IFS
2581
2582} >&5
2583
2584cat >&5 <<_ACEOF
2585
2586
2587## ----------- ##
2588## Core tests. ##
2589## ----------- ##
2590
2591_ACEOF
2592
2593
2594# Keep a trace of the command line.
2595# Strip out --no-create and --no-recursion so they do not pile up.
2596# Strip out --silent because we don't want to record it for future runs.
2597# Also quote any args containing shell meta-characters.
2598# Make two passes to allow for proper duplicate-argument suppression.
2599ac_configure_args=
2600ac_configure_args0=
2601ac_configure_args1=
2602ac_must_keep_next=false
2603for ac_pass in 1 2
2604do
2605  for ac_arg
2606  do
2607    case $ac_arg in
2608    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2609    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2610    | -silent | --silent | --silen | --sile | --sil)
2611      continue ;;
2612    *\'*)
2613      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2614    esac
2615    case $ac_pass in
2616    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2617    2)
2618      as_fn_append ac_configure_args1 " '$ac_arg'"
2619      if test $ac_must_keep_next = true; then
2620	ac_must_keep_next=false # Got value, back to normal.
2621      else
2622	case $ac_arg in
2623	  *=* | --config-cache | -C | -disable-* | --disable-* \
2624	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2625	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2626	  | -with-* | --with-* | -without-* | --without-* | --x)
2627	    case "$ac_configure_args0 " in
2628	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2629	    esac
2630	    ;;
2631	  -* ) ac_must_keep_next=true ;;
2632	esac
2633      fi
2634      as_fn_append ac_configure_args " '$ac_arg'"
2635      ;;
2636    esac
2637  done
2638done
2639{ ac_configure_args0=; unset ac_configure_args0;}
2640{ ac_configure_args1=; unset ac_configure_args1;}
2641
2642# When interrupted or exit'd, cleanup temporary files, and complete
2643# config.log.  We remove comments because anyway the quotes in there
2644# would cause problems or look ugly.
2645# WARNING: Use '\'' to represent an apostrophe within the trap.
2646# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2647trap 'exit_status=$?
2648  # Save into config.log some information that might help in debugging.
2649  {
2650    echo
2651
2652    $as_echo "## ---------------- ##
2653## Cache variables. ##
2654## ---------------- ##"
2655    echo
2656    # The following way of writing the cache mishandles newlines in values,
2657(
2658  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2659    eval ac_val=\$$ac_var
2660    case $ac_val in #(
2661    *${as_nl}*)
2662      case $ac_var in #(
2663      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2664$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2665      esac
2666      case $ac_var in #(
2667      _ | IFS | as_nl) ;; #(
2668      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2669      *) { eval $ac_var=; unset $ac_var;} ;;
2670      esac ;;
2671    esac
2672  done
2673  (set) 2>&1 |
2674    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2675    *${as_nl}ac_space=\ *)
2676      sed -n \
2677	"s/'\''/'\''\\\\'\'''\''/g;
2678	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2679      ;; #(
2680    *)
2681      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2682      ;;
2683    esac |
2684    sort
2685)
2686    echo
2687
2688    $as_echo "## ----------------- ##
2689## Output variables. ##
2690## ----------------- ##"
2691    echo
2692    for ac_var in $ac_subst_vars
2693    do
2694      eval ac_val=\$$ac_var
2695      case $ac_val in
2696      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2697      esac
2698      $as_echo "$ac_var='\''$ac_val'\''"
2699    done | sort
2700    echo
2701
2702    if test -n "$ac_subst_files"; then
2703      $as_echo "## ------------------- ##
2704## File substitutions. ##
2705## ------------------- ##"
2706      echo
2707      for ac_var in $ac_subst_files
2708      do
2709	eval ac_val=\$$ac_var
2710	case $ac_val in
2711	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2712	esac
2713	$as_echo "$ac_var='\''$ac_val'\''"
2714      done | sort
2715      echo
2716    fi
2717
2718    if test -s confdefs.h; then
2719      $as_echo "## ----------- ##
2720## confdefs.h. ##
2721## ----------- ##"
2722      echo
2723      cat confdefs.h
2724      echo
2725    fi
2726    test "$ac_signal" != 0 &&
2727      $as_echo "$as_me: caught signal $ac_signal"
2728    $as_echo "$as_me: exit $exit_status"
2729  } >&5
2730  rm -f core *.core core.conftest.* &&
2731    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2732    exit $exit_status
2733' 0
2734for ac_signal in 1 2 13 15; do
2735  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2736done
2737ac_signal=0
2738
2739# confdefs.h avoids OS command line length limits that DEFS can exceed.
2740rm -f -r conftest* confdefs.h
2741
2742$as_echo "/* confdefs.h */" > confdefs.h
2743
2744# Predefined preprocessor variables.
2745
2746cat >>confdefs.h <<_ACEOF
2747#define PACKAGE_NAME "$PACKAGE_NAME"
2748_ACEOF
2749
2750cat >>confdefs.h <<_ACEOF
2751#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2752_ACEOF
2753
2754cat >>confdefs.h <<_ACEOF
2755#define PACKAGE_VERSION "$PACKAGE_VERSION"
2756_ACEOF
2757
2758cat >>confdefs.h <<_ACEOF
2759#define PACKAGE_STRING "$PACKAGE_STRING"
2760_ACEOF
2761
2762cat >>confdefs.h <<_ACEOF
2763#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2764_ACEOF
2765
2766cat >>confdefs.h <<_ACEOF
2767#define PACKAGE_URL "$PACKAGE_URL"
2768_ACEOF
2769
2770
2771# Let the site file select an alternate cache file if it wants to.
2772# Prefer an explicitly selected file to automatically selected ones.
2773ac_site_file1=NONE
2774ac_site_file2=NONE
2775if test -n "$CONFIG_SITE"; then
2776  # We do not want a PATH search for config.site.
2777  case $CONFIG_SITE in #((
2778    -*)  ac_site_file1=./$CONFIG_SITE;;
2779    */*) ac_site_file1=$CONFIG_SITE;;
2780    *)   ac_site_file1=./$CONFIG_SITE;;
2781  esac
2782elif test "x$prefix" != xNONE; then
2783  ac_site_file1=$prefix/share/config.site
2784  ac_site_file2=$prefix/etc/config.site
2785else
2786  ac_site_file1=$ac_default_prefix/share/config.site
2787  ac_site_file2=$ac_default_prefix/etc/config.site
2788fi
2789for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2790do
2791  test "x$ac_site_file" = xNONE && continue
2792  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2793    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2794$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2795    sed 's/^/| /' "$ac_site_file" >&5
2796    . "$ac_site_file" \
2797      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2798$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2799as_fn_error $? "failed to load site script $ac_site_file
2800See \`config.log' for more details" "$LINENO" 5 ; }
2801  fi
2802done
2803
2804if test -r "$cache_file"; then
2805  # Some versions of bash will fail to source /dev/null (special files
2806  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2807  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2808    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2809$as_echo "$as_me: loading cache $cache_file" >&6;}
2810    case $cache_file in
2811      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2812      *)                      . "./$cache_file";;
2813    esac
2814  fi
2815else
2816  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2817$as_echo "$as_me: creating cache $cache_file" >&6;}
2818  >$cache_file
2819fi
2820
2821# Check that the precious variables saved in the cache have kept the same
2822# value.
2823ac_cache_corrupted=false
2824for ac_var in $ac_precious_vars; do
2825  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2826  eval ac_new_set=\$ac_env_${ac_var}_set
2827  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2828  eval ac_new_val=\$ac_env_${ac_var}_value
2829  case $ac_old_set,$ac_new_set in
2830    set,)
2831      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2832$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2833      ac_cache_corrupted=: ;;
2834    ,set)
2835      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2836$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2837      ac_cache_corrupted=: ;;
2838    ,);;
2839    *)
2840      if test "x$ac_old_val" != "x$ac_new_val"; then
2841	# differences in whitespace do not lead to failure.
2842	ac_old_val_w=`echo x $ac_old_val`
2843	ac_new_val_w=`echo x $ac_new_val`
2844	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2845	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2846$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2847	  ac_cache_corrupted=:
2848	else
2849	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2850$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2851	  eval $ac_var=\$ac_old_val
2852	fi
2853	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2854$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2855	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2856$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2857      fi;;
2858  esac
2859  # Pass precious variables to config.status.
2860  if test "$ac_new_set" = set; then
2861    case $ac_new_val in
2862    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2863    *) ac_arg=$ac_var=$ac_new_val ;;
2864    esac
2865    case " $ac_configure_args " in
2866      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2867      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2868    esac
2869  fi
2870done
2871if $ac_cache_corrupted; then
2872  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2874  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2875$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2876  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2877fi
2878## -------------------- ##
2879## Main body of script. ##
2880## -------------------- ##
2881
2882ac_ext=c
2883ac_cpp='$CPP $CPPFLAGS'
2884ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2885ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2886ac_compiler_gnu=$ac_cv_c_compiler_gnu
2887
2888
2889
2890ac_aux_dir=
2891for ac_dir in build-aux "$srcdir"/build-aux; do
2892  if test -f "$ac_dir/install-sh"; then
2893    ac_aux_dir=$ac_dir
2894    ac_install_sh="$ac_aux_dir/install-sh -c"
2895    break
2896  elif test -f "$ac_dir/install.sh"; then
2897    ac_aux_dir=$ac_dir
2898    ac_install_sh="$ac_aux_dir/install.sh -c"
2899    break
2900  elif test -f "$ac_dir/shtool"; then
2901    ac_aux_dir=$ac_dir
2902    ac_install_sh="$ac_aux_dir/shtool install -c"
2903    break
2904  fi
2905done
2906if test -z "$ac_aux_dir"; then
2907  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2908fi
2909
2910# These three variables are undocumented and unsupported,
2911# and are intended to be withdrawn in a future Autoconf release.
2912# They can cause serious problems if a builder's source tree is in a directory
2913# whose full name contains unusual characters.
2914ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2915ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2916ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2917
2918
2919# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2920#
2921# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2922#
2923# This program is free software; you can redistribute it and/or modify
2924# it under the terms of the GNU General Public License as published by
2925# the Free Software Foundation; either version 2 of the License, or
2926# (at your option) any later version.
2927#
2928# This program is distributed in the hope that it will be useful, but
2929# WITHOUT ANY WARRANTY; without even the implied warranty of
2930# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2931# General Public License for more details.
2932#
2933# You should have received a copy of the GNU General Public License
2934# along with this program; if not, write to the Free Software
2935# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2936#
2937# As a special exception to the GNU General Public License, if you
2938# distribute this file as part of a program that contains a
2939# configuration script generated by Autoconf, you may include it under
2940# the same distribution terms that you use for the rest of that program.
2941
2942# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2943# ----------------------------------
2944# PKG_PROG_PKG_CONFIG
2945
2946# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2947#
2948# Check to see whether a particular set of modules exists.  Similar
2949# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2950#
2951#
2952# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2953# this or PKG_CHECK_MODULES is called, or make sure to call
2954# PKG_CHECK_EXISTS manually
2955# --------------------------------------------------------------
2956
2957
2958
2959# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2960# ---------------------------------------------
2961# _PKG_CONFIG
2962
2963# _PKG_SHORT_ERRORS_SUPPORTED
2964# -----------------------------
2965# _PKG_SHORT_ERRORS_SUPPORTED
2966
2967
2968# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2969# [ACTION-IF-NOT-FOUND])
2970#
2971#
2972# Note that if there is a possibility the first call to
2973# PKG_CHECK_MODULES might not happen, you should be sure to include an
2974# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2975#
2976#
2977# --------------------------------------------------------------
2978# PKG_CHECK_MODULES
2979
2980
2981# Include these first...
2982#
2983# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2984# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2985#
2986# This code is free software; you can redistribute it and/or modify it
2987# under the terms of the GNU General Public License version 2 only, as
2988# published by the Free Software Foundation.  Oracle designates this
2989# particular file as subject to the "Classpath" exception as provided
2990# by Oracle in the LICENSE file that accompanied this code.
2991#
2992# This code is distributed in the hope that it will be useful, but WITHOUT
2993# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2994# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2995# version 2 for more details (a copy is included in the LICENSE file that
2996# accompanied this code).
2997#
2998# You should have received a copy of the GNU General Public License version
2999# 2 along with this work; if not, write to the Free Software Foundation,
3000# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3001#
3002# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3003# or visit www.oracle.com if you need additional information or have any
3004# questions.
3005#
3006
3007
3008
3009# This will make sure the given variable points to a full and proper
3010# path. This means:
3011# 1) There will be no spaces in the path. On posix platforms,
3012#    spaces in the path will result in an error. On Windows,
3013#    the path will be rewritten using short-style to be space-free.
3014# 2) The path will be absolute, and it will be in unix-style (on
3015#     cygwin).
3016# $1: The name of the variable to fix
3017
3018
3019# This will make sure the given variable points to a executable
3020# with a full and proper path. This means:
3021# 1) There will be no spaces in the path. On posix platforms,
3022#    spaces in the path will result in an error. On Windows,
3023#    the path will be rewritten using short-style to be space-free.
3024# 2) The path will be absolute, and it will be in unix-style (on
3025#     cygwin).
3026# Any arguments given to the executable is preserved.
3027# If the input variable does not have a directory specification, then
3028# it need to be in the PATH.
3029# $1: The name of the variable to fix
3030
3031
3032
3033
3034
3035
3036# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3037# $1: variable to check
3038# $2: executable name to print in warning (optional)
3039
3040
3041# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3042# Arguments as AC_PATH_PROG:
3043# $1: variable to set
3044# $2: executable name to look for
3045
3046
3047# Setup the most fundamental tools that relies on not much else to set up,
3048# but is used by much of the early bootstrap code.
3049
3050
3051# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3052
3053
3054
3055
3056
3057
3058
3059#%%% Simple tools %%%
3060
3061# Check if we have found a usable version of make
3062# $1: the path to a potential make binary (or empty)
3063# $2: the description on how we found this
3064
3065
3066# Goes looking for a usable version of GNU make.
3067
3068
3069
3070
3071
3072
3073# Check if build directory is on local disk. If not possible to determine,
3074# we prefer to claim it's local.
3075# Argument 1: directory to test
3076# Argument 2: what to do if it is on local disk
3077# Argument 3: what to do otherwise (remote disk or failure)
3078
3079
3080
3081
3082#
3083# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3084# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3085#
3086# This code is free software; you can redistribute it and/or modify it
3087# under the terms of the GNU General Public License version 2 only, as
3088# published by the Free Software Foundation.  Oracle designates this
3089# particular file as subject to the "Classpath" exception as provided
3090# by Oracle in the LICENSE file that accompanied this code.
3091#
3092# This code is distributed in the hope that it will be useful, but WITHOUT
3093# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3094# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3095# version 2 for more details (a copy is included in the LICENSE file that
3096# accompanied this code).
3097#
3098# You should have received a copy of the GNU General Public License version
3099# 2 along with this work; if not, write to the Free Software Foundation,
3100# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3101#
3102# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3103# or visit www.oracle.com if you need additional information or have any
3104# questions.
3105#
3106
3107
3108
3109
3110
3111# Helper function which possibly converts a path using DOS-style short mode.
3112# If so, the updated path is stored in $new_path.
3113# $1: The path to check
3114
3115
3116# Helper function which possibly converts a path using DOS-style short mode.
3117# If so, the updated path is stored in $new_path.
3118# $1: The path to check
3119
3120
3121# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3122# and could probably be heavily simplified. However, all changes in this
3123# area tend to need lot of testing in different scenarios, and in lack of
3124# proper unit testing, cleaning this up has not been deemed worth the effort
3125# at the moment.
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3136
3137
3138
3139
3140#
3141# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3142# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3143#
3144# This code is free software; you can redistribute it and/or modify it
3145# under the terms of the GNU General Public License version 2 only, as
3146# published by the Free Software Foundation.  Oracle designates this
3147# particular file as subject to the "Classpath" exception as provided
3148# by Oracle in the LICENSE file that accompanied this code.
3149#
3150# This code is distributed in the hope that it will be useful, but WITHOUT
3151# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3152# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3153# version 2 for more details (a copy is included in the LICENSE file that
3154# accompanied this code).
3155#
3156# You should have received a copy of the GNU General Public License version
3157# 2 along with this work; if not, write to the Free Software Foundation,
3158# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3159#
3160# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3161# or visit www.oracle.com if you need additional information or have any
3162# questions.
3163#
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175# ... then the rest
3176#
3177# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3178# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3179#
3180# This code is free software; you can redistribute it and/or modify it
3181# under the terms of the GNU General Public License version 2 only, as
3182# published by the Free Software Foundation.  Oracle designates this
3183# particular file as subject to the "Classpath" exception as provided
3184# by Oracle in the LICENSE file that accompanied this code.
3185#
3186# This code is distributed in the hope that it will be useful, but WITHOUT
3187# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3188# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3189# version 2 for more details (a copy is included in the LICENSE file that
3190# accompanied this code).
3191#
3192# You should have received a copy of the GNU General Public License version
3193# 2 along with this work; if not, write to the Free Software Foundation,
3194# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3195#
3196# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3197# or visit www.oracle.com if you need additional information or have any
3198# questions.
3199#
3200
3201# Execute the check given as argument, and verify the result
3202# If the Boot JDK was previously found, do nothing
3203# $1 A command line (typically autoconf macro) to execute
3204
3205
3206# Test: Is bootjdk explicitely set by command line arguments?
3207
3208
3209# Test: Is bootjdk available from builddeps?
3210
3211
3212# Test: Is $JAVA_HOME set?
3213
3214
3215# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3216
3217
3218# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3219
3220
3221# Look for a jdk in the given path. If there are multiple, try to select the newest.
3222# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3223# $1 = Path to directory containing jdk installations.
3224# $2 = String to append to the found JDK directory to get the proper JDK home
3225
3226
3227# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3228# environmental variable as base for where to look.
3229# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3230
3231
3232# Test: Is there a JDK installed in default, well-known locations?
3233
3234
3235# Check that a command-line tool in the Boot JDK is correct
3236# $1 = name of variable to assign
3237# $2 = name of binary
3238
3239
3240###############################################################################
3241#
3242# We need a Boot JDK to bootstrap the build.
3243#
3244
3245
3246
3247
3248
3249#
3250# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3251# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3252#
3253# This code is free software; you can redistribute it and/or modify it
3254# under the terms of the GNU General Public License version 2 only, as
3255# published by the Free Software Foundation.  Oracle designates this
3256# particular file as subject to the "Classpath" exception as provided
3257# by Oracle in the LICENSE file that accompanied this code.
3258#
3259# This code is distributed in the hope that it will be useful, but WITHOUT
3260# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3261# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3262# version 2 for more details (a copy is included in the LICENSE file that
3263# accompanied this code).
3264#
3265# You should have received a copy of the GNU General Public License version
3266# 2 along with this work; if not, write to the Free Software Foundation,
3267# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3268#
3269# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3270# or visit www.oracle.com if you need additional information or have any
3271# questions.
3272#
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291#
3292# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3293# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3294#
3295# This code is free software; you can redistribute it and/or modify it
3296# under the terms of the GNU General Public License version 2 only, as
3297# published by the Free Software Foundation.  Oracle designates this
3298# particular file as subject to the "Classpath" exception as provided
3299# by Oracle in the LICENSE file that accompanied this code.
3300#
3301# This code is distributed in the hope that it will be useful, but WITHOUT
3302# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3303# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3304# version 2 for more details (a copy is included in the LICENSE file that
3305# accompanied this code).
3306#
3307# You should have received a copy of the GNU General Public License version
3308# 2 along with this work; if not, write to the Free Software Foundation,
3309# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3310#
3311# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3312# or visit www.oracle.com if you need additional information or have any
3313# questions.
3314#
3315
3316
3317
3318
3319
3320cygwin_help() {
3321    case $1 in
3322    unzip)
3323        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3324    zip)
3325        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3326    make)
3327        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3328    * )
3329       break ;;
3330    esac
3331}
3332
3333apt_help() {
3334    case $1 in
3335    devkit)
3336        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3337    openjdk)
3338        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3339    alsa)
3340        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3341    cups)
3342        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3343    freetype2)
3344        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3345    pulse)
3346        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3347    x11)
3348        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3349    ccache)
3350        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3351    * )
3352       break ;;
3353    esac
3354}
3355
3356yum_help() {
3357    case $1 in
3358    devkit)
3359        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3360    openjdk)
3361        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3362    alsa)
3363        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3364    cups)
3365        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3366    freetype2)
3367        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3368    pulse)
3369        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3370    x11)
3371        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3372    ccache)
3373        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3374    * )
3375       break ;;
3376    esac
3377}
3378
3379port_help() {
3380    PKGHANDLER_COMMAND=""
3381}
3382
3383pkgutil_help() {
3384    PKGHANDLER_COMMAND=""
3385}
3386
3387pkgadd_help() {
3388    PKGHANDLER_COMMAND=""
3389}
3390
3391
3392
3393#
3394# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3395# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3396#
3397# This code is free software; you can redistribute it and/or modify it
3398# under the terms of the GNU General Public License version 2 only, as
3399# published by the Free Software Foundation.  Oracle designates this
3400# particular file as subject to the "Classpath" exception as provided
3401# by Oracle in the LICENSE file that accompanied this code.
3402#
3403# This code is distributed in the hope that it will be useful, but WITHOUT
3404# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3405# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3406# version 2 for more details (a copy is included in the LICENSE file that
3407# accompanied this code).
3408#
3409# You should have received a copy of the GNU General Public License version
3410# 2 along with this work; if not, write to the Free Software Foundation,
3411# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3412#
3413# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3414# or visit www.oracle.com if you need additional information or have any
3415# questions.
3416#
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432# Support for customization of the build process. Some build files
3433# will include counterparts from this location, if they exist. This allows
3434# for a degree of customization of the build targets and the rules/recipes
3435# to create them
3436
3437# Check whether --with-custom-make-dir was given.
3438if test "${with_custom_make_dir+set}" = set; then :
3439  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3440fi
3441
3442
3443
3444#
3445# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3446# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3447#
3448# This code is free software; you can redistribute it and/or modify it
3449# under the terms of the GNU General Public License version 2 only, as
3450# published by the Free Software Foundation.  Oracle designates this
3451# particular file as subject to the "Classpath" exception as provided
3452# by Oracle in the LICENSE file that accompanied this code.
3453#
3454# This code is distributed in the hope that it will be useful, but WITHOUT
3455# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3456# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3457# version 2 for more details (a copy is included in the LICENSE file that
3458# accompanied this code).
3459#
3460# You should have received a copy of the GNU General Public License version
3461# 2 along with this work; if not, write to the Free Software Foundation,
3462# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3463#
3464# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3465# or visit www.oracle.com if you need additional information or have any
3466# questions.
3467#
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483#
3484# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3485# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3486#
3487# This code is free software; you can redistribute it and/or modify it
3488# under the terms of the GNU General Public License version 2 only, as
3489# published by the Free Software Foundation.  Oracle designates this
3490# particular file as subject to the "Classpath" exception as provided
3491# by Oracle in the LICENSE file that accompanied this code.
3492#
3493# This code is distributed in the hope that it will be useful, but WITHOUT
3494# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3495# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3496# version 2 for more details (a copy is included in the LICENSE file that
3497# accompanied this code).
3498#
3499# You should have received a copy of the GNU General Public License version
3500# 2 along with this work; if not, write to the Free Software Foundation,
3501# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3502#
3503# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3504# or visit www.oracle.com if you need additional information or have any
3505# questions.
3506#
3507
3508# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3509# Converts autoconf style CPU name to OpenJDK style, into
3510# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3511
3512
3513# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3514# Converts autoconf style OS name to OpenJDK style, into
3515# VAR_OS and VAR_OS_API.
3516
3517
3518# Expects $host_os $host_cpu $build_os and $build_cpu
3519# and $with_target_bits to have been setup!
3520#
3521# Translate the standard triplet(quadruplet) definition
3522# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3523# OPENJDK_BUILD_OS, etc.
3524
3525
3526# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3527# accordingly. Must be done after setting up build and target system, but before
3528# doing anything else with these values.
3529
3530
3531    # Setup the legacy variables, for controlling the old makefiles.
3532    #
3533
3534
3535
3536
3537#%%% Build and target systems %%%
3538
3539
3540
3541
3542# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3543# Add -mX to various FLAGS variables.
3544
3545
3546
3547
3548
3549
3550#
3551# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3552# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3553#
3554# This code is free software; you can redistribute it and/or modify it
3555# under the terms of the GNU General Public License version 2 only, as
3556# published by the Free Software Foundation.  Oracle designates this
3557# particular file as subject to the "Classpath" exception as provided
3558# by Oracle in the LICENSE file that accompanied this code.
3559#
3560# This code is distributed in the hope that it will be useful, but WITHOUT
3561# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3562# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3563# version 2 for more details (a copy is included in the LICENSE file that
3564# accompanied this code).
3565#
3566# You should have received a copy of the GNU General Public License version
3567# 2 along with this work; if not, write to the Free Software Foundation,
3568# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3569#
3570# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3571# or visit www.oracle.com if you need additional information or have any
3572# questions.
3573#
3574
3575
3576
3577
3578
3579
3580
3581
3582#
3583# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3584# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3585#
3586# This code is free software; you can redistribute it and/or modify it
3587# under the terms of the GNU General Public License version 2 only, as
3588# published by the Free Software Foundation.  Oracle designates this
3589# particular file as subject to the "Classpath" exception as provided
3590# by Oracle in the LICENSE file that accompanied this code.
3591#
3592# This code is distributed in the hope that it will be useful, but WITHOUT
3593# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3594# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3595# version 2 for more details (a copy is included in the LICENSE file that
3596# accompanied this code).
3597#
3598# You should have received a copy of the GNU General Public License version
3599# 2 along with this work; if not, write to the Free Software Foundation,
3600# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3601#
3602# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3603# or visit www.oracle.com if you need additional information or have any
3604# questions.
3605#
3606
3607# $1 = compiler to test (CC or CXX)
3608# $2 = human readable name of compiler (C or C++)
3609
3610
3611
3612
3613
3614# $1 = compiler to test (CC or CXX)
3615# $2 = human readable name of compiler (C or C++)
3616# $3 = list of compiler names to search for
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629#
3630# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3631# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3632#
3633# This code is free software; you can redistribute it and/or modify it
3634# under the terms of the GNU General Public License version 2 only, as
3635# published by the Free Software Foundation.  Oracle designates this
3636# particular file as subject to the "Classpath" exception as provided
3637# by Oracle in the LICENSE file that accompanied this code.
3638#
3639# This code is distributed in the hope that it will be useful, but WITHOUT
3640# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3641# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3642# version 2 for more details (a copy is included in the LICENSE file that
3643# accompanied this code).
3644#
3645# You should have received a copy of the GNU General Public License version
3646# 2 along with this work; if not, write to the Free Software Foundation,
3647# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3648#
3649# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3650# or visit www.oracle.com if you need additional information or have any
3651# questions.
3652#
3653
3654
3655
3656
3657
3658
3659
3660# Check if the VS env variables were setup prior to running configure.
3661# If not, then find vcvarsall.bat and run it automatically, and integrate
3662# the set env variables into the spec file.
3663
3664
3665
3666
3667
3668
3669# This line needs to be here, verbatim, after all includes and the dummy hook
3670# definitions. It is replaced with custom functionality when building
3671# custom sources.
3672#CUSTOM_AUTOCONF_INCLUDE
3673
3674# Do not change or remove the following line, it is needed for consistency checks:
3675DATE_WHEN_GENERATED=1354106772
3676
3677###############################################################################
3678#
3679# Initialization / Boot-strapping
3680#
3681# The bootstrapping process needs to solve the "chicken or the egg" problem,
3682# thus it jumps back and forth, each time gaining something needed later on.
3683#
3684###############################################################################
3685
3686# Basic initialization that must happen first of all
3687
3688# Save the original command line. This is passed to us by the wrapper configure script.
3689
3690DATE_WHEN_CONFIGURED=`LANG=C date`
3691
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3693$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3694{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3695$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3696
3697
3698
3699# Start with tools that do not need have cross compilation support
3700# and can be expected to be found in the default PATH. These tools are
3701# used by configure. Nor are these tools expected to be found in the
3702# devkit from the builddeps server either, since they are
3703# needed to download the devkit.
3704
3705# First are all the simple required tools.
3706
3707    for ac_prog in basename
3708do
3709  # Extract the first word of "$ac_prog", so it can be a program name with args.
3710set dummy $ac_prog; ac_word=$2
3711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3712$as_echo_n "checking for $ac_word... " >&6; }
3713if test "${ac_cv_path_BASENAME+set}" = set; then :
3714  $as_echo_n "(cached) " >&6
3715else
3716  case $BASENAME in
3717  [\\/]* | ?:[\\/]*)
3718  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3719  ;;
3720  *)
3721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3722for as_dir in $PATH
3723do
3724  IFS=$as_save_IFS
3725  test -z "$as_dir" && as_dir=.
3726    for ac_exec_ext in '' $ac_executable_extensions; do
3727  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3728    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3730    break 2
3731  fi
3732done
3733  done
3734IFS=$as_save_IFS
3735
3736  ;;
3737esac
3738fi
3739BASENAME=$ac_cv_path_BASENAME
3740if test -n "$BASENAME"; then
3741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3742$as_echo "$BASENAME" >&6; }
3743else
3744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3745$as_echo "no" >&6; }
3746fi
3747
3748
3749  test -n "$BASENAME" && break
3750done
3751
3752
3753    if test "x$BASENAME" = x; then
3754        if test "xbasename" = x; then
3755          PROG_NAME=basename
3756        else
3757          PROG_NAME=basename
3758        fi
3759        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3760$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3761        as_fn_error $? "Cannot continue" "$LINENO" 5
3762    fi
3763
3764
3765
3766    for ac_prog in bash
3767do
3768  # Extract the first word of "$ac_prog", so it can be a program name with args.
3769set dummy $ac_prog; ac_word=$2
3770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771$as_echo_n "checking for $ac_word... " >&6; }
3772if test "${ac_cv_path_BASH+set}" = set; then :
3773  $as_echo_n "(cached) " >&6
3774else
3775  case $BASH in
3776  [\\/]* | ?:[\\/]*)
3777  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3778  ;;
3779  *)
3780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781for as_dir in $PATH
3782do
3783  IFS=$as_save_IFS
3784  test -z "$as_dir" && as_dir=.
3785    for ac_exec_ext in '' $ac_executable_extensions; do
3786  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3787    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3789    break 2
3790  fi
3791done
3792  done
3793IFS=$as_save_IFS
3794
3795  ;;
3796esac
3797fi
3798BASH=$ac_cv_path_BASH
3799if test -n "$BASH"; then
3800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3801$as_echo "$BASH" >&6; }
3802else
3803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3804$as_echo "no" >&6; }
3805fi
3806
3807
3808  test -n "$BASH" && break
3809done
3810
3811
3812    if test "x$BASH" = x; then
3813        if test "xbash" = x; then
3814          PROG_NAME=bash
3815        else
3816          PROG_NAME=bash
3817        fi
3818        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3819$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3820        as_fn_error $? "Cannot continue" "$LINENO" 5
3821    fi
3822
3823
3824
3825    for ac_prog in cat
3826do
3827  # Extract the first word of "$ac_prog", so it can be a program name with args.
3828set dummy $ac_prog; ac_word=$2
3829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3830$as_echo_n "checking for $ac_word... " >&6; }
3831if test "${ac_cv_path_CAT+set}" = set; then :
3832  $as_echo_n "(cached) " >&6
3833else
3834  case $CAT in
3835  [\\/]* | ?:[\\/]*)
3836  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3837  ;;
3838  *)
3839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3840for as_dir in $PATH
3841do
3842  IFS=$as_save_IFS
3843  test -z "$as_dir" && as_dir=.
3844    for ac_exec_ext in '' $ac_executable_extensions; do
3845  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3846    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3848    break 2
3849  fi
3850done
3851  done
3852IFS=$as_save_IFS
3853
3854  ;;
3855esac
3856fi
3857CAT=$ac_cv_path_CAT
3858if test -n "$CAT"; then
3859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3860$as_echo "$CAT" >&6; }
3861else
3862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3863$as_echo "no" >&6; }
3864fi
3865
3866
3867  test -n "$CAT" && break
3868done
3869
3870
3871    if test "x$CAT" = x; then
3872        if test "xcat" = x; then
3873          PROG_NAME=cat
3874        else
3875          PROG_NAME=cat
3876        fi
3877        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3878$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3879        as_fn_error $? "Cannot continue" "$LINENO" 5
3880    fi
3881
3882
3883
3884    for ac_prog in chmod
3885do
3886  # Extract the first word of "$ac_prog", so it can be a program name with args.
3887set dummy $ac_prog; ac_word=$2
3888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3889$as_echo_n "checking for $ac_word... " >&6; }
3890if test "${ac_cv_path_CHMOD+set}" = set; then :
3891  $as_echo_n "(cached) " >&6
3892else
3893  case $CHMOD in
3894  [\\/]* | ?:[\\/]*)
3895  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3896  ;;
3897  *)
3898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3899for as_dir in $PATH
3900do
3901  IFS=$as_save_IFS
3902  test -z "$as_dir" && as_dir=.
3903    for ac_exec_ext in '' $ac_executable_extensions; do
3904  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3905    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3907    break 2
3908  fi
3909done
3910  done
3911IFS=$as_save_IFS
3912
3913  ;;
3914esac
3915fi
3916CHMOD=$ac_cv_path_CHMOD
3917if test -n "$CHMOD"; then
3918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3919$as_echo "$CHMOD" >&6; }
3920else
3921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3922$as_echo "no" >&6; }
3923fi
3924
3925
3926  test -n "$CHMOD" && break
3927done
3928
3929
3930    if test "x$CHMOD" = x; then
3931        if test "xchmod" = x; then
3932          PROG_NAME=chmod
3933        else
3934          PROG_NAME=chmod
3935        fi
3936        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3937$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3938        as_fn_error $? "Cannot continue" "$LINENO" 5
3939    fi
3940
3941
3942
3943    for ac_prog in cmp
3944do
3945  # Extract the first word of "$ac_prog", so it can be a program name with args.
3946set dummy $ac_prog; ac_word=$2
3947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3948$as_echo_n "checking for $ac_word... " >&6; }
3949if test "${ac_cv_path_CMP+set}" = set; then :
3950  $as_echo_n "(cached) " >&6
3951else
3952  case $CMP in
3953  [\\/]* | ?:[\\/]*)
3954  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3955  ;;
3956  *)
3957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3958for as_dir in $PATH
3959do
3960  IFS=$as_save_IFS
3961  test -z "$as_dir" && as_dir=.
3962    for ac_exec_ext in '' $ac_executable_extensions; do
3963  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3964    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3966    break 2
3967  fi
3968done
3969  done
3970IFS=$as_save_IFS
3971
3972  ;;
3973esac
3974fi
3975CMP=$ac_cv_path_CMP
3976if test -n "$CMP"; then
3977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
3978$as_echo "$CMP" >&6; }
3979else
3980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3981$as_echo "no" >&6; }
3982fi
3983
3984
3985  test -n "$CMP" && break
3986done
3987
3988
3989    if test "x$CMP" = x; then
3990        if test "xcmp" = x; then
3991          PROG_NAME=cmp
3992        else
3993          PROG_NAME=cmp
3994        fi
3995        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3996$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3997        as_fn_error $? "Cannot continue" "$LINENO" 5
3998    fi
3999
4000
4001
4002    for ac_prog in cp
4003do
4004  # Extract the first word of "$ac_prog", so it can be a program name with args.
4005set dummy $ac_prog; ac_word=$2
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4007$as_echo_n "checking for $ac_word... " >&6; }
4008if test "${ac_cv_path_CP+set}" = set; then :
4009  $as_echo_n "(cached) " >&6
4010else
4011  case $CP in
4012  [\\/]* | ?:[\\/]*)
4013  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4014  ;;
4015  *)
4016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4017for as_dir in $PATH
4018do
4019  IFS=$as_save_IFS
4020  test -z "$as_dir" && as_dir=.
4021    for ac_exec_ext in '' $ac_executable_extensions; do
4022  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4023    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4025    break 2
4026  fi
4027done
4028  done
4029IFS=$as_save_IFS
4030
4031  ;;
4032esac
4033fi
4034CP=$ac_cv_path_CP
4035if test -n "$CP"; then
4036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4037$as_echo "$CP" >&6; }
4038else
4039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4040$as_echo "no" >&6; }
4041fi
4042
4043
4044  test -n "$CP" && break
4045done
4046
4047
4048    if test "x$CP" = x; then
4049        if test "xcp" = x; then
4050          PROG_NAME=cp
4051        else
4052          PROG_NAME=cp
4053        fi
4054        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4055$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4056        as_fn_error $? "Cannot continue" "$LINENO" 5
4057    fi
4058
4059
4060
4061    for ac_prog in cut
4062do
4063  # Extract the first word of "$ac_prog", so it can be a program name with args.
4064set dummy $ac_prog; ac_word=$2
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4066$as_echo_n "checking for $ac_word... " >&6; }
4067if test "${ac_cv_path_CUT+set}" = set; then :
4068  $as_echo_n "(cached) " >&6
4069else
4070  case $CUT in
4071  [\\/]* | ?:[\\/]*)
4072  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4073  ;;
4074  *)
4075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4076for as_dir in $PATH
4077do
4078  IFS=$as_save_IFS
4079  test -z "$as_dir" && as_dir=.
4080    for ac_exec_ext in '' $ac_executable_extensions; do
4081  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4082    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4084    break 2
4085  fi
4086done
4087  done
4088IFS=$as_save_IFS
4089
4090  ;;
4091esac
4092fi
4093CUT=$ac_cv_path_CUT
4094if test -n "$CUT"; then
4095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4096$as_echo "$CUT" >&6; }
4097else
4098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4099$as_echo "no" >&6; }
4100fi
4101
4102
4103  test -n "$CUT" && break
4104done
4105
4106
4107    if test "x$CUT" = x; then
4108        if test "xcut" = x; then
4109          PROG_NAME=cut
4110        else
4111          PROG_NAME=cut
4112        fi
4113        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4114$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4115        as_fn_error $? "Cannot continue" "$LINENO" 5
4116    fi
4117
4118
4119
4120    for ac_prog in date
4121do
4122  # Extract the first word of "$ac_prog", so it can be a program name with args.
4123set dummy $ac_prog; ac_word=$2
4124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4125$as_echo_n "checking for $ac_word... " >&6; }
4126if test "${ac_cv_path_DATE+set}" = set; then :
4127  $as_echo_n "(cached) " >&6
4128else
4129  case $DATE in
4130  [\\/]* | ?:[\\/]*)
4131  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4132  ;;
4133  *)
4134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4135for as_dir in $PATH
4136do
4137  IFS=$as_save_IFS
4138  test -z "$as_dir" && as_dir=.
4139    for ac_exec_ext in '' $ac_executable_extensions; do
4140  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4141    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4143    break 2
4144  fi
4145done
4146  done
4147IFS=$as_save_IFS
4148
4149  ;;
4150esac
4151fi
4152DATE=$ac_cv_path_DATE
4153if test -n "$DATE"; then
4154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4155$as_echo "$DATE" >&6; }
4156else
4157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4158$as_echo "no" >&6; }
4159fi
4160
4161
4162  test -n "$DATE" && break
4163done
4164
4165
4166    if test "x$DATE" = x; then
4167        if test "xdate" = x; then
4168          PROG_NAME=date
4169        else
4170          PROG_NAME=date
4171        fi
4172        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4173$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4174        as_fn_error $? "Cannot continue" "$LINENO" 5
4175    fi
4176
4177
4178
4179    for ac_prog in gdiff diff
4180do
4181  # Extract the first word of "$ac_prog", so it can be a program name with args.
4182set dummy $ac_prog; ac_word=$2
4183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4184$as_echo_n "checking for $ac_word... " >&6; }
4185if test "${ac_cv_path_DIFF+set}" = set; then :
4186  $as_echo_n "(cached) " >&6
4187else
4188  case $DIFF in
4189  [\\/]* | ?:[\\/]*)
4190  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4191  ;;
4192  *)
4193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4194for as_dir in $PATH
4195do
4196  IFS=$as_save_IFS
4197  test -z "$as_dir" && as_dir=.
4198    for ac_exec_ext in '' $ac_executable_extensions; do
4199  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4200    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4202    break 2
4203  fi
4204done
4205  done
4206IFS=$as_save_IFS
4207
4208  ;;
4209esac
4210fi
4211DIFF=$ac_cv_path_DIFF
4212if test -n "$DIFF"; then
4213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4214$as_echo "$DIFF" >&6; }
4215else
4216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4217$as_echo "no" >&6; }
4218fi
4219
4220
4221  test -n "$DIFF" && break
4222done
4223
4224
4225    if test "x$DIFF" = x; then
4226        if test "xgdiff diff" = x; then
4227          PROG_NAME=diff
4228        else
4229          PROG_NAME=gdiff diff
4230        fi
4231        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4232$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4233        as_fn_error $? "Cannot continue" "$LINENO" 5
4234    fi
4235
4236
4237
4238    for ac_prog in dirname
4239do
4240  # Extract the first word of "$ac_prog", so it can be a program name with args.
4241set dummy $ac_prog; ac_word=$2
4242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4243$as_echo_n "checking for $ac_word... " >&6; }
4244if test "${ac_cv_path_DIRNAME+set}" = set; then :
4245  $as_echo_n "(cached) " >&6
4246else
4247  case $DIRNAME in
4248  [\\/]* | ?:[\\/]*)
4249  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4250  ;;
4251  *)
4252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4253for as_dir in $PATH
4254do
4255  IFS=$as_save_IFS
4256  test -z "$as_dir" && as_dir=.
4257    for ac_exec_ext in '' $ac_executable_extensions; do
4258  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4259    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4261    break 2
4262  fi
4263done
4264  done
4265IFS=$as_save_IFS
4266
4267  ;;
4268esac
4269fi
4270DIRNAME=$ac_cv_path_DIRNAME
4271if test -n "$DIRNAME"; then
4272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4273$as_echo "$DIRNAME" >&6; }
4274else
4275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4276$as_echo "no" >&6; }
4277fi
4278
4279
4280  test -n "$DIRNAME" && break
4281done
4282
4283
4284    if test "x$DIRNAME" = x; then
4285        if test "xdirname" = x; then
4286          PROG_NAME=dirname
4287        else
4288          PROG_NAME=dirname
4289        fi
4290        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4291$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4292        as_fn_error $? "Cannot continue" "$LINENO" 5
4293    fi
4294
4295
4296
4297    for ac_prog in echo
4298do
4299  # Extract the first word of "$ac_prog", so it can be a program name with args.
4300set dummy $ac_prog; ac_word=$2
4301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4302$as_echo_n "checking for $ac_word... " >&6; }
4303if test "${ac_cv_path_ECHO+set}" = set; then :
4304  $as_echo_n "(cached) " >&6
4305else
4306  case $ECHO in
4307  [\\/]* | ?:[\\/]*)
4308  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4309  ;;
4310  *)
4311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4312for as_dir in $PATH
4313do
4314  IFS=$as_save_IFS
4315  test -z "$as_dir" && as_dir=.
4316    for ac_exec_ext in '' $ac_executable_extensions; do
4317  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4318    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4320    break 2
4321  fi
4322done
4323  done
4324IFS=$as_save_IFS
4325
4326  ;;
4327esac
4328fi
4329ECHO=$ac_cv_path_ECHO
4330if test -n "$ECHO"; then
4331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4332$as_echo "$ECHO" >&6; }
4333else
4334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4335$as_echo "no" >&6; }
4336fi
4337
4338
4339  test -n "$ECHO" && break
4340done
4341
4342
4343    if test "x$ECHO" = x; then
4344        if test "xecho" = x; then
4345          PROG_NAME=echo
4346        else
4347          PROG_NAME=echo
4348        fi
4349        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4350$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4351        as_fn_error $? "Cannot continue" "$LINENO" 5
4352    fi
4353
4354
4355
4356    for ac_prog in expr
4357do
4358  # Extract the first word of "$ac_prog", so it can be a program name with args.
4359set dummy $ac_prog; ac_word=$2
4360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4361$as_echo_n "checking for $ac_word... " >&6; }
4362if test "${ac_cv_path_EXPR+set}" = set; then :
4363  $as_echo_n "(cached) " >&6
4364else
4365  case $EXPR in
4366  [\\/]* | ?:[\\/]*)
4367  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4368  ;;
4369  *)
4370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4371for as_dir in $PATH
4372do
4373  IFS=$as_save_IFS
4374  test -z "$as_dir" && as_dir=.
4375    for ac_exec_ext in '' $ac_executable_extensions; do
4376  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4377    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4379    break 2
4380  fi
4381done
4382  done
4383IFS=$as_save_IFS
4384
4385  ;;
4386esac
4387fi
4388EXPR=$ac_cv_path_EXPR
4389if test -n "$EXPR"; then
4390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4391$as_echo "$EXPR" >&6; }
4392else
4393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4394$as_echo "no" >&6; }
4395fi
4396
4397
4398  test -n "$EXPR" && break
4399done
4400
4401
4402    if test "x$EXPR" = x; then
4403        if test "xexpr" = x; then
4404          PROG_NAME=expr
4405        else
4406          PROG_NAME=expr
4407        fi
4408        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4409$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4410        as_fn_error $? "Cannot continue" "$LINENO" 5
4411    fi
4412
4413
4414
4415    for ac_prog in file
4416do
4417  # Extract the first word of "$ac_prog", so it can be a program name with args.
4418set dummy $ac_prog; ac_word=$2
4419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4420$as_echo_n "checking for $ac_word... " >&6; }
4421if test "${ac_cv_path_FILE+set}" = set; then :
4422  $as_echo_n "(cached) " >&6
4423else
4424  case $FILE in
4425  [\\/]* | ?:[\\/]*)
4426  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4427  ;;
4428  *)
4429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4430for as_dir in $PATH
4431do
4432  IFS=$as_save_IFS
4433  test -z "$as_dir" && as_dir=.
4434    for ac_exec_ext in '' $ac_executable_extensions; do
4435  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4436    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4438    break 2
4439  fi
4440done
4441  done
4442IFS=$as_save_IFS
4443
4444  ;;
4445esac
4446fi
4447FILE=$ac_cv_path_FILE
4448if test -n "$FILE"; then
4449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4450$as_echo "$FILE" >&6; }
4451else
4452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4453$as_echo "no" >&6; }
4454fi
4455
4456
4457  test -n "$FILE" && break
4458done
4459
4460
4461    if test "x$FILE" = x; then
4462        if test "xfile" = x; then
4463          PROG_NAME=file
4464        else
4465          PROG_NAME=file
4466        fi
4467        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4468$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4469        as_fn_error $? "Cannot continue" "$LINENO" 5
4470    fi
4471
4472
4473
4474    for ac_prog in find
4475do
4476  # Extract the first word of "$ac_prog", so it can be a program name with args.
4477set dummy $ac_prog; ac_word=$2
4478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4479$as_echo_n "checking for $ac_word... " >&6; }
4480if test "${ac_cv_path_FIND+set}" = set; then :
4481  $as_echo_n "(cached) " >&6
4482else
4483  case $FIND in
4484  [\\/]* | ?:[\\/]*)
4485  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4486  ;;
4487  *)
4488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4489for as_dir in $PATH
4490do
4491  IFS=$as_save_IFS
4492  test -z "$as_dir" && as_dir=.
4493    for ac_exec_ext in '' $ac_executable_extensions; do
4494  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4495    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4497    break 2
4498  fi
4499done
4500  done
4501IFS=$as_save_IFS
4502
4503  ;;
4504esac
4505fi
4506FIND=$ac_cv_path_FIND
4507if test -n "$FIND"; then
4508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4509$as_echo "$FIND" >&6; }
4510else
4511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4512$as_echo "no" >&6; }
4513fi
4514
4515
4516  test -n "$FIND" && break
4517done
4518
4519
4520    if test "x$FIND" = x; then
4521        if test "xfind" = x; then
4522          PROG_NAME=find
4523        else
4524          PROG_NAME=find
4525        fi
4526        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4527$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4528        as_fn_error $? "Cannot continue" "$LINENO" 5
4529    fi
4530
4531
4532
4533    for ac_prog in head
4534do
4535  # Extract the first word of "$ac_prog", so it can be a program name with args.
4536set dummy $ac_prog; ac_word=$2
4537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4538$as_echo_n "checking for $ac_word... " >&6; }
4539if test "${ac_cv_path_HEAD+set}" = set; then :
4540  $as_echo_n "(cached) " >&6
4541else
4542  case $HEAD in
4543  [\\/]* | ?:[\\/]*)
4544  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4545  ;;
4546  *)
4547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4548for as_dir in $PATH
4549do
4550  IFS=$as_save_IFS
4551  test -z "$as_dir" && as_dir=.
4552    for ac_exec_ext in '' $ac_executable_extensions; do
4553  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4554    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4556    break 2
4557  fi
4558done
4559  done
4560IFS=$as_save_IFS
4561
4562  ;;
4563esac
4564fi
4565HEAD=$ac_cv_path_HEAD
4566if test -n "$HEAD"; then
4567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4568$as_echo "$HEAD" >&6; }
4569else
4570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4571$as_echo "no" >&6; }
4572fi
4573
4574
4575  test -n "$HEAD" && break
4576done
4577
4578
4579    if test "x$HEAD" = x; then
4580        if test "xhead" = x; then
4581          PROG_NAME=head
4582        else
4583          PROG_NAME=head
4584        fi
4585        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4586$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4587        as_fn_error $? "Cannot continue" "$LINENO" 5
4588    fi
4589
4590
4591
4592    for ac_prog in ln
4593do
4594  # Extract the first word of "$ac_prog", so it can be a program name with args.
4595set dummy $ac_prog; ac_word=$2
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4597$as_echo_n "checking for $ac_word... " >&6; }
4598if test "${ac_cv_path_LN+set}" = set; then :
4599  $as_echo_n "(cached) " >&6
4600else
4601  case $LN in
4602  [\\/]* | ?:[\\/]*)
4603  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4604  ;;
4605  *)
4606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in $PATH
4608do
4609  IFS=$as_save_IFS
4610  test -z "$as_dir" && as_dir=.
4611    for ac_exec_ext in '' $ac_executable_extensions; do
4612  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4613    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4615    break 2
4616  fi
4617done
4618  done
4619IFS=$as_save_IFS
4620
4621  ;;
4622esac
4623fi
4624LN=$ac_cv_path_LN
4625if test -n "$LN"; then
4626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4627$as_echo "$LN" >&6; }
4628else
4629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4630$as_echo "no" >&6; }
4631fi
4632
4633
4634  test -n "$LN" && break
4635done
4636
4637
4638    if test "x$LN" = x; then
4639        if test "xln" = x; then
4640          PROG_NAME=ln
4641        else
4642          PROG_NAME=ln
4643        fi
4644        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4645$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4646        as_fn_error $? "Cannot continue" "$LINENO" 5
4647    fi
4648
4649
4650
4651    for ac_prog in ls
4652do
4653  # Extract the first word of "$ac_prog", so it can be a program name with args.
4654set dummy $ac_prog; ac_word=$2
4655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4656$as_echo_n "checking for $ac_word... " >&6; }
4657if test "${ac_cv_path_LS+set}" = set; then :
4658  $as_echo_n "(cached) " >&6
4659else
4660  case $LS in
4661  [\\/]* | ?:[\\/]*)
4662  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4663  ;;
4664  *)
4665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4666for as_dir in $PATH
4667do
4668  IFS=$as_save_IFS
4669  test -z "$as_dir" && as_dir=.
4670    for ac_exec_ext in '' $ac_executable_extensions; do
4671  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4672    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4674    break 2
4675  fi
4676done
4677  done
4678IFS=$as_save_IFS
4679
4680  ;;
4681esac
4682fi
4683LS=$ac_cv_path_LS
4684if test -n "$LS"; then
4685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4686$as_echo "$LS" >&6; }
4687else
4688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4689$as_echo "no" >&6; }
4690fi
4691
4692
4693  test -n "$LS" && break
4694done
4695
4696
4697    if test "x$LS" = x; then
4698        if test "xls" = x; then
4699          PROG_NAME=ls
4700        else
4701          PROG_NAME=ls
4702        fi
4703        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4704$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4705        as_fn_error $? "Cannot continue" "$LINENO" 5
4706    fi
4707
4708
4709
4710    for ac_prog in mkdir
4711do
4712  # Extract the first word of "$ac_prog", so it can be a program name with args.
4713set dummy $ac_prog; ac_word=$2
4714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4715$as_echo_n "checking for $ac_word... " >&6; }
4716if test "${ac_cv_path_MKDIR+set}" = set; then :
4717  $as_echo_n "(cached) " >&6
4718else
4719  case $MKDIR in
4720  [\\/]* | ?:[\\/]*)
4721  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4722  ;;
4723  *)
4724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4725for as_dir in $PATH
4726do
4727  IFS=$as_save_IFS
4728  test -z "$as_dir" && as_dir=.
4729    for ac_exec_ext in '' $ac_executable_extensions; do
4730  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4731    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4733    break 2
4734  fi
4735done
4736  done
4737IFS=$as_save_IFS
4738
4739  ;;
4740esac
4741fi
4742MKDIR=$ac_cv_path_MKDIR
4743if test -n "$MKDIR"; then
4744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4745$as_echo "$MKDIR" >&6; }
4746else
4747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4748$as_echo "no" >&6; }
4749fi
4750
4751
4752  test -n "$MKDIR" && break
4753done
4754
4755
4756    if test "x$MKDIR" = x; then
4757        if test "xmkdir" = x; then
4758          PROG_NAME=mkdir
4759        else
4760          PROG_NAME=mkdir
4761        fi
4762        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4763$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4764        as_fn_error $? "Cannot continue" "$LINENO" 5
4765    fi
4766
4767
4768
4769    for ac_prog in mktemp
4770do
4771  # Extract the first word of "$ac_prog", so it can be a program name with args.
4772set dummy $ac_prog; ac_word=$2
4773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4774$as_echo_n "checking for $ac_word... " >&6; }
4775if test "${ac_cv_path_MKTEMP+set}" = set; then :
4776  $as_echo_n "(cached) " >&6
4777else
4778  case $MKTEMP in
4779  [\\/]* | ?:[\\/]*)
4780  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4781  ;;
4782  *)
4783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4784for as_dir in $PATH
4785do
4786  IFS=$as_save_IFS
4787  test -z "$as_dir" && as_dir=.
4788    for ac_exec_ext in '' $ac_executable_extensions; do
4789  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4790    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4792    break 2
4793  fi
4794done
4795  done
4796IFS=$as_save_IFS
4797
4798  ;;
4799esac
4800fi
4801MKTEMP=$ac_cv_path_MKTEMP
4802if test -n "$MKTEMP"; then
4803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4804$as_echo "$MKTEMP" >&6; }
4805else
4806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807$as_echo "no" >&6; }
4808fi
4809
4810
4811  test -n "$MKTEMP" && break
4812done
4813
4814
4815    if test "x$MKTEMP" = x; then
4816        if test "xmktemp" = x; then
4817          PROG_NAME=mktemp
4818        else
4819          PROG_NAME=mktemp
4820        fi
4821        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4822$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4823        as_fn_error $? "Cannot continue" "$LINENO" 5
4824    fi
4825
4826
4827
4828    for ac_prog in mv
4829do
4830  # Extract the first word of "$ac_prog", so it can be a program name with args.
4831set dummy $ac_prog; ac_word=$2
4832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4833$as_echo_n "checking for $ac_word... " >&6; }
4834if test "${ac_cv_path_MV+set}" = set; then :
4835  $as_echo_n "(cached) " >&6
4836else
4837  case $MV in
4838  [\\/]* | ?:[\\/]*)
4839  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4840  ;;
4841  *)
4842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4843for as_dir in $PATH
4844do
4845  IFS=$as_save_IFS
4846  test -z "$as_dir" && as_dir=.
4847    for ac_exec_ext in '' $ac_executable_extensions; do
4848  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4849    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4851    break 2
4852  fi
4853done
4854  done
4855IFS=$as_save_IFS
4856
4857  ;;
4858esac
4859fi
4860MV=$ac_cv_path_MV
4861if test -n "$MV"; then
4862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
4863$as_echo "$MV" >&6; }
4864else
4865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4866$as_echo "no" >&6; }
4867fi
4868
4869
4870  test -n "$MV" && break
4871done
4872
4873
4874    if test "x$MV" = x; then
4875        if test "xmv" = x; then
4876          PROG_NAME=mv
4877        else
4878          PROG_NAME=mv
4879        fi
4880        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4881$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4882        as_fn_error $? "Cannot continue" "$LINENO" 5
4883    fi
4884
4885
4886
4887    for ac_prog in printf
4888do
4889  # Extract the first word of "$ac_prog", so it can be a program name with args.
4890set dummy $ac_prog; ac_word=$2
4891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4892$as_echo_n "checking for $ac_word... " >&6; }
4893if test "${ac_cv_path_PRINTF+set}" = set; then :
4894  $as_echo_n "(cached) " >&6
4895else
4896  case $PRINTF in
4897  [\\/]* | ?:[\\/]*)
4898  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
4899  ;;
4900  *)
4901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4902for as_dir in $PATH
4903do
4904  IFS=$as_save_IFS
4905  test -z "$as_dir" && as_dir=.
4906    for ac_exec_ext in '' $ac_executable_extensions; do
4907  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4908    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
4909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4910    break 2
4911  fi
4912done
4913  done
4914IFS=$as_save_IFS
4915
4916  ;;
4917esac
4918fi
4919PRINTF=$ac_cv_path_PRINTF
4920if test -n "$PRINTF"; then
4921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
4922$as_echo "$PRINTF" >&6; }
4923else
4924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4925$as_echo "no" >&6; }
4926fi
4927
4928
4929  test -n "$PRINTF" && break
4930done
4931
4932
4933    if test "x$PRINTF" = x; then
4934        if test "xprintf" = x; then
4935          PROG_NAME=printf
4936        else
4937          PROG_NAME=printf
4938        fi
4939        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4940$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4941        as_fn_error $? "Cannot continue" "$LINENO" 5
4942    fi
4943
4944
4945
4946    for ac_prog in pwd
4947do
4948  # Extract the first word of "$ac_prog", so it can be a program name with args.
4949set dummy $ac_prog; ac_word=$2
4950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4951$as_echo_n "checking for $ac_word... " >&6; }
4952if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
4953  $as_echo_n "(cached) " >&6
4954else
4955  case $THEPWDCMD in
4956  [\\/]* | ?:[\\/]*)
4957  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
4958  ;;
4959  *)
4960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4961for as_dir in $PATH
4962do
4963  IFS=$as_save_IFS
4964  test -z "$as_dir" && as_dir=.
4965    for ac_exec_ext in '' $ac_executable_extensions; do
4966  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4967    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
4968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4969    break 2
4970  fi
4971done
4972  done
4973IFS=$as_save_IFS
4974
4975  ;;
4976esac
4977fi
4978THEPWDCMD=$ac_cv_path_THEPWDCMD
4979if test -n "$THEPWDCMD"; then
4980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
4981$as_echo "$THEPWDCMD" >&6; }
4982else
4983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4984$as_echo "no" >&6; }
4985fi
4986
4987
4988  test -n "$THEPWDCMD" && break
4989done
4990
4991
4992    if test "x$THEPWDCMD" = x; then
4993        if test "xpwd" = x; then
4994          PROG_NAME=thepwdcmd
4995        else
4996          PROG_NAME=pwd
4997        fi
4998        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4999$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5000        as_fn_error $? "Cannot continue" "$LINENO" 5
5001    fi
5002
5003
5004
5005    for ac_prog in rm
5006do
5007  # Extract the first word of "$ac_prog", so it can be a program name with args.
5008set dummy $ac_prog; ac_word=$2
5009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5010$as_echo_n "checking for $ac_word... " >&6; }
5011if test "${ac_cv_path_RM+set}" = set; then :
5012  $as_echo_n "(cached) " >&6
5013else
5014  case $RM in
5015  [\\/]* | ?:[\\/]*)
5016  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5017  ;;
5018  *)
5019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5020for as_dir in $PATH
5021do
5022  IFS=$as_save_IFS
5023  test -z "$as_dir" && as_dir=.
5024    for ac_exec_ext in '' $ac_executable_extensions; do
5025  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5026    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5028    break 2
5029  fi
5030done
5031  done
5032IFS=$as_save_IFS
5033
5034  ;;
5035esac
5036fi
5037RM=$ac_cv_path_RM
5038if test -n "$RM"; then
5039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5040$as_echo "$RM" >&6; }
5041else
5042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5043$as_echo "no" >&6; }
5044fi
5045
5046
5047  test -n "$RM" && break
5048done
5049
5050
5051    if test "x$RM" = x; then
5052        if test "xrm" = x; then
5053          PROG_NAME=rm
5054        else
5055          PROG_NAME=rm
5056        fi
5057        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5058$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5059        as_fn_error $? "Cannot continue" "$LINENO" 5
5060    fi
5061
5062
5063
5064    for ac_prog in sh
5065do
5066  # Extract the first word of "$ac_prog", so it can be a program name with args.
5067set dummy $ac_prog; ac_word=$2
5068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5069$as_echo_n "checking for $ac_word... " >&6; }
5070if test "${ac_cv_path_SH+set}" = set; then :
5071  $as_echo_n "(cached) " >&6
5072else
5073  case $SH in
5074  [\\/]* | ?:[\\/]*)
5075  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5076  ;;
5077  *)
5078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079for as_dir in $PATH
5080do
5081  IFS=$as_save_IFS
5082  test -z "$as_dir" && as_dir=.
5083    for ac_exec_ext in '' $ac_executable_extensions; do
5084  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5085    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5087    break 2
5088  fi
5089done
5090  done
5091IFS=$as_save_IFS
5092
5093  ;;
5094esac
5095fi
5096SH=$ac_cv_path_SH
5097if test -n "$SH"; then
5098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5099$as_echo "$SH" >&6; }
5100else
5101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5102$as_echo "no" >&6; }
5103fi
5104
5105
5106  test -n "$SH" && break
5107done
5108
5109
5110    if test "x$SH" = x; then
5111        if test "xsh" = x; then
5112          PROG_NAME=sh
5113        else
5114          PROG_NAME=sh
5115        fi
5116        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5117$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5118        as_fn_error $? "Cannot continue" "$LINENO" 5
5119    fi
5120
5121
5122
5123    for ac_prog in sort
5124do
5125  # Extract the first word of "$ac_prog", so it can be a program name with args.
5126set dummy $ac_prog; ac_word=$2
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128$as_echo_n "checking for $ac_word... " >&6; }
5129if test "${ac_cv_path_SORT+set}" = set; then :
5130  $as_echo_n "(cached) " >&6
5131else
5132  case $SORT in
5133  [\\/]* | ?:[\\/]*)
5134  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5135  ;;
5136  *)
5137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140  IFS=$as_save_IFS
5141  test -z "$as_dir" && as_dir=.
5142    for ac_exec_ext in '' $ac_executable_extensions; do
5143  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5144    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5146    break 2
5147  fi
5148done
5149  done
5150IFS=$as_save_IFS
5151
5152  ;;
5153esac
5154fi
5155SORT=$ac_cv_path_SORT
5156if test -n "$SORT"; then
5157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5158$as_echo "$SORT" >&6; }
5159else
5160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161$as_echo "no" >&6; }
5162fi
5163
5164
5165  test -n "$SORT" && break
5166done
5167
5168
5169    if test "x$SORT" = x; then
5170        if test "xsort" = x; then
5171          PROG_NAME=sort
5172        else
5173          PROG_NAME=sort
5174        fi
5175        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5176$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5177        as_fn_error $? "Cannot continue" "$LINENO" 5
5178    fi
5179
5180
5181
5182    for ac_prog in tail
5183do
5184  # Extract the first word of "$ac_prog", so it can be a program name with args.
5185set dummy $ac_prog; ac_word=$2
5186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5187$as_echo_n "checking for $ac_word... " >&6; }
5188if test "${ac_cv_path_TAIL+set}" = set; then :
5189  $as_echo_n "(cached) " >&6
5190else
5191  case $TAIL in
5192  [\\/]* | ?:[\\/]*)
5193  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5194  ;;
5195  *)
5196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5197for as_dir in $PATH
5198do
5199  IFS=$as_save_IFS
5200  test -z "$as_dir" && as_dir=.
5201    for ac_exec_ext in '' $ac_executable_extensions; do
5202  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5203    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5205    break 2
5206  fi
5207done
5208  done
5209IFS=$as_save_IFS
5210
5211  ;;
5212esac
5213fi
5214TAIL=$ac_cv_path_TAIL
5215if test -n "$TAIL"; then
5216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5217$as_echo "$TAIL" >&6; }
5218else
5219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5220$as_echo "no" >&6; }
5221fi
5222
5223
5224  test -n "$TAIL" && break
5225done
5226
5227
5228    if test "x$TAIL" = x; then
5229        if test "xtail" = x; then
5230          PROG_NAME=tail
5231        else
5232          PROG_NAME=tail
5233        fi
5234        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5235$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5236        as_fn_error $? "Cannot continue" "$LINENO" 5
5237    fi
5238
5239
5240
5241    for ac_prog in tar
5242do
5243  # Extract the first word of "$ac_prog", so it can be a program name with args.
5244set dummy $ac_prog; ac_word=$2
5245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5246$as_echo_n "checking for $ac_word... " >&6; }
5247if test "${ac_cv_path_TAR+set}" = set; then :
5248  $as_echo_n "(cached) " >&6
5249else
5250  case $TAR in
5251  [\\/]* | ?:[\\/]*)
5252  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5253  ;;
5254  *)
5255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5256for as_dir in $PATH
5257do
5258  IFS=$as_save_IFS
5259  test -z "$as_dir" && as_dir=.
5260    for ac_exec_ext in '' $ac_executable_extensions; do
5261  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5262    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5264    break 2
5265  fi
5266done
5267  done
5268IFS=$as_save_IFS
5269
5270  ;;
5271esac
5272fi
5273TAR=$ac_cv_path_TAR
5274if test -n "$TAR"; then
5275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5276$as_echo "$TAR" >&6; }
5277else
5278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5279$as_echo "no" >&6; }
5280fi
5281
5282
5283  test -n "$TAR" && break
5284done
5285
5286
5287    if test "x$TAR" = x; then
5288        if test "xtar" = x; then
5289          PROG_NAME=tar
5290        else
5291          PROG_NAME=tar
5292        fi
5293        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5294$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5295        as_fn_error $? "Cannot continue" "$LINENO" 5
5296    fi
5297
5298
5299
5300    for ac_prog in tee
5301do
5302  # Extract the first word of "$ac_prog", so it can be a program name with args.
5303set dummy $ac_prog; ac_word=$2
5304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5305$as_echo_n "checking for $ac_word... " >&6; }
5306if test "${ac_cv_path_TEE+set}" = set; then :
5307  $as_echo_n "(cached) " >&6
5308else
5309  case $TEE in
5310  [\\/]* | ?:[\\/]*)
5311  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5312  ;;
5313  *)
5314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5315for as_dir in $PATH
5316do
5317  IFS=$as_save_IFS
5318  test -z "$as_dir" && as_dir=.
5319    for ac_exec_ext in '' $ac_executable_extensions; do
5320  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5321    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5323    break 2
5324  fi
5325done
5326  done
5327IFS=$as_save_IFS
5328
5329  ;;
5330esac
5331fi
5332TEE=$ac_cv_path_TEE
5333if test -n "$TEE"; then
5334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5335$as_echo "$TEE" >&6; }
5336else
5337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5338$as_echo "no" >&6; }
5339fi
5340
5341
5342  test -n "$TEE" && break
5343done
5344
5345
5346    if test "x$TEE" = x; then
5347        if test "xtee" = x; then
5348          PROG_NAME=tee
5349        else
5350          PROG_NAME=tee
5351        fi
5352        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5353$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5354        as_fn_error $? "Cannot continue" "$LINENO" 5
5355    fi
5356
5357
5358
5359    for ac_prog in touch
5360do
5361  # Extract the first word of "$ac_prog", so it can be a program name with args.
5362set dummy $ac_prog; ac_word=$2
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5364$as_echo_n "checking for $ac_word... " >&6; }
5365if test "${ac_cv_path_TOUCH+set}" = set; then :
5366  $as_echo_n "(cached) " >&6
5367else
5368  case $TOUCH in
5369  [\\/]* | ?:[\\/]*)
5370  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5371  ;;
5372  *)
5373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5374for as_dir in $PATH
5375do
5376  IFS=$as_save_IFS
5377  test -z "$as_dir" && as_dir=.
5378    for ac_exec_ext in '' $ac_executable_extensions; do
5379  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5380    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5382    break 2
5383  fi
5384done
5385  done
5386IFS=$as_save_IFS
5387
5388  ;;
5389esac
5390fi
5391TOUCH=$ac_cv_path_TOUCH
5392if test -n "$TOUCH"; then
5393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5394$as_echo "$TOUCH" >&6; }
5395else
5396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5397$as_echo "no" >&6; }
5398fi
5399
5400
5401  test -n "$TOUCH" && break
5402done
5403
5404
5405    if test "x$TOUCH" = x; then
5406        if test "xtouch" = x; then
5407          PROG_NAME=touch
5408        else
5409          PROG_NAME=touch
5410        fi
5411        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5412$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5413        as_fn_error $? "Cannot continue" "$LINENO" 5
5414    fi
5415
5416
5417
5418    for ac_prog in tr
5419do
5420  # Extract the first word of "$ac_prog", so it can be a program name with args.
5421set dummy $ac_prog; ac_word=$2
5422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5423$as_echo_n "checking for $ac_word... " >&6; }
5424if test "${ac_cv_path_TR+set}" = set; then :
5425  $as_echo_n "(cached) " >&6
5426else
5427  case $TR in
5428  [\\/]* | ?:[\\/]*)
5429  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5430  ;;
5431  *)
5432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5433for as_dir in $PATH
5434do
5435  IFS=$as_save_IFS
5436  test -z "$as_dir" && as_dir=.
5437    for ac_exec_ext in '' $ac_executable_extensions; do
5438  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5439    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5441    break 2
5442  fi
5443done
5444  done
5445IFS=$as_save_IFS
5446
5447  ;;
5448esac
5449fi
5450TR=$ac_cv_path_TR
5451if test -n "$TR"; then
5452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5453$as_echo "$TR" >&6; }
5454else
5455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5456$as_echo "no" >&6; }
5457fi
5458
5459
5460  test -n "$TR" && break
5461done
5462
5463
5464    if test "x$TR" = x; then
5465        if test "xtr" = x; then
5466          PROG_NAME=tr
5467        else
5468          PROG_NAME=tr
5469        fi
5470        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5471$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5472        as_fn_error $? "Cannot continue" "$LINENO" 5
5473    fi
5474
5475
5476
5477    for ac_prog in uname
5478do
5479  # Extract the first word of "$ac_prog", so it can be a program name with args.
5480set dummy $ac_prog; ac_word=$2
5481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5482$as_echo_n "checking for $ac_word... " >&6; }
5483if test "${ac_cv_path_UNAME+set}" = set; then :
5484  $as_echo_n "(cached) " >&6
5485else
5486  case $UNAME in
5487  [\\/]* | ?:[\\/]*)
5488  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5489  ;;
5490  *)
5491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5492for as_dir in $PATH
5493do
5494  IFS=$as_save_IFS
5495  test -z "$as_dir" && as_dir=.
5496    for ac_exec_ext in '' $ac_executable_extensions; do
5497  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5498    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5500    break 2
5501  fi
5502done
5503  done
5504IFS=$as_save_IFS
5505
5506  ;;
5507esac
5508fi
5509UNAME=$ac_cv_path_UNAME
5510if test -n "$UNAME"; then
5511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5512$as_echo "$UNAME" >&6; }
5513else
5514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5515$as_echo "no" >&6; }
5516fi
5517
5518
5519  test -n "$UNAME" && break
5520done
5521
5522
5523    if test "x$UNAME" = x; then
5524        if test "xuname" = x; then
5525          PROG_NAME=uname
5526        else
5527          PROG_NAME=uname
5528        fi
5529        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5530$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5531        as_fn_error $? "Cannot continue" "$LINENO" 5
5532    fi
5533
5534
5535
5536    for ac_prog in uniq
5537do
5538  # Extract the first word of "$ac_prog", so it can be a program name with args.
5539set dummy $ac_prog; ac_word=$2
5540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5541$as_echo_n "checking for $ac_word... " >&6; }
5542if test "${ac_cv_path_UNIQ+set}" = set; then :
5543  $as_echo_n "(cached) " >&6
5544else
5545  case $UNIQ in
5546  [\\/]* | ?:[\\/]*)
5547  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5548  ;;
5549  *)
5550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5551for as_dir in $PATH
5552do
5553  IFS=$as_save_IFS
5554  test -z "$as_dir" && as_dir=.
5555    for ac_exec_ext in '' $ac_executable_extensions; do
5556  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5557    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5559    break 2
5560  fi
5561done
5562  done
5563IFS=$as_save_IFS
5564
5565  ;;
5566esac
5567fi
5568UNIQ=$ac_cv_path_UNIQ
5569if test -n "$UNIQ"; then
5570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5571$as_echo "$UNIQ" >&6; }
5572else
5573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5574$as_echo "no" >&6; }
5575fi
5576
5577
5578  test -n "$UNIQ" && break
5579done
5580
5581
5582    if test "x$UNIQ" = x; then
5583        if test "xuniq" = x; then
5584          PROG_NAME=uniq
5585        else
5586          PROG_NAME=uniq
5587        fi
5588        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5589$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5590        as_fn_error $? "Cannot continue" "$LINENO" 5
5591    fi
5592
5593
5594
5595    for ac_prog in wc
5596do
5597  # Extract the first word of "$ac_prog", so it can be a program name with args.
5598set dummy $ac_prog; ac_word=$2
5599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5600$as_echo_n "checking for $ac_word... " >&6; }
5601if test "${ac_cv_path_WC+set}" = set; then :
5602  $as_echo_n "(cached) " >&6
5603else
5604  case $WC in
5605  [\\/]* | ?:[\\/]*)
5606  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5607  ;;
5608  *)
5609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5610for as_dir in $PATH
5611do
5612  IFS=$as_save_IFS
5613  test -z "$as_dir" && as_dir=.
5614    for ac_exec_ext in '' $ac_executable_extensions; do
5615  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5616    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5618    break 2
5619  fi
5620done
5621  done
5622IFS=$as_save_IFS
5623
5624  ;;
5625esac
5626fi
5627WC=$ac_cv_path_WC
5628if test -n "$WC"; then
5629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5630$as_echo "$WC" >&6; }
5631else
5632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5633$as_echo "no" >&6; }
5634fi
5635
5636
5637  test -n "$WC" && break
5638done
5639
5640
5641    if test "x$WC" = x; then
5642        if test "xwc" = x; then
5643          PROG_NAME=wc
5644        else
5645          PROG_NAME=wc
5646        fi
5647        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5648$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5649        as_fn_error $? "Cannot continue" "$LINENO" 5
5650    fi
5651
5652
5653
5654    for ac_prog in which
5655do
5656  # Extract the first word of "$ac_prog", so it can be a program name with args.
5657set dummy $ac_prog; ac_word=$2
5658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5659$as_echo_n "checking for $ac_word... " >&6; }
5660if test "${ac_cv_path_WHICH+set}" = set; then :
5661  $as_echo_n "(cached) " >&6
5662else
5663  case $WHICH in
5664  [\\/]* | ?:[\\/]*)
5665  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5666  ;;
5667  *)
5668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5669for as_dir in $PATH
5670do
5671  IFS=$as_save_IFS
5672  test -z "$as_dir" && as_dir=.
5673    for ac_exec_ext in '' $ac_executable_extensions; do
5674  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5675    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5677    break 2
5678  fi
5679done
5680  done
5681IFS=$as_save_IFS
5682
5683  ;;
5684esac
5685fi
5686WHICH=$ac_cv_path_WHICH
5687if test -n "$WHICH"; then
5688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5689$as_echo "$WHICH" >&6; }
5690else
5691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692$as_echo "no" >&6; }
5693fi
5694
5695
5696  test -n "$WHICH" && break
5697done
5698
5699
5700    if test "x$WHICH" = x; then
5701        if test "xwhich" = x; then
5702          PROG_NAME=which
5703        else
5704          PROG_NAME=which
5705        fi
5706        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5707$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5708        as_fn_error $? "Cannot continue" "$LINENO" 5
5709    fi
5710
5711
5712
5713    for ac_prog in xargs
5714do
5715  # Extract the first word of "$ac_prog", so it can be a program name with args.
5716set dummy $ac_prog; ac_word=$2
5717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5718$as_echo_n "checking for $ac_word... " >&6; }
5719if test "${ac_cv_path_XARGS+set}" = set; then :
5720  $as_echo_n "(cached) " >&6
5721else
5722  case $XARGS in
5723  [\\/]* | ?:[\\/]*)
5724  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5725  ;;
5726  *)
5727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5728for as_dir in $PATH
5729do
5730  IFS=$as_save_IFS
5731  test -z "$as_dir" && as_dir=.
5732    for ac_exec_ext in '' $ac_executable_extensions; do
5733  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5734    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5736    break 2
5737  fi
5738done
5739  done
5740IFS=$as_save_IFS
5741
5742  ;;
5743esac
5744fi
5745XARGS=$ac_cv_path_XARGS
5746if test -n "$XARGS"; then
5747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5748$as_echo "$XARGS" >&6; }
5749else
5750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5751$as_echo "no" >&6; }
5752fi
5753
5754
5755  test -n "$XARGS" && break
5756done
5757
5758
5759    if test "x$XARGS" = x; then
5760        if test "xxargs" = x; then
5761          PROG_NAME=xargs
5762        else
5763          PROG_NAME=xargs
5764        fi
5765        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5766$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5767        as_fn_error $? "Cannot continue" "$LINENO" 5
5768    fi
5769
5770
5771
5772# Then required tools that require some special treatment.
5773for ac_prog in gawk mawk nawk awk
5774do
5775  # Extract the first word of "$ac_prog", so it can be a program name with args.
5776set dummy $ac_prog; ac_word=$2
5777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5778$as_echo_n "checking for $ac_word... " >&6; }
5779if test "${ac_cv_prog_AWK+set}" = set; then :
5780  $as_echo_n "(cached) " >&6
5781else
5782  if test -n "$AWK"; then
5783  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5784else
5785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5786for as_dir in $PATH
5787do
5788  IFS=$as_save_IFS
5789  test -z "$as_dir" && as_dir=.
5790    for ac_exec_ext in '' $ac_executable_extensions; do
5791  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5792    ac_cv_prog_AWK="$ac_prog"
5793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5794    break 2
5795  fi
5796done
5797  done
5798IFS=$as_save_IFS
5799
5800fi
5801fi
5802AWK=$ac_cv_prog_AWK
5803if test -n "$AWK"; then
5804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5805$as_echo "$AWK" >&6; }
5806else
5807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5808$as_echo "no" >&6; }
5809fi
5810
5811
5812  test -n "$AWK" && break
5813done
5814
5815
5816    if test "x$AWK" = x; then
5817        if test "x" = x; then
5818          PROG_NAME=awk
5819        else
5820          PROG_NAME=
5821        fi
5822        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5823$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5824        as_fn_error $? "Cannot continue" "$LINENO" 5
5825    fi
5826
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5828$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5829if test "${ac_cv_path_GREP+set}" = set; then :
5830  $as_echo_n "(cached) " >&6
5831else
5832  if test -z "$GREP"; then
5833  ac_path_GREP_found=false
5834  # Loop through the user's path and test for each of PROGNAME-LIST
5835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5836for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5837do
5838  IFS=$as_save_IFS
5839  test -z "$as_dir" && as_dir=.
5840    for ac_prog in grep ggrep; do
5841    for ac_exec_ext in '' $ac_executable_extensions; do
5842      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5843      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5844# Check for GNU ac_path_GREP and select it if it is found.
5845  # Check for GNU $ac_path_GREP
5846case `"$ac_path_GREP" --version 2>&1` in
5847*GNU*)
5848  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5849*)
5850  ac_count=0
5851  $as_echo_n 0123456789 >"conftest.in"
5852  while :
5853  do
5854    cat "conftest.in" "conftest.in" >"conftest.tmp"
5855    mv "conftest.tmp" "conftest.in"
5856    cp "conftest.in" "conftest.nl"
5857    $as_echo 'GREP' >> "conftest.nl"
5858    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5859    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5860    as_fn_arith $ac_count + 1 && ac_count=$as_val
5861    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5862      # Best one so far, save it but keep looking for a better one
5863      ac_cv_path_GREP="$ac_path_GREP"
5864      ac_path_GREP_max=$ac_count
5865    fi
5866    # 10*(2^10) chars as input seems more than enough
5867    test $ac_count -gt 10 && break
5868  done
5869  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5870esac
5871
5872      $ac_path_GREP_found && break 3
5873    done
5874  done
5875  done
5876IFS=$as_save_IFS
5877  if test -z "$ac_cv_path_GREP"; then
5878    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5879  fi
5880else
5881  ac_cv_path_GREP=$GREP
5882fi
5883
5884fi
5885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5886$as_echo "$ac_cv_path_GREP" >&6; }
5887 GREP="$ac_cv_path_GREP"
5888
5889
5890
5891    if test "x$GREP" = x; then
5892        if test "x" = x; then
5893          PROG_NAME=grep
5894        else
5895          PROG_NAME=
5896        fi
5897        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5898$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5899        as_fn_error $? "Cannot continue" "$LINENO" 5
5900    fi
5901
5902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5903$as_echo_n "checking for egrep... " >&6; }
5904if test "${ac_cv_path_EGREP+set}" = set; then :
5905  $as_echo_n "(cached) " >&6
5906else
5907  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5908   then ac_cv_path_EGREP="$GREP -E"
5909   else
5910     if test -z "$EGREP"; then
5911  ac_path_EGREP_found=false
5912  # Loop through the user's path and test for each of PROGNAME-LIST
5913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5914for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5915do
5916  IFS=$as_save_IFS
5917  test -z "$as_dir" && as_dir=.
5918    for ac_prog in egrep; do
5919    for ac_exec_ext in '' $ac_executable_extensions; do
5920      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5921      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5922# Check for GNU ac_path_EGREP and select it if it is found.
5923  # Check for GNU $ac_path_EGREP
5924case `"$ac_path_EGREP" --version 2>&1` in
5925*GNU*)
5926  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5927*)
5928  ac_count=0
5929  $as_echo_n 0123456789 >"conftest.in"
5930  while :
5931  do
5932    cat "conftest.in" "conftest.in" >"conftest.tmp"
5933    mv "conftest.tmp" "conftest.in"
5934    cp "conftest.in" "conftest.nl"
5935    $as_echo 'EGREP' >> "conftest.nl"
5936    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5937    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5938    as_fn_arith $ac_count + 1 && ac_count=$as_val
5939    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5940      # Best one so far, save it but keep looking for a better one
5941      ac_cv_path_EGREP="$ac_path_EGREP"
5942      ac_path_EGREP_max=$ac_count
5943    fi
5944    # 10*(2^10) chars as input seems more than enough
5945    test $ac_count -gt 10 && break
5946  done
5947  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5948esac
5949
5950      $ac_path_EGREP_found && break 3
5951    done
5952  done
5953  done
5954IFS=$as_save_IFS
5955  if test -z "$ac_cv_path_EGREP"; then
5956    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5957  fi
5958else
5959  ac_cv_path_EGREP=$EGREP
5960fi
5961
5962   fi
5963fi
5964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5965$as_echo "$ac_cv_path_EGREP" >&6; }
5966 EGREP="$ac_cv_path_EGREP"
5967
5968
5969
5970    if test "x$EGREP" = x; then
5971        if test "x" = x; then
5972          PROG_NAME=egrep
5973        else
5974          PROG_NAME=
5975        fi
5976        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5977$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5978        as_fn_error $? "Cannot continue" "$LINENO" 5
5979    fi
5980
5981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5982$as_echo_n "checking for fgrep... " >&6; }
5983if test "${ac_cv_path_FGREP+set}" = set; then :
5984  $as_echo_n "(cached) " >&6
5985else
5986  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5987   then ac_cv_path_FGREP="$GREP -F"
5988   else
5989     if test -z "$FGREP"; then
5990  ac_path_FGREP_found=false
5991  # Loop through the user's path and test for each of PROGNAME-LIST
5992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5994do
5995  IFS=$as_save_IFS
5996  test -z "$as_dir" && as_dir=.
5997    for ac_prog in fgrep; do
5998    for ac_exec_ext in '' $ac_executable_extensions; do
5999      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6000      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6001# Check for GNU ac_path_FGREP and select it if it is found.
6002  # Check for GNU $ac_path_FGREP
6003case `"$ac_path_FGREP" --version 2>&1` in
6004*GNU*)
6005  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6006*)
6007  ac_count=0
6008  $as_echo_n 0123456789 >"conftest.in"
6009  while :
6010  do
6011    cat "conftest.in" "conftest.in" >"conftest.tmp"
6012    mv "conftest.tmp" "conftest.in"
6013    cp "conftest.in" "conftest.nl"
6014    $as_echo 'FGREP' >> "conftest.nl"
6015    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6016    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6017    as_fn_arith $ac_count + 1 && ac_count=$as_val
6018    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6019      # Best one so far, save it but keep looking for a better one
6020      ac_cv_path_FGREP="$ac_path_FGREP"
6021      ac_path_FGREP_max=$ac_count
6022    fi
6023    # 10*(2^10) chars as input seems more than enough
6024    test $ac_count -gt 10 && break
6025  done
6026  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6027esac
6028
6029      $ac_path_FGREP_found && break 3
6030    done
6031  done
6032  done
6033IFS=$as_save_IFS
6034  if test -z "$ac_cv_path_FGREP"; then
6035    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6036  fi
6037else
6038  ac_cv_path_FGREP=$FGREP
6039fi
6040
6041   fi
6042fi
6043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6044$as_echo "$ac_cv_path_FGREP" >&6; }
6045 FGREP="$ac_cv_path_FGREP"
6046
6047
6048
6049    if test "x$FGREP" = x; then
6050        if test "x" = x; then
6051          PROG_NAME=fgrep
6052        else
6053          PROG_NAME=
6054        fi
6055        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6056$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6057        as_fn_error $? "Cannot continue" "$LINENO" 5
6058    fi
6059
6060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6061$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6062if test "${ac_cv_path_SED+set}" = set; then :
6063  $as_echo_n "(cached) " >&6
6064else
6065            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6066     for ac_i in 1 2 3 4 5 6 7; do
6067       ac_script="$ac_script$as_nl$ac_script"
6068     done
6069     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6070     { ac_script=; unset ac_script;}
6071     if test -z "$SED"; then
6072  ac_path_SED_found=false
6073  # Loop through the user's path and test for each of PROGNAME-LIST
6074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075for as_dir in $PATH
6076do
6077  IFS=$as_save_IFS
6078  test -z "$as_dir" && as_dir=.
6079    for ac_prog in sed gsed; do
6080    for ac_exec_ext in '' $ac_executable_extensions; do
6081      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6082      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6083# Check for GNU ac_path_SED and select it if it is found.
6084  # Check for GNU $ac_path_SED
6085case `"$ac_path_SED" --version 2>&1` in
6086*GNU*)
6087  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6088*)
6089  ac_count=0
6090  $as_echo_n 0123456789 >"conftest.in"
6091  while :
6092  do
6093    cat "conftest.in" "conftest.in" >"conftest.tmp"
6094    mv "conftest.tmp" "conftest.in"
6095    cp "conftest.in" "conftest.nl"
6096    $as_echo '' >> "conftest.nl"
6097    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6098    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6099    as_fn_arith $ac_count + 1 && ac_count=$as_val
6100    if test $ac_count -gt ${ac_path_SED_max-0}; then
6101      # Best one so far, save it but keep looking for a better one
6102      ac_cv_path_SED="$ac_path_SED"
6103      ac_path_SED_max=$ac_count
6104    fi
6105    # 10*(2^10) chars as input seems more than enough
6106    test $ac_count -gt 10 && break
6107  done
6108  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6109esac
6110
6111      $ac_path_SED_found && break 3
6112    done
6113  done
6114  done
6115IFS=$as_save_IFS
6116  if test -z "$ac_cv_path_SED"; then
6117    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6118  fi
6119else
6120  ac_cv_path_SED=$SED
6121fi
6122
6123fi
6124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6125$as_echo "$ac_cv_path_SED" >&6; }
6126 SED="$ac_cv_path_SED"
6127  rm -f conftest.sed
6128
6129
6130    if test "x$SED" = x; then
6131        if test "x" = x; then
6132          PROG_NAME=sed
6133        else
6134          PROG_NAME=
6135        fi
6136        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6137$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6138        as_fn_error $? "Cannot continue" "$LINENO" 5
6139    fi
6140
6141
6142for ac_prog in nawk gawk awk
6143do
6144  # Extract the first word of "$ac_prog", so it can be a program name with args.
6145set dummy $ac_prog; ac_word=$2
6146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6147$as_echo_n "checking for $ac_word... " >&6; }
6148if test "${ac_cv_path_NAWK+set}" = set; then :
6149  $as_echo_n "(cached) " >&6
6150else
6151  case $NAWK in
6152  [\\/]* | ?:[\\/]*)
6153  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6154  ;;
6155  *)
6156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6157for as_dir in $PATH
6158do
6159  IFS=$as_save_IFS
6160  test -z "$as_dir" && as_dir=.
6161    for ac_exec_ext in '' $ac_executable_extensions; do
6162  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6163    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6165    break 2
6166  fi
6167done
6168  done
6169IFS=$as_save_IFS
6170
6171  ;;
6172esac
6173fi
6174NAWK=$ac_cv_path_NAWK
6175if test -n "$NAWK"; then
6176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6177$as_echo "$NAWK" >&6; }
6178else
6179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6180$as_echo "no" >&6; }
6181fi
6182
6183
6184  test -n "$NAWK" && break
6185done
6186
6187
6188    if test "x$NAWK" = x; then
6189        if test "x" = x; then
6190          PROG_NAME=nawk
6191        else
6192          PROG_NAME=
6193        fi
6194        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6195$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6196        as_fn_error $? "Cannot continue" "$LINENO" 5
6197    fi
6198
6199
6200# Always force rm.
6201RM="$RM -f"
6202
6203# These are not required on all platforms
6204# Extract the first word of "cygpath", so it can be a program name with args.
6205set dummy cygpath; ac_word=$2
6206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6207$as_echo_n "checking for $ac_word... " >&6; }
6208if test "${ac_cv_path_CYGPATH+set}" = set; then :
6209  $as_echo_n "(cached) " >&6
6210else
6211  case $CYGPATH in
6212  [\\/]* | ?:[\\/]*)
6213  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6214  ;;
6215  *)
6216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6217for as_dir in $PATH
6218do
6219  IFS=$as_save_IFS
6220  test -z "$as_dir" && as_dir=.
6221    for ac_exec_ext in '' $ac_executable_extensions; do
6222  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6223    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6225    break 2
6226  fi
6227done
6228  done
6229IFS=$as_save_IFS
6230
6231  ;;
6232esac
6233fi
6234CYGPATH=$ac_cv_path_CYGPATH
6235if test -n "$CYGPATH"; then
6236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6237$as_echo "$CYGPATH" >&6; }
6238else
6239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6240$as_echo "no" >&6; }
6241fi
6242
6243
6244# Extract the first word of "readlink", so it can be a program name with args.
6245set dummy readlink; ac_word=$2
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6247$as_echo_n "checking for $ac_word... " >&6; }
6248if test "${ac_cv_path_READLINK+set}" = set; then :
6249  $as_echo_n "(cached) " >&6
6250else
6251  case $READLINK in
6252  [\\/]* | ?:[\\/]*)
6253  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6254  ;;
6255  *)
6256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6257for as_dir in $PATH
6258do
6259  IFS=$as_save_IFS
6260  test -z "$as_dir" && as_dir=.
6261    for ac_exec_ext in '' $ac_executable_extensions; do
6262  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6263    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6265    break 2
6266  fi
6267done
6268  done
6269IFS=$as_save_IFS
6270
6271  ;;
6272esac
6273fi
6274READLINK=$ac_cv_path_READLINK
6275if test -n "$READLINK"; then
6276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6277$as_echo "$READLINK" >&6; }
6278else
6279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6280$as_echo "no" >&6; }
6281fi
6282
6283
6284# Extract the first word of "df", so it can be a program name with args.
6285set dummy df; ac_word=$2
6286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6287$as_echo_n "checking for $ac_word... " >&6; }
6288if test "${ac_cv_path_DF+set}" = set; then :
6289  $as_echo_n "(cached) " >&6
6290else
6291  case $DF in
6292  [\\/]* | ?:[\\/]*)
6293  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6294  ;;
6295  *)
6296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6297for as_dir in $PATH
6298do
6299  IFS=$as_save_IFS
6300  test -z "$as_dir" && as_dir=.
6301    for ac_exec_ext in '' $ac_executable_extensions; do
6302  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6303    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6305    break 2
6306  fi
6307done
6308  done
6309IFS=$as_save_IFS
6310
6311  ;;
6312esac
6313fi
6314DF=$ac_cv_path_DF
6315if test -n "$DF"; then
6316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6317$as_echo "$DF" >&6; }
6318else
6319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6320$as_echo "no" >&6; }
6321fi
6322
6323
6324# Extract the first word of "SetFile", so it can be a program name with args.
6325set dummy SetFile; ac_word=$2
6326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6327$as_echo_n "checking for $ac_word... " >&6; }
6328if test "${ac_cv_path_SETFILE+set}" = set; then :
6329  $as_echo_n "(cached) " >&6
6330else
6331  case $SETFILE in
6332  [\\/]* | ?:[\\/]*)
6333  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6334  ;;
6335  *)
6336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6337for as_dir in $PATH
6338do
6339  IFS=$as_save_IFS
6340  test -z "$as_dir" && as_dir=.
6341    for ac_exec_ext in '' $ac_executable_extensions; do
6342  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6343    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6345    break 2
6346  fi
6347done
6348  done
6349IFS=$as_save_IFS
6350
6351  ;;
6352esac
6353fi
6354SETFILE=$ac_cv_path_SETFILE
6355if test -n "$SETFILE"; then
6356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6357$as_echo "$SETFILE" >&6; }
6358else
6359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6360$as_echo "no" >&6; }
6361fi
6362
6363
6364
6365
6366# Now we can determine OpenJDK build and target platforms. This is required to
6367# have early on.
6368# Make sure we can run config.sub.
6369$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6370  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6371
6372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6373$as_echo_n "checking build system type... " >&6; }
6374if test "${ac_cv_build+set}" = set; then :
6375  $as_echo_n "(cached) " >&6
6376else
6377  ac_build_alias=$build_alias
6378test "x$ac_build_alias" = x &&
6379  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6380test "x$ac_build_alias" = x &&
6381  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6382ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6383  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6384
6385fi
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6387$as_echo "$ac_cv_build" >&6; }
6388case $ac_cv_build in
6389*-*-*) ;;
6390*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6391esac
6392build=$ac_cv_build
6393ac_save_IFS=$IFS; IFS='-'
6394set x $ac_cv_build
6395shift
6396build_cpu=$1
6397build_vendor=$2
6398shift; shift
6399# Remember, the first character of IFS is used to create $*,
6400# except with old shells:
6401build_os=$*
6402IFS=$ac_save_IFS
6403case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6404
6405
6406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6407$as_echo_n "checking host system type... " >&6; }
6408if test "${ac_cv_host+set}" = set; then :
6409  $as_echo_n "(cached) " >&6
6410else
6411  if test "x$host_alias" = x; then
6412  ac_cv_host=$ac_cv_build
6413else
6414  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6415    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6416fi
6417
6418fi
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6420$as_echo "$ac_cv_host" >&6; }
6421case $ac_cv_host in
6422*-*-*) ;;
6423*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6424esac
6425host=$ac_cv_host
6426ac_save_IFS=$IFS; IFS='-'
6427set x $ac_cv_host
6428shift
6429host_cpu=$1
6430host_vendor=$2
6431shift; shift
6432# Remember, the first character of IFS is used to create $*,
6433# except with old shells:
6434host_os=$*
6435IFS=$ac_save_IFS
6436case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6437
6438
6439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6440$as_echo_n "checking target system type... " >&6; }
6441if test "${ac_cv_target+set}" = set; then :
6442  $as_echo_n "(cached) " >&6
6443else
6444  if test "x$target_alias" = x; then
6445  ac_cv_target=$ac_cv_host
6446else
6447  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6448    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6449fi
6450
6451fi
6452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6453$as_echo "$ac_cv_target" >&6; }
6454case $ac_cv_target in
6455*-*-*) ;;
6456*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6457esac
6458target=$ac_cv_target
6459ac_save_IFS=$IFS; IFS='-'
6460set x $ac_cv_target
6461shift
6462target_cpu=$1
6463target_vendor=$2
6464shift; shift
6465# Remember, the first character of IFS is used to create $*,
6466# except with old shells:
6467target_os=$*
6468IFS=$ac_save_IFS
6469case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6470
6471
6472# The aliases save the names the user supplied, while $host etc.
6473# will get canonicalized.
6474test -n "$target_alias" &&
6475  test "$program_prefix$program_suffix$program_transform_name" = \
6476    NONENONEs,x,x, &&
6477  program_prefix=${target_alias}-
6478
6479# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6480# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6481# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6482# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6483# to use the configure naming style.
6484
6485
6486
6487
6488
6489    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6490    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6491    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6492    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6493    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6494    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6495
6496
6497
6498    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6499
6500  case "$build_os" in
6501    *linux*)
6502      VAR_OS=linux
6503      VAR_OS_API=posix
6504      VAR_OS_ENV=linux
6505      ;;
6506    *solaris*)
6507      VAR_OS=solaris
6508      VAR_OS_API=posix
6509      VAR_OS_ENV=solaris
6510      ;;
6511    *darwin*)
6512      VAR_OS=macosx
6513      VAR_OS_API=posix
6514      VAR_OS_ENV=macosx
6515      ;;
6516    *bsd*)
6517      VAR_OS=bsd
6518      VAR_OS_API=posix
6519      VAR_OS_ENV=bsd
6520      ;;
6521    *cygwin*)
6522      VAR_OS=windows
6523      VAR_OS_API=winapi
6524      VAR_OS_ENV=windows.cygwin
6525      ;;
6526    *mingw*)
6527      VAR_OS=windows
6528      VAR_OS_API=winapi
6529      VAR_OS_ENV=windows.msys
6530      ;;
6531    *)
6532      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6533      ;;
6534  esac
6535
6536
6537  # First argument is the cpu name from the trip/quad
6538  case "$build_cpu" in
6539    x86_64)
6540      VAR_CPU=x86_64
6541      VAR_CPU_ARCH=x86
6542      VAR_CPU_BITS=64
6543      VAR_CPU_ENDIAN=little
6544      ;;
6545    i?86)
6546      VAR_CPU=x86
6547      VAR_CPU_ARCH=x86
6548      VAR_CPU_BITS=32
6549      VAR_CPU_ENDIAN=little
6550      ;;
6551    arm*)
6552      VAR_CPU=arm
6553      VAR_CPU_ARCH=arm
6554      VAR_CPU_BITS=32
6555      VAR_CPU_ENDIAN=little
6556      ;;
6557    powerpc)
6558      VAR_CPU=ppc
6559      VAR_CPU_ARCH=ppc
6560      VAR_CPU_BITS=32
6561      VAR_CPU_ENDIAN=big
6562       ;;
6563    powerpc64)
6564      VAR_CPU=ppc64
6565      VAR_CPU_ARCH=ppc
6566      VAR_CPU_BITS=64
6567      VAR_CPU_ENDIAN=big
6568       ;;
6569    sparc)
6570      VAR_CPU=sparc
6571      VAR_CPU_ARCH=sparc
6572      VAR_CPU_BITS=32
6573      VAR_CPU_ENDIAN=big
6574       ;;
6575    sparcv9)
6576      VAR_CPU=sparcv9
6577      VAR_CPU_ARCH=sparc
6578      VAR_CPU_BITS=64
6579      VAR_CPU_ENDIAN=big
6580       ;;
6581    *)
6582      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6583      ;;
6584  esac
6585
6586    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6587    OPENJDK_BUILD_OS="$VAR_OS"
6588    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6589    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6590    OPENJDK_BUILD_CPU="$VAR_CPU"
6591    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6592    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6593    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6594
6595
6596
6597
6598
6599
6600
6601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6602$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6604$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6605
6606    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6607
6608  case "$host_os" in
6609    *linux*)
6610      VAR_OS=linux
6611      VAR_OS_API=posix
6612      VAR_OS_ENV=linux
6613      ;;
6614    *solaris*)
6615      VAR_OS=solaris
6616      VAR_OS_API=posix
6617      VAR_OS_ENV=solaris
6618      ;;
6619    *darwin*)
6620      VAR_OS=macosx
6621      VAR_OS_API=posix
6622      VAR_OS_ENV=macosx
6623      ;;
6624    *bsd*)
6625      VAR_OS=bsd
6626      VAR_OS_API=posix
6627      VAR_OS_ENV=bsd
6628      ;;
6629    *cygwin*)
6630      VAR_OS=windows
6631      VAR_OS_API=winapi
6632      VAR_OS_ENV=windows.cygwin
6633      ;;
6634    *mingw*)
6635      VAR_OS=windows
6636      VAR_OS_API=winapi
6637      VAR_OS_ENV=windows.msys
6638      ;;
6639    *)
6640      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6641      ;;
6642  esac
6643
6644
6645  # First argument is the cpu name from the trip/quad
6646  case "$host_cpu" in
6647    x86_64)
6648      VAR_CPU=x86_64
6649      VAR_CPU_ARCH=x86
6650      VAR_CPU_BITS=64
6651      VAR_CPU_ENDIAN=little
6652      ;;
6653    i?86)
6654      VAR_CPU=x86
6655      VAR_CPU_ARCH=x86
6656      VAR_CPU_BITS=32
6657      VAR_CPU_ENDIAN=little
6658      ;;
6659    arm*)
6660      VAR_CPU=arm
6661      VAR_CPU_ARCH=arm
6662      VAR_CPU_BITS=32
6663      VAR_CPU_ENDIAN=little
6664      ;;
6665    powerpc)
6666      VAR_CPU=ppc
6667      VAR_CPU_ARCH=ppc
6668      VAR_CPU_BITS=32
6669      VAR_CPU_ENDIAN=big
6670       ;;
6671    powerpc64)
6672      VAR_CPU=ppc64
6673      VAR_CPU_ARCH=ppc
6674      VAR_CPU_BITS=64
6675      VAR_CPU_ENDIAN=big
6676       ;;
6677    sparc)
6678      VAR_CPU=sparc
6679      VAR_CPU_ARCH=sparc
6680      VAR_CPU_BITS=32
6681      VAR_CPU_ENDIAN=big
6682       ;;
6683    sparcv9)
6684      VAR_CPU=sparcv9
6685      VAR_CPU_ARCH=sparc
6686      VAR_CPU_BITS=64
6687      VAR_CPU_ENDIAN=big
6688       ;;
6689    *)
6690      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6691      ;;
6692  esac
6693
6694    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6695    OPENJDK_TARGET_OS="$VAR_OS"
6696    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6697    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6698    OPENJDK_TARGET_CPU="$VAR_CPU"
6699    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6700    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6701    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6702
6703
6704
6705
6706
6707
6708
6709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6710$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6712$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6713
6714
6715
6716# Check whether --with-target-bits was given.
6717if test "${with_target_bits+set}" = set; then :
6718  withval=$with_target_bits;
6719fi
6720
6721
6722  # We have three types of compiles:
6723  # native  == normal compilation, target system == build system
6724  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6725  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6726  #
6727  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6728    # We're doing a proper cross-compilation
6729    COMPILE_TYPE="cross"
6730  else
6731    COMPILE_TYPE="native"
6732  fi
6733
6734  if test "x$with_target_bits" != x; then
6735    if test "x$COMPILE_TYPE" = "xcross"; then
6736      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6737    fi
6738
6739    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6740      # A reduced build is requested
6741      COMPILE_TYPE="reduced"
6742      OPENJDK_TARGET_CPU_BITS=32
6743      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6744        OPENJDK_TARGET_CPU=x86
6745      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6746        OPENJDK_TARGET_CPU=sparc
6747      else
6748        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6749      fi
6750    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6751      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
6752    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6753      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6754$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6755    else
6756      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6757    fi
6758  fi
6759
6760
6761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6762$as_echo_n "checking compilation type... " >&6; }
6763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6764$as_echo "$COMPILE_TYPE" >&6; }
6765
6766
6767    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6768       REQUIRED_OS_NAME=SunOS
6769       REQUIRED_OS_VERSION=5.10
6770    fi
6771    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6772       REQUIRED_OS_NAME=Linux
6773       REQUIRED_OS_VERSION=2.6
6774    fi
6775    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6776        REQUIRED_OS_NAME=Windows
6777        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6778            REQUIRED_OS_VERSION=5.2
6779        else
6780            REQUIRED_OS_VERSION=5.1
6781        fi
6782    fi
6783    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6784        REQUIRED_OS_NAME=Darwin
6785        REQUIRED_OS_VERSION=11.2
6786    fi
6787
6788
6789
6790
6791
6792    # Also store the legacy naming of the cpu.
6793    # Ie i586 and amd64 instead of x86 and x86_64
6794    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6795    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6796      OPENJDK_TARGET_CPU_LEGACY="i586"
6797    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6798      # On all platforms except MacOSX replace x86_64 with amd64.
6799      OPENJDK_TARGET_CPU_LEGACY="amd64"
6800    fi
6801
6802
6803    # And the second legacy naming of the cpu.
6804    # Ie i386 and amd64 instead of x86 and x86_64.
6805    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6806    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6807      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6808    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6809      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6810    fi
6811
6812
6813    # This is the name of the cpu (but using i386 and amd64 instead of
6814    # x86 and x86_64, respectively), preceeded by a /, to be used when
6815    # locating libraries. On macosx, it's empty, though.
6816    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6817    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6818        OPENJDK_TARGET_CPU_LIBDIR=""
6819    fi
6820
6821
6822    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6823    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6824    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6825    OPENJDK_TARGET_CPU_ISADIR=""
6826    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6827      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6828          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6829      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6830          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6831      fi
6832    fi
6833
6834
6835    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6836    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6837    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6838      # On linux only, we replace x86 with i386.
6839      OPENJDK_TARGET_CPU_OSARCH="i386"
6840    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6841      # On all platforms except macosx, we replace x86_64 with amd64.
6842      OPENJDK_TARGET_CPU_OSARCH="amd64"
6843    fi
6844
6845
6846    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6847    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6848      OPENJDK_TARGET_CPU_JLI="i386"
6849    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6850      # On all platforms except macosx, we replace x86_64 with amd64.
6851      OPENJDK_TARGET_CPU_JLI="amd64"
6852    fi
6853    # Now setup the -D flags for building libjli.
6854    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6855    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6856      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
6857        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
6858      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
6859        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
6860      fi
6861    fi
6862
6863
6864    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
6865    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
6866        OPENJDK_TARGET_OS_API_DIR="solaris"
6867    fi
6868    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
6869        OPENJDK_TARGET_OS_API_DIR="windows"
6870    fi
6871
6872
6873    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6874        A_LP64="LP64:="
6875        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
6876        # unpack200.exe
6877        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
6878            ADD_LP64="-D_LP64=1"
6879        fi
6880    fi
6881    LP64=$A_LP64
6882
6883
6884    if test "x$COMPILE_TYPE" = "xcross"; then
6885      # FIXME: ... or should this include reduced builds..?
6886      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
6887    else
6888      DEFINE_CROSS_COMPILE_ARCH=""
6889    fi
6890
6891
6892
6893
6894# Continue setting up basic stuff. Most remaining code require fundamental tools.
6895
6896# Locate the directory of this script.
6897SCRIPT="$0"
6898
6899    if test "x$OPENJDK_BUILD_OS" != xwindows; then
6900        # Follow a chain of symbolic links. Use readlink
6901        # where it exists, else fall back to horribly
6902        # complicated shell code.
6903        if test "x$READLINK_TESTED" != yes; then
6904            # On MacOSX there is a readlink tool with a different
6905            # purpose than the GNU readlink tool. Check the found readlink.
6906            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
6907            if test "x$ISGNU" = x; then
6908                 # A readlink that we do not know how to use.
6909                 # Are there other non-GNU readlinks out there?
6910                 READLINK_TESTED=yes
6911                 READLINK=
6912            fi
6913        fi
6914
6915        if test "x$READLINK" != x; then
6916            SCRIPT=`$READLINK -f $SCRIPT`
6917        else
6918            STARTDIR=$PWD
6919            COUNTER=0
6920            sym_link_dir=`$DIRNAME $SCRIPT`
6921            sym_link_file=`$BASENAME $SCRIPT`
6922            while test $COUNTER -lt 20; do
6923                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
6924                if test "x$ISLINK" == x; then
6925                    # This is not a symbolic link! We are done!
6926                    break
6927                fi
6928                # The link might be relative! We have to use cd to travel safely.
6929                cd $sym_link_dir
6930                # ... and we must get the to the absolute path, not one using symbolic links.
6931                cd `pwd -P`
6932                cd `$DIRNAME $ISLINK`
6933                sym_link_dir=`$THEPWDCMD`
6934                sym_link_file=`$BASENAME $ISLINK`
6935                let COUNTER=COUNTER+1
6936            done
6937            cd $STARTDIR
6938            SCRIPT=$sym_link_dir/$sym_link_file
6939        fi
6940    fi
6941
6942AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
6943
6944# Where is the source? It is located two levels above the configure script.
6945CURDIR="$PWD"
6946cd "$AUTOCONF_DIR/../.."
6947SRC_ROOT="`pwd`"
6948
6949if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6950  PATH_SEP=";"
6951
6952  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
6953  if test $SRC_ROOT_LENGTH -gt 100; then
6954      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
6955  fi
6956
6957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
6959$as_echo_n "checking cygwin release... " >&6; }
6960    CYGWIN_VERSION=`$UNAME -r`
6961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
6962$as_echo "$CYGWIN_VERSION" >&6; }
6963    WINDOWS_ENV_VENDOR='cygwin'
6964    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
6965
6966    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
6967    if test "x$CYGWIN_VERSION_OK" = x; then
6968      { $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
6969$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;}
6970      as_fn_error $? "Cannot continue" "$LINENO" 5
6971    fi
6972    if test "x$CYGPATH" = x; then
6973        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
6974    fi
6975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
6976$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
6977    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6978    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
6979    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
6980    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
6981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
6982$as_echo "$CYGWIN_ROOT_PATH" >&6; }
6983    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
6984    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
6985    if test "x$test_cygdrive_prefix" = x; then
6986        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
6987    fi
6988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6989    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
6990$as_echo_n "checking msys release... " >&6; }
6991    MSYS_VERSION=`$UNAME -r`
6992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
6993$as_echo "$MSYS_VERSION" >&6; }
6994
6995    WINDOWS_ENV_VENDOR='msys'
6996    WINDOWS_ENV_VERSION="$MSYS_VERSION"
6997
6998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
6999$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7000    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7001    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7002
7003  windows_path="$MSYS_ROOT_PATH"
7004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7005    unix_path=`$CYGPATH -u "$windows_path"`
7006    MSYS_ROOT_PATH="$unix_path"
7007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7009    MSYS_ROOT_PATH="$unix_path"
7010  fi
7011
7012    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7013$as_echo "$MSYS_ROOT_PATH" >&6; }
7014    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7015  else
7016    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7017  fi
7018
7019  # Test if windows or unix (cygwin/msys) find is first in path.
7020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7021$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7022  FIND_BINARY_OUTPUT=`find --version 2>&1`
7023  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7025$as_echo "unix style" >&6; }
7026  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7028$as_echo "Windows" >&6; }
7029    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7030$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7031    { $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
7032$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7033    as_fn_error $? "Cannot continue" "$LINENO" 5
7034  else
7035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7036$as_echo "unknown" >&6; }
7037    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7038$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7039  fi
7040
7041else
7042  PATH_SEP=":"
7043fi
7044
7045
7046
7047cd "$CURDIR"
7048
7049
7050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7051
7052  # Input might be given as Windows format, start by converting to
7053  # unix format.
7054  path="$SRC_ROOT"
7055  new_path=`$CYGPATH -u "$path"`
7056
7057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7060  # "foo.exe" is OK but "foo" is an error.
7061  #
7062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7063  # It is also a way to make sure we got the proper file name for the real test later on.
7064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7065  if test "x$test_shortpath" = x; then
7066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7067$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7068    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7069  fi
7070
7071  # Call helper function which possibly converts this using DOS-style short mode.
7072  # If so, the updated path is stored in $new_path.
7073
7074  input_path="$new_path"
7075  # Check if we need to convert this using DOS-style short mode. If the path
7076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7077  # take no chances and rewrite it.
7078  # Note: m4 eats our [], so we need to use [ and ] instead.
7079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7080  if test "x$has_forbidden_chars" != x; then
7081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7085      # Going to short mode and back again did indeed matter. Since short mode is
7086      # case insensitive, let's make it lowercase to improve readability.
7087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7088      # Now convert it back to Unix-stile (cygpath)
7089      input_path=`$CYGPATH -u "$shortmode_path"`
7090      new_path="$input_path"
7091    fi
7092  fi
7093
7094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7095  if test "x$test_cygdrive_prefix" = x; then
7096    # As a simple fix, exclude /usr/bin since it's not a real path.
7097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7099      # a path prefixed by /cygdrive for fixpath to work.
7100      new_path="$CYGWIN_ROOT_PATH$input_path"
7101    fi
7102  fi
7103
7104
7105  if test "x$path" != "x$new_path"; then
7106    SRC_ROOT="$new_path"
7107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7108$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7109  fi
7110
7111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7112
7113  path="$SRC_ROOT"
7114  has_colon=`$ECHO $path | $GREP ^.:`
7115  new_path="$path"
7116  if test "x$has_colon" = x; then
7117    # Not in mixed or Windows style, start by that.
7118    new_path=`cmd //c echo $path`
7119  fi
7120
7121
7122  input_path="$new_path"
7123  # Check if we need to convert this using DOS-style short mode. If the path
7124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7125  # take no chances and rewrite it.
7126  # Note: m4 eats our [], so we need to use [ and ] instead.
7127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7128  if test "x$has_forbidden_chars" != x; then
7129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7131  fi
7132
7133
7134  windows_path="$new_path"
7135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7136    unix_path=`$CYGPATH -u "$windows_path"`
7137    new_path="$unix_path"
7138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7140    new_path="$unix_path"
7141  fi
7142
7143  if test "x$path" != "x$new_path"; then
7144    SRC_ROOT="$new_path"
7145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7146$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7147  fi
7148
7149  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7151
7152  else
7153    # We're on a posix platform. Hooray! :)
7154    path="$SRC_ROOT"
7155
7156    if test ! -f "$path" && test ! -d "$path"; then
7157      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7158    fi
7159
7160    has_space=`$ECHO "$path" | $GREP " "`
7161    if test "x$has_space" != x; then
7162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7163$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7164      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7165    fi
7166  fi
7167
7168
7169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7170
7171  # Input might be given as Windows format, start by converting to
7172  # unix format.
7173  path="$CURDIR"
7174  new_path=`$CYGPATH -u "$path"`
7175
7176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7179  # "foo.exe" is OK but "foo" is an error.
7180  #
7181  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7182  # It is also a way to make sure we got the proper file name for the real test later on.
7183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7184  if test "x$test_shortpath" = x; then
7185    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7186$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7187    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7188  fi
7189
7190  # Call helper function which possibly converts this using DOS-style short mode.
7191  # If so, the updated path is stored in $new_path.
7192
7193  input_path="$new_path"
7194  # Check if we need to convert this using DOS-style short mode. If the path
7195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7196  # take no chances and rewrite it.
7197  # Note: m4 eats our [], so we need to use [ and ] instead.
7198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7199  if test "x$has_forbidden_chars" != x; then
7200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7204      # Going to short mode and back again did indeed matter. Since short mode is
7205      # case insensitive, let's make it lowercase to improve readability.
7206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7207      # Now convert it back to Unix-stile (cygpath)
7208      input_path=`$CYGPATH -u "$shortmode_path"`
7209      new_path="$input_path"
7210    fi
7211  fi
7212
7213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7214  if test "x$test_cygdrive_prefix" = x; then
7215    # As a simple fix, exclude /usr/bin since it's not a real path.
7216    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7218      # a path prefixed by /cygdrive for fixpath to work.
7219      new_path="$CYGWIN_ROOT_PATH$input_path"
7220    fi
7221  fi
7222
7223
7224  if test "x$path" != "x$new_path"; then
7225    CURDIR="$new_path"
7226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7227$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7228  fi
7229
7230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7231
7232  path="$CURDIR"
7233  has_colon=`$ECHO $path | $GREP ^.:`
7234  new_path="$path"
7235  if test "x$has_colon" = x; then
7236    # Not in mixed or Windows style, start by that.
7237    new_path=`cmd //c echo $path`
7238  fi
7239
7240
7241  input_path="$new_path"
7242  # Check if we need to convert this using DOS-style short mode. If the path
7243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7244  # take no chances and rewrite it.
7245  # Note: m4 eats our [], so we need to use [ and ] instead.
7246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7247  if test "x$has_forbidden_chars" != x; then
7248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7250  fi
7251
7252
7253  windows_path="$new_path"
7254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7255    unix_path=`$CYGPATH -u "$windows_path"`
7256    new_path="$unix_path"
7257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7259    new_path="$unix_path"
7260  fi
7261
7262  if test "x$path" != "x$new_path"; then
7263    CURDIR="$new_path"
7264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7265$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7266  fi
7267
7268  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7269  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7270
7271  else
7272    # We're on a posix platform. Hooray! :)
7273    path="$CURDIR"
7274
7275    if test ! -f "$path" && test ! -d "$path"; then
7276      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7277    fi
7278
7279    has_space=`$ECHO "$path" | $GREP " "`
7280    if test "x$has_space" != x; then
7281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7282$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7283      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7284    fi
7285  fi
7286
7287
7288if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7289    # Add extra search paths on solaris for utilities like ar and as etc...
7290    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7291fi
7292
7293# You can force the sys-root if the sys-root encoded into the cross compiler tools
7294# is not correct.
7295
7296# Check whether --with-sys-root was given.
7297if test "${with_sys_root+set}" = set; then :
7298  withval=$with_sys_root;
7299fi
7300
7301
7302if test "x$with_sys_root" != x; then
7303  SYS_ROOT=$with_sys_root
7304else
7305  SYS_ROOT=/
7306fi
7307
7308
7309
7310# Check whether --with-tools-dir was given.
7311if test "${with_tools_dir+set}" = set; then :
7312  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7313fi
7314
7315
7316
7317# Check whether --with-devkit was given.
7318if test "${with_devkit+set}" = set; then :
7319  withval=$with_devkit;
7320    if test "x$with_sys_root" != x; then
7321      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7322    fi
7323    if test "x$with_tools_dir" != x; then
7324      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7325    fi
7326    TOOLS_DIR=$with_devkit/bin
7327    SYS_ROOT=$with_devkit/$host_alias/libc
7328
7329fi
7330
7331
7332
7333
7334# Setup default logging of stdout and stderr to build.log in the output root.
7335BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7336BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7337BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7338
7339
7340
7341
7342
7343# These are needed to be able to create a configuration name (and thus the output directory)
7344
7345###############################################################################
7346#
7347# Check which variant of the JDK that we want to build.
7348# Currently we have:
7349#    normal:   standard edition
7350# but the custom make system may add other variants
7351#
7352# Effectively the JDK variant gives a name to a specific set of
7353# modules to compile into the JDK. In the future, these modules
7354# might even be Jigsaw modules.
7355#
7356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7357$as_echo_n "checking which variant of the JDK to build... " >&6; }
7358
7359# Check whether --with-jdk-variant was given.
7360if test "${with_jdk_variant+set}" = set; then :
7361  withval=$with_jdk_variant;
7362fi
7363
7364
7365if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7366    JDK_VARIANT="normal"
7367else
7368    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7369fi
7370
7371
7372
7373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7374$as_echo "$JDK_VARIANT" >&6; }
7375
7376
7377
7378###############################################################################
7379#
7380# Check which variants of the JVM that we want to build.
7381# Currently we have:
7382#    server: normal interpreter and a tiered C1/C2 compiler
7383#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7384#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7385#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7386#    zero: no machine code interpreter, no compiler
7387#    zeroshark: zero interpreter and shark/llvm compiler backend
7388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7389$as_echo_n "checking which variants of the JVM to build... " >&6; }
7390
7391# Check whether --with-jvm-variants was given.
7392if test "${with_jvm_variants+set}" = set; then :
7393  withval=$with_jvm_variants;
7394fi
7395
7396
7397if test "x$with_jvm_variants" = x; then
7398     with_jvm_variants="server"
7399fi
7400
7401JVM_VARIANTS=",$with_jvm_variants,"
7402TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7403
7404if test "x$TEST_VARIANTS" != "x,"; then
7405   as_fn_error $? "The available JVM variants are: server, client, kernel, zero, zeroshark" "$LINENO" 5
7406fi
7407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7408$as_echo "$with_jvm_variants" >&6; }
7409
7410JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7411JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7412JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7413JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7414JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7415
7416if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7417    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7418        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7419    fi
7420fi
7421if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7422    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7423        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7424    fi
7425fi
7426
7427# Replace the commas with AND for use in the build directory name.
7428ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7429COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7430if test "x$COUNT_VARIANTS" != "x,1"; then
7431    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7432else
7433    BUILDING_MULTIPLE_JVM_VARIANTS=no
7434fi
7435
7436
7437
7438
7439
7440
7441
7442
7443if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7444   MACOSX_UNIVERSAL="true"
7445fi
7446
7447
7448
7449
7450
7451###############################################################################
7452#
7453# Set the debug level
7454#    release: no debug information, all optimizations, no asserts.
7455#    fastdebug: debug information (-g), all optimizations, all asserts
7456#    slowdebug: debug information (-g), no optimizations, all asserts
7457#
7458DEBUG_LEVEL="release"
7459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7460$as_echo_n "checking which debug level to use... " >&6; }
7461# Check whether --enable-debug was given.
7462if test "${enable_debug+set}" = set; then :
7463  enableval=$enable_debug;
7464        ENABLE_DEBUG="${enableval}"
7465        DEBUG_LEVEL="fastdebug"
7466
7467else
7468  ENABLE_DEBUG="no"
7469fi
7470
7471
7472
7473# Check whether --with-debug-level was given.
7474if test "${with_debug_level+set}" = set; then :
7475  withval=$with_debug_level;
7476        DEBUG_LEVEL="${withval}"
7477        if test "x$ENABLE_DEBUG" = xyes; then
7478			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7479        fi
7480
7481fi
7482
7483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7484$as_echo "$DEBUG_LEVEL" >&6; }
7485
7486if test "x$DEBUG_LEVEL" != xrelease && \
7487   test "x$DEBUG_LEVEL" != xfastdebug && \
7488   test "x$DEBUG_LEVEL" != xslowdebug; then
7489   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7490fi
7491
7492
7493###############################################################################
7494#
7495# Setup legacy vars/targets and new vars to deal with different debug levels.
7496#
7497
7498case $DEBUG_LEVEL in
7499      release )
7500          VARIANT="OPT"
7501          FASTDEBUG="false"
7502          DEBUG_CLASSFILES="false"
7503          BUILD_VARIANT_RELEASE=""
7504          HOTSPOT_DEBUG_LEVEL="product"
7505          HOTSPOT_EXPORT="product"
7506           ;;
7507      fastdebug )
7508          VARIANT="DBG"
7509          FASTDEBUG="true"
7510          DEBUG_CLASSFILES="true"
7511          BUILD_VARIANT_RELEASE="-fastdebug"
7512          HOTSPOT_DEBUG_LEVEL="fastdebug"
7513          HOTSPOT_EXPORT="fastdebug"
7514           ;;
7515      slowdebug )
7516          VARIANT="DBG"
7517          FASTDEBUG="false"
7518          DEBUG_CLASSFILES="true"
7519          BUILD_VARIANT_RELEASE="-debug"
7520          HOTSPOT_DEBUG_LEVEL="jvmg"
7521          HOTSPOT_EXPORT="debug"
7522           ;;
7523esac
7524
7525#####
7526# Generate the legacy makefile targets for hotspot.
7527# The hotspot api for selecting the build artifacts, really, needs to be improved.
7528#
7529HOTSPOT_TARGET=""
7530
7531if test "x$JVM_VARIANT_SERVER" = xtrue; then
7532    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7533fi
7534
7535if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7536    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7537fi
7538
7539if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7540    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7541fi
7542
7543if test "x$JVM_VARIANT_ZERO" = xtrue; then
7544    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7545fi
7546
7547if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7548    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7549fi
7550
7551HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7552
7553# On Macosx universal binaries are produced, but they only contain
7554# 64 bit intel. This invalidates control of which jvms are built
7555# from configure, but only server is valid anyway. Fix this
7556# when hotspot makefiles are rewritten.
7557if test "x$MACOSX_UNIVERSAL" = xtrue; then
7558    HOTSPOT_TARGET=universal_product
7559fi
7560
7561#####
7562
7563
7564
7565
7566
7567
7568
7569
7570# With basic setup done, call the custom early hook.
7571
7572
7573# To properly create a configuration name, we need to have the OpenJDK target
7574# and options (variants and debug level) parsed.
7575
7576
7577
7578# Check whether --with-conf-name was given.
7579if test "${with_conf_name+set}" = set; then :
7580  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7581fi
7582
7583
7584# Test from where we are running configure, in or outside of src root.
7585# To enable comparison of directories, CURDIR needs to be symlink free
7586# just like SRC_ROOT already is
7587NOSYM_CURDIR="$CURDIR"
7588
7589    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7590        # Follow a chain of symbolic links. Use readlink
7591        # where it exists, else fall back to horribly
7592        # complicated shell code.
7593        if test "x$READLINK_TESTED" != yes; then
7594            # On MacOSX there is a readlink tool with a different
7595            # purpose than the GNU readlink tool. Check the found readlink.
7596            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
7597            if test "x$ISGNU" = x; then
7598                 # A readlink that we do not know how to use.
7599                 # Are there other non-GNU readlinks out there?
7600                 READLINK_TESTED=yes
7601                 READLINK=
7602            fi
7603        fi
7604
7605        if test "x$READLINK" != x; then
7606            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7607        else
7608            STARTDIR=$PWD
7609            COUNTER=0
7610            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7611            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7612            while test $COUNTER -lt 20; do
7613                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7614                if test "x$ISLINK" == x; then
7615                    # This is not a symbolic link! We are done!
7616                    break
7617                fi
7618                # The link might be relative! We have to use cd to travel safely.
7619                cd $sym_link_dir
7620                # ... and we must get the to the absolute path, not one using symbolic links.
7621                cd `pwd -P`
7622                cd `$DIRNAME $ISLINK`
7623                sym_link_dir=`$THEPWDCMD`
7624                sym_link_file=`$BASENAME $ISLINK`
7625                let COUNTER=COUNTER+1
7626            done
7627            cd $STARTDIR
7628            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7629        fi
7630    fi
7631
7632if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7633        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7634        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7635    # We are running configure from the src root.
7636    # Create a default ./build/target-variant-debuglevel output root.
7637    if test "x${CONF_NAME}" = x; then
7638        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7639    fi
7640    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7641    $MKDIR -p "$OUTPUT_ROOT"
7642    if test ! -d "$OUTPUT_ROOT"; then
7643        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7644    fi
7645else
7646    # We are running configure from outside of the src dir.
7647    # Then use the current directory as output dir!
7648    # If configuration is situated in normal build directory, just use the build
7649    # directory name as configuration name, otherwise use the complete path.
7650    if test "x${CONF_NAME}" = x; then
7651        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7652    fi
7653    OUTPUT_ROOT="$CURDIR"
7654
7655    # WARNING: This might be a bad thing to do. You need to be sure you want to
7656    # have a configuration in this directory. Do some sanity checks!
7657
7658    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7659      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7660      # other files
7661      files_present=`$LS $OUTPUT_ROOT`
7662      # Configure has already touched config.log and confdefs.h in the current dir when this check
7663      # is performed.
7664      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7665                                             | $TR -d '\n'`
7666      if test "x$filtered_files" != x; then
7667        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7668$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7669        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7670$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7671        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7672$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7673        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7674$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7675        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7676$as_echo "$as_me: seriously mess up just about everything." >&6;}
7677        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7678$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7679        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7680$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7681        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7682      fi
7683    fi
7684fi
7685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7686$as_echo_n "checking what configuration name to use... " >&6; }
7687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7688$as_echo "$CONF_NAME" >&6; }
7689
7690
7691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7692
7693  # Input might be given as Windows format, start by converting to
7694  # unix format.
7695  path="$OUTPUT_ROOT"
7696  new_path=`$CYGPATH -u "$path"`
7697
7698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7701  # "foo.exe" is OK but "foo" is an error.
7702  #
7703  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7704  # It is also a way to make sure we got the proper file name for the real test later on.
7705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7706  if test "x$test_shortpath" = x; then
7707    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7708$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7709    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7710  fi
7711
7712  # Call helper function which possibly converts this using DOS-style short mode.
7713  # If so, the updated path is stored in $new_path.
7714
7715  input_path="$new_path"
7716  # Check if we need to convert this using DOS-style short mode. If the path
7717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7718  # take no chances and rewrite it.
7719  # Note: m4 eats our [], so we need to use [ and ] instead.
7720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7721  if test "x$has_forbidden_chars" != x; then
7722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7726      # Going to short mode and back again did indeed matter. Since short mode is
7727      # case insensitive, let's make it lowercase to improve readability.
7728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7729      # Now convert it back to Unix-stile (cygpath)
7730      input_path=`$CYGPATH -u "$shortmode_path"`
7731      new_path="$input_path"
7732    fi
7733  fi
7734
7735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7736  if test "x$test_cygdrive_prefix" = x; then
7737    # As a simple fix, exclude /usr/bin since it's not a real path.
7738    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7740      # a path prefixed by /cygdrive for fixpath to work.
7741      new_path="$CYGWIN_ROOT_PATH$input_path"
7742    fi
7743  fi
7744
7745
7746  if test "x$path" != "x$new_path"; then
7747    OUTPUT_ROOT="$new_path"
7748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7749$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7750  fi
7751
7752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7753
7754  path="$OUTPUT_ROOT"
7755  has_colon=`$ECHO $path | $GREP ^.:`
7756  new_path="$path"
7757  if test "x$has_colon" = x; then
7758    # Not in mixed or Windows style, start by that.
7759    new_path=`cmd //c echo $path`
7760  fi
7761
7762
7763  input_path="$new_path"
7764  # Check if we need to convert this using DOS-style short mode. If the path
7765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7766  # take no chances and rewrite it.
7767  # Note: m4 eats our [], so we need to use [ and ] instead.
7768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7769  if test "x$has_forbidden_chars" != x; then
7770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7772  fi
7773
7774
7775  windows_path="$new_path"
7776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7777    unix_path=`$CYGPATH -u "$windows_path"`
7778    new_path="$unix_path"
7779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7781    new_path="$unix_path"
7782  fi
7783
7784  if test "x$path" != "x$new_path"; then
7785    OUTPUT_ROOT="$new_path"
7786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7787$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7788  fi
7789
7790  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7791  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7792
7793  else
7794    # We're on a posix platform. Hooray! :)
7795    path="$OUTPUT_ROOT"
7796
7797    if test ! -f "$path" && test ! -d "$path"; then
7798      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7799    fi
7800
7801    has_space=`$ECHO "$path" | $GREP " "`
7802    if test "x$has_space" != x; then
7803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7804$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7805      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7806    fi
7807  fi
7808
7809
7810SPEC=$OUTPUT_ROOT/spec.gmk
7811
7812CONF_NAME=$CONF_NAME
7813
7814OUTPUT_ROOT=$OUTPUT_ROOT
7815
7816
7817# Most of the probed defines are put into config.h
7818ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7819
7820# The spec.gmk file contains all variables for the make system.
7821ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7822
7823# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7824ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7825
7826# The bootcycle-spec.gmk file contains support for boot cycle builds.
7827ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7828
7829# The compare.sh is used to compare the build output to other builds.
7830ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7831
7832# Spec.sh is currently used by compare-objects.sh
7833ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
7834
7835# The generated Makefile knows where the spec.gmk is and where the source is.
7836# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
7837# which will look for generated configurations
7838ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
7839
7840
7841# Save the arguments given to us
7842echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
7843
7844
7845# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
7846
7847    for ac_prog in apt-get yum port pkgutil pkgadd
7848do
7849  # Extract the first word of "$ac_prog", so it can be a program name with args.
7850set dummy $ac_prog; ac_word=$2
7851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7852$as_echo_n "checking for $ac_word... " >&6; }
7853if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
7854  $as_echo_n "(cached) " >&6
7855else
7856  if test -n "$PKGHANDLER"; then
7857  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
7858else
7859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7860for as_dir in $PATH
7861do
7862  IFS=$as_save_IFS
7863  test -z "$as_dir" && as_dir=.
7864    for ac_exec_ext in '' $ac_executable_extensions; do
7865  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7866    ac_cv_prog_PKGHANDLER="$ac_prog"
7867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7868    break 2
7869  fi
7870done
7871  done
7872IFS=$as_save_IFS
7873
7874fi
7875fi
7876PKGHANDLER=$ac_cv_prog_PKGHANDLER
7877if test -n "$PKGHANDLER"; then
7878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
7879$as_echo "$PKGHANDLER" >&6; }
7880else
7881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7882$as_echo "no" >&6; }
7883fi
7884
7885
7886  test -n "$PKGHANDLER" && break
7887done
7888
7889
7890
7891# Setup tools that requires more complex handling, or that is not needed by the configure script.
7892
7893
7894  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
7895  if test "x$MAKE" != x; then
7896    # User has supplied a make, test it.
7897    if test ! -f "$MAKE"; then
7898      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
7899    fi
7900
7901  MAKE_CANDIDATE=""$MAKE""
7902  DESCRIPTION="user supplied MAKE=$MAKE"
7903  if test "x$MAKE_CANDIDATE" != x; then
7904    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7905$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7906    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7907    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7908    if test "x$IS_GNU_MAKE" = x; then
7909      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7910$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7911    else
7912      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7913      if test "x$IS_MODERN_MAKE" = x; then
7914        { $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
7915$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;}
7916      else
7917        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7918          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7919            MAKE_EXPECTED_ENV='cygwin'
7920          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7921            MAKE_EXPECTED_ENV='msys'
7922          else
7923            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
7924          fi
7925          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7926          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7927        else
7928          # Not relevant for non-Windows
7929          IS_MAKE_CORRECT_ENV=true
7930        fi
7931        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7932          { $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
7933$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;}
7934        else
7935          FOUND_MAKE=$MAKE_CANDIDATE
7936
7937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7938
7939  # First separate the path from the arguments. This will split at the first
7940  # space.
7941  complete="$FOUND_MAKE"
7942  path="${complete%% *}"
7943  tmp="$complete EOL"
7944  arguments="${tmp#* }"
7945
7946  # Input might be given as Windows format, start by converting to
7947  # unix format.
7948  new_path=`$CYGPATH -u "$path"`
7949
7950  # Now try to locate executable using which
7951  new_path=`$WHICH "$new_path" 2> /dev/null`
7952  # bat and cmd files are not always considered executable in cygwin causing which
7953  # to not find them
7954  if test "x$new_path" = x \
7955           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7956           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7957    new_path=`$CYGPATH -u "$path"`
7958  fi
7959  if test "x$new_path" = x; then
7960    # Oops. Which didn't find the executable.
7961    # The splitting of arguments from the executable at a space might have been incorrect,
7962    # since paths with space are more likely in Windows. Give it another try with the whole
7963    # argument.
7964    path="$complete"
7965    arguments="EOL"
7966    new_path=`$CYGPATH -u "$path"`
7967    new_path=`$WHICH "$new_path" 2> /dev/null`
7968    # bat and cmd files are not always considered executable in cygwin causing which
7969    # to not find them
7970    if test "x$new_path" = x \
7971             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7972             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7973      new_path=`$CYGPATH -u "$path"`
7974    fi
7975    if test "x$new_path" = x; then
7976      # It's still not found. Now this is an unrecoverable error.
7977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7978$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7979      has_space=`$ECHO "$complete" | $GREP " "`
7980      if test "x$has_space" != x; then
7981        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7982$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7983      fi
7984      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
7985    fi
7986  fi
7987
7988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7991  # "foo.exe" is OK but "foo" is an error.
7992  #
7993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7994  # It is also a way to make sure we got the proper file name for the real test later on.
7995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7996  if test "x$test_shortpath" = x; then
7997    # Short path failed, file does not exist as specified.
7998    # Try adding .exe or .cmd
7999    if test -f "${new_path}.exe"; then
8000       input_to_shortpath="${new_path}.exe"
8001    elif test -f "${new_path}.cmd"; then
8002       input_to_shortpath="${new_path}.cmd"
8003    else
8004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8005$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8006      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8007$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8008      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8009    fi
8010  else
8011    input_to_shortpath="$new_path"
8012  fi
8013
8014  # Call helper function which possibly converts this using DOS-style short mode.
8015  # If so, the updated path is stored in $new_path.
8016  new_path="$input_to_shortpath"
8017
8018  input_path="$input_to_shortpath"
8019  # Check if we need to convert this using DOS-style short mode. If the path
8020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8021  # take no chances and rewrite it.
8022  # Note: m4 eats our [], so we need to use [ and ] instead.
8023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8024  if test "x$has_forbidden_chars" != x; then
8025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8029      # Going to short mode and back again did indeed matter. Since short mode is
8030      # case insensitive, let's make it lowercase to improve readability.
8031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8032      # Now convert it back to Unix-stile (cygpath)
8033      input_path=`$CYGPATH -u "$shortmode_path"`
8034      new_path="$input_path"
8035    fi
8036  fi
8037
8038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8039  if test "x$test_cygdrive_prefix" = x; then
8040    # As a simple fix, exclude /usr/bin since it's not a real path.
8041    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8043      # a path prefixed by /cygdrive for fixpath to work.
8044      new_path="$CYGWIN_ROOT_PATH$input_path"
8045    fi
8046  fi
8047
8048  # remove trailing .exe if any
8049  new_path="${new_path/%.exe/}"
8050
8051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8052
8053  # First separate the path from the arguments. This will split at the first
8054  # space.
8055  complete="$FOUND_MAKE"
8056  path="${complete%% *}"
8057  tmp="$complete EOL"
8058  arguments="${tmp#* }"
8059
8060  # Input might be given as Windows format, start by converting to
8061  # unix format.
8062  new_path="$path"
8063
8064  windows_path="$new_path"
8065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8066    unix_path=`$CYGPATH -u "$windows_path"`
8067    new_path="$unix_path"
8068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8070    new_path="$unix_path"
8071  fi
8072
8073
8074  # Now try to locate executable using which
8075  new_path=`$WHICH "$new_path" 2> /dev/null`
8076
8077  if test "x$new_path" = x; then
8078    # Oops. Which didn't find the executable.
8079    # The splitting of arguments from the executable at a space might have been incorrect,
8080    # since paths with space are more likely in Windows. Give it another try with the whole
8081    # argument.
8082    path="$complete"
8083    arguments="EOL"
8084    new_path="$path"
8085
8086  windows_path="$new_path"
8087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8088    unix_path=`$CYGPATH -u "$windows_path"`
8089    new_path="$unix_path"
8090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8092    new_path="$unix_path"
8093  fi
8094
8095
8096    new_path=`$WHICH "$new_path" 2> /dev/null`
8097
8098    if test "x$new_path" = x; then
8099      # It's still not found. Now this is an unrecoverable error.
8100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8101$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8102      has_space=`$ECHO "$complete" | $GREP " "`
8103      if test "x$has_space" != x; then
8104        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8105$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8106      fi
8107      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8108    fi
8109  fi
8110
8111  # Now new_path has a complete unix path to the binary
8112  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8113    # Keep paths in /bin as-is, but remove trailing .exe if any
8114    new_path="${new_path/%.exe/}"
8115    # Do not save /bin paths to all_fixpath_prefixes!
8116  else
8117    # Not in mixed or Windows style, start by that.
8118    new_path=`cmd //c echo $new_path`
8119
8120  input_path="$new_path"
8121  # Check if we need to convert this using DOS-style short mode. If the path
8122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8123  # take no chances and rewrite it.
8124  # Note: m4 eats our [], so we need to use [ and ] instead.
8125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8126  if test "x$has_forbidden_chars" != x; then
8127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8129  fi
8130
8131    # Output is in $new_path
8132
8133  windows_path="$new_path"
8134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8135    unix_path=`$CYGPATH -u "$windows_path"`
8136    new_path="$unix_path"
8137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8139    new_path="$unix_path"
8140  fi
8141
8142    # remove trailing .exe if any
8143    new_path="${new_path/%.exe/}"
8144
8145    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8146    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8147  fi
8148
8149  else
8150    # We're on a posix platform. Hooray! :)
8151    # First separate the path from the arguments. This will split at the first
8152    # space.
8153    complete="$FOUND_MAKE"
8154    path="${complete%% *}"
8155    tmp="$complete EOL"
8156    arguments="${tmp#* }"
8157
8158    new_path=`$WHICH $path 2> /dev/null`
8159    if test "x$new_path" = x; then
8160      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8161      if test "x$is_absolute_path" != x; then
8162        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8163$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8164        new_path="$path"
8165      else
8166        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8167$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8168        has_space=`$ECHO "$complete" | $GREP " "`
8169        if test "x$has_space" != x; then
8170          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8171$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8172        fi
8173        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8174      fi
8175    fi
8176  fi
8177
8178  # Now join together the path and the arguments once again
8179  if test "x$arguments" != xEOL; then
8180      new_complete="$new_path ${arguments% *}"
8181  else
8182      new_complete="$new_path"
8183  fi
8184
8185  if test "x$complete" != "x$new_complete"; then
8186    FOUND_MAKE="$new_complete"
8187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8188$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8189  fi
8190
8191        fi
8192      fi
8193    fi
8194  fi
8195
8196    if test "x$FOUND_MAKE" = x; then
8197      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8198    fi
8199  else
8200    # Try our hardest to locate a correct version of GNU make
8201    for ac_prog in gmake
8202do
8203  # Extract the first word of "$ac_prog", so it can be a program name with args.
8204set dummy $ac_prog; ac_word=$2
8205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8206$as_echo_n "checking for $ac_word... " >&6; }
8207if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8208  $as_echo_n "(cached) " >&6
8209else
8210  case $CHECK_GMAKE in
8211  [\\/]* | ?:[\\/]*)
8212  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8213  ;;
8214  *)
8215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8216for as_dir in $PATH
8217do
8218  IFS=$as_save_IFS
8219  test -z "$as_dir" && as_dir=.
8220    for ac_exec_ext in '' $ac_executable_extensions; do
8221  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8222    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8224    break 2
8225  fi
8226done
8227  done
8228IFS=$as_save_IFS
8229
8230  ;;
8231esac
8232fi
8233CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8234if test -n "$CHECK_GMAKE"; then
8235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8236$as_echo "$CHECK_GMAKE" >&6; }
8237else
8238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8239$as_echo "no" >&6; }
8240fi
8241
8242
8243  test -n "$CHECK_GMAKE" && break
8244done
8245
8246
8247  MAKE_CANDIDATE=""$CHECK_GMAKE""
8248  DESCRIPTION="gmake in PATH"
8249  if test "x$MAKE_CANDIDATE" != x; then
8250    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8251$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8252    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8253    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8254    if test "x$IS_GNU_MAKE" = x; then
8255      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8256$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8257    else
8258      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8259      if test "x$IS_MODERN_MAKE" = x; then
8260        { $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
8261$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;}
8262      else
8263        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8264          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8265            MAKE_EXPECTED_ENV='cygwin'
8266          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8267            MAKE_EXPECTED_ENV='msys'
8268          else
8269            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8270          fi
8271          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8272          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8273        else
8274          # Not relevant for non-Windows
8275          IS_MAKE_CORRECT_ENV=true
8276        fi
8277        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8278          { $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
8279$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;}
8280        else
8281          FOUND_MAKE=$MAKE_CANDIDATE
8282
8283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8284
8285  # First separate the path from the arguments. This will split at the first
8286  # space.
8287  complete="$FOUND_MAKE"
8288  path="${complete%% *}"
8289  tmp="$complete EOL"
8290  arguments="${tmp#* }"
8291
8292  # Input might be given as Windows format, start by converting to
8293  # unix format.
8294  new_path=`$CYGPATH -u "$path"`
8295
8296  # Now try to locate executable using which
8297  new_path=`$WHICH "$new_path" 2> /dev/null`
8298  # bat and cmd files are not always considered executable in cygwin causing which
8299  # to not find them
8300  if test "x$new_path" = x \
8301           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8302           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8303    new_path=`$CYGPATH -u "$path"`
8304  fi
8305  if test "x$new_path" = x; then
8306    # Oops. Which didn't find the executable.
8307    # The splitting of arguments from the executable at a space might have been incorrect,
8308    # since paths with space are more likely in Windows. Give it another try with the whole
8309    # argument.
8310    path="$complete"
8311    arguments="EOL"
8312    new_path=`$CYGPATH -u "$path"`
8313    new_path=`$WHICH "$new_path" 2> /dev/null`
8314    # bat and cmd files are not always considered executable in cygwin causing which
8315    # to not find them
8316    if test "x$new_path" = x \
8317             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8318             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8319      new_path=`$CYGPATH -u "$path"`
8320    fi
8321    if test "x$new_path" = x; then
8322      # It's still not found. Now this is an unrecoverable error.
8323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8324$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8325      has_space=`$ECHO "$complete" | $GREP " "`
8326      if test "x$has_space" != x; then
8327        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8328$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8329      fi
8330      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8331    fi
8332  fi
8333
8334  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8335  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8336  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8337  # "foo.exe" is OK but "foo" is an error.
8338  #
8339  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8340  # It is also a way to make sure we got the proper file name for the real test later on.
8341  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8342  if test "x$test_shortpath" = x; then
8343    # Short path failed, file does not exist as specified.
8344    # Try adding .exe or .cmd
8345    if test -f "${new_path}.exe"; then
8346       input_to_shortpath="${new_path}.exe"
8347    elif test -f "${new_path}.cmd"; then
8348       input_to_shortpath="${new_path}.cmd"
8349    else
8350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8351$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8352      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8353$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8354      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8355    fi
8356  else
8357    input_to_shortpath="$new_path"
8358  fi
8359
8360  # Call helper function which possibly converts this using DOS-style short mode.
8361  # If so, the updated path is stored in $new_path.
8362  new_path="$input_to_shortpath"
8363
8364  input_path="$input_to_shortpath"
8365  # Check if we need to convert this using DOS-style short mode. If the path
8366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8367  # take no chances and rewrite it.
8368  # Note: m4 eats our [], so we need to use [ and ] instead.
8369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8370  if test "x$has_forbidden_chars" != x; then
8371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8375      # Going to short mode and back again did indeed matter. Since short mode is
8376      # case insensitive, let's make it lowercase to improve readability.
8377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8378      # Now convert it back to Unix-stile (cygpath)
8379      input_path=`$CYGPATH -u "$shortmode_path"`
8380      new_path="$input_path"
8381    fi
8382  fi
8383
8384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8385  if test "x$test_cygdrive_prefix" = x; then
8386    # As a simple fix, exclude /usr/bin since it's not a real path.
8387    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8389      # a path prefixed by /cygdrive for fixpath to work.
8390      new_path="$CYGWIN_ROOT_PATH$input_path"
8391    fi
8392  fi
8393
8394  # remove trailing .exe if any
8395  new_path="${new_path/%.exe/}"
8396
8397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8398
8399  # First separate the path from the arguments. This will split at the first
8400  # space.
8401  complete="$FOUND_MAKE"
8402  path="${complete%% *}"
8403  tmp="$complete EOL"
8404  arguments="${tmp#* }"
8405
8406  # Input might be given as Windows format, start by converting to
8407  # unix format.
8408  new_path="$path"
8409
8410  windows_path="$new_path"
8411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8412    unix_path=`$CYGPATH -u "$windows_path"`
8413    new_path="$unix_path"
8414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8416    new_path="$unix_path"
8417  fi
8418
8419
8420  # Now try to locate executable using which
8421  new_path=`$WHICH "$new_path" 2> /dev/null`
8422
8423  if test "x$new_path" = x; then
8424    # Oops. Which didn't find the executable.
8425    # The splitting of arguments from the executable at a space might have been incorrect,
8426    # since paths with space are more likely in Windows. Give it another try with the whole
8427    # argument.
8428    path="$complete"
8429    arguments="EOL"
8430    new_path="$path"
8431
8432  windows_path="$new_path"
8433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8434    unix_path=`$CYGPATH -u "$windows_path"`
8435    new_path="$unix_path"
8436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8438    new_path="$unix_path"
8439  fi
8440
8441
8442    new_path=`$WHICH "$new_path" 2> /dev/null`
8443
8444    if test "x$new_path" = x; then
8445      # It's still not found. Now this is an unrecoverable error.
8446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8447$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8448      has_space=`$ECHO "$complete" | $GREP " "`
8449      if test "x$has_space" != x; then
8450        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8451$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8452      fi
8453      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8454    fi
8455  fi
8456
8457  # Now new_path has a complete unix path to the binary
8458  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8459    # Keep paths in /bin as-is, but remove trailing .exe if any
8460    new_path="${new_path/%.exe/}"
8461    # Do not save /bin paths to all_fixpath_prefixes!
8462  else
8463    # Not in mixed or Windows style, start by that.
8464    new_path=`cmd //c echo $new_path`
8465
8466  input_path="$new_path"
8467  # Check if we need to convert this using DOS-style short mode. If the path
8468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8469  # take no chances and rewrite it.
8470  # Note: m4 eats our [], so we need to use [ and ] instead.
8471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8472  if test "x$has_forbidden_chars" != x; then
8473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8475  fi
8476
8477    # Output is in $new_path
8478
8479  windows_path="$new_path"
8480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8481    unix_path=`$CYGPATH -u "$windows_path"`
8482    new_path="$unix_path"
8483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8485    new_path="$unix_path"
8486  fi
8487
8488    # remove trailing .exe if any
8489    new_path="${new_path/%.exe/}"
8490
8491    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8492    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8493  fi
8494
8495  else
8496    # We're on a posix platform. Hooray! :)
8497    # First separate the path from the arguments. This will split at the first
8498    # space.
8499    complete="$FOUND_MAKE"
8500    path="${complete%% *}"
8501    tmp="$complete EOL"
8502    arguments="${tmp#* }"
8503
8504    new_path=`$WHICH $path 2> /dev/null`
8505    if test "x$new_path" = x; then
8506      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8507      if test "x$is_absolute_path" != x; then
8508        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8509$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8510        new_path="$path"
8511      else
8512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8513$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8514        has_space=`$ECHO "$complete" | $GREP " "`
8515        if test "x$has_space" != x; then
8516          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8517$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8518        fi
8519        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8520      fi
8521    fi
8522  fi
8523
8524  # Now join together the path and the arguments once again
8525  if test "x$arguments" != xEOL; then
8526      new_complete="$new_path ${arguments% *}"
8527  else
8528      new_complete="$new_path"
8529  fi
8530
8531  if test "x$complete" != "x$new_complete"; then
8532    FOUND_MAKE="$new_complete"
8533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8534$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8535  fi
8536
8537        fi
8538      fi
8539    fi
8540  fi
8541
8542
8543    if test "x$FOUND_MAKE" = x; then
8544      for ac_prog in make
8545do
8546  # Extract the first word of "$ac_prog", so it can be a program name with args.
8547set dummy $ac_prog; ac_word=$2
8548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8549$as_echo_n "checking for $ac_word... " >&6; }
8550if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8551  $as_echo_n "(cached) " >&6
8552else
8553  case $CHECK_MAKE in
8554  [\\/]* | ?:[\\/]*)
8555  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8556  ;;
8557  *)
8558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8559for as_dir in $PATH
8560do
8561  IFS=$as_save_IFS
8562  test -z "$as_dir" && as_dir=.
8563    for ac_exec_ext in '' $ac_executable_extensions; do
8564  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8565    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8567    break 2
8568  fi
8569done
8570  done
8571IFS=$as_save_IFS
8572
8573  ;;
8574esac
8575fi
8576CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8577if test -n "$CHECK_MAKE"; then
8578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8579$as_echo "$CHECK_MAKE" >&6; }
8580else
8581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8582$as_echo "no" >&6; }
8583fi
8584
8585
8586  test -n "$CHECK_MAKE" && break
8587done
8588
8589
8590  MAKE_CANDIDATE=""$CHECK_MAKE""
8591  DESCRIPTION="make in PATH"
8592  if test "x$MAKE_CANDIDATE" != x; then
8593    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8594$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8595    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8596    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8597    if test "x$IS_GNU_MAKE" = x; then
8598      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8599$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8600    else
8601      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8602      if test "x$IS_MODERN_MAKE" = x; then
8603        { $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
8604$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;}
8605      else
8606        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8607          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8608            MAKE_EXPECTED_ENV='cygwin'
8609          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8610            MAKE_EXPECTED_ENV='msys'
8611          else
8612            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8613          fi
8614          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8615          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8616        else
8617          # Not relevant for non-Windows
8618          IS_MAKE_CORRECT_ENV=true
8619        fi
8620        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8621          { $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
8622$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;}
8623        else
8624          FOUND_MAKE=$MAKE_CANDIDATE
8625
8626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8627
8628  # First separate the path from the arguments. This will split at the first
8629  # space.
8630  complete="$FOUND_MAKE"
8631  path="${complete%% *}"
8632  tmp="$complete EOL"
8633  arguments="${tmp#* }"
8634
8635  # Input might be given as Windows format, start by converting to
8636  # unix format.
8637  new_path=`$CYGPATH -u "$path"`
8638
8639  # Now try to locate executable using which
8640  new_path=`$WHICH "$new_path" 2> /dev/null`
8641  # bat and cmd files are not always considered executable in cygwin causing which
8642  # to not find them
8643  if test "x$new_path" = x \
8644           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8645           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8646    new_path=`$CYGPATH -u "$path"`
8647  fi
8648  if test "x$new_path" = x; then
8649    # Oops. Which didn't find the executable.
8650    # The splitting of arguments from the executable at a space might have been incorrect,
8651    # since paths with space are more likely in Windows. Give it another try with the whole
8652    # argument.
8653    path="$complete"
8654    arguments="EOL"
8655    new_path=`$CYGPATH -u "$path"`
8656    new_path=`$WHICH "$new_path" 2> /dev/null`
8657    # bat and cmd files are not always considered executable in cygwin causing which
8658    # to not find them
8659    if test "x$new_path" = x \
8660             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8661             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8662      new_path=`$CYGPATH -u "$path"`
8663    fi
8664    if test "x$new_path" = x; then
8665      # It's still not found. Now this is an unrecoverable error.
8666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8667$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8668      has_space=`$ECHO "$complete" | $GREP " "`
8669      if test "x$has_space" != x; then
8670        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8671$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8672      fi
8673      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8674    fi
8675  fi
8676
8677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8680  # "foo.exe" is OK but "foo" is an error.
8681  #
8682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8683  # It is also a way to make sure we got the proper file name for the real test later on.
8684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8685  if test "x$test_shortpath" = x; then
8686    # Short path failed, file does not exist as specified.
8687    # Try adding .exe or .cmd
8688    if test -f "${new_path}.exe"; then
8689       input_to_shortpath="${new_path}.exe"
8690    elif test -f "${new_path}.cmd"; then
8691       input_to_shortpath="${new_path}.cmd"
8692    else
8693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8694$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8695      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8696$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8697      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8698    fi
8699  else
8700    input_to_shortpath="$new_path"
8701  fi
8702
8703  # Call helper function which possibly converts this using DOS-style short mode.
8704  # If so, the updated path is stored in $new_path.
8705  new_path="$input_to_shortpath"
8706
8707  input_path="$input_to_shortpath"
8708  # Check if we need to convert this using DOS-style short mode. If the path
8709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8710  # take no chances and rewrite it.
8711  # Note: m4 eats our [], so we need to use [ and ] instead.
8712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8713  if test "x$has_forbidden_chars" != x; then
8714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8718      # Going to short mode and back again did indeed matter. Since short mode is
8719      # case insensitive, let's make it lowercase to improve readability.
8720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8721      # Now convert it back to Unix-stile (cygpath)
8722      input_path=`$CYGPATH -u "$shortmode_path"`
8723      new_path="$input_path"
8724    fi
8725  fi
8726
8727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8728  if test "x$test_cygdrive_prefix" = x; then
8729    # As a simple fix, exclude /usr/bin since it's not a real path.
8730    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8732      # a path prefixed by /cygdrive for fixpath to work.
8733      new_path="$CYGWIN_ROOT_PATH$input_path"
8734    fi
8735  fi
8736
8737  # remove trailing .exe if any
8738  new_path="${new_path/%.exe/}"
8739
8740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8741
8742  # First separate the path from the arguments. This will split at the first
8743  # space.
8744  complete="$FOUND_MAKE"
8745  path="${complete%% *}"
8746  tmp="$complete EOL"
8747  arguments="${tmp#* }"
8748
8749  # Input might be given as Windows format, start by converting to
8750  # unix format.
8751  new_path="$path"
8752
8753  windows_path="$new_path"
8754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8755    unix_path=`$CYGPATH -u "$windows_path"`
8756    new_path="$unix_path"
8757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8759    new_path="$unix_path"
8760  fi
8761
8762
8763  # Now try to locate executable using which
8764  new_path=`$WHICH "$new_path" 2> /dev/null`
8765
8766  if test "x$new_path" = x; then
8767    # Oops. Which didn't find the executable.
8768    # The splitting of arguments from the executable at a space might have been incorrect,
8769    # since paths with space are more likely in Windows. Give it another try with the whole
8770    # argument.
8771    path="$complete"
8772    arguments="EOL"
8773    new_path="$path"
8774
8775  windows_path="$new_path"
8776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8777    unix_path=`$CYGPATH -u "$windows_path"`
8778    new_path="$unix_path"
8779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8781    new_path="$unix_path"
8782  fi
8783
8784
8785    new_path=`$WHICH "$new_path" 2> /dev/null`
8786
8787    if test "x$new_path" = x; then
8788      # It's still not found. Now this is an unrecoverable error.
8789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8790$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8791      has_space=`$ECHO "$complete" | $GREP " "`
8792      if test "x$has_space" != x; then
8793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8795      fi
8796      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8797    fi
8798  fi
8799
8800  # Now new_path has a complete unix path to the binary
8801  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8802    # Keep paths in /bin as-is, but remove trailing .exe if any
8803    new_path="${new_path/%.exe/}"
8804    # Do not save /bin paths to all_fixpath_prefixes!
8805  else
8806    # Not in mixed or Windows style, start by that.
8807    new_path=`cmd //c echo $new_path`
8808
8809  input_path="$new_path"
8810  # Check if we need to convert this using DOS-style short mode. If the path
8811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8812  # take no chances and rewrite it.
8813  # Note: m4 eats our [], so we need to use [ and ] instead.
8814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8815  if test "x$has_forbidden_chars" != x; then
8816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8818  fi
8819
8820    # Output is in $new_path
8821
8822  windows_path="$new_path"
8823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8824    unix_path=`$CYGPATH -u "$windows_path"`
8825    new_path="$unix_path"
8826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8828    new_path="$unix_path"
8829  fi
8830
8831    # remove trailing .exe if any
8832    new_path="${new_path/%.exe/}"
8833
8834    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8835    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8836  fi
8837
8838  else
8839    # We're on a posix platform. Hooray! :)
8840    # First separate the path from the arguments. This will split at the first
8841    # space.
8842    complete="$FOUND_MAKE"
8843    path="${complete%% *}"
8844    tmp="$complete EOL"
8845    arguments="${tmp#* }"
8846
8847    new_path=`$WHICH $path 2> /dev/null`
8848    if test "x$new_path" = x; then
8849      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8850      if test "x$is_absolute_path" != x; then
8851        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8852$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8853        new_path="$path"
8854      else
8855        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8856$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8857        has_space=`$ECHO "$complete" | $GREP " "`
8858        if test "x$has_space" != x; then
8859          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8860$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8861        fi
8862        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8863      fi
8864    fi
8865  fi
8866
8867  # Now join together the path and the arguments once again
8868  if test "x$arguments" != xEOL; then
8869      new_complete="$new_path ${arguments% *}"
8870  else
8871      new_complete="$new_path"
8872  fi
8873
8874  if test "x$complete" != "x$new_complete"; then
8875    FOUND_MAKE="$new_complete"
8876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8877$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8878  fi
8879
8880        fi
8881      fi
8882    fi
8883  fi
8884
8885    fi
8886
8887    if test "x$FOUND_MAKE" = x; then
8888      if test "x$TOOLS_DIR" != x; then
8889        # We have a tools-dir, check that as well before giving up.
8890        OLD_PATH=$PATH
8891        PATH=$TOOLS_DIR:$PATH
8892        for ac_prog in gmake
8893do
8894  # Extract the first word of "$ac_prog", so it can be a program name with args.
8895set dummy $ac_prog; ac_word=$2
8896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8897$as_echo_n "checking for $ac_word... " >&6; }
8898if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
8899  $as_echo_n "(cached) " >&6
8900else
8901  case $CHECK_TOOLSDIR_GMAKE in
8902  [\\/]* | ?:[\\/]*)
8903  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
8904  ;;
8905  *)
8906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8907for as_dir in $PATH
8908do
8909  IFS=$as_save_IFS
8910  test -z "$as_dir" && as_dir=.
8911    for ac_exec_ext in '' $ac_executable_extensions; do
8912  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8913    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8915    break 2
8916  fi
8917done
8918  done
8919IFS=$as_save_IFS
8920
8921  ;;
8922esac
8923fi
8924CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
8925if test -n "$CHECK_TOOLSDIR_GMAKE"; then
8926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
8927$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
8928else
8929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8930$as_echo "no" >&6; }
8931fi
8932
8933
8934  test -n "$CHECK_TOOLSDIR_GMAKE" && break
8935done
8936
8937
8938  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
8939  DESCRIPTION="gmake in tools-dir"
8940  if test "x$MAKE_CANDIDATE" != x; then
8941    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8942$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8943    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8944    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8945    if test "x$IS_GNU_MAKE" = x; then
8946      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8947$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8948    else
8949      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8950      if test "x$IS_MODERN_MAKE" = x; then
8951        { $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
8952$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;}
8953      else
8954        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8955          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8956            MAKE_EXPECTED_ENV='cygwin'
8957          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8958            MAKE_EXPECTED_ENV='msys'
8959          else
8960            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8961          fi
8962          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8963          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8964        else
8965          # Not relevant for non-Windows
8966          IS_MAKE_CORRECT_ENV=true
8967        fi
8968        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8969          { $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
8970$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;}
8971        else
8972          FOUND_MAKE=$MAKE_CANDIDATE
8973
8974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8975
8976  # First separate the path from the arguments. This will split at the first
8977  # space.
8978  complete="$FOUND_MAKE"
8979  path="${complete%% *}"
8980  tmp="$complete EOL"
8981  arguments="${tmp#* }"
8982
8983  # Input might be given as Windows format, start by converting to
8984  # unix format.
8985  new_path=`$CYGPATH -u "$path"`
8986
8987  # Now try to locate executable using which
8988  new_path=`$WHICH "$new_path" 2> /dev/null`
8989  # bat and cmd files are not always considered executable in cygwin causing which
8990  # to not find them
8991  if test "x$new_path" = x \
8992           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8993           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8994    new_path=`$CYGPATH -u "$path"`
8995  fi
8996  if test "x$new_path" = x; then
8997    # Oops. Which didn't find the executable.
8998    # The splitting of arguments from the executable at a space might have been incorrect,
8999    # since paths with space are more likely in Windows. Give it another try with the whole
9000    # argument.
9001    path="$complete"
9002    arguments="EOL"
9003    new_path=`$CYGPATH -u "$path"`
9004    new_path=`$WHICH "$new_path" 2> /dev/null`
9005    # bat and cmd files are not always considered executable in cygwin causing which
9006    # to not find them
9007    if test "x$new_path" = x \
9008             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9009             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9010      new_path=`$CYGPATH -u "$path"`
9011    fi
9012    if test "x$new_path" = x; then
9013      # It's still not found. Now this is an unrecoverable error.
9014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9015$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9016      has_space=`$ECHO "$complete" | $GREP " "`
9017      if test "x$has_space" != x; then
9018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9020      fi
9021      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9022    fi
9023  fi
9024
9025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9028  # "foo.exe" is OK but "foo" is an error.
9029  #
9030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9031  # It is also a way to make sure we got the proper file name for the real test later on.
9032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9033  if test "x$test_shortpath" = x; then
9034    # Short path failed, file does not exist as specified.
9035    # Try adding .exe or .cmd
9036    if test -f "${new_path}.exe"; then
9037       input_to_shortpath="${new_path}.exe"
9038    elif test -f "${new_path}.cmd"; then
9039       input_to_shortpath="${new_path}.cmd"
9040    else
9041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9042$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9043      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9044$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9045      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9046    fi
9047  else
9048    input_to_shortpath="$new_path"
9049  fi
9050
9051  # Call helper function which possibly converts this using DOS-style short mode.
9052  # If so, the updated path is stored in $new_path.
9053  new_path="$input_to_shortpath"
9054
9055  input_path="$input_to_shortpath"
9056  # Check if we need to convert this using DOS-style short mode. If the path
9057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9058  # take no chances and rewrite it.
9059  # Note: m4 eats our [], so we need to use [ and ] instead.
9060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9061  if test "x$has_forbidden_chars" != x; then
9062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9066      # Going to short mode and back again did indeed matter. Since short mode is
9067      # case insensitive, let's make it lowercase to improve readability.
9068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9069      # Now convert it back to Unix-stile (cygpath)
9070      input_path=`$CYGPATH -u "$shortmode_path"`
9071      new_path="$input_path"
9072    fi
9073  fi
9074
9075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9076  if test "x$test_cygdrive_prefix" = x; then
9077    # As a simple fix, exclude /usr/bin since it's not a real path.
9078    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9080      # a path prefixed by /cygdrive for fixpath to work.
9081      new_path="$CYGWIN_ROOT_PATH$input_path"
9082    fi
9083  fi
9084
9085  # remove trailing .exe if any
9086  new_path="${new_path/%.exe/}"
9087
9088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9089
9090  # First separate the path from the arguments. This will split at the first
9091  # space.
9092  complete="$FOUND_MAKE"
9093  path="${complete%% *}"
9094  tmp="$complete EOL"
9095  arguments="${tmp#* }"
9096
9097  # Input might be given as Windows format, start by converting to
9098  # unix format.
9099  new_path="$path"
9100
9101  windows_path="$new_path"
9102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9103    unix_path=`$CYGPATH -u "$windows_path"`
9104    new_path="$unix_path"
9105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9107    new_path="$unix_path"
9108  fi
9109
9110
9111  # Now try to locate executable using which
9112  new_path=`$WHICH "$new_path" 2> /dev/null`
9113
9114  if test "x$new_path" = x; then
9115    # Oops. Which didn't find the executable.
9116    # The splitting of arguments from the executable at a space might have been incorrect,
9117    # since paths with space are more likely in Windows. Give it another try with the whole
9118    # argument.
9119    path="$complete"
9120    arguments="EOL"
9121    new_path="$path"
9122
9123  windows_path="$new_path"
9124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9125    unix_path=`$CYGPATH -u "$windows_path"`
9126    new_path="$unix_path"
9127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9129    new_path="$unix_path"
9130  fi
9131
9132
9133    new_path=`$WHICH "$new_path" 2> /dev/null`
9134
9135    if test "x$new_path" = x; then
9136      # It's still not found. Now this is an unrecoverable error.
9137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9138$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9139      has_space=`$ECHO "$complete" | $GREP " "`
9140      if test "x$has_space" != x; then
9141        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9142$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9143      fi
9144      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9145    fi
9146  fi
9147
9148  # Now new_path has a complete unix path to the binary
9149  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9150    # Keep paths in /bin as-is, but remove trailing .exe if any
9151    new_path="${new_path/%.exe/}"
9152    # Do not save /bin paths to all_fixpath_prefixes!
9153  else
9154    # Not in mixed or Windows style, start by that.
9155    new_path=`cmd //c echo $new_path`
9156
9157  input_path="$new_path"
9158  # Check if we need to convert this using DOS-style short mode. If the path
9159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9160  # take no chances and rewrite it.
9161  # Note: m4 eats our [], so we need to use [ and ] instead.
9162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9163  if test "x$has_forbidden_chars" != x; then
9164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9165    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9166  fi
9167
9168    # Output is in $new_path
9169
9170  windows_path="$new_path"
9171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9172    unix_path=`$CYGPATH -u "$windows_path"`
9173    new_path="$unix_path"
9174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9176    new_path="$unix_path"
9177  fi
9178
9179    # remove trailing .exe if any
9180    new_path="${new_path/%.exe/}"
9181
9182    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9183    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9184  fi
9185
9186  else
9187    # We're on a posix platform. Hooray! :)
9188    # First separate the path from the arguments. This will split at the first
9189    # space.
9190    complete="$FOUND_MAKE"
9191    path="${complete%% *}"
9192    tmp="$complete EOL"
9193    arguments="${tmp#* }"
9194
9195    new_path=`$WHICH $path 2> /dev/null`
9196    if test "x$new_path" = x; then
9197      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9198      if test "x$is_absolute_path" != x; then
9199        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9200$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9201        new_path="$path"
9202      else
9203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9204$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9205        has_space=`$ECHO "$complete" | $GREP " "`
9206        if test "x$has_space" != x; then
9207          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9208$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9209        fi
9210        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9211      fi
9212    fi
9213  fi
9214
9215  # Now join together the path and the arguments once again
9216  if test "x$arguments" != xEOL; then
9217      new_complete="$new_path ${arguments% *}"
9218  else
9219      new_complete="$new_path"
9220  fi
9221
9222  if test "x$complete" != "x$new_complete"; then
9223    FOUND_MAKE="$new_complete"
9224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9225$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9226  fi
9227
9228        fi
9229      fi
9230    fi
9231  fi
9232
9233        if test "x$FOUND_MAKE" = x; then
9234          for ac_prog in make
9235do
9236  # Extract the first word of "$ac_prog", so it can be a program name with args.
9237set dummy $ac_prog; ac_word=$2
9238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9239$as_echo_n "checking for $ac_word... " >&6; }
9240if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9241  $as_echo_n "(cached) " >&6
9242else
9243  case $CHECK_TOOLSDIR_MAKE in
9244  [\\/]* | ?:[\\/]*)
9245  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9246  ;;
9247  *)
9248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9249for as_dir in $PATH
9250do
9251  IFS=$as_save_IFS
9252  test -z "$as_dir" && as_dir=.
9253    for ac_exec_ext in '' $ac_executable_extensions; do
9254  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9255    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9257    break 2
9258  fi
9259done
9260  done
9261IFS=$as_save_IFS
9262
9263  ;;
9264esac
9265fi
9266CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9267if test -n "$CHECK_TOOLSDIR_MAKE"; then
9268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9269$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9270else
9271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9272$as_echo "no" >&6; }
9273fi
9274
9275
9276  test -n "$CHECK_TOOLSDIR_MAKE" && break
9277done
9278
9279
9280  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9281  DESCRIPTION="make in tools-dir"
9282  if test "x$MAKE_CANDIDATE" != x; then
9283    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9284$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9285    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9286    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9287    if test "x$IS_GNU_MAKE" = x; then
9288      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9289$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9290    else
9291      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9292      if test "x$IS_MODERN_MAKE" = x; then
9293        { $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
9294$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;}
9295      else
9296        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9297          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9298            MAKE_EXPECTED_ENV='cygwin'
9299          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9300            MAKE_EXPECTED_ENV='msys'
9301          else
9302            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9303          fi
9304          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9305          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9306        else
9307          # Not relevant for non-Windows
9308          IS_MAKE_CORRECT_ENV=true
9309        fi
9310        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9311          { $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
9312$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;}
9313        else
9314          FOUND_MAKE=$MAKE_CANDIDATE
9315
9316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9317
9318  # First separate the path from the arguments. This will split at the first
9319  # space.
9320  complete="$FOUND_MAKE"
9321  path="${complete%% *}"
9322  tmp="$complete EOL"
9323  arguments="${tmp#* }"
9324
9325  # Input might be given as Windows format, start by converting to
9326  # unix format.
9327  new_path=`$CYGPATH -u "$path"`
9328
9329  # Now try to locate executable using which
9330  new_path=`$WHICH "$new_path" 2> /dev/null`
9331  # bat and cmd files are not always considered executable in cygwin causing which
9332  # to not find them
9333  if test "x$new_path" = x \
9334           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9335           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9336    new_path=`$CYGPATH -u "$path"`
9337  fi
9338  if test "x$new_path" = x; then
9339    # Oops. Which didn't find the executable.
9340    # The splitting of arguments from the executable at a space might have been incorrect,
9341    # since paths with space are more likely in Windows. Give it another try with the whole
9342    # argument.
9343    path="$complete"
9344    arguments="EOL"
9345    new_path=`$CYGPATH -u "$path"`
9346    new_path=`$WHICH "$new_path" 2> /dev/null`
9347    # bat and cmd files are not always considered executable in cygwin causing which
9348    # to not find them
9349    if test "x$new_path" = x \
9350             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9351             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9352      new_path=`$CYGPATH -u "$path"`
9353    fi
9354    if test "x$new_path" = x; then
9355      # It's still not found. Now this is an unrecoverable error.
9356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9357$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9358      has_space=`$ECHO "$complete" | $GREP " "`
9359      if test "x$has_space" != x; then
9360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9362      fi
9363      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9364    fi
9365  fi
9366
9367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9370  # "foo.exe" is OK but "foo" is an error.
9371  #
9372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9373  # It is also a way to make sure we got the proper file name for the real test later on.
9374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9375  if test "x$test_shortpath" = x; then
9376    # Short path failed, file does not exist as specified.
9377    # Try adding .exe or .cmd
9378    if test -f "${new_path}.exe"; then
9379       input_to_shortpath="${new_path}.exe"
9380    elif test -f "${new_path}.cmd"; then
9381       input_to_shortpath="${new_path}.cmd"
9382    else
9383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9384$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9385      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9386$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9387      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9388    fi
9389  else
9390    input_to_shortpath="$new_path"
9391  fi
9392
9393  # Call helper function which possibly converts this using DOS-style short mode.
9394  # If so, the updated path is stored in $new_path.
9395  new_path="$input_to_shortpath"
9396
9397  input_path="$input_to_shortpath"
9398  # Check if we need to convert this using DOS-style short mode. If the path
9399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9400  # take no chances and rewrite it.
9401  # Note: m4 eats our [], so we need to use [ and ] instead.
9402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9403  if test "x$has_forbidden_chars" != x; then
9404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9408      # Going to short mode and back again did indeed matter. Since short mode is
9409      # case insensitive, let's make it lowercase to improve readability.
9410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9411      # Now convert it back to Unix-stile (cygpath)
9412      input_path=`$CYGPATH -u "$shortmode_path"`
9413      new_path="$input_path"
9414    fi
9415  fi
9416
9417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9418  if test "x$test_cygdrive_prefix" = x; then
9419    # As a simple fix, exclude /usr/bin since it's not a real path.
9420    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9422      # a path prefixed by /cygdrive for fixpath to work.
9423      new_path="$CYGWIN_ROOT_PATH$input_path"
9424    fi
9425  fi
9426
9427  # remove trailing .exe if any
9428  new_path="${new_path/%.exe/}"
9429
9430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9431
9432  # First separate the path from the arguments. This will split at the first
9433  # space.
9434  complete="$FOUND_MAKE"
9435  path="${complete%% *}"
9436  tmp="$complete EOL"
9437  arguments="${tmp#* }"
9438
9439  # Input might be given as Windows format, start by converting to
9440  # unix format.
9441  new_path="$path"
9442
9443  windows_path="$new_path"
9444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9445    unix_path=`$CYGPATH -u "$windows_path"`
9446    new_path="$unix_path"
9447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9449    new_path="$unix_path"
9450  fi
9451
9452
9453  # Now try to locate executable using which
9454  new_path=`$WHICH "$new_path" 2> /dev/null`
9455
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="$path"
9464
9465  windows_path="$new_path"
9466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9467    unix_path=`$CYGPATH -u "$windows_path"`
9468    new_path="$unix_path"
9469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9471    new_path="$unix_path"
9472  fi
9473
9474
9475    new_path=`$WHICH "$new_path" 2> /dev/null`
9476
9477    if test "x$new_path" = x; then
9478      # It's still not found. Now this is an unrecoverable error.
9479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9480$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9481      has_space=`$ECHO "$complete" | $GREP " "`
9482      if test "x$has_space" != x; then
9483        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9484$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9485      fi
9486      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9487    fi
9488  fi
9489
9490  # Now new_path has a complete unix path to the binary
9491  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9492    # Keep paths in /bin as-is, but remove trailing .exe if any
9493    new_path="${new_path/%.exe/}"
9494    # Do not save /bin paths to all_fixpath_prefixes!
9495  else
9496    # Not in mixed or Windows style, start by that.
9497    new_path=`cmd //c echo $new_path`
9498
9499  input_path="$new_path"
9500  # Check if we need to convert this using DOS-style short mode. If the path
9501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9502  # take no chances and rewrite it.
9503  # Note: m4 eats our [], so we need to use [ and ] instead.
9504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9505  if test "x$has_forbidden_chars" != x; then
9506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9508  fi
9509
9510    # Output is in $new_path
9511
9512  windows_path="$new_path"
9513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9514    unix_path=`$CYGPATH -u "$windows_path"`
9515    new_path="$unix_path"
9516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9518    new_path="$unix_path"
9519  fi
9520
9521    # remove trailing .exe if any
9522    new_path="${new_path/%.exe/}"
9523
9524    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9525    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9526  fi
9527
9528  else
9529    # We're on a posix platform. Hooray! :)
9530    # First separate the path from the arguments. This will split at the first
9531    # space.
9532    complete="$FOUND_MAKE"
9533    path="${complete%% *}"
9534    tmp="$complete EOL"
9535    arguments="${tmp#* }"
9536
9537    new_path=`$WHICH $path 2> /dev/null`
9538    if test "x$new_path" = x; then
9539      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9540      if test "x$is_absolute_path" != x; then
9541        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9542$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9543        new_path="$path"
9544      else
9545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9546$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9547        has_space=`$ECHO "$complete" | $GREP " "`
9548        if test "x$has_space" != x; then
9549          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9550$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9551        fi
9552        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9553      fi
9554    fi
9555  fi
9556
9557  # Now join together the path and the arguments once again
9558  if test "x$arguments" != xEOL; then
9559      new_complete="$new_path ${arguments% *}"
9560  else
9561      new_complete="$new_path"
9562  fi
9563
9564  if test "x$complete" != "x$new_complete"; then
9565    FOUND_MAKE="$new_complete"
9566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9567$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9568  fi
9569
9570        fi
9571      fi
9572    fi
9573  fi
9574
9575        fi
9576        PATH=$OLD_PATH
9577      fi
9578    fi
9579
9580    if test "x$FOUND_MAKE" = x; then
9581      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
9582    fi
9583  fi
9584
9585  MAKE=$FOUND_MAKE
9586
9587  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9588$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9589
9590
9591
9592    # Test if find supports -delete
9593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9594$as_echo_n "checking if find supports -delete... " >&6; }
9595    FIND_DELETE="-delete"
9596
9597    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9598
9599    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9600
9601    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9602    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9603        # No, it does not.
9604        rm $DELETEDIR/TestIfFindSupportsDelete
9605        FIND_DELETE="-exec rm \{\} \+"
9606        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9607$as_echo "no" >&6; }
9608    else
9609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9610$as_echo "yes" >&6; }
9611    fi
9612    rmdir $DELETEDIR
9613
9614
9615
9616# These tools might not be installed by default,
9617# need hint on how to install them.
9618
9619    for ac_prog in unzip
9620do
9621  # Extract the first word of "$ac_prog", so it can be a program name with args.
9622set dummy $ac_prog; ac_word=$2
9623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9624$as_echo_n "checking for $ac_word... " >&6; }
9625if test "${ac_cv_path_UNZIP+set}" = set; then :
9626  $as_echo_n "(cached) " >&6
9627else
9628  case $UNZIP in
9629  [\\/]* | ?:[\\/]*)
9630  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9631  ;;
9632  *)
9633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9634for as_dir in $PATH
9635do
9636  IFS=$as_save_IFS
9637  test -z "$as_dir" && as_dir=.
9638    for ac_exec_ext in '' $ac_executable_extensions; do
9639  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9640    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9642    break 2
9643  fi
9644done
9645  done
9646IFS=$as_save_IFS
9647
9648  ;;
9649esac
9650fi
9651UNZIP=$ac_cv_path_UNZIP
9652if test -n "$UNZIP"; then
9653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9654$as_echo "$UNZIP" >&6; }
9655else
9656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9657$as_echo "no" >&6; }
9658fi
9659
9660
9661  test -n "$UNZIP" && break
9662done
9663
9664
9665    if test "x$UNZIP" = x; then
9666        if test "xunzip" = x; then
9667          PROG_NAME=unzip
9668        else
9669          PROG_NAME=unzip
9670        fi
9671        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9672$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9673        as_fn_error $? "Cannot continue" "$LINENO" 5
9674    fi
9675
9676
9677
9678    for ac_prog in zip
9679do
9680  # Extract the first word of "$ac_prog", so it can be a program name with args.
9681set dummy $ac_prog; ac_word=$2
9682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9683$as_echo_n "checking for $ac_word... " >&6; }
9684if test "${ac_cv_path_ZIP+set}" = set; then :
9685  $as_echo_n "(cached) " >&6
9686else
9687  case $ZIP in
9688  [\\/]* | ?:[\\/]*)
9689  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9690  ;;
9691  *)
9692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9693for as_dir in $PATH
9694do
9695  IFS=$as_save_IFS
9696  test -z "$as_dir" && as_dir=.
9697    for ac_exec_ext in '' $ac_executable_extensions; do
9698  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9699    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9701    break 2
9702  fi
9703done
9704  done
9705IFS=$as_save_IFS
9706
9707  ;;
9708esac
9709fi
9710ZIP=$ac_cv_path_ZIP
9711if test -n "$ZIP"; then
9712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9713$as_echo "$ZIP" >&6; }
9714else
9715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9716$as_echo "no" >&6; }
9717fi
9718
9719
9720  test -n "$ZIP" && break
9721done
9722
9723
9724    if test "x$ZIP" = x; then
9725        if test "xzip" = x; then
9726          PROG_NAME=zip
9727        else
9728          PROG_NAME=zip
9729        fi
9730        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9731$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9732        as_fn_error $? "Cannot continue" "$LINENO" 5
9733    fi
9734
9735
9736
9737# Non-required basic tools
9738
9739# Extract the first word of "ldd", so it can be a program name with args.
9740set dummy ldd; ac_word=$2
9741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9742$as_echo_n "checking for $ac_word... " >&6; }
9743if test "${ac_cv_path_LDD+set}" = set; then :
9744  $as_echo_n "(cached) " >&6
9745else
9746  case $LDD in
9747  [\\/]* | ?:[\\/]*)
9748  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9749  ;;
9750  *)
9751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9752for as_dir in $PATH
9753do
9754  IFS=$as_save_IFS
9755  test -z "$as_dir" && as_dir=.
9756    for ac_exec_ext in '' $ac_executable_extensions; do
9757  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9758    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9760    break 2
9761  fi
9762done
9763  done
9764IFS=$as_save_IFS
9765
9766  ;;
9767esac
9768fi
9769LDD=$ac_cv_path_LDD
9770if test -n "$LDD"; then
9771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
9772$as_echo "$LDD" >&6; }
9773else
9774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9775$as_echo "no" >&6; }
9776fi
9777
9778
9779if test "x$LDD" = "x"; then
9780    # List shared lib dependencies is used for
9781    # debug output and checking for forbidden dependencies.
9782    # We can build without it.
9783    LDD="true"
9784fi
9785# Extract the first word of "otool", so it can be a program name with args.
9786set dummy otool; ac_word=$2
9787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9788$as_echo_n "checking for $ac_word... " >&6; }
9789if test "${ac_cv_path_OTOOL+set}" = set; then :
9790  $as_echo_n "(cached) " >&6
9791else
9792  case $OTOOL in
9793  [\\/]* | ?:[\\/]*)
9794  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
9795  ;;
9796  *)
9797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9798for as_dir in $PATH
9799do
9800  IFS=$as_save_IFS
9801  test -z "$as_dir" && as_dir=.
9802    for ac_exec_ext in '' $ac_executable_extensions; do
9803  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9804    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
9805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9806    break 2
9807  fi
9808done
9809  done
9810IFS=$as_save_IFS
9811
9812  ;;
9813esac
9814fi
9815OTOOL=$ac_cv_path_OTOOL
9816if test -n "$OTOOL"; then
9817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9818$as_echo "$OTOOL" >&6; }
9819else
9820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9821$as_echo "no" >&6; }
9822fi
9823
9824
9825if test "x$OTOOL" = "x"; then
9826   OTOOL="true"
9827fi
9828for ac_prog in readelf greadelf
9829do
9830  # Extract the first word of "$ac_prog", so it can be a program name with args.
9831set dummy $ac_prog; ac_word=$2
9832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9833$as_echo_n "checking for $ac_word... " >&6; }
9834if test "${ac_cv_path_READELF+set}" = set; then :
9835  $as_echo_n "(cached) " >&6
9836else
9837  case $READELF in
9838  [\\/]* | ?:[\\/]*)
9839  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
9840  ;;
9841  *)
9842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9843for as_dir in $PATH
9844do
9845  IFS=$as_save_IFS
9846  test -z "$as_dir" && as_dir=.
9847    for ac_exec_ext in '' $ac_executable_extensions; do
9848  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9849    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
9850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9851    break 2
9852  fi
9853done
9854  done
9855IFS=$as_save_IFS
9856
9857  ;;
9858esac
9859fi
9860READELF=$ac_cv_path_READELF
9861if test -n "$READELF"; then
9862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
9863$as_echo "$READELF" >&6; }
9864else
9865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9866$as_echo "no" >&6; }
9867fi
9868
9869
9870  test -n "$READELF" && break
9871done
9872
9873# Extract the first word of "hg", so it can be a program name with args.
9874set dummy hg; ac_word=$2
9875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9876$as_echo_n "checking for $ac_word... " >&6; }
9877if test "${ac_cv_path_HG+set}" = set; then :
9878  $as_echo_n "(cached) " >&6
9879else
9880  case $HG in
9881  [\\/]* | ?:[\\/]*)
9882  ac_cv_path_HG="$HG" # Let the user override the test with a path.
9883  ;;
9884  *)
9885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9886for as_dir in $PATH
9887do
9888  IFS=$as_save_IFS
9889  test -z "$as_dir" && as_dir=.
9890    for ac_exec_ext in '' $ac_executable_extensions; do
9891  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9892    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
9893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9894    break 2
9895  fi
9896done
9897  done
9898IFS=$as_save_IFS
9899
9900  ;;
9901esac
9902fi
9903HG=$ac_cv_path_HG
9904if test -n "$HG"; then
9905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
9906$as_echo "$HG" >&6; }
9907else
9908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9909$as_echo "no" >&6; }
9910fi
9911
9912
9913# Extract the first word of "stat", so it can be a program name with args.
9914set dummy stat; ac_word=$2
9915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9916$as_echo_n "checking for $ac_word... " >&6; }
9917if test "${ac_cv_path_STAT+set}" = set; then :
9918  $as_echo_n "(cached) " >&6
9919else
9920  case $STAT in
9921  [\\/]* | ?:[\\/]*)
9922  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
9923  ;;
9924  *)
9925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9926for as_dir in $PATH
9927do
9928  IFS=$as_save_IFS
9929  test -z "$as_dir" && as_dir=.
9930    for ac_exec_ext in '' $ac_executable_extensions; do
9931  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9932    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
9933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9934    break 2
9935  fi
9936done
9937  done
9938IFS=$as_save_IFS
9939
9940  ;;
9941esac
9942fi
9943STAT=$ac_cv_path_STAT
9944if test -n "$STAT"; then
9945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
9946$as_echo "$STAT" >&6; }
9947else
9948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9949$as_echo "no" >&6; }
9950fi
9951
9952
9953# Extract the first word of "time", so it can be a program name with args.
9954set dummy time; ac_word=$2
9955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9956$as_echo_n "checking for $ac_word... " >&6; }
9957if test "${ac_cv_path_TIME+set}" = set; then :
9958  $as_echo_n "(cached) " >&6
9959else
9960  case $TIME in
9961  [\\/]* | ?:[\\/]*)
9962  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
9963  ;;
9964  *)
9965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9966for as_dir in $PATH
9967do
9968  IFS=$as_save_IFS
9969  test -z "$as_dir" && as_dir=.
9970    for ac_exec_ext in '' $ac_executable_extensions; do
9971  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9972    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
9973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9974    break 2
9975  fi
9976done
9977  done
9978IFS=$as_save_IFS
9979
9980  ;;
9981esac
9982fi
9983TIME=$ac_cv_path_TIME
9984if test -n "$TIME"; then
9985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
9986$as_echo "$TIME" >&6; }
9987else
9988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9989$as_echo "no" >&6; }
9990fi
9991
9992
9993
9994if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
9995
9996    for ac_prog in comm
9997do
9998  # Extract the first word of "$ac_prog", so it can be a program name with args.
9999set dummy $ac_prog; ac_word=$2
10000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10001$as_echo_n "checking for $ac_word... " >&6; }
10002if test "${ac_cv_path_COMM+set}" = set; then :
10003  $as_echo_n "(cached) " >&6
10004else
10005  case $COMM in
10006  [\\/]* | ?:[\\/]*)
10007  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10008  ;;
10009  *)
10010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10011for as_dir in $PATH
10012do
10013  IFS=$as_save_IFS
10014  test -z "$as_dir" && as_dir=.
10015    for ac_exec_ext in '' $ac_executable_extensions; do
10016  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10017    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10019    break 2
10020  fi
10021done
10022  done
10023IFS=$as_save_IFS
10024
10025  ;;
10026esac
10027fi
10028COMM=$ac_cv_path_COMM
10029if test -n "$COMM"; then
10030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10031$as_echo "$COMM" >&6; }
10032else
10033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10034$as_echo "no" >&6; }
10035fi
10036
10037
10038  test -n "$COMM" && break
10039done
10040
10041
10042    if test "x$COMM" = x; then
10043        if test "xcomm" = x; then
10044          PROG_NAME=comm
10045        else
10046          PROG_NAME=comm
10047        fi
10048        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10049$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10050        as_fn_error $? "Cannot continue" "$LINENO" 5
10051    fi
10052
10053
10054fi
10055
10056
10057# Check if pkg-config is available.
10058
10059
10060if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10061	if test -n "$ac_tool_prefix"; then
10062  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10063set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10065$as_echo_n "checking for $ac_word... " >&6; }
10066if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10067  $as_echo_n "(cached) " >&6
10068else
10069  case $PKG_CONFIG in
10070  [\\/]* | ?:[\\/]*)
10071  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10072  ;;
10073  *)
10074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10075for as_dir in $PATH
10076do
10077  IFS=$as_save_IFS
10078  test -z "$as_dir" && as_dir=.
10079    for ac_exec_ext in '' $ac_executable_extensions; do
10080  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10081    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10083    break 2
10084  fi
10085done
10086  done
10087IFS=$as_save_IFS
10088
10089  ;;
10090esac
10091fi
10092PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10093if test -n "$PKG_CONFIG"; then
10094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10095$as_echo "$PKG_CONFIG" >&6; }
10096else
10097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098$as_echo "no" >&6; }
10099fi
10100
10101
10102fi
10103if test -z "$ac_cv_path_PKG_CONFIG"; then
10104  ac_pt_PKG_CONFIG=$PKG_CONFIG
10105  # Extract the first word of "pkg-config", so it can be a program name with args.
10106set dummy pkg-config; ac_word=$2
10107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10108$as_echo_n "checking for $ac_word... " >&6; }
10109if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10110  $as_echo_n "(cached) " >&6
10111else
10112  case $ac_pt_PKG_CONFIG in
10113  [\\/]* | ?:[\\/]*)
10114  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10115  ;;
10116  *)
10117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10118for as_dir in $PATH
10119do
10120  IFS=$as_save_IFS
10121  test -z "$as_dir" && as_dir=.
10122    for ac_exec_ext in '' $ac_executable_extensions; do
10123  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10124    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10126    break 2
10127  fi
10128done
10129  done
10130IFS=$as_save_IFS
10131
10132  ;;
10133esac
10134fi
10135ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10136if test -n "$ac_pt_PKG_CONFIG"; then
10137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10138$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10139else
10140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10141$as_echo "no" >&6; }
10142fi
10143
10144  if test "x$ac_pt_PKG_CONFIG" = x; then
10145    PKG_CONFIG=""
10146  else
10147    case $cross_compiling:$ac_tool_warned in
10148yes:)
10149{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10150$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10151ac_tool_warned=yes ;;
10152esac
10153    PKG_CONFIG=$ac_pt_PKG_CONFIG
10154  fi
10155else
10156  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10157fi
10158
10159fi
10160if test -n "$PKG_CONFIG"; then
10161	_pkg_min_version=0.9.0
10162	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10163$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10164	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10165		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10166$as_echo "yes" >&6; }
10167	else
10168		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10169$as_echo "no" >&6; }
10170		PKG_CONFIG=""
10171	fi
10172
10173fi
10174
10175# After basic tools have been setup, we can check build os specific details.
10176
10177###############################################################################
10178
10179# Note that this is the build platform OS version!
10180
10181OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10182OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10183OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10184OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10185
10186
10187
10188
10189
10190# Setup builddeps, for automatic downloading of tools we need.
10191# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10192# boot-jdk setup, but we need to have basic tools setup first.
10193
10194
10195# Check whether --with-builddeps-conf was given.
10196if test "${with_builddeps_conf+set}" = set; then :
10197  withval=$with_builddeps_conf;
10198fi
10199
10200
10201
10202# Check whether --with-builddeps-server was given.
10203if test "${with_builddeps_server+set}" = set; then :
10204  withval=$with_builddeps_server;
10205fi
10206
10207
10208
10209# Check whether --with-builddeps-dir was given.
10210if test "${with_builddeps_dir+set}" = set; then :
10211  withval=$with_builddeps_dir;
10212else
10213  with_builddeps_dir=/localhome/builddeps
10214fi
10215
10216
10217
10218# Check whether --with-builddeps-group was given.
10219if test "${with_builddeps_group+set}" = set; then :
10220  withval=$with_builddeps_group;
10221fi
10222
10223
10224
10225
10226    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10227        if test "x$with_builddeps_conf" != x; then
10228            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10229$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10230            builddepsfile=$with_builddeps_conf
10231            if test -s $builddepsfile; then
10232                . $builddepsfile
10233                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10234$as_echo "loaded!" >&6; }
10235            else
10236               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10237           fi
10238        else
10239            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10240$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10241            builddepsfile=`mktemp`
10242            touch $builddepsfile
10243            # Put all found confs into a single file.
10244            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10245            # Source the file to acquire the variables
10246            if test -s $builddepsfile; then
10247                . $builddepsfile
10248                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10249$as_echo "found at least one!" >&6; }
10250            else
10251               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10252           fi
10253        fi
10254        # Create build and target names that use _ instead of "-" and ".".
10255        # This is necessary to use them in variable names.
10256        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10257        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10258        # Extract rewrite information for build and target
10259        eval rewritten_build=\${REWRITE_${build_var}}
10260        if test "x$rewritten_build" = x; then
10261            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10262            echo Build stays the same $rewritten_build
10263        else
10264            echo Rewriting build for builddeps into $rewritten_build
10265        fi
10266        eval rewritten_target=\${REWRITE_${target_var}}
10267        if test "x$rewritten_target" = x; then
10268            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10269            echo Target stays the same $rewritten_target
10270        else
10271            echo Rewriting target for builddeps into $rewritten_target
10272        fi
10273        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10274        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10275    fi
10276    for ac_prog in 7z unzip
10277do
10278  # Extract the first word of "$ac_prog", so it can be a program name with args.
10279set dummy $ac_prog; ac_word=$2
10280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10281$as_echo_n "checking for $ac_word... " >&6; }
10282if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10283  $as_echo_n "(cached) " >&6
10284else
10285  if test -n "$BDEPS_UNZIP"; then
10286  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10287else
10288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10289for as_dir in $PATH
10290do
10291  IFS=$as_save_IFS
10292  test -z "$as_dir" && as_dir=.
10293    for ac_exec_ext in '' $ac_executable_extensions; do
10294  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10295    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10297    break 2
10298  fi
10299done
10300  done
10301IFS=$as_save_IFS
10302
10303fi
10304fi
10305BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10306if test -n "$BDEPS_UNZIP"; then
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10308$as_echo "$BDEPS_UNZIP" >&6; }
10309else
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314
10315  test -n "$BDEPS_UNZIP" && break
10316done
10317
10318    if test "x$BDEPS_UNZIP" = x7z; then
10319        BDEPS_UNZIP="7z x"
10320    fi
10321
10322    for ac_prog in wget lftp ftp
10323do
10324  # Extract the first word of "$ac_prog", so it can be a program name with args.
10325set dummy $ac_prog; ac_word=$2
10326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10327$as_echo_n "checking for $ac_word... " >&6; }
10328if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10329  $as_echo_n "(cached) " >&6
10330else
10331  if test -n "$BDEPS_FTP"; then
10332  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10333else
10334as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10335for as_dir in $PATH
10336do
10337  IFS=$as_save_IFS
10338  test -z "$as_dir" && as_dir=.
10339    for ac_exec_ext in '' $ac_executable_extensions; do
10340  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10341    ac_cv_prog_BDEPS_FTP="$ac_prog"
10342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10343    break 2
10344  fi
10345done
10346  done
10347IFS=$as_save_IFS
10348
10349fi
10350fi
10351BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10352if test -n "$BDEPS_FTP"; then
10353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10354$as_echo "$BDEPS_FTP" >&6; }
10355else
10356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10357$as_echo "no" >&6; }
10358fi
10359
10360
10361  test -n "$BDEPS_FTP" && break
10362done
10363
10364
10365
10366###############################################################################
10367#
10368# Determine OpenJDK variants, options and version numbers.
10369#
10370###############################################################################
10371
10372# We need build & target for this.
10373
10374
10375###############################################################################
10376#
10377# Should we build only OpenJDK even if closed sources are present?
10378#
10379# Check whether --enable-openjdk-only was given.
10380if test "${enable_openjdk_only+set}" = set; then :
10381  enableval=$enable_openjdk_only;
10382else
10383  enable_openjdk_only="no"
10384fi
10385
10386
10387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
10388$as_echo_n "checking for presence of closed sources... " >&6; }
10389if test -d "$SRC_ROOT/jdk/src/closed"; then
10390    CLOSED_SOURCE_PRESENT=yes
10391else
10392    CLOSED_SOURCE_PRESENT=no
10393fi
10394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
10395$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
10396
10397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is supressed (openjdk-only)" >&5
10398$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
10399SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
10400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPRESS_CLOSED_SOURCE" >&5
10401$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
10402
10403if test "x$CLOSED_SOURCE_PRESENT" = xno; then
10404  OPENJDK=true
10405  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10406    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
10407$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
10408  fi
10409else
10410  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10411    OPENJDK=true
10412  else
10413    OPENJDK=false
10414  fi
10415fi
10416
10417if test "x$OPENJDK" = "xtrue"; then
10418    SET_OPENJDK="OPENJDK=true"
10419fi
10420
10421
10422
10423###############################################################################
10424#
10425# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10426# We always build headless support.
10427#
10428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10429$as_echo_n "checking headful support... " >&6; }
10430# Check whether --enable-headful was given.
10431if test "${enable_headful+set}" = set; then :
10432  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10433else
10434  SUPPORT_HEADFUL=yes
10435fi
10436
10437
10438SUPPORT_HEADLESS=yes
10439BUILD_HEADLESS="BUILD_HEADLESS:=true"
10440
10441if test "x$SUPPORT_HEADFUL" = xyes; then
10442    # We are building both headful and headless.
10443    headful_msg="inlude support for both headful and headless"
10444fi
10445
10446if test "x$SUPPORT_HEADFUL" = xno; then
10447    # Thus we are building headless only.
10448    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10449    headful_msg="headless only"
10450fi
10451
10452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10453$as_echo "$headful_msg" >&6; }
10454
10455
10456
10457
10458
10459# Control wether Hotspot runs Queens test after build.
10460# Check whether --enable-hotspot-test-in-build was given.
10461if test "${enable_hotspot_test_in_build+set}" = set; then :
10462  enableval=$enable_hotspot_test_in_build;
10463else
10464  enable_hotspot_test_in_build=no
10465fi
10466
10467if test "x$enable_hotspot_test_in_build" = "xyes"; then
10468    TEST_IN_BUILD=true
10469else
10470    TEST_IN_BUILD=false
10471fi
10472
10473
10474###############################################################################
10475#
10476# Choose cacerts source file
10477#
10478
10479# Check whether --with-cacerts-file was given.
10480if test "${with_cacerts_file+set}" = set; then :
10481  withval=$with_cacerts_file;
10482fi
10483
10484if test "x$with_cacerts_file" != x; then
10485    CACERTS_FILE=$with_cacerts_file
10486else
10487    if test "x$OPENJDK" = "xtrue"; then
10488        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10489    else
10490        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10491    fi
10492fi
10493
10494
10495###############################################################################
10496#
10497# Enable or disable unlimited crypto
10498#
10499# Check whether --enable-unlimited-crypto was given.
10500if test "${enable_unlimited_crypto+set}" = set; then :
10501  enableval=$enable_unlimited_crypto;
10502else
10503  enable_unlimited_crypto=no
10504fi
10505
10506if test "x$enable_unlimited_crypto" = "xyes"; then
10507    UNLIMITED_CRYPTO=true
10508else
10509    UNLIMITED_CRYPTO=false
10510fi
10511
10512
10513###############################################################################
10514#
10515# Compress jars
10516#
10517COMPRESS_JARS=false
10518
10519
10520
10521
10522# Source the version numbers
10523. $AUTOCONF_DIR/version.numbers
10524if test "x$OPENJDK" = "xfalse"; then
10525    . $AUTOCONF_DIR/closed.version.numbers
10526fi
10527# Now set the JDK version, milestone, build number etc.
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542COPYRIGHT_YEAR=`date +'%Y'`
10543
10544
10545RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
10546
10547
10548if test "x$JDK_UPDATE_VERSION" != x; then
10549    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10550else
10551    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10552fi
10553
10554
10555if test "x$MILESTONE" != x; then
10556    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
10557else
10558    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
10559fi
10560
10561
10562if test "x$JDK_BUILD_NUMBER" != x; then
10563    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
10564else
10565    JDK_BUILD_NUMBER=b00
10566    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10567    # Avoid [:alnum:] since it depends on the locale.
10568    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10569    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10570    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
10571fi
10572
10573COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10574
10575
10576
10577###############################################################################
10578#
10579# Setup BootJDK, used to bootstrap the build.
10580#
10581###############################################################################
10582
10583
10584BOOT_JDK_FOUND=no
10585
10586# Check whether --with-boot-jdk was given.
10587if test "${with_boot_jdk+set}" = set; then :
10588  withval=$with_boot_jdk;
10589fi
10590
10591
10592# We look for the Boot JDK through various means, going from more certain to
10593# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10594# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10595# must check if this is indeed valid; otherwise we'll continue looking.
10596
10597# Test: Is bootjdk explicitely set by command line arguments?
10598
10599  if test "x$BOOT_JDK_FOUND" = xno; then
10600    # Now execute the test
10601
10602if test "x$with_boot_jdk" != x; then
10603    BOOT_JDK=$with_boot_jdk
10604    BOOT_JDK_FOUND=maybe
10605    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10606$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10607fi
10608
10609
10610    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10611    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10612      # Do we have a bin/java?
10613      if test ! -x "$BOOT_JDK/bin/java"; then
10614        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10615$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10616        BOOT_JDK_FOUND=no
10617      else
10618        # Do we have a bin/javac?
10619        if test ! -x "$BOOT_JDK/bin/javac"; then
10620          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10622          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10623$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10624          BOOT_JDK_FOUND=no
10625        else
10626          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10627          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10628            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10630            BOOT_JDK_FOUND=no
10631          else
10632            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10633            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10634
10635            # Extra M4 quote needed to protect [] in grep expression.
10636            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10637            if test "x$FOUND_VERSION_78" = x; then
10638              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10640              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10641$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10642              BOOT_JDK_FOUND=no
10643            else
10644              # We're done! :-)
10645              BOOT_JDK_FOUND=yes
10646
10647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10648
10649  # Input might be given as Windows format, start by converting to
10650  # unix format.
10651  path="$BOOT_JDK"
10652  new_path=`$CYGPATH -u "$path"`
10653
10654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10657  # "foo.exe" is OK but "foo" is an error.
10658  #
10659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10660  # It is also a way to make sure we got the proper file name for the real test later on.
10661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10662  if test "x$test_shortpath" = x; then
10663    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10664$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10665    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10666  fi
10667
10668  # Call helper function which possibly converts this using DOS-style short mode.
10669  # If so, the updated path is stored in $new_path.
10670
10671  input_path="$new_path"
10672  # Check if we need to convert this using DOS-style short mode. If the path
10673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10674  # take no chances and rewrite it.
10675  # Note: m4 eats our [], so we need to use [ and ] instead.
10676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10677  if test "x$has_forbidden_chars" != x; then
10678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10682      # Going to short mode and back again did indeed matter. Since short mode is
10683      # case insensitive, let's make it lowercase to improve readability.
10684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10685      # Now convert it back to Unix-stile (cygpath)
10686      input_path=`$CYGPATH -u "$shortmode_path"`
10687      new_path="$input_path"
10688    fi
10689  fi
10690
10691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10692  if test "x$test_cygdrive_prefix" = x; then
10693    # As a simple fix, exclude /usr/bin since it's not a real path.
10694    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10696      # a path prefixed by /cygdrive for fixpath to work.
10697      new_path="$CYGWIN_ROOT_PATH$input_path"
10698    fi
10699  fi
10700
10701
10702  if test "x$path" != "x$new_path"; then
10703    BOOT_JDK="$new_path"
10704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10705$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10706  fi
10707
10708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10709
10710  path="$BOOT_JDK"
10711  has_colon=`$ECHO $path | $GREP ^.:`
10712  new_path="$path"
10713  if test "x$has_colon" = x; then
10714    # Not in mixed or Windows style, start by that.
10715    new_path=`cmd //c echo $path`
10716  fi
10717
10718
10719  input_path="$new_path"
10720  # Check if we need to convert this using DOS-style short mode. If the path
10721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10722  # take no chances and rewrite it.
10723  # Note: m4 eats our [], so we need to use [ and ] instead.
10724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10725  if test "x$has_forbidden_chars" != x; then
10726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10728  fi
10729
10730
10731  windows_path="$new_path"
10732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10733    unix_path=`$CYGPATH -u "$windows_path"`
10734    new_path="$unix_path"
10735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10737    new_path="$unix_path"
10738  fi
10739
10740  if test "x$path" != "x$new_path"; then
10741    BOOT_JDK="$new_path"
10742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10743$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10744  fi
10745
10746  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10747  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10748
10749  else
10750    # We're on a posix platform. Hooray! :)
10751    path="$BOOT_JDK"
10752
10753    if test ! -f "$path" && test ! -d "$path"; then
10754      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
10755    fi
10756
10757    has_space=`$ECHO "$path" | $GREP " "`
10758    if test "x$has_space" != x; then
10759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10761      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
10762    fi
10763  fi
10764
10765              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
10766$as_echo_n "checking for Boot JDK... " >&6; }
10767              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
10768$as_echo "$BOOT_JDK" >&6; }
10769              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
10770$as_echo_n "checking Boot JDK version... " >&6; }
10771              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10772              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
10773$as_echo "$BOOT_JDK_VERSION" >&6; }
10774            fi # end check jdk version
10775          fi # end check rt.jar
10776        fi # end check javac
10777      fi # end check java
10778    fi # end check boot jdk found
10779  fi
10780
10781if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
10782  # Having specified an argument which is incorrect will produce an instant failure;
10783  # we should not go on looking
10784  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
10785fi
10786
10787# Test: Is bootjdk available from builddeps?
10788
10789  if test "x$BOOT_JDK_FOUND" = xno; then
10790    # Now execute the test
10791
10792
10793
10794    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10795        # Source the builddeps file again, to make sure it uses the latest variables!
10796        . $builddepsfile
10797        # Look for a target and build machine specific resource!
10798        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
10799        if test "x$resource" = x; then
10800            # Ok, lets instead look for a target specific resource
10801            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
10802        fi
10803        if test "x$resource" = x; then
10804            # Ok, lets instead look for a build specific resource
10805            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
10806        fi
10807        if test "x$resource" = x; then
10808            # Ok, lets instead look for a generic resource
10809            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
10810            resource=${builddep_bootjdk}
10811        fi
10812        if test "x$resource" != x; then
10813            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
10814$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
10815	    # If the resource in the builddeps.conf file is an existing directory,
10816	    # for example /java/linux/cups
10817	    if test -d ${resource}; then
10818	       depdir=${resource}
10819	    else
10820
10821# bootjdk is for example mymodule
10822# $resource is for example libs/general/libmymod_1_2_3.zip
10823# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
10824# $with_builddeps_dir is for example /localhome/builddeps
10825# depdir is the name of the variable into which we store the depdir, eg MYMOD
10826# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
10827# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
10828    filename=`basename $resource`
10829    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
10830    filebase=${filename%%.*}
10831    extension=${filename#*.}
10832    installdir=$with_builddeps_dir/$filebase
10833    if test ! -f $installdir/$filename.unpacked; then
10834        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
10835$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
10836        if test ! -d $installdir; then
10837            mkdir -p $installdir
10838        fi
10839        if test ! -d $installdir; then
10840            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
10841        fi
10842        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
10843        touch $tmpfile
10844        if test ! -f $tmpfile; then
10845            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
10846        fi
10847
10848    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
10849    # $tmpfile is the local file name for the downloaded file.
10850    VALID_TOOL=no
10851    if test "x$BDEPS_FTP" = xwget; then
10852       VALID_TOOL=yes
10853       wget -O $tmpfile $with_builddeps_server/$resource
10854    fi
10855    if test "x$BDEPS_FTP" = xlftp; then
10856       VALID_TOOL=yes
10857       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
10858    fi
10859    if test "x$BDEPS_FTP" = xftp; then
10860        VALID_TOOL=yes
10861        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
10862        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
10863        FTPUSERPWD=${FTPSERVER%%@*}
10864        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
10865            FTPUSER=${userpwd%%:*}
10866            FTPPWD=${userpwd#*@}
10867            FTPSERVER=${FTPSERVER#*@}
10868        else
10869            FTPUSER=ftp
10870            FTPPWD=ftp
10871        fi
10872        # the "pass" command does not work on some
10873        # ftp clients (read ftp.exe) but if it works,
10874        # passive mode is better!
10875        (\
10876            echo "user $FTPUSER $FTPPWD"        ;\
10877            echo "pass"                         ;\
10878            echo "bin"                          ;\
10879            echo "get $FTPPATH $tmpfile"              ;\
10880        ) | ftp -in $FTPSERVER
10881    fi
10882    if test "x$VALID_TOOL" != xyes; then
10883       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
10884    fi
10885
10886        mv $tmpfile $installdir/$filename
10887        if test ! -s $installdir/$filename; then
10888            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
10889        fi
10890        case "$extension" in
10891            zip)  echo "Unzipping $installdir/$filename..."
10892               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
10893            ;;
10894            tar.gz) echo "Untaring $installdir/$filename..."
10895               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10896            ;;
10897            tgz) echo "Untaring $installdir/$filename..."
10898               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10899            ;;
10900            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
10901            ;;
10902        esac
10903    fi
10904    if test -f $installdir/$filename.unpacked; then
10905        depdir=$installdir
10906    fi
10907
10908	    fi
10909            # Source the builddeps file again, because in the previous command, the depdir
10910            # was updated to point at the current build dependency install directory.
10911            . $builddepsfile
10912            # Now extract variables from the builddeps.conf files.
10913            theroot=${builddep_bootjdk_ROOT}
10914            thecflags=${builddep_bootjdk_CFLAGS}
10915            thelibs=${builddep_bootjdk_LIBS}
10916            if test "x$depdir" = x; then
10917                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
10918            fi
10919            BOOT_JDK=$depdir
10920            if test "x$theroot" != x; then
10921               BOOT_JDK="$theroot"
10922            fi
10923            if test "x$thecflags" != x; then
10924               BOOT_JDK_CFLAGS="$thecflags"
10925            fi
10926            if test "x$thelibs" != x; then
10927               BOOT_JDK_LIBS="$thelibs"
10928            fi
10929            BOOT_JDK_FOUND=maybe
10930            else BOOT_JDK_FOUND=no
10931
10932        fi
10933        else BOOT_JDK_FOUND=no
10934
10935    fi
10936
10937
10938
10939    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10940    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10941      # Do we have a bin/java?
10942      if test ! -x "$BOOT_JDK/bin/java"; then
10943        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10944$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10945        BOOT_JDK_FOUND=no
10946      else
10947        # Do we have a bin/javac?
10948        if test ! -x "$BOOT_JDK/bin/javac"; then
10949          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10951          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10952$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10953          BOOT_JDK_FOUND=no
10954        else
10955          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10956          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10957            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10959            BOOT_JDK_FOUND=no
10960          else
10961            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10962            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10963
10964            # Extra M4 quote needed to protect [] in grep expression.
10965            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10966            if test "x$FOUND_VERSION_78" = x; then
10967              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10969              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10970$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10971              BOOT_JDK_FOUND=no
10972            else
10973              # We're done! :-)
10974              BOOT_JDK_FOUND=yes
10975
10976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10977
10978  # Input might be given as Windows format, start by converting to
10979  # unix format.
10980  path="$BOOT_JDK"
10981  new_path=`$CYGPATH -u "$path"`
10982
10983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10986  # "foo.exe" is OK but "foo" is an error.
10987  #
10988  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10989  # It is also a way to make sure we got the proper file name for the real test later on.
10990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10991  if test "x$test_shortpath" = x; then
10992    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10993$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10994    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10995  fi
10996
10997  # Call helper function which possibly converts this using DOS-style short mode.
10998  # If so, the updated path is stored in $new_path.
10999
11000  input_path="$new_path"
11001  # Check if we need to convert this using DOS-style short mode. If the path
11002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11003  # take no chances and rewrite it.
11004  # Note: m4 eats our [], so we need to use [ and ] instead.
11005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11006  if test "x$has_forbidden_chars" != x; then
11007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11011      # Going to short mode and back again did indeed matter. Since short mode is
11012      # case insensitive, let's make it lowercase to improve readability.
11013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11014      # Now convert it back to Unix-stile (cygpath)
11015      input_path=`$CYGPATH -u "$shortmode_path"`
11016      new_path="$input_path"
11017    fi
11018  fi
11019
11020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11021  if test "x$test_cygdrive_prefix" = x; then
11022    # As a simple fix, exclude /usr/bin since it's not a real path.
11023    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11025      # a path prefixed by /cygdrive for fixpath to work.
11026      new_path="$CYGWIN_ROOT_PATH$input_path"
11027    fi
11028  fi
11029
11030
11031  if test "x$path" != "x$new_path"; then
11032    BOOT_JDK="$new_path"
11033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11034$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11035  fi
11036
11037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11038
11039  path="$BOOT_JDK"
11040  has_colon=`$ECHO $path | $GREP ^.:`
11041  new_path="$path"
11042  if test "x$has_colon" = x; then
11043    # Not in mixed or Windows style, start by that.
11044    new_path=`cmd //c echo $path`
11045  fi
11046
11047
11048  input_path="$new_path"
11049  # Check if we need to convert this using DOS-style short mode. If the path
11050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11051  # take no chances and rewrite it.
11052  # Note: m4 eats our [], so we need to use [ and ] instead.
11053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11054  if test "x$has_forbidden_chars" != x; then
11055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11057  fi
11058
11059
11060  windows_path="$new_path"
11061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11062    unix_path=`$CYGPATH -u "$windows_path"`
11063    new_path="$unix_path"
11064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11066    new_path="$unix_path"
11067  fi
11068
11069  if test "x$path" != "x$new_path"; then
11070    BOOT_JDK="$new_path"
11071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11072$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11073  fi
11074
11075  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11076  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11077
11078  else
11079    # We're on a posix platform. Hooray! :)
11080    path="$BOOT_JDK"
11081
11082    if test ! -f "$path" && test ! -d "$path"; then
11083      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11084    fi
11085
11086    has_space=`$ECHO "$path" | $GREP " "`
11087    if test "x$has_space" != x; then
11088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11089$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11090      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11091    fi
11092  fi
11093
11094              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11095$as_echo_n "checking for Boot JDK... " >&6; }
11096              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11097$as_echo "$BOOT_JDK" >&6; }
11098              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11099$as_echo_n "checking Boot JDK version... " >&6; }
11100              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11101              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11102$as_echo "$BOOT_JDK_VERSION" >&6; }
11103            fi # end check jdk version
11104          fi # end check rt.jar
11105        fi # end check javac
11106      fi # end check java
11107    fi # end check boot jdk found
11108  fi
11109
11110
11111# Test: Is $JAVA_HOME set?
11112
11113  if test "x$BOOT_JDK_FOUND" = xno; then
11114    # Now execute the test
11115
11116    if test "x$JAVA_HOME" != x; then
11117        JAVA_HOME_PROCESSED="$JAVA_HOME"
11118
11119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11120
11121  # Input might be given as Windows format, start by converting to
11122  # unix format.
11123  path="$JAVA_HOME_PROCESSED"
11124  new_path=`$CYGPATH -u "$path"`
11125
11126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11129  # "foo.exe" is OK but "foo" is an error.
11130  #
11131  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11132  # It is also a way to make sure we got the proper file name for the real test later on.
11133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11134  if test "x$test_shortpath" = x; then
11135    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11136$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11137    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11138  fi
11139
11140  # Call helper function which possibly converts this using DOS-style short mode.
11141  # If so, the updated path is stored in $new_path.
11142
11143  input_path="$new_path"
11144  # Check if we need to convert this using DOS-style short mode. If the path
11145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11146  # take no chances and rewrite it.
11147  # Note: m4 eats our [], so we need to use [ and ] instead.
11148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11149  if test "x$has_forbidden_chars" != x; then
11150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11154      # Going to short mode and back again did indeed matter. Since short mode is
11155      # case insensitive, let's make it lowercase to improve readability.
11156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11157      # Now convert it back to Unix-stile (cygpath)
11158      input_path=`$CYGPATH -u "$shortmode_path"`
11159      new_path="$input_path"
11160    fi
11161  fi
11162
11163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11164  if test "x$test_cygdrive_prefix" = x; then
11165    # As a simple fix, exclude /usr/bin since it's not a real path.
11166    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11168      # a path prefixed by /cygdrive for fixpath to work.
11169      new_path="$CYGWIN_ROOT_PATH$input_path"
11170    fi
11171  fi
11172
11173
11174  if test "x$path" != "x$new_path"; then
11175    JAVA_HOME_PROCESSED="$new_path"
11176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11177$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11178  fi
11179
11180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11181
11182  path="$JAVA_HOME_PROCESSED"
11183  has_colon=`$ECHO $path | $GREP ^.:`
11184  new_path="$path"
11185  if test "x$has_colon" = x; then
11186    # Not in mixed or Windows style, start by that.
11187    new_path=`cmd //c echo $path`
11188  fi
11189
11190
11191  input_path="$new_path"
11192  # Check if we need to convert this using DOS-style short mode. If the path
11193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11194  # take no chances and rewrite it.
11195  # Note: m4 eats our [], so we need to use [ and ] instead.
11196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11197  if test "x$has_forbidden_chars" != x; then
11198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11200  fi
11201
11202
11203  windows_path="$new_path"
11204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11205    unix_path=`$CYGPATH -u "$windows_path"`
11206    new_path="$unix_path"
11207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11209    new_path="$unix_path"
11210  fi
11211
11212  if test "x$path" != "x$new_path"; then
11213    JAVA_HOME_PROCESSED="$new_path"
11214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11215$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11216  fi
11217
11218  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11219  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11220
11221  else
11222    # We're on a posix platform. Hooray! :)
11223    path="$JAVA_HOME_PROCESSED"
11224
11225    if test ! -f "$path" && test ! -d "$path"; then
11226      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11227    fi
11228
11229    has_space=`$ECHO "$path" | $GREP " "`
11230    if test "x$has_space" != x; then
11231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11232$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11233      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11234    fi
11235  fi
11236
11237        if test ! -d "$JAVA_HOME_PROCESSED"; then
11238            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11239$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11240        else
11241          # Aha, the user has set a JAVA_HOME
11242          # let us use that as the Boot JDK.
11243          BOOT_JDK="$JAVA_HOME_PROCESSED"
11244          BOOT_JDK_FOUND=maybe
11245          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11246$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11247        fi
11248    fi
11249
11250
11251    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11252    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11253      # Do we have a bin/java?
11254      if test ! -x "$BOOT_JDK/bin/java"; then
11255        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11256$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11257        BOOT_JDK_FOUND=no
11258      else
11259        # Do we have a bin/javac?
11260        if test ! -x "$BOOT_JDK/bin/javac"; then
11261          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11263          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11264$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11265          BOOT_JDK_FOUND=no
11266        else
11267          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11268          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11269            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11271            BOOT_JDK_FOUND=no
11272          else
11273            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11274            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11275
11276            # Extra M4 quote needed to protect [] in grep expression.
11277            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11278            if test "x$FOUND_VERSION_78" = x; then
11279              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11281              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11282$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11283              BOOT_JDK_FOUND=no
11284            else
11285              # We're done! :-)
11286              BOOT_JDK_FOUND=yes
11287
11288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11289
11290  # Input might be given as Windows format, start by converting to
11291  # unix format.
11292  path="$BOOT_JDK"
11293  new_path=`$CYGPATH -u "$path"`
11294
11295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11298  # "foo.exe" is OK but "foo" is an error.
11299  #
11300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11301  # It is also a way to make sure we got the proper file name for the real test later on.
11302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11303  if test "x$test_shortpath" = x; then
11304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11305$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11306    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11307  fi
11308
11309  # Call helper function which possibly converts this using DOS-style short mode.
11310  # If so, the updated path is stored in $new_path.
11311
11312  input_path="$new_path"
11313  # Check if we need to convert this using DOS-style short mode. If the path
11314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11315  # take no chances and rewrite it.
11316  # Note: m4 eats our [], so we need to use [ and ] instead.
11317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11318  if test "x$has_forbidden_chars" != x; then
11319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11323      # Going to short mode and back again did indeed matter. Since short mode is
11324      # case insensitive, let's make it lowercase to improve readability.
11325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11326      # Now convert it back to Unix-stile (cygpath)
11327      input_path=`$CYGPATH -u "$shortmode_path"`
11328      new_path="$input_path"
11329    fi
11330  fi
11331
11332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11333  if test "x$test_cygdrive_prefix" = x; then
11334    # As a simple fix, exclude /usr/bin since it's not a real path.
11335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11337      # a path prefixed by /cygdrive for fixpath to work.
11338      new_path="$CYGWIN_ROOT_PATH$input_path"
11339    fi
11340  fi
11341
11342
11343  if test "x$path" != "x$new_path"; then
11344    BOOT_JDK="$new_path"
11345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11346$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11347  fi
11348
11349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11350
11351  path="$BOOT_JDK"
11352  has_colon=`$ECHO $path | $GREP ^.:`
11353  new_path="$path"
11354  if test "x$has_colon" = x; then
11355    # Not in mixed or Windows style, start by that.
11356    new_path=`cmd //c echo $path`
11357  fi
11358
11359
11360  input_path="$new_path"
11361  # Check if we need to convert this using DOS-style short mode. If the path
11362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11363  # take no chances and rewrite it.
11364  # Note: m4 eats our [], so we need to use [ and ] instead.
11365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11366  if test "x$has_forbidden_chars" != x; then
11367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11369  fi
11370
11371
11372  windows_path="$new_path"
11373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11374    unix_path=`$CYGPATH -u "$windows_path"`
11375    new_path="$unix_path"
11376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11378    new_path="$unix_path"
11379  fi
11380
11381  if test "x$path" != "x$new_path"; then
11382    BOOT_JDK="$new_path"
11383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11384$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11385  fi
11386
11387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11389
11390  else
11391    # We're on a posix platform. Hooray! :)
11392    path="$BOOT_JDK"
11393
11394    if test ! -f "$path" && test ! -d "$path"; then
11395      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11396    fi
11397
11398    has_space=`$ECHO "$path" | $GREP " "`
11399    if test "x$has_space" != x; then
11400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11401$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11402      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11403    fi
11404  fi
11405
11406              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11407$as_echo_n "checking for Boot JDK... " >&6; }
11408              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11409$as_echo "$BOOT_JDK" >&6; }
11410              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11411$as_echo_n "checking Boot JDK version... " >&6; }
11412              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11413              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11414$as_echo "$BOOT_JDK_VERSION" >&6; }
11415            fi # end check jdk version
11416          fi # end check rt.jar
11417        fi # end check javac
11418      fi # end check java
11419    fi # end check boot jdk found
11420  fi
11421
11422
11423# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11424
11425  if test "x$BOOT_JDK_FOUND" = xno; then
11426    # Now execute the test
11427
11428    if test -x /usr/libexec/java_home; then
11429        BOOT_JDK=`/usr/libexec/java_home`
11430        BOOT_JDK_FOUND=maybe
11431        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11432$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11433    fi
11434
11435
11436    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11437    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11438      # Do we have a bin/java?
11439      if test ! -x "$BOOT_JDK/bin/java"; then
11440        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11442        BOOT_JDK_FOUND=no
11443      else
11444        # Do we have a bin/javac?
11445        if test ! -x "$BOOT_JDK/bin/javac"; then
11446          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11448          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11449$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11450          BOOT_JDK_FOUND=no
11451        else
11452          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11453          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11454            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11456            BOOT_JDK_FOUND=no
11457          else
11458            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11459            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11460
11461            # Extra M4 quote needed to protect [] in grep expression.
11462            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11463            if test "x$FOUND_VERSION_78" = x; then
11464              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11465$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11466              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11467$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11468              BOOT_JDK_FOUND=no
11469            else
11470              # We're done! :-)
11471              BOOT_JDK_FOUND=yes
11472
11473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11474
11475  # Input might be given as Windows format, start by converting to
11476  # unix format.
11477  path="$BOOT_JDK"
11478  new_path=`$CYGPATH -u "$path"`
11479
11480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11483  # "foo.exe" is OK but "foo" is an error.
11484  #
11485  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11486  # It is also a way to make sure we got the proper file name for the real test later on.
11487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11488  if test "x$test_shortpath" = x; then
11489    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11490$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11491    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11492  fi
11493
11494  # Call helper function which possibly converts this using DOS-style short mode.
11495  # If so, the updated path is stored in $new_path.
11496
11497  input_path="$new_path"
11498  # Check if we need to convert this using DOS-style short mode. If the path
11499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11500  # take no chances and rewrite it.
11501  # Note: m4 eats our [], so we need to use [ and ] instead.
11502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11503  if test "x$has_forbidden_chars" != x; then
11504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11508      # Going to short mode and back again did indeed matter. Since short mode is
11509      # case insensitive, let's make it lowercase to improve readability.
11510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11511      # Now convert it back to Unix-stile (cygpath)
11512      input_path=`$CYGPATH -u "$shortmode_path"`
11513      new_path="$input_path"
11514    fi
11515  fi
11516
11517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11518  if test "x$test_cygdrive_prefix" = x; then
11519    # As a simple fix, exclude /usr/bin since it's not a real path.
11520    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11522      # a path prefixed by /cygdrive for fixpath to work.
11523      new_path="$CYGWIN_ROOT_PATH$input_path"
11524    fi
11525  fi
11526
11527
11528  if test "x$path" != "x$new_path"; then
11529    BOOT_JDK="$new_path"
11530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11531$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11532  fi
11533
11534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11535
11536  path="$BOOT_JDK"
11537  has_colon=`$ECHO $path | $GREP ^.:`
11538  new_path="$path"
11539  if test "x$has_colon" = x; then
11540    # Not in mixed or Windows style, start by that.
11541    new_path=`cmd //c echo $path`
11542  fi
11543
11544
11545  input_path="$new_path"
11546  # Check if we need to convert this using DOS-style short mode. If the path
11547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11548  # take no chances and rewrite it.
11549  # Note: m4 eats our [], so we need to use [ and ] instead.
11550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11551  if test "x$has_forbidden_chars" != x; then
11552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11554  fi
11555
11556
11557  windows_path="$new_path"
11558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11559    unix_path=`$CYGPATH -u "$windows_path"`
11560    new_path="$unix_path"
11561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11563    new_path="$unix_path"
11564  fi
11565
11566  if test "x$path" != "x$new_path"; then
11567    BOOT_JDK="$new_path"
11568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11569$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11570  fi
11571
11572  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11573  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11574
11575  else
11576    # We're on a posix platform. Hooray! :)
11577    path="$BOOT_JDK"
11578
11579    if test ! -f "$path" && test ! -d "$path"; then
11580      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11581    fi
11582
11583    has_space=`$ECHO "$path" | $GREP " "`
11584    if test "x$has_space" != x; then
11585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11586$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11587      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11588    fi
11589  fi
11590
11591              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11592$as_echo_n "checking for Boot JDK... " >&6; }
11593              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11594$as_echo "$BOOT_JDK" >&6; }
11595              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11596$as_echo_n "checking Boot JDK version... " >&6; }
11597              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11598              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11599$as_echo "$BOOT_JDK_VERSION" >&6; }
11600            fi # end check jdk version
11601          fi # end check rt.jar
11602        fi # end check javac
11603      fi # end check java
11604    fi # end check boot jdk found
11605  fi
11606
11607
11608# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11609
11610  if test "x$BOOT_JDK_FOUND" = xno; then
11611    # Now execute the test
11612
11613    # Extract the first word of "javac", so it can be a program name with args.
11614set dummy javac; ac_word=$2
11615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11616$as_echo_n "checking for $ac_word... " >&6; }
11617if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11618  $as_echo_n "(cached) " >&6
11619else
11620  case $JAVAC_CHECK in
11621  [\\/]* | ?:[\\/]*)
11622  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11623  ;;
11624  *)
11625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11626for as_dir in $PATH
11627do
11628  IFS=$as_save_IFS
11629  test -z "$as_dir" && as_dir=.
11630    for ac_exec_ext in '' $ac_executable_extensions; do
11631  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11632    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11634    break 2
11635  fi
11636done
11637  done
11638IFS=$as_save_IFS
11639
11640  ;;
11641esac
11642fi
11643JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11644if test -n "$JAVAC_CHECK"; then
11645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11646$as_echo "$JAVAC_CHECK" >&6; }
11647else
11648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11649$as_echo "no" >&6; }
11650fi
11651
11652
11653    # Extract the first word of "java", so it can be a program name with args.
11654set dummy java; ac_word=$2
11655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11656$as_echo_n "checking for $ac_word... " >&6; }
11657if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11658  $as_echo_n "(cached) " >&6
11659else
11660  case $JAVA_CHECK in
11661  [\\/]* | ?:[\\/]*)
11662  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11663  ;;
11664  *)
11665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11666for as_dir in $PATH
11667do
11668  IFS=$as_save_IFS
11669  test -z "$as_dir" && as_dir=.
11670    for ac_exec_ext in '' $ac_executable_extensions; do
11671  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11672    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11674    break 2
11675  fi
11676done
11677  done
11678IFS=$as_save_IFS
11679
11680  ;;
11681esac
11682fi
11683JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11684if test -n "$JAVA_CHECK"; then
11685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11686$as_echo "$JAVA_CHECK" >&6; }
11687else
11688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11689$as_echo "no" >&6; }
11690fi
11691
11692
11693    BINARY="$JAVAC_CHECK"
11694    if test "x$JAVAC_CHECK" = x; then
11695        BINARY="$JAVA_CHECK"
11696    fi
11697    if test "x$BINARY" != x; then
11698        # So there is a java(c) binary, it might be part of a JDK.
11699        # Lets find the JDK/JRE directory by following symbolic links.
11700        # Linux/GNU systems often have links from /usr/bin/java to
11701        # /etc/alternatives/java to the real JDK binary.
11702
11703    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11704        # Follow a chain of symbolic links. Use readlink
11705        # where it exists, else fall back to horribly
11706        # complicated shell code.
11707        if test "x$READLINK_TESTED" != yes; then
11708            # On MacOSX there is a readlink tool with a different
11709            # purpose than the GNU readlink tool. Check the found readlink.
11710            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
11711            if test "x$ISGNU" = x; then
11712                 # A readlink that we do not know how to use.
11713                 # Are there other non-GNU readlinks out there?
11714                 READLINK_TESTED=yes
11715                 READLINK=
11716            fi
11717        fi
11718
11719        if test "x$READLINK" != x; then
11720            BINARY=`$READLINK -f $BINARY`
11721        else
11722            STARTDIR=$PWD
11723            COUNTER=0
11724            sym_link_dir=`$DIRNAME $BINARY`
11725            sym_link_file=`$BASENAME $BINARY`
11726            while test $COUNTER -lt 20; do
11727                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11728                if test "x$ISLINK" == x; then
11729                    # This is not a symbolic link! We are done!
11730                    break
11731                fi
11732                # The link might be relative! We have to use cd to travel safely.
11733                cd $sym_link_dir
11734                # ... and we must get the to the absolute path, not one using symbolic links.
11735                cd `pwd -P`
11736                cd `$DIRNAME $ISLINK`
11737                sym_link_dir=`$THEPWDCMD`
11738                sym_link_file=`$BASENAME $ISLINK`
11739                let COUNTER=COUNTER+1
11740            done
11741            cd $STARTDIR
11742            BINARY=$sym_link_dir/$sym_link_file
11743        fi
11744    fi
11745
11746        BOOT_JDK=`dirname "$BINARY"`
11747        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11748        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11749            # Looks like we found ourselves an JDK
11750            BOOT_JDK_FOUND=maybe
11751            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
11752$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
11753        fi
11754    fi
11755
11756
11757    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11758    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11759      # Do we have a bin/java?
11760      if test ! -x "$BOOT_JDK/bin/java"; then
11761        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11763        BOOT_JDK_FOUND=no
11764      else
11765        # Do we have a bin/javac?
11766        if test ! -x "$BOOT_JDK/bin/javac"; then
11767          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11769          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11770$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11771          BOOT_JDK_FOUND=no
11772        else
11773          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11774          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11775            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11777            BOOT_JDK_FOUND=no
11778          else
11779            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11780            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11781
11782            # Extra M4 quote needed to protect [] in grep expression.
11783            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11784            if test "x$FOUND_VERSION_78" = x; then
11785              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11786$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11787              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11788$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11789              BOOT_JDK_FOUND=no
11790            else
11791              # We're done! :-)
11792              BOOT_JDK_FOUND=yes
11793
11794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11795
11796  # Input might be given as Windows format, start by converting to
11797  # unix format.
11798  path="$BOOT_JDK"
11799  new_path=`$CYGPATH -u "$path"`
11800
11801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11804  # "foo.exe" is OK but "foo" is an error.
11805  #
11806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11807  # It is also a way to make sure we got the proper file name for the real test later on.
11808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11809  if test "x$test_shortpath" = x; then
11810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11811$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11812    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11813  fi
11814
11815  # Call helper function which possibly converts this using DOS-style short mode.
11816  # If so, the updated path is stored in $new_path.
11817
11818  input_path="$new_path"
11819  # Check if we need to convert this using DOS-style short mode. If the path
11820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11821  # take no chances and rewrite it.
11822  # Note: m4 eats our [], so we need to use [ and ] instead.
11823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11824  if test "x$has_forbidden_chars" != x; then
11825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11829      # Going to short mode and back again did indeed matter. Since short mode is
11830      # case insensitive, let's make it lowercase to improve readability.
11831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11832      # Now convert it back to Unix-stile (cygpath)
11833      input_path=`$CYGPATH -u "$shortmode_path"`
11834      new_path="$input_path"
11835    fi
11836  fi
11837
11838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11839  if test "x$test_cygdrive_prefix" = x; then
11840    # As a simple fix, exclude /usr/bin since it's not a real path.
11841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11843      # a path prefixed by /cygdrive for fixpath to work.
11844      new_path="$CYGWIN_ROOT_PATH$input_path"
11845    fi
11846  fi
11847
11848
11849  if test "x$path" != "x$new_path"; then
11850    BOOT_JDK="$new_path"
11851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11852$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11853  fi
11854
11855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11856
11857  path="$BOOT_JDK"
11858  has_colon=`$ECHO $path | $GREP ^.:`
11859  new_path="$path"
11860  if test "x$has_colon" = x; then
11861    # Not in mixed or Windows style, start by that.
11862    new_path=`cmd //c echo $path`
11863  fi
11864
11865
11866  input_path="$new_path"
11867  # Check if we need to convert this using DOS-style short mode. If the path
11868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11869  # take no chances and rewrite it.
11870  # Note: m4 eats our [], so we need to use [ and ] instead.
11871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11872  if test "x$has_forbidden_chars" != x; then
11873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11875  fi
11876
11877
11878  windows_path="$new_path"
11879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11880    unix_path=`$CYGPATH -u "$windows_path"`
11881    new_path="$unix_path"
11882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11884    new_path="$unix_path"
11885  fi
11886
11887  if test "x$path" != "x$new_path"; then
11888    BOOT_JDK="$new_path"
11889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11891  fi
11892
11893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11895
11896  else
11897    # We're on a posix platform. Hooray! :)
11898    path="$BOOT_JDK"
11899
11900    if test ! -f "$path" && test ! -d "$path"; then
11901      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11902    fi
11903
11904    has_space=`$ECHO "$path" | $GREP " "`
11905    if test "x$has_space" != x; then
11906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11907$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11908      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11909    fi
11910  fi
11911
11912              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11913$as_echo_n "checking for Boot JDK... " >&6; }
11914              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11915$as_echo "$BOOT_JDK" >&6; }
11916              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11917$as_echo_n "checking Boot JDK version... " >&6; }
11918              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11919              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11920$as_echo "$BOOT_JDK_VERSION" >&6; }
11921            fi # end check jdk version
11922          fi # end check rt.jar
11923        fi # end check javac
11924      fi # end check java
11925    fi # end check boot jdk found
11926  fi
11927
11928
11929# Test: Is there a JDK installed in default, well-known locations?
11930
11931  if test "x$BOOT_JDK_FOUND" = xno; then
11932    # Now execute the test
11933
11934  if test "x$OPENJDK_TARGET_OS" = xwindows; then
11935
11936  if test "x$BOOT_JDK_FOUND" = xno; then
11937    # Now execute the test
11938
11939  if test "x$ProgramW6432" != x; then
11940    VIRTUAL_DIR="$ProgramW6432/Java"
11941
11942  windows_path="$VIRTUAL_DIR"
11943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11944    unix_path=`$CYGPATH -u "$windows_path"`
11945    VIRTUAL_DIR="$unix_path"
11946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11948    VIRTUAL_DIR="$unix_path"
11949  fi
11950
11951
11952  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
11953  BOOT_JDK_SUFFIX=""
11954  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
11955  if test "x$ALL_JDKS_FOUND" != x; then
11956    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
11957
11958  if test "x$BOOT_JDK_FOUND" = xno; then
11959    # Now execute the test
11960
11961        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
11962        if test -d "$BOOT_JDK"; then
11963          BOOT_JDK_FOUND=maybe
11964          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
11965$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
11966        fi
11967
11968
11969    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11970    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11971      # Do we have a bin/java?
11972      if test ! -x "$BOOT_JDK/bin/java"; then
11973        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11974$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11975        BOOT_JDK_FOUND=no
11976      else
11977        # Do we have a bin/javac?
11978        if test ! -x "$BOOT_JDK/bin/javac"; then
11979          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11981          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11982$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11983          BOOT_JDK_FOUND=no
11984        else
11985          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11986          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11987            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11989            BOOT_JDK_FOUND=no
11990          else
11991            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11992            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11993
11994            # Extra M4 quote needed to protect [] in grep expression.
11995            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11996            if test "x$FOUND_VERSION_78" = x; then
11997              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11999              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12000$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12001              BOOT_JDK_FOUND=no
12002            else
12003              # We're done! :-)
12004              BOOT_JDK_FOUND=yes
12005
12006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12007
12008  # Input might be given as Windows format, start by converting to
12009  # unix format.
12010  path="$BOOT_JDK"
12011  new_path=`$CYGPATH -u "$path"`
12012
12013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12016  # "foo.exe" is OK but "foo" is an error.
12017  #
12018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12019  # It is also a way to make sure we got the proper file name for the real test later on.
12020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12021  if test "x$test_shortpath" = x; then
12022    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12023$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12024    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12025  fi
12026
12027  # Call helper function which possibly converts this using DOS-style short mode.
12028  # If so, the updated path is stored in $new_path.
12029
12030  input_path="$new_path"
12031  # Check if we need to convert this using DOS-style short mode. If the path
12032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12033  # take no chances and rewrite it.
12034  # Note: m4 eats our [], so we need to use [ and ] instead.
12035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12036  if test "x$has_forbidden_chars" != x; then
12037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12041      # Going to short mode and back again did indeed matter. Since short mode is
12042      # case insensitive, let's make it lowercase to improve readability.
12043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12044      # Now convert it back to Unix-stile (cygpath)
12045      input_path=`$CYGPATH -u "$shortmode_path"`
12046      new_path="$input_path"
12047    fi
12048  fi
12049
12050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12051  if test "x$test_cygdrive_prefix" = x; then
12052    # As a simple fix, exclude /usr/bin since it's not a real path.
12053    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12055      # a path prefixed by /cygdrive for fixpath to work.
12056      new_path="$CYGWIN_ROOT_PATH$input_path"
12057    fi
12058  fi
12059
12060
12061  if test "x$path" != "x$new_path"; then
12062    BOOT_JDK="$new_path"
12063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12064$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12065  fi
12066
12067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12068
12069  path="$BOOT_JDK"
12070  has_colon=`$ECHO $path | $GREP ^.:`
12071  new_path="$path"
12072  if test "x$has_colon" = x; then
12073    # Not in mixed or Windows style, start by that.
12074    new_path=`cmd //c echo $path`
12075  fi
12076
12077
12078  input_path="$new_path"
12079  # Check if we need to convert this using DOS-style short mode. If the path
12080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12081  # take no chances and rewrite it.
12082  # Note: m4 eats our [], so we need to use [ and ] instead.
12083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12084  if test "x$has_forbidden_chars" != x; then
12085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12087  fi
12088
12089
12090  windows_path="$new_path"
12091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12092    unix_path=`$CYGPATH -u "$windows_path"`
12093    new_path="$unix_path"
12094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12096    new_path="$unix_path"
12097  fi
12098
12099  if test "x$path" != "x$new_path"; then
12100    BOOT_JDK="$new_path"
12101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12102$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12103  fi
12104
12105  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12106  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12107
12108  else
12109    # We're on a posix platform. Hooray! :)
12110    path="$BOOT_JDK"
12111
12112    if test ! -f "$path" && test ! -d "$path"; then
12113      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12114    fi
12115
12116    has_space=`$ECHO "$path" | $GREP " "`
12117    if test "x$has_space" != x; then
12118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12119$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12120      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12121    fi
12122  fi
12123
12124              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12125$as_echo_n "checking for Boot JDK... " >&6; }
12126              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12127$as_echo "$BOOT_JDK" >&6; }
12128              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12129$as_echo_n "checking Boot JDK version... " >&6; }
12130              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12131              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12132$as_echo "$BOOT_JDK_VERSION" >&6; }
12133            fi # end check jdk version
12134          fi # end check rt.jar
12135        fi # end check javac
12136      fi # end check java
12137    fi # end check boot jdk found
12138  fi
12139
12140    done
12141  fi
12142
12143  fi
12144
12145
12146    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12147    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12148      # Do we have a bin/java?
12149      if test ! -x "$BOOT_JDK/bin/java"; then
12150        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12152        BOOT_JDK_FOUND=no
12153      else
12154        # Do we have a bin/javac?
12155        if test ! -x "$BOOT_JDK/bin/javac"; then
12156          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12158          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12159$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12160          BOOT_JDK_FOUND=no
12161        else
12162          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12163          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12164            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12166            BOOT_JDK_FOUND=no
12167          else
12168            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12169            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12170
12171            # Extra M4 quote needed to protect [] in grep expression.
12172            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12173            if test "x$FOUND_VERSION_78" = x; then
12174              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12176              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12177$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12178              BOOT_JDK_FOUND=no
12179            else
12180              # We're done! :-)
12181              BOOT_JDK_FOUND=yes
12182
12183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12184
12185  # Input might be given as Windows format, start by converting to
12186  # unix format.
12187  path="$BOOT_JDK"
12188  new_path=`$CYGPATH -u "$path"`
12189
12190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12193  # "foo.exe" is OK but "foo" is an error.
12194  #
12195  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12196  # It is also a way to make sure we got the proper file name for the real test later on.
12197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12198  if test "x$test_shortpath" = x; then
12199    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12200$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12201    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12202  fi
12203
12204  # Call helper function which possibly converts this using DOS-style short mode.
12205  # If so, the updated path is stored in $new_path.
12206
12207  input_path="$new_path"
12208  # Check if we need to convert this using DOS-style short mode. If the path
12209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12210  # take no chances and rewrite it.
12211  # Note: m4 eats our [], so we need to use [ and ] instead.
12212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12213  if test "x$has_forbidden_chars" != x; then
12214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12218      # Going to short mode and back again did indeed matter. Since short mode is
12219      # case insensitive, let's make it lowercase to improve readability.
12220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12221      # Now convert it back to Unix-stile (cygpath)
12222      input_path=`$CYGPATH -u "$shortmode_path"`
12223      new_path="$input_path"
12224    fi
12225  fi
12226
12227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12228  if test "x$test_cygdrive_prefix" = x; then
12229    # As a simple fix, exclude /usr/bin since it's not a real path.
12230    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12232      # a path prefixed by /cygdrive for fixpath to work.
12233      new_path="$CYGWIN_ROOT_PATH$input_path"
12234    fi
12235  fi
12236
12237
12238  if test "x$path" != "x$new_path"; then
12239    BOOT_JDK="$new_path"
12240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12241$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12242  fi
12243
12244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12245
12246  path="$BOOT_JDK"
12247  has_colon=`$ECHO $path | $GREP ^.:`
12248  new_path="$path"
12249  if test "x$has_colon" = x; then
12250    # Not in mixed or Windows style, start by that.
12251    new_path=`cmd //c echo $path`
12252  fi
12253
12254
12255  input_path="$new_path"
12256  # Check if we need to convert this using DOS-style short mode. If the path
12257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12258  # take no chances and rewrite it.
12259  # Note: m4 eats our [], so we need to use [ and ] instead.
12260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12261  if test "x$has_forbidden_chars" != x; then
12262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12263    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12264  fi
12265
12266
12267  windows_path="$new_path"
12268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12269    unix_path=`$CYGPATH -u "$windows_path"`
12270    new_path="$unix_path"
12271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12273    new_path="$unix_path"
12274  fi
12275
12276  if test "x$path" != "x$new_path"; then
12277    BOOT_JDK="$new_path"
12278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12279$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12280  fi
12281
12282  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12283  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12284
12285  else
12286    # We're on a posix platform. Hooray! :)
12287    path="$BOOT_JDK"
12288
12289    if test ! -f "$path" && test ! -d "$path"; then
12290      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12291    fi
12292
12293    has_space=`$ECHO "$path" | $GREP " "`
12294    if test "x$has_space" != x; then
12295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12296$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12297      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12298    fi
12299  fi
12300
12301              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12302$as_echo_n "checking for Boot JDK... " >&6; }
12303              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12304$as_echo "$BOOT_JDK" >&6; }
12305              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12306$as_echo_n "checking Boot JDK version... " >&6; }
12307              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12308              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12309$as_echo "$BOOT_JDK_VERSION" >&6; }
12310            fi # end check jdk version
12311          fi # end check rt.jar
12312        fi # end check javac
12313      fi # end check java
12314    fi # end check boot jdk found
12315  fi
12316
12317
12318  if test "x$BOOT_JDK_FOUND" = xno; then
12319    # Now execute the test
12320
12321  if test "x$PROGRAMW6432" != x; then
12322    VIRTUAL_DIR="$PROGRAMW6432/Java"
12323
12324  windows_path="$VIRTUAL_DIR"
12325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12326    unix_path=`$CYGPATH -u "$windows_path"`
12327    VIRTUAL_DIR="$unix_path"
12328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12330    VIRTUAL_DIR="$unix_path"
12331  fi
12332
12333
12334  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12335  BOOT_JDK_SUFFIX=""
12336  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12337  if test "x$ALL_JDKS_FOUND" != x; then
12338    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12339
12340  if test "x$BOOT_JDK_FOUND" = xno; then
12341    # Now execute the test
12342
12343        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12344        if test -d "$BOOT_JDK"; then
12345          BOOT_JDK_FOUND=maybe
12346          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12347$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12348        fi
12349
12350
12351    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12352    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12353      # Do we have a bin/java?
12354      if test ! -x "$BOOT_JDK/bin/java"; then
12355        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12357        BOOT_JDK_FOUND=no
12358      else
12359        # Do we have a bin/javac?
12360        if test ! -x "$BOOT_JDK/bin/javac"; then
12361          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12363          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12364$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12365          BOOT_JDK_FOUND=no
12366        else
12367          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12368          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12369            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12371            BOOT_JDK_FOUND=no
12372          else
12373            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12374            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12375
12376            # Extra M4 quote needed to protect [] in grep expression.
12377            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12378            if test "x$FOUND_VERSION_78" = x; then
12379              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12381              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12382$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12383              BOOT_JDK_FOUND=no
12384            else
12385              # We're done! :-)
12386              BOOT_JDK_FOUND=yes
12387
12388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12389
12390  # Input might be given as Windows format, start by converting to
12391  # unix format.
12392  path="$BOOT_JDK"
12393  new_path=`$CYGPATH -u "$path"`
12394
12395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12398  # "foo.exe" is OK but "foo" is an error.
12399  #
12400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12401  # It is also a way to make sure we got the proper file name for the real test later on.
12402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12403  if test "x$test_shortpath" = x; then
12404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12405$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12406    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12407  fi
12408
12409  # Call helper function which possibly converts this using DOS-style short mode.
12410  # If so, the updated path is stored in $new_path.
12411
12412  input_path="$new_path"
12413  # Check if we need to convert this using DOS-style short mode. If the path
12414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12415  # take no chances and rewrite it.
12416  # Note: m4 eats our [], so we need to use [ and ] instead.
12417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12418  if test "x$has_forbidden_chars" != x; then
12419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12423      # Going to short mode and back again did indeed matter. Since short mode is
12424      # case insensitive, let's make it lowercase to improve readability.
12425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12426      # Now convert it back to Unix-stile (cygpath)
12427      input_path=`$CYGPATH -u "$shortmode_path"`
12428      new_path="$input_path"
12429    fi
12430  fi
12431
12432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12433  if test "x$test_cygdrive_prefix" = x; then
12434    # As a simple fix, exclude /usr/bin since it's not a real path.
12435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12437      # a path prefixed by /cygdrive for fixpath to work.
12438      new_path="$CYGWIN_ROOT_PATH$input_path"
12439    fi
12440  fi
12441
12442
12443  if test "x$path" != "x$new_path"; then
12444    BOOT_JDK="$new_path"
12445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12446$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12447  fi
12448
12449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12450
12451  path="$BOOT_JDK"
12452  has_colon=`$ECHO $path | $GREP ^.:`
12453  new_path="$path"
12454  if test "x$has_colon" = x; then
12455    # Not in mixed or Windows style, start by that.
12456    new_path=`cmd //c echo $path`
12457  fi
12458
12459
12460  input_path="$new_path"
12461  # Check if we need to convert this using DOS-style short mode. If the path
12462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12463  # take no chances and rewrite it.
12464  # Note: m4 eats our [], so we need to use [ and ] instead.
12465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12466  if test "x$has_forbidden_chars" != x; then
12467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12469  fi
12470
12471
12472  windows_path="$new_path"
12473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12474    unix_path=`$CYGPATH -u "$windows_path"`
12475    new_path="$unix_path"
12476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12478    new_path="$unix_path"
12479  fi
12480
12481  if test "x$path" != "x$new_path"; then
12482    BOOT_JDK="$new_path"
12483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12485  fi
12486
12487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12489
12490  else
12491    # We're on a posix platform. Hooray! :)
12492    path="$BOOT_JDK"
12493
12494    if test ! -f "$path" && test ! -d "$path"; then
12495      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12496    fi
12497
12498    has_space=`$ECHO "$path" | $GREP " "`
12499    if test "x$has_space" != x; then
12500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12501$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12502      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12503    fi
12504  fi
12505
12506              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12507$as_echo_n "checking for Boot JDK... " >&6; }
12508              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12509$as_echo "$BOOT_JDK" >&6; }
12510              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12511$as_echo_n "checking Boot JDK version... " >&6; }
12512              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12513              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12514$as_echo "$BOOT_JDK_VERSION" >&6; }
12515            fi # end check jdk version
12516          fi # end check rt.jar
12517        fi # end check javac
12518      fi # end check java
12519    fi # end check boot jdk found
12520  fi
12521
12522    done
12523  fi
12524
12525  fi
12526
12527
12528    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12529    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12530      # Do we have a bin/java?
12531      if test ! -x "$BOOT_JDK/bin/java"; then
12532        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12534        BOOT_JDK_FOUND=no
12535      else
12536        # Do we have a bin/javac?
12537        if test ! -x "$BOOT_JDK/bin/javac"; then
12538          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12540          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12541$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12542          BOOT_JDK_FOUND=no
12543        else
12544          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12545          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12546            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12548            BOOT_JDK_FOUND=no
12549          else
12550            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12551            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12552
12553            # Extra M4 quote needed to protect [] in grep expression.
12554            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12555            if test "x$FOUND_VERSION_78" = x; then
12556              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12558              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12559$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12560              BOOT_JDK_FOUND=no
12561            else
12562              # We're done! :-)
12563              BOOT_JDK_FOUND=yes
12564
12565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12566
12567  # Input might be given as Windows format, start by converting to
12568  # unix format.
12569  path="$BOOT_JDK"
12570  new_path=`$CYGPATH -u "$path"`
12571
12572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12575  # "foo.exe" is OK but "foo" is an error.
12576  #
12577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12578  # It is also a way to make sure we got the proper file name for the real test later on.
12579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12580  if test "x$test_shortpath" = x; then
12581    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12582$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12583    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12584  fi
12585
12586  # Call helper function which possibly converts this using DOS-style short mode.
12587  # If so, the updated path is stored in $new_path.
12588
12589  input_path="$new_path"
12590  # Check if we need to convert this using DOS-style short mode. If the path
12591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12592  # take no chances and rewrite it.
12593  # Note: m4 eats our [], so we need to use [ and ] instead.
12594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12595  if test "x$has_forbidden_chars" != x; then
12596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12600      # Going to short mode and back again did indeed matter. Since short mode is
12601      # case insensitive, let's make it lowercase to improve readability.
12602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12603      # Now convert it back to Unix-stile (cygpath)
12604      input_path=`$CYGPATH -u "$shortmode_path"`
12605      new_path="$input_path"
12606    fi
12607  fi
12608
12609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12610  if test "x$test_cygdrive_prefix" = x; then
12611    # As a simple fix, exclude /usr/bin since it's not a real path.
12612    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12614      # a path prefixed by /cygdrive for fixpath to work.
12615      new_path="$CYGWIN_ROOT_PATH$input_path"
12616    fi
12617  fi
12618
12619
12620  if test "x$path" != "x$new_path"; then
12621    BOOT_JDK="$new_path"
12622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12623$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12624  fi
12625
12626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12627
12628  path="$BOOT_JDK"
12629  has_colon=`$ECHO $path | $GREP ^.:`
12630  new_path="$path"
12631  if test "x$has_colon" = x; then
12632    # Not in mixed or Windows style, start by that.
12633    new_path=`cmd //c echo $path`
12634  fi
12635
12636
12637  input_path="$new_path"
12638  # Check if we need to convert this using DOS-style short mode. If the path
12639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12640  # take no chances and rewrite it.
12641  # Note: m4 eats our [], so we need to use [ and ] instead.
12642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12643  if test "x$has_forbidden_chars" != x; then
12644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12646  fi
12647
12648
12649  windows_path="$new_path"
12650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12651    unix_path=`$CYGPATH -u "$windows_path"`
12652    new_path="$unix_path"
12653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12655    new_path="$unix_path"
12656  fi
12657
12658  if test "x$path" != "x$new_path"; then
12659    BOOT_JDK="$new_path"
12660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12661$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12662  fi
12663
12664  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12665  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12666
12667  else
12668    # We're on a posix platform. Hooray! :)
12669    path="$BOOT_JDK"
12670
12671    if test ! -f "$path" && test ! -d "$path"; then
12672      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12673    fi
12674
12675    has_space=`$ECHO "$path" | $GREP " "`
12676    if test "x$has_space" != x; then
12677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12678$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12679      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12680    fi
12681  fi
12682
12683              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12684$as_echo_n "checking for Boot JDK... " >&6; }
12685              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12686$as_echo "$BOOT_JDK" >&6; }
12687              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12688$as_echo_n "checking Boot JDK version... " >&6; }
12689              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12690              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12691$as_echo "$BOOT_JDK_VERSION" >&6; }
12692            fi # end check jdk version
12693          fi # end check rt.jar
12694        fi # end check javac
12695      fi # end check java
12696    fi # end check boot jdk found
12697  fi
12698
12699
12700  if test "x$BOOT_JDK_FOUND" = xno; then
12701    # Now execute the test
12702
12703  if test "x$PROGRAMFILES" != x; then
12704    VIRTUAL_DIR="$PROGRAMFILES/Java"
12705
12706  windows_path="$VIRTUAL_DIR"
12707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12708    unix_path=`$CYGPATH -u "$windows_path"`
12709    VIRTUAL_DIR="$unix_path"
12710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12712    VIRTUAL_DIR="$unix_path"
12713  fi
12714
12715
12716  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12717  BOOT_JDK_SUFFIX=""
12718  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12719  if test "x$ALL_JDKS_FOUND" != x; then
12720    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12721
12722  if test "x$BOOT_JDK_FOUND" = xno; then
12723    # Now execute the test
12724
12725        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12726        if test -d "$BOOT_JDK"; then
12727          BOOT_JDK_FOUND=maybe
12728          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12729$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12730        fi
12731
12732
12733    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12734    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12735      # Do we have a bin/java?
12736      if test ! -x "$BOOT_JDK/bin/java"; then
12737        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12739        BOOT_JDK_FOUND=no
12740      else
12741        # Do we have a bin/javac?
12742        if test ! -x "$BOOT_JDK/bin/javac"; then
12743          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12745          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12746$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12747          BOOT_JDK_FOUND=no
12748        else
12749          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12750          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12751            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12753            BOOT_JDK_FOUND=no
12754          else
12755            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12756            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12757
12758            # Extra M4 quote needed to protect [] in grep expression.
12759            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12760            if test "x$FOUND_VERSION_78" = x; then
12761              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12763              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12764$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12765              BOOT_JDK_FOUND=no
12766            else
12767              # We're done! :-)
12768              BOOT_JDK_FOUND=yes
12769
12770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12771
12772  # Input might be given as Windows format, start by converting to
12773  # unix format.
12774  path="$BOOT_JDK"
12775  new_path=`$CYGPATH -u "$path"`
12776
12777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12780  # "foo.exe" is OK but "foo" is an error.
12781  #
12782  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12783  # It is also a way to make sure we got the proper file name for the real test later on.
12784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12785  if test "x$test_shortpath" = x; then
12786    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12787$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12788    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12789  fi
12790
12791  # Call helper function which possibly converts this using DOS-style short mode.
12792  # If so, the updated path is stored in $new_path.
12793
12794  input_path="$new_path"
12795  # Check if we need to convert this using DOS-style short mode. If the path
12796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12797  # take no chances and rewrite it.
12798  # Note: m4 eats our [], so we need to use [ and ] instead.
12799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12800  if test "x$has_forbidden_chars" != x; then
12801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12805      # Going to short mode and back again did indeed matter. Since short mode is
12806      # case insensitive, let's make it lowercase to improve readability.
12807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12808      # Now convert it back to Unix-stile (cygpath)
12809      input_path=`$CYGPATH -u "$shortmode_path"`
12810      new_path="$input_path"
12811    fi
12812  fi
12813
12814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12815  if test "x$test_cygdrive_prefix" = x; then
12816    # As a simple fix, exclude /usr/bin since it's not a real path.
12817    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12819      # a path prefixed by /cygdrive for fixpath to work.
12820      new_path="$CYGWIN_ROOT_PATH$input_path"
12821    fi
12822  fi
12823
12824
12825  if test "x$path" != "x$new_path"; then
12826    BOOT_JDK="$new_path"
12827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12828$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12829  fi
12830
12831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12832
12833  path="$BOOT_JDK"
12834  has_colon=`$ECHO $path | $GREP ^.:`
12835  new_path="$path"
12836  if test "x$has_colon" = x; then
12837    # Not in mixed or Windows style, start by that.
12838    new_path=`cmd //c echo $path`
12839  fi
12840
12841
12842  input_path="$new_path"
12843  # Check if we need to convert this using DOS-style short mode. If the path
12844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12845  # take no chances and rewrite it.
12846  # Note: m4 eats our [], so we need to use [ and ] instead.
12847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12848  if test "x$has_forbidden_chars" != x; then
12849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12850    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12851  fi
12852
12853
12854  windows_path="$new_path"
12855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12856    unix_path=`$CYGPATH -u "$windows_path"`
12857    new_path="$unix_path"
12858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12860    new_path="$unix_path"
12861  fi
12862
12863  if test "x$path" != "x$new_path"; then
12864    BOOT_JDK="$new_path"
12865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12866$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12867  fi
12868
12869  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12870  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12871
12872  else
12873    # We're on a posix platform. Hooray! :)
12874    path="$BOOT_JDK"
12875
12876    if test ! -f "$path" && test ! -d "$path"; then
12877      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12878    fi
12879
12880    has_space=`$ECHO "$path" | $GREP " "`
12881    if test "x$has_space" != x; then
12882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12883$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12884      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12885    fi
12886  fi
12887
12888              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12889$as_echo_n "checking for Boot JDK... " >&6; }
12890              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12891$as_echo "$BOOT_JDK" >&6; }
12892              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12893$as_echo_n "checking Boot JDK version... " >&6; }
12894              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12895              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12896$as_echo "$BOOT_JDK_VERSION" >&6; }
12897            fi # end check jdk version
12898          fi # end check rt.jar
12899        fi # end check javac
12900      fi # end check java
12901    fi # end check boot jdk found
12902  fi
12903
12904    done
12905  fi
12906
12907  fi
12908
12909
12910    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12911    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12912      # Do we have a bin/java?
12913      if test ! -x "$BOOT_JDK/bin/java"; then
12914        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12915$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12916        BOOT_JDK_FOUND=no
12917      else
12918        # Do we have a bin/javac?
12919        if test ! -x "$BOOT_JDK/bin/javac"; then
12920          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12921$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12922          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12923$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12924          BOOT_JDK_FOUND=no
12925        else
12926          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12927          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12928            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12930            BOOT_JDK_FOUND=no
12931          else
12932            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12933            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12934
12935            # Extra M4 quote needed to protect [] in grep expression.
12936            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12937            if test "x$FOUND_VERSION_78" = x; then
12938              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12939$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12940              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12941$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12942              BOOT_JDK_FOUND=no
12943            else
12944              # We're done! :-)
12945              BOOT_JDK_FOUND=yes
12946
12947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12948
12949  # Input might be given as Windows format, start by converting to
12950  # unix format.
12951  path="$BOOT_JDK"
12952  new_path=`$CYGPATH -u "$path"`
12953
12954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12957  # "foo.exe" is OK but "foo" is an error.
12958  #
12959  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12960  # It is also a way to make sure we got the proper file name for the real test later on.
12961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12962  if test "x$test_shortpath" = x; then
12963    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12964$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12965    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12966  fi
12967
12968  # Call helper function which possibly converts this using DOS-style short mode.
12969  # If so, the updated path is stored in $new_path.
12970
12971  input_path="$new_path"
12972  # Check if we need to convert this using DOS-style short mode. If the path
12973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12974  # take no chances and rewrite it.
12975  # Note: m4 eats our [], so we need to use [ and ] instead.
12976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12977  if test "x$has_forbidden_chars" != x; then
12978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12982      # Going to short mode and back again did indeed matter. Since short mode is
12983      # case insensitive, let's make it lowercase to improve readability.
12984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12985      # Now convert it back to Unix-stile (cygpath)
12986      input_path=`$CYGPATH -u "$shortmode_path"`
12987      new_path="$input_path"
12988    fi
12989  fi
12990
12991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12992  if test "x$test_cygdrive_prefix" = x; then
12993    # As a simple fix, exclude /usr/bin since it's not a real path.
12994    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12996      # a path prefixed by /cygdrive for fixpath to work.
12997      new_path="$CYGWIN_ROOT_PATH$input_path"
12998    fi
12999  fi
13000
13001
13002  if test "x$path" != "x$new_path"; then
13003    BOOT_JDK="$new_path"
13004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13005$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13006  fi
13007
13008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13009
13010  path="$BOOT_JDK"
13011  has_colon=`$ECHO $path | $GREP ^.:`
13012  new_path="$path"
13013  if test "x$has_colon" = x; then
13014    # Not in mixed or Windows style, start by that.
13015    new_path=`cmd //c echo $path`
13016  fi
13017
13018
13019  input_path="$new_path"
13020  # Check if we need to convert this using DOS-style short mode. If the path
13021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13022  # take no chances and rewrite it.
13023  # Note: m4 eats our [], so we need to use [ and ] instead.
13024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13025  if test "x$has_forbidden_chars" != x; then
13026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13028  fi
13029
13030
13031  windows_path="$new_path"
13032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13033    unix_path=`$CYGPATH -u "$windows_path"`
13034    new_path="$unix_path"
13035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13037    new_path="$unix_path"
13038  fi
13039
13040  if test "x$path" != "x$new_path"; then
13041    BOOT_JDK="$new_path"
13042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13043$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13044  fi
13045
13046  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13047  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13048
13049  else
13050    # We're on a posix platform. Hooray! :)
13051    path="$BOOT_JDK"
13052
13053    if test ! -f "$path" && test ! -d "$path"; then
13054      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13055    fi
13056
13057    has_space=`$ECHO "$path" | $GREP " "`
13058    if test "x$has_space" != x; then
13059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13060$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13061      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13062    fi
13063  fi
13064
13065              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13066$as_echo_n "checking for Boot JDK... " >&6; }
13067              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13068$as_echo "$BOOT_JDK" >&6; }
13069              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13070$as_echo_n "checking Boot JDK version... " >&6; }
13071              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13072              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13073$as_echo "$BOOT_JDK_VERSION" >&6; }
13074            fi # end check jdk version
13075          fi # end check rt.jar
13076        fi # end check javac
13077      fi # end check java
13078    fi # end check boot jdk found
13079  fi
13080
13081
13082  if test "x$BOOT_JDK_FOUND" = xno; then
13083    # Now execute the test
13084
13085  if test "x$ProgramFiles" != x; then
13086    VIRTUAL_DIR="$ProgramFiles/Java"
13087
13088  windows_path="$VIRTUAL_DIR"
13089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13090    unix_path=`$CYGPATH -u "$windows_path"`
13091    VIRTUAL_DIR="$unix_path"
13092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13094    VIRTUAL_DIR="$unix_path"
13095  fi
13096
13097
13098  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13099  BOOT_JDK_SUFFIX=""
13100  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13101  if test "x$ALL_JDKS_FOUND" != x; then
13102    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13103
13104  if test "x$BOOT_JDK_FOUND" = xno; then
13105    # Now execute the test
13106
13107        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13108        if test -d "$BOOT_JDK"; then
13109          BOOT_JDK_FOUND=maybe
13110          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13111$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13112        fi
13113
13114
13115    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13116    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13117      # Do we have a bin/java?
13118      if test ! -x "$BOOT_JDK/bin/java"; then
13119        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13121        BOOT_JDK_FOUND=no
13122      else
13123        # Do we have a bin/javac?
13124        if test ! -x "$BOOT_JDK/bin/javac"; then
13125          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13127          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13128$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13129          BOOT_JDK_FOUND=no
13130        else
13131          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13132          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13133            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13135            BOOT_JDK_FOUND=no
13136          else
13137            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13138            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13139
13140            # Extra M4 quote needed to protect [] in grep expression.
13141            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13142            if test "x$FOUND_VERSION_78" = x; then
13143              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13145              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13146$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13147              BOOT_JDK_FOUND=no
13148            else
13149              # We're done! :-)
13150              BOOT_JDK_FOUND=yes
13151
13152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13153
13154  # Input might be given as Windows format, start by converting to
13155  # unix format.
13156  path="$BOOT_JDK"
13157  new_path=`$CYGPATH -u "$path"`
13158
13159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13162  # "foo.exe" is OK but "foo" is an error.
13163  #
13164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13165  # It is also a way to make sure we got the proper file name for the real test later on.
13166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13167  if test "x$test_shortpath" = x; then
13168    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13169$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13170    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13171  fi
13172
13173  # Call helper function which possibly converts this using DOS-style short mode.
13174  # If so, the updated path is stored in $new_path.
13175
13176  input_path="$new_path"
13177  # Check if we need to convert this using DOS-style short mode. If the path
13178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13179  # take no chances and rewrite it.
13180  # Note: m4 eats our [], so we need to use [ and ] instead.
13181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13182  if test "x$has_forbidden_chars" != x; then
13183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13187      # Going to short mode and back again did indeed matter. Since short mode is
13188      # case insensitive, let's make it lowercase to improve readability.
13189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13190      # Now convert it back to Unix-stile (cygpath)
13191      input_path=`$CYGPATH -u "$shortmode_path"`
13192      new_path="$input_path"
13193    fi
13194  fi
13195
13196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13197  if test "x$test_cygdrive_prefix" = x; then
13198    # As a simple fix, exclude /usr/bin since it's not a real path.
13199    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13201      # a path prefixed by /cygdrive for fixpath to work.
13202      new_path="$CYGWIN_ROOT_PATH$input_path"
13203    fi
13204  fi
13205
13206
13207  if test "x$path" != "x$new_path"; then
13208    BOOT_JDK="$new_path"
13209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13210$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13211  fi
13212
13213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13214
13215  path="$BOOT_JDK"
13216  has_colon=`$ECHO $path | $GREP ^.:`
13217  new_path="$path"
13218  if test "x$has_colon" = x; then
13219    # Not in mixed or Windows style, start by that.
13220    new_path=`cmd //c echo $path`
13221  fi
13222
13223
13224  input_path="$new_path"
13225  # Check if we need to convert this using DOS-style short mode. If the path
13226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13227  # take no chances and rewrite it.
13228  # Note: m4 eats our [], so we need to use [ and ] instead.
13229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13230  if test "x$has_forbidden_chars" != x; then
13231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13233  fi
13234
13235
13236  windows_path="$new_path"
13237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13238    unix_path=`$CYGPATH -u "$windows_path"`
13239    new_path="$unix_path"
13240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13242    new_path="$unix_path"
13243  fi
13244
13245  if test "x$path" != "x$new_path"; then
13246    BOOT_JDK="$new_path"
13247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13248$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13249  fi
13250
13251  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13252  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13253
13254  else
13255    # We're on a posix platform. Hooray! :)
13256    path="$BOOT_JDK"
13257
13258    if test ! -f "$path" && test ! -d "$path"; then
13259      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13260    fi
13261
13262    has_space=`$ECHO "$path" | $GREP " "`
13263    if test "x$has_space" != x; then
13264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13266      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13267    fi
13268  fi
13269
13270              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13271$as_echo_n "checking for Boot JDK... " >&6; }
13272              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13273$as_echo "$BOOT_JDK" >&6; }
13274              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13275$as_echo_n "checking Boot JDK version... " >&6; }
13276              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13277              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13278$as_echo "$BOOT_JDK_VERSION" >&6; }
13279            fi # end check jdk version
13280          fi # end check rt.jar
13281        fi # end check javac
13282      fi # end check java
13283    fi # end check boot jdk found
13284  fi
13285
13286    done
13287  fi
13288
13289  fi
13290
13291
13292    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13293    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13294      # Do we have a bin/java?
13295      if test ! -x "$BOOT_JDK/bin/java"; then
13296        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13298        BOOT_JDK_FOUND=no
13299      else
13300        # Do we have a bin/javac?
13301        if test ! -x "$BOOT_JDK/bin/javac"; then
13302          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13304          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13305$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13306          BOOT_JDK_FOUND=no
13307        else
13308          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13309          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13310            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13312            BOOT_JDK_FOUND=no
13313          else
13314            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13315            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13316
13317            # Extra M4 quote needed to protect [] in grep expression.
13318            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13319            if test "x$FOUND_VERSION_78" = x; then
13320              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13322              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13323$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13324              BOOT_JDK_FOUND=no
13325            else
13326              # We're done! :-)
13327              BOOT_JDK_FOUND=yes
13328
13329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13330
13331  # Input might be given as Windows format, start by converting to
13332  # unix format.
13333  path="$BOOT_JDK"
13334  new_path=`$CYGPATH -u "$path"`
13335
13336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13339  # "foo.exe" is OK but "foo" is an error.
13340  #
13341  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13342  # It is also a way to make sure we got the proper file name for the real test later on.
13343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13344  if test "x$test_shortpath" = x; then
13345    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13346$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13347    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13348  fi
13349
13350  # Call helper function which possibly converts this using DOS-style short mode.
13351  # If so, the updated path is stored in $new_path.
13352
13353  input_path="$new_path"
13354  # Check if we need to convert this using DOS-style short mode. If the path
13355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13356  # take no chances and rewrite it.
13357  # Note: m4 eats our [], so we need to use [ and ] instead.
13358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13359  if test "x$has_forbidden_chars" != x; then
13360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13364      # Going to short mode and back again did indeed matter. Since short mode is
13365      # case insensitive, let's make it lowercase to improve readability.
13366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13367      # Now convert it back to Unix-stile (cygpath)
13368      input_path=`$CYGPATH -u "$shortmode_path"`
13369      new_path="$input_path"
13370    fi
13371  fi
13372
13373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13374  if test "x$test_cygdrive_prefix" = x; then
13375    # As a simple fix, exclude /usr/bin since it's not a real path.
13376    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13378      # a path prefixed by /cygdrive for fixpath to work.
13379      new_path="$CYGWIN_ROOT_PATH$input_path"
13380    fi
13381  fi
13382
13383
13384  if test "x$path" != "x$new_path"; then
13385    BOOT_JDK="$new_path"
13386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13387$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13388  fi
13389
13390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13391
13392  path="$BOOT_JDK"
13393  has_colon=`$ECHO $path | $GREP ^.:`
13394  new_path="$path"
13395  if test "x$has_colon" = x; then
13396    # Not in mixed or Windows style, start by that.
13397    new_path=`cmd //c echo $path`
13398  fi
13399
13400
13401  input_path="$new_path"
13402  # Check if we need to convert this using DOS-style short mode. If the path
13403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13404  # take no chances and rewrite it.
13405  # Note: m4 eats our [], so we need to use [ and ] instead.
13406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13407  if test "x$has_forbidden_chars" != x; then
13408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13410  fi
13411
13412
13413  windows_path="$new_path"
13414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13415    unix_path=`$CYGPATH -u "$windows_path"`
13416    new_path="$unix_path"
13417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13419    new_path="$unix_path"
13420  fi
13421
13422  if test "x$path" != "x$new_path"; then
13423    BOOT_JDK="$new_path"
13424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13426  fi
13427
13428  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13429  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13430
13431  else
13432    # We're on a posix platform. Hooray! :)
13433    path="$BOOT_JDK"
13434
13435    if test ! -f "$path" && test ! -d "$path"; then
13436      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13437    fi
13438
13439    has_space=`$ECHO "$path" | $GREP " "`
13440    if test "x$has_space" != x; then
13441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13442$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13443      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13444    fi
13445  fi
13446
13447              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13448$as_echo_n "checking for Boot JDK... " >&6; }
13449              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13450$as_echo "$BOOT_JDK" >&6; }
13451              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13452$as_echo_n "checking Boot JDK version... " >&6; }
13453              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13454              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13455$as_echo "$BOOT_JDK_VERSION" >&6; }
13456            fi # end check jdk version
13457          fi # end check rt.jar
13458        fi # end check javac
13459      fi # end check java
13460    fi # end check boot jdk found
13461  fi
13462
13463
13464  if test "x$BOOT_JDK_FOUND" = xno; then
13465    # Now execute the test
13466
13467  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13468  BOOT_JDK_SUFFIX=""
13469  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13470  if test "x$ALL_JDKS_FOUND" != x; then
13471    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13472
13473  if test "x$BOOT_JDK_FOUND" = xno; then
13474    # Now execute the test
13475
13476        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13477        if test -d "$BOOT_JDK"; then
13478          BOOT_JDK_FOUND=maybe
13479          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13480$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13481        fi
13482
13483
13484    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13485    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13486      # Do we have a bin/java?
13487      if test ! -x "$BOOT_JDK/bin/java"; then
13488        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13490        BOOT_JDK_FOUND=no
13491      else
13492        # Do we have a bin/javac?
13493        if test ! -x "$BOOT_JDK/bin/javac"; then
13494          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13495$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13496          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13497$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13498          BOOT_JDK_FOUND=no
13499        else
13500          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13501          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13502            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13504            BOOT_JDK_FOUND=no
13505          else
13506            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13507            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13508
13509            # Extra M4 quote needed to protect [] in grep expression.
13510            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13511            if test "x$FOUND_VERSION_78" = x; then
13512              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13514              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13515$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13516              BOOT_JDK_FOUND=no
13517            else
13518              # We're done! :-)
13519              BOOT_JDK_FOUND=yes
13520
13521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13522
13523  # Input might be given as Windows format, start by converting to
13524  # unix format.
13525  path="$BOOT_JDK"
13526  new_path=`$CYGPATH -u "$path"`
13527
13528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13531  # "foo.exe" is OK but "foo" is an error.
13532  #
13533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13534  # It is also a way to make sure we got the proper file name for the real test later on.
13535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13536  if test "x$test_shortpath" = x; then
13537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13538$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13539    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13540  fi
13541
13542  # Call helper function which possibly converts this using DOS-style short mode.
13543  # If so, the updated path is stored in $new_path.
13544
13545  input_path="$new_path"
13546  # Check if we need to convert this using DOS-style short mode. If the path
13547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13548  # take no chances and rewrite it.
13549  # Note: m4 eats our [], so we need to use [ and ] instead.
13550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13551  if test "x$has_forbidden_chars" != x; then
13552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13556      # Going to short mode and back again did indeed matter. Since short mode is
13557      # case insensitive, let's make it lowercase to improve readability.
13558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13559      # Now convert it back to Unix-stile (cygpath)
13560      input_path=`$CYGPATH -u "$shortmode_path"`
13561      new_path="$input_path"
13562    fi
13563  fi
13564
13565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13566  if test "x$test_cygdrive_prefix" = x; then
13567    # As a simple fix, exclude /usr/bin since it's not a real path.
13568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13570      # a path prefixed by /cygdrive for fixpath to work.
13571      new_path="$CYGWIN_ROOT_PATH$input_path"
13572    fi
13573  fi
13574
13575
13576  if test "x$path" != "x$new_path"; then
13577    BOOT_JDK="$new_path"
13578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13579$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13580  fi
13581
13582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13583
13584  path="$BOOT_JDK"
13585  has_colon=`$ECHO $path | $GREP ^.:`
13586  new_path="$path"
13587  if test "x$has_colon" = x; then
13588    # Not in mixed or Windows style, start by that.
13589    new_path=`cmd //c echo $path`
13590  fi
13591
13592
13593  input_path="$new_path"
13594  # Check if we need to convert this using DOS-style short mode. If the path
13595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13596  # take no chances and rewrite it.
13597  # Note: m4 eats our [], so we need to use [ and ] instead.
13598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13599  if test "x$has_forbidden_chars" != x; then
13600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13602  fi
13603
13604
13605  windows_path="$new_path"
13606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13607    unix_path=`$CYGPATH -u "$windows_path"`
13608    new_path="$unix_path"
13609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13611    new_path="$unix_path"
13612  fi
13613
13614  if test "x$path" != "x$new_path"; then
13615    BOOT_JDK="$new_path"
13616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13617$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13618  fi
13619
13620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13622
13623  else
13624    # We're on a posix platform. Hooray! :)
13625    path="$BOOT_JDK"
13626
13627    if test ! -f "$path" && test ! -d "$path"; then
13628      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13629    fi
13630
13631    has_space=`$ECHO "$path" | $GREP " "`
13632    if test "x$has_space" != x; then
13633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13634$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13635      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13636    fi
13637  fi
13638
13639              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13640$as_echo_n "checking for Boot JDK... " >&6; }
13641              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13642$as_echo "$BOOT_JDK" >&6; }
13643              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13644$as_echo_n "checking Boot JDK version... " >&6; }
13645              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13646              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13647$as_echo "$BOOT_JDK_VERSION" >&6; }
13648            fi # end check jdk version
13649          fi # end check rt.jar
13650        fi # end check javac
13651      fi # end check java
13652    fi # end check boot jdk found
13653  fi
13654
13655    done
13656  fi
13657
13658
13659    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13660    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13661      # Do we have a bin/java?
13662      if test ! -x "$BOOT_JDK/bin/java"; then
13663        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13664$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13665        BOOT_JDK_FOUND=no
13666      else
13667        # Do we have a bin/javac?
13668        if test ! -x "$BOOT_JDK/bin/javac"; then
13669          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13671          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13672$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13673          BOOT_JDK_FOUND=no
13674        else
13675          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13676          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13677            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13678$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13679            BOOT_JDK_FOUND=no
13680          else
13681            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13682            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13683
13684            # Extra M4 quote needed to protect [] in grep expression.
13685            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13686            if test "x$FOUND_VERSION_78" = x; then
13687              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13689              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13690$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13691              BOOT_JDK_FOUND=no
13692            else
13693              # We're done! :-)
13694              BOOT_JDK_FOUND=yes
13695
13696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13697
13698  # Input might be given as Windows format, start by converting to
13699  # unix format.
13700  path="$BOOT_JDK"
13701  new_path=`$CYGPATH -u "$path"`
13702
13703  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13704  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13705  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13706  # "foo.exe" is OK but "foo" is an error.
13707  #
13708  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13709  # It is also a way to make sure we got the proper file name for the real test later on.
13710  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13711  if test "x$test_shortpath" = x; then
13712    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13713$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13714    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13715  fi
13716
13717  # Call helper function which possibly converts this using DOS-style short mode.
13718  # If so, the updated path is stored in $new_path.
13719
13720  input_path="$new_path"
13721  # Check if we need to convert this using DOS-style short mode. If the path
13722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13723  # take no chances and rewrite it.
13724  # Note: m4 eats our [], so we need to use [ and ] instead.
13725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13726  if test "x$has_forbidden_chars" != x; then
13727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13728    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13729    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13730    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13731      # Going to short mode and back again did indeed matter. Since short mode is
13732      # case insensitive, let's make it lowercase to improve readability.
13733      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13734      # Now convert it back to Unix-stile (cygpath)
13735      input_path=`$CYGPATH -u "$shortmode_path"`
13736      new_path="$input_path"
13737    fi
13738  fi
13739
13740  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13741  if test "x$test_cygdrive_prefix" = x; then
13742    # As a simple fix, exclude /usr/bin since it's not a real path.
13743    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13744      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13745      # a path prefixed by /cygdrive for fixpath to work.
13746      new_path="$CYGWIN_ROOT_PATH$input_path"
13747    fi
13748  fi
13749
13750
13751  if test "x$path" != "x$new_path"; then
13752    BOOT_JDK="$new_path"
13753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13754$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13755  fi
13756
13757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13758
13759  path="$BOOT_JDK"
13760  has_colon=`$ECHO $path | $GREP ^.:`
13761  new_path="$path"
13762  if test "x$has_colon" = x; then
13763    # Not in mixed or Windows style, start by that.
13764    new_path=`cmd //c echo $path`
13765  fi
13766
13767
13768  input_path="$new_path"
13769  # Check if we need to convert this using DOS-style short mode. If the path
13770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13771  # take no chances and rewrite it.
13772  # Note: m4 eats our [], so we need to use [ and ] instead.
13773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13774  if test "x$has_forbidden_chars" != x; then
13775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13776    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13777  fi
13778
13779
13780  windows_path="$new_path"
13781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13782    unix_path=`$CYGPATH -u "$windows_path"`
13783    new_path="$unix_path"
13784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13786    new_path="$unix_path"
13787  fi
13788
13789  if test "x$path" != "x$new_path"; then
13790    BOOT_JDK="$new_path"
13791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13792$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13793  fi
13794
13795  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13796  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13797
13798  else
13799    # We're on a posix platform. Hooray! :)
13800    path="$BOOT_JDK"
13801
13802    if test ! -f "$path" && test ! -d "$path"; then
13803      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13804    fi
13805
13806    has_space=`$ECHO "$path" | $GREP " "`
13807    if test "x$has_space" != x; then
13808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13809$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13810      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13811    fi
13812  fi
13813
13814              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13815$as_echo_n "checking for Boot JDK... " >&6; }
13816              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13817$as_echo "$BOOT_JDK" >&6; }
13818              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13819$as_echo_n "checking Boot JDK version... " >&6; }
13820              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13821              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13822$as_echo "$BOOT_JDK_VERSION" >&6; }
13823            fi # end check jdk version
13824          fi # end check rt.jar
13825        fi # end check javac
13826      fi # end check java
13827    fi # end check boot jdk found
13828  fi
13829
13830  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
13831
13832  if test "x$BOOT_JDK_FOUND" = xno; then
13833    # Now execute the test
13834
13835  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
13836  BOOT_JDK_SUFFIX="/Contents/Home"
13837  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13838  if test "x$ALL_JDKS_FOUND" != x; then
13839    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13840
13841  if test "x$BOOT_JDK_FOUND" = xno; then
13842    # Now execute the test
13843
13844        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13845        if test -d "$BOOT_JDK"; then
13846          BOOT_JDK_FOUND=maybe
13847          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13848$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13849        fi
13850
13851
13852    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13853    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13854      # Do we have a bin/java?
13855      if test ! -x "$BOOT_JDK/bin/java"; then
13856        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13858        BOOT_JDK_FOUND=no
13859      else
13860        # Do we have a bin/javac?
13861        if test ! -x "$BOOT_JDK/bin/javac"; then
13862          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13864          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13865$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13866          BOOT_JDK_FOUND=no
13867        else
13868          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13869          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13870            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13871$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13872            BOOT_JDK_FOUND=no
13873          else
13874            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13875            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13876
13877            # Extra M4 quote needed to protect [] in grep expression.
13878            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13879            if test "x$FOUND_VERSION_78" = x; then
13880              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13882              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13883$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13884              BOOT_JDK_FOUND=no
13885            else
13886              # We're done! :-)
13887              BOOT_JDK_FOUND=yes
13888
13889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13890
13891  # Input might be given as Windows format, start by converting to
13892  # unix format.
13893  path="$BOOT_JDK"
13894  new_path=`$CYGPATH -u "$path"`
13895
13896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13899  # "foo.exe" is OK but "foo" is an error.
13900  #
13901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13902  # It is also a way to make sure we got the proper file name for the real test later on.
13903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13904  if test "x$test_shortpath" = x; then
13905    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13906$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13907    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13908  fi
13909
13910  # Call helper function which possibly converts this using DOS-style short mode.
13911  # If so, the updated path is stored in $new_path.
13912
13913  input_path="$new_path"
13914  # Check if we need to convert this using DOS-style short mode. If the path
13915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13916  # take no chances and rewrite it.
13917  # Note: m4 eats our [], so we need to use [ and ] instead.
13918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13919  if test "x$has_forbidden_chars" != x; then
13920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13924      # Going to short mode and back again did indeed matter. Since short mode is
13925      # case insensitive, let's make it lowercase to improve readability.
13926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13927      # Now convert it back to Unix-stile (cygpath)
13928      input_path=`$CYGPATH -u "$shortmode_path"`
13929      new_path="$input_path"
13930    fi
13931  fi
13932
13933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13934  if test "x$test_cygdrive_prefix" = x; then
13935    # As a simple fix, exclude /usr/bin since it's not a real path.
13936    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13938      # a path prefixed by /cygdrive for fixpath to work.
13939      new_path="$CYGWIN_ROOT_PATH$input_path"
13940    fi
13941  fi
13942
13943
13944  if test "x$path" != "x$new_path"; then
13945    BOOT_JDK="$new_path"
13946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13947$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13948  fi
13949
13950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13951
13952  path="$BOOT_JDK"
13953  has_colon=`$ECHO $path | $GREP ^.:`
13954  new_path="$path"
13955  if test "x$has_colon" = x; then
13956    # Not in mixed or Windows style, start by that.
13957    new_path=`cmd //c echo $path`
13958  fi
13959
13960
13961  input_path="$new_path"
13962  # Check if we need to convert this using DOS-style short mode. If the path
13963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13964  # take no chances and rewrite it.
13965  # Note: m4 eats our [], so we need to use [ and ] instead.
13966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13967  if test "x$has_forbidden_chars" != x; then
13968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13970  fi
13971
13972
13973  windows_path="$new_path"
13974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13975    unix_path=`$CYGPATH -u "$windows_path"`
13976    new_path="$unix_path"
13977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13979    new_path="$unix_path"
13980  fi
13981
13982  if test "x$path" != "x$new_path"; then
13983    BOOT_JDK="$new_path"
13984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13986  fi
13987
13988  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13989  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13990
13991  else
13992    # We're on a posix platform. Hooray! :)
13993    path="$BOOT_JDK"
13994
13995    if test ! -f "$path" && test ! -d "$path"; then
13996      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13997    fi
13998
13999    has_space=`$ECHO "$path" | $GREP " "`
14000    if test "x$has_space" != x; then
14001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14002$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14003      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14004    fi
14005  fi
14006
14007              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14008$as_echo_n "checking for Boot JDK... " >&6; }
14009              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14010$as_echo "$BOOT_JDK" >&6; }
14011              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14012$as_echo_n "checking Boot JDK version... " >&6; }
14013              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14014              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14015$as_echo "$BOOT_JDK_VERSION" >&6; }
14016            fi # end check jdk version
14017          fi # end check rt.jar
14018        fi # end check javac
14019      fi # end check java
14020    fi # end check boot jdk found
14021  fi
14022
14023    done
14024  fi
14025
14026
14027    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14028    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14029      # Do we have a bin/java?
14030      if test ! -x "$BOOT_JDK/bin/java"; then
14031        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14033        BOOT_JDK_FOUND=no
14034      else
14035        # Do we have a bin/javac?
14036        if test ! -x "$BOOT_JDK/bin/javac"; then
14037          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14039          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14040$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14041          BOOT_JDK_FOUND=no
14042        else
14043          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14044          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14045            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14047            BOOT_JDK_FOUND=no
14048          else
14049            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14050            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14051
14052            # Extra M4 quote needed to protect [] in grep expression.
14053            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14054            if test "x$FOUND_VERSION_78" = x; then
14055              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14057              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14058$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14059              BOOT_JDK_FOUND=no
14060            else
14061              # We're done! :-)
14062              BOOT_JDK_FOUND=yes
14063
14064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14065
14066  # Input might be given as Windows format, start by converting to
14067  # unix format.
14068  path="$BOOT_JDK"
14069  new_path=`$CYGPATH -u "$path"`
14070
14071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14074  # "foo.exe" is OK but "foo" is an error.
14075  #
14076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14077  # It is also a way to make sure we got the proper file name for the real test later on.
14078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14079  if test "x$test_shortpath" = x; then
14080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14081$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14082    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14083  fi
14084
14085  # Call helper function which possibly converts this using DOS-style short mode.
14086  # If so, the updated path is stored in $new_path.
14087
14088  input_path="$new_path"
14089  # Check if we need to convert this using DOS-style short mode. If the path
14090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14091  # take no chances and rewrite it.
14092  # Note: m4 eats our [], so we need to use [ and ] instead.
14093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14094  if test "x$has_forbidden_chars" != x; then
14095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14099      # Going to short mode and back again did indeed matter. Since short mode is
14100      # case insensitive, let's make it lowercase to improve readability.
14101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14102      # Now convert it back to Unix-stile (cygpath)
14103      input_path=`$CYGPATH -u "$shortmode_path"`
14104      new_path="$input_path"
14105    fi
14106  fi
14107
14108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14109  if test "x$test_cygdrive_prefix" = x; then
14110    # As a simple fix, exclude /usr/bin since it's not a real path.
14111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14113      # a path prefixed by /cygdrive for fixpath to work.
14114      new_path="$CYGWIN_ROOT_PATH$input_path"
14115    fi
14116  fi
14117
14118
14119  if test "x$path" != "x$new_path"; then
14120    BOOT_JDK="$new_path"
14121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14122$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14123  fi
14124
14125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14126
14127  path="$BOOT_JDK"
14128  has_colon=`$ECHO $path | $GREP ^.:`
14129  new_path="$path"
14130  if test "x$has_colon" = x; then
14131    # Not in mixed or Windows style, start by that.
14132    new_path=`cmd //c echo $path`
14133  fi
14134
14135
14136  input_path="$new_path"
14137  # Check if we need to convert this using DOS-style short mode. If the path
14138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14139  # take no chances and rewrite it.
14140  # Note: m4 eats our [], so we need to use [ and ] instead.
14141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14142  if test "x$has_forbidden_chars" != x; then
14143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14145  fi
14146
14147
14148  windows_path="$new_path"
14149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14150    unix_path=`$CYGPATH -u "$windows_path"`
14151    new_path="$unix_path"
14152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14154    new_path="$unix_path"
14155  fi
14156
14157  if test "x$path" != "x$new_path"; then
14158    BOOT_JDK="$new_path"
14159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14160$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14161  fi
14162
14163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14165
14166  else
14167    # We're on a posix platform. Hooray! :)
14168    path="$BOOT_JDK"
14169
14170    if test ! -f "$path" && test ! -d "$path"; then
14171      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14172    fi
14173
14174    has_space=`$ECHO "$path" | $GREP " "`
14175    if test "x$has_space" != x; then
14176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14177$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14178      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14179    fi
14180  fi
14181
14182              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14183$as_echo_n "checking for Boot JDK... " >&6; }
14184              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14185$as_echo "$BOOT_JDK" >&6; }
14186              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14187$as_echo_n "checking Boot JDK version... " >&6; }
14188              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14189              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14190$as_echo "$BOOT_JDK_VERSION" >&6; }
14191            fi # end check jdk version
14192          fi # end check rt.jar
14193        fi # end check javac
14194      fi # end check java
14195    fi # end check boot jdk found
14196  fi
14197
14198
14199  if test "x$BOOT_JDK_FOUND" = xno; then
14200    # Now execute the test
14201
14202  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14203  BOOT_JDK_SUFFIX="/Contents/Home"
14204  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14205  if test "x$ALL_JDKS_FOUND" != x; then
14206    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14207
14208  if test "x$BOOT_JDK_FOUND" = xno; then
14209    # Now execute the test
14210
14211        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14212        if test -d "$BOOT_JDK"; then
14213          BOOT_JDK_FOUND=maybe
14214          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14215$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14216        fi
14217
14218
14219    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14220    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14221      # Do we have a bin/java?
14222      if test ! -x "$BOOT_JDK/bin/java"; then
14223        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14225        BOOT_JDK_FOUND=no
14226      else
14227        # Do we have a bin/javac?
14228        if test ! -x "$BOOT_JDK/bin/javac"; then
14229          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14231          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14232$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14233          BOOT_JDK_FOUND=no
14234        else
14235          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14236          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14237            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14238$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14239            BOOT_JDK_FOUND=no
14240          else
14241            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14242            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14243
14244            # Extra M4 quote needed to protect [] in grep expression.
14245            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14246            if test "x$FOUND_VERSION_78" = x; then
14247              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14249              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14250$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14251              BOOT_JDK_FOUND=no
14252            else
14253              # We're done! :-)
14254              BOOT_JDK_FOUND=yes
14255
14256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14257
14258  # Input might be given as Windows format, start by converting to
14259  # unix format.
14260  path="$BOOT_JDK"
14261  new_path=`$CYGPATH -u "$path"`
14262
14263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14266  # "foo.exe" is OK but "foo" is an error.
14267  #
14268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14269  # It is also a way to make sure we got the proper file name for the real test later on.
14270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14271  if test "x$test_shortpath" = x; then
14272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14273$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14274    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14275  fi
14276
14277  # Call helper function which possibly converts this using DOS-style short mode.
14278  # If so, the updated path is stored in $new_path.
14279
14280  input_path="$new_path"
14281  # Check if we need to convert this using DOS-style short mode. If the path
14282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14283  # take no chances and rewrite it.
14284  # Note: m4 eats our [], so we need to use [ and ] instead.
14285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14286  if test "x$has_forbidden_chars" != x; then
14287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14291      # Going to short mode and back again did indeed matter. Since short mode is
14292      # case insensitive, let's make it lowercase to improve readability.
14293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14294      # Now convert it back to Unix-stile (cygpath)
14295      input_path=`$CYGPATH -u "$shortmode_path"`
14296      new_path="$input_path"
14297    fi
14298  fi
14299
14300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14301  if test "x$test_cygdrive_prefix" = x; then
14302    # As a simple fix, exclude /usr/bin since it's not a real path.
14303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14305      # a path prefixed by /cygdrive for fixpath to work.
14306      new_path="$CYGWIN_ROOT_PATH$input_path"
14307    fi
14308  fi
14309
14310
14311  if test "x$path" != "x$new_path"; then
14312    BOOT_JDK="$new_path"
14313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14315  fi
14316
14317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14318
14319  path="$BOOT_JDK"
14320  has_colon=`$ECHO $path | $GREP ^.:`
14321  new_path="$path"
14322  if test "x$has_colon" = x; then
14323    # Not in mixed or Windows style, start by that.
14324    new_path=`cmd //c echo $path`
14325  fi
14326
14327
14328  input_path="$new_path"
14329  # Check if we need to convert this using DOS-style short mode. If the path
14330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14331  # take no chances and rewrite it.
14332  # Note: m4 eats our [], so we need to use [ and ] instead.
14333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14334  if test "x$has_forbidden_chars" != x; then
14335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14337  fi
14338
14339
14340  windows_path="$new_path"
14341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14342    unix_path=`$CYGPATH -u "$windows_path"`
14343    new_path="$unix_path"
14344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14346    new_path="$unix_path"
14347  fi
14348
14349  if test "x$path" != "x$new_path"; then
14350    BOOT_JDK="$new_path"
14351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14352$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14353  fi
14354
14355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14357
14358  else
14359    # We're on a posix platform. Hooray! :)
14360    path="$BOOT_JDK"
14361
14362    if test ! -f "$path" && test ! -d "$path"; then
14363      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14364    fi
14365
14366    has_space=`$ECHO "$path" | $GREP " "`
14367    if test "x$has_space" != x; then
14368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14369$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14370      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14371    fi
14372  fi
14373
14374              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14375$as_echo_n "checking for Boot JDK... " >&6; }
14376              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14377$as_echo "$BOOT_JDK" >&6; }
14378              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14379$as_echo_n "checking Boot JDK version... " >&6; }
14380              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14381              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14382$as_echo "$BOOT_JDK_VERSION" >&6; }
14383            fi # end check jdk version
14384          fi # end check rt.jar
14385        fi # end check javac
14386      fi # end check java
14387    fi # end check boot jdk found
14388  fi
14389
14390    done
14391  fi
14392
14393
14394    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14395    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14396      # Do we have a bin/java?
14397      if test ! -x "$BOOT_JDK/bin/java"; then
14398        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14400        BOOT_JDK_FOUND=no
14401      else
14402        # Do we have a bin/javac?
14403        if test ! -x "$BOOT_JDK/bin/javac"; then
14404          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14406          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14407$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14408          BOOT_JDK_FOUND=no
14409        else
14410          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14411          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14412            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14414            BOOT_JDK_FOUND=no
14415          else
14416            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14417            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14418
14419            # Extra M4 quote needed to protect [] in grep expression.
14420            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14421            if test "x$FOUND_VERSION_78" = x; then
14422              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14424              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14425$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14426              BOOT_JDK_FOUND=no
14427            else
14428              # We're done! :-)
14429              BOOT_JDK_FOUND=yes
14430
14431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14432
14433  # Input might be given as Windows format, start by converting to
14434  # unix format.
14435  path="$BOOT_JDK"
14436  new_path=`$CYGPATH -u "$path"`
14437
14438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14441  # "foo.exe" is OK but "foo" is an error.
14442  #
14443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14444  # It is also a way to make sure we got the proper file name for the real test later on.
14445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14446  if test "x$test_shortpath" = x; then
14447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14448$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14449    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14450  fi
14451
14452  # Call helper function which possibly converts this using DOS-style short mode.
14453  # If so, the updated path is stored in $new_path.
14454
14455  input_path="$new_path"
14456  # Check if we need to convert this using DOS-style short mode. If the path
14457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14458  # take no chances and rewrite it.
14459  # Note: m4 eats our [], so we need to use [ and ] instead.
14460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14461  if test "x$has_forbidden_chars" != x; then
14462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14466      # Going to short mode and back again did indeed matter. Since short mode is
14467      # case insensitive, let's make it lowercase to improve readability.
14468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14469      # Now convert it back to Unix-stile (cygpath)
14470      input_path=`$CYGPATH -u "$shortmode_path"`
14471      new_path="$input_path"
14472    fi
14473  fi
14474
14475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14476  if test "x$test_cygdrive_prefix" = x; then
14477    # As a simple fix, exclude /usr/bin since it's not a real path.
14478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14480      # a path prefixed by /cygdrive for fixpath to work.
14481      new_path="$CYGWIN_ROOT_PATH$input_path"
14482    fi
14483  fi
14484
14485
14486  if test "x$path" != "x$new_path"; then
14487    BOOT_JDK="$new_path"
14488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14490  fi
14491
14492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14493
14494  path="$BOOT_JDK"
14495  has_colon=`$ECHO $path | $GREP ^.:`
14496  new_path="$path"
14497  if test "x$has_colon" = x; then
14498    # Not in mixed or Windows style, start by that.
14499    new_path=`cmd //c echo $path`
14500  fi
14501
14502
14503  input_path="$new_path"
14504  # Check if we need to convert this using DOS-style short mode. If the path
14505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14506  # take no chances and rewrite it.
14507  # Note: m4 eats our [], so we need to use [ and ] instead.
14508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14509  if test "x$has_forbidden_chars" != x; then
14510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14512  fi
14513
14514
14515  windows_path="$new_path"
14516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14517    unix_path=`$CYGPATH -u "$windows_path"`
14518    new_path="$unix_path"
14519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14521    new_path="$unix_path"
14522  fi
14523
14524  if test "x$path" != "x$new_path"; then
14525    BOOT_JDK="$new_path"
14526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14528  fi
14529
14530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14532
14533  else
14534    # We're on a posix platform. Hooray! :)
14535    path="$BOOT_JDK"
14536
14537    if test ! -f "$path" && test ! -d "$path"; then
14538      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14539    fi
14540
14541    has_space=`$ECHO "$path" | $GREP " "`
14542    if test "x$has_space" != x; then
14543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14544$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14545      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14546    fi
14547  fi
14548
14549              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14550$as_echo_n "checking for Boot JDK... " >&6; }
14551              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14552$as_echo "$BOOT_JDK" >&6; }
14553              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14554$as_echo_n "checking Boot JDK version... " >&6; }
14555              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14556              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14557$as_echo "$BOOT_JDK_VERSION" >&6; }
14558            fi # end check jdk version
14559          fi # end check rt.jar
14560        fi # end check javac
14561      fi # end check java
14562    fi # end check boot jdk found
14563  fi
14564
14565  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14566
14567  if test "x$BOOT_JDK_FOUND" = xno; then
14568    # Now execute the test
14569
14570  BOOT_JDK_PREFIX="/usr/lib/jvm"
14571  BOOT_JDK_SUFFIX=""
14572  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14573  if test "x$ALL_JDKS_FOUND" != x; then
14574    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14575
14576  if test "x$BOOT_JDK_FOUND" = xno; then
14577    # Now execute the test
14578
14579        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14580        if test -d "$BOOT_JDK"; then
14581          BOOT_JDK_FOUND=maybe
14582          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14583$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14584        fi
14585
14586
14587    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14588    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14589      # Do we have a bin/java?
14590      if test ! -x "$BOOT_JDK/bin/java"; then
14591        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14593        BOOT_JDK_FOUND=no
14594      else
14595        # Do we have a bin/javac?
14596        if test ! -x "$BOOT_JDK/bin/javac"; then
14597          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14599          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14600$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14601          BOOT_JDK_FOUND=no
14602        else
14603          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14604          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14605            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14607            BOOT_JDK_FOUND=no
14608          else
14609            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14610            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14611
14612            # Extra M4 quote needed to protect [] in grep expression.
14613            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14614            if test "x$FOUND_VERSION_78" = x; then
14615              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14617              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14618$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14619              BOOT_JDK_FOUND=no
14620            else
14621              # We're done! :-)
14622              BOOT_JDK_FOUND=yes
14623
14624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14625
14626  # Input might be given as Windows format, start by converting to
14627  # unix format.
14628  path="$BOOT_JDK"
14629  new_path=`$CYGPATH -u "$path"`
14630
14631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14634  # "foo.exe" is OK but "foo" is an error.
14635  #
14636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14637  # It is also a way to make sure we got the proper file name for the real test later on.
14638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14639  if test "x$test_shortpath" = 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 $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14643  fi
14644
14645  # Call helper function which possibly converts this using DOS-style short mode.
14646  # If so, the updated path is stored in $new_path.
14647
14648  input_path="$new_path"
14649  # Check if we need to convert this using DOS-style short mode. If the path
14650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14651  # take no chances and rewrite it.
14652  # Note: m4 eats our [], so we need to use [ and ] instead.
14653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14654  if test "x$has_forbidden_chars" != x; then
14655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14659      # Going to short mode and back again did indeed matter. Since short mode is
14660      # case insensitive, let's make it lowercase to improve readability.
14661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14662      # Now convert it back to Unix-stile (cygpath)
14663      input_path=`$CYGPATH -u "$shortmode_path"`
14664      new_path="$input_path"
14665    fi
14666  fi
14667
14668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14669  if test "x$test_cygdrive_prefix" = x; then
14670    # As a simple fix, exclude /usr/bin since it's not a real path.
14671    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14673      # a path prefixed by /cygdrive for fixpath to work.
14674      new_path="$CYGWIN_ROOT_PATH$input_path"
14675    fi
14676  fi
14677
14678
14679  if test "x$path" != "x$new_path"; then
14680    BOOT_JDK="$new_path"
14681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14682$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14683  fi
14684
14685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14686
14687  path="$BOOT_JDK"
14688  has_colon=`$ECHO $path | $GREP ^.:`
14689  new_path="$path"
14690  if test "x$has_colon" = x; then
14691    # Not in mixed or Windows style, start by that.
14692    new_path=`cmd //c echo $path`
14693  fi
14694
14695
14696  input_path="$new_path"
14697  # Check if we need to convert this using DOS-style short mode. If the path
14698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14699  # take no chances and rewrite it.
14700  # Note: m4 eats our [], so we need to use [ and ] instead.
14701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14702  if test "x$has_forbidden_chars" != x; then
14703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14705  fi
14706
14707
14708  windows_path="$new_path"
14709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14710    unix_path=`$CYGPATH -u "$windows_path"`
14711    new_path="$unix_path"
14712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14714    new_path="$unix_path"
14715  fi
14716
14717  if test "x$path" != "x$new_path"; then
14718    BOOT_JDK="$new_path"
14719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14720$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14721  fi
14722
14723  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14724  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14725
14726  else
14727    # We're on a posix platform. Hooray! :)
14728    path="$BOOT_JDK"
14729
14730    if test ! -f "$path" && test ! -d "$path"; then
14731      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14732    fi
14733
14734    has_space=`$ECHO "$path" | $GREP " "`
14735    if test "x$has_space" != x; then
14736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14738      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14739    fi
14740  fi
14741
14742              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14743$as_echo_n "checking for Boot JDK... " >&6; }
14744              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14745$as_echo "$BOOT_JDK" >&6; }
14746              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14747$as_echo_n "checking Boot JDK version... " >&6; }
14748              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14749              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14750$as_echo "$BOOT_JDK_VERSION" >&6; }
14751            fi # end check jdk version
14752          fi # end check rt.jar
14753        fi # end check javac
14754      fi # end check java
14755    fi # end check boot jdk found
14756  fi
14757
14758    done
14759  fi
14760
14761
14762    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14763    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14764      # Do we have a bin/java?
14765      if test ! -x "$BOOT_JDK/bin/java"; then
14766        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14767$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14768        BOOT_JDK_FOUND=no
14769      else
14770        # Do we have a bin/javac?
14771        if test ! -x "$BOOT_JDK/bin/javac"; then
14772          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14773$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14774          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14775$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14776          BOOT_JDK_FOUND=no
14777        else
14778          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14779          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14780            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14782            BOOT_JDK_FOUND=no
14783          else
14784            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14785            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14786
14787            # Extra M4 quote needed to protect [] in grep expression.
14788            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14789            if test "x$FOUND_VERSION_78" = x; then
14790              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14792              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14793$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14794              BOOT_JDK_FOUND=no
14795            else
14796              # We're done! :-)
14797              BOOT_JDK_FOUND=yes
14798
14799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14800
14801  # Input might be given as Windows format, start by converting to
14802  # unix format.
14803  path="$BOOT_JDK"
14804  new_path=`$CYGPATH -u "$path"`
14805
14806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14809  # "foo.exe" is OK but "foo" is an error.
14810  #
14811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14812  # It is also a way to make sure we got the proper file name for the real test later on.
14813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14814  if test "x$test_shortpath" = x; then
14815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14816$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14817    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14818  fi
14819
14820  # Call helper function which possibly converts this using DOS-style short mode.
14821  # If so, the updated path is stored in $new_path.
14822
14823  input_path="$new_path"
14824  # Check if we need to convert this using DOS-style short mode. If the path
14825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14826  # take no chances and rewrite it.
14827  # Note: m4 eats our [], so we need to use [ and ] instead.
14828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14829  if test "x$has_forbidden_chars" != x; then
14830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14834      # Going to short mode and back again did indeed matter. Since short mode is
14835      # case insensitive, let's make it lowercase to improve readability.
14836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14837      # Now convert it back to Unix-stile (cygpath)
14838      input_path=`$CYGPATH -u "$shortmode_path"`
14839      new_path="$input_path"
14840    fi
14841  fi
14842
14843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14844  if test "x$test_cygdrive_prefix" = x; then
14845    # As a simple fix, exclude /usr/bin since it's not a real path.
14846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14848      # a path prefixed by /cygdrive for fixpath to work.
14849      new_path="$CYGWIN_ROOT_PATH$input_path"
14850    fi
14851  fi
14852
14853
14854  if test "x$path" != "x$new_path"; then
14855    BOOT_JDK="$new_path"
14856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14857$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14858  fi
14859
14860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14861
14862  path="$BOOT_JDK"
14863  has_colon=`$ECHO $path | $GREP ^.:`
14864  new_path="$path"
14865  if test "x$has_colon" = x; then
14866    # Not in mixed or Windows style, start by that.
14867    new_path=`cmd //c echo $path`
14868  fi
14869
14870
14871  input_path="$new_path"
14872  # Check if we need to convert this using DOS-style short mode. If the path
14873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14874  # take no chances and rewrite it.
14875  # Note: m4 eats our [], so we need to use [ and ] instead.
14876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14877  if test "x$has_forbidden_chars" != x; then
14878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14880  fi
14881
14882
14883  windows_path="$new_path"
14884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14885    unix_path=`$CYGPATH -u "$windows_path"`
14886    new_path="$unix_path"
14887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14889    new_path="$unix_path"
14890  fi
14891
14892  if test "x$path" != "x$new_path"; then
14893    BOOT_JDK="$new_path"
14894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14895$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14896  fi
14897
14898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14900
14901  else
14902    # We're on a posix platform. Hooray! :)
14903    path="$BOOT_JDK"
14904
14905    if test ! -f "$path" && test ! -d "$path"; then
14906      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14907    fi
14908
14909    has_space=`$ECHO "$path" | $GREP " "`
14910    if test "x$has_space" != x; then
14911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14912$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14913      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14914    fi
14915  fi
14916
14917              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14918$as_echo_n "checking for Boot JDK... " >&6; }
14919              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14920$as_echo "$BOOT_JDK" >&6; }
14921              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14922$as_echo_n "checking Boot JDK version... " >&6; }
14923              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14924              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14925$as_echo "$BOOT_JDK_VERSION" >&6; }
14926            fi # end check jdk version
14927          fi # end check rt.jar
14928        fi # end check javac
14929      fi # end check java
14930    fi # end check boot jdk found
14931  fi
14932
14933  fi
14934
14935
14936    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14937    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14938      # Do we have a bin/java?
14939      if test ! -x "$BOOT_JDK/bin/java"; then
14940        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14942        BOOT_JDK_FOUND=no
14943      else
14944        # Do we have a bin/javac?
14945        if test ! -x "$BOOT_JDK/bin/javac"; then
14946          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14948          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14949$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14950          BOOT_JDK_FOUND=no
14951        else
14952          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14953          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14954            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14956            BOOT_JDK_FOUND=no
14957          else
14958            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14959            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14960
14961            # Extra M4 quote needed to protect [] in grep expression.
14962            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14963            if test "x$FOUND_VERSION_78" = x; then
14964              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14966              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14967$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14968              BOOT_JDK_FOUND=no
14969            else
14970              # We're done! :-)
14971              BOOT_JDK_FOUND=yes
14972
14973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14974
14975  # Input might be given as Windows format, start by converting to
14976  # unix format.
14977  path="$BOOT_JDK"
14978  new_path=`$CYGPATH -u "$path"`
14979
14980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14983  # "foo.exe" is OK but "foo" is an error.
14984  #
14985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14986  # It is also a way to make sure we got the proper file name for the real test later on.
14987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14988  if test "x$test_shortpath" = x; then
14989    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14990$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14991    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14992  fi
14993
14994  # Call helper function which possibly converts this using DOS-style short mode.
14995  # If so, the updated path is stored in $new_path.
14996
14997  input_path="$new_path"
14998  # Check if we need to convert this using DOS-style short mode. If the path
14999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15000  # take no chances and rewrite it.
15001  # Note: m4 eats our [], so we need to use [ and ] instead.
15002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15003  if test "x$has_forbidden_chars" != x; then
15004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15008      # Going to short mode and back again did indeed matter. Since short mode is
15009      # case insensitive, let's make it lowercase to improve readability.
15010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15011      # Now convert it back to Unix-stile (cygpath)
15012      input_path=`$CYGPATH -u "$shortmode_path"`
15013      new_path="$input_path"
15014    fi
15015  fi
15016
15017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15018  if test "x$test_cygdrive_prefix" = x; then
15019    # As a simple fix, exclude /usr/bin since it's not a real path.
15020    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15022      # a path prefixed by /cygdrive for fixpath to work.
15023      new_path="$CYGWIN_ROOT_PATH$input_path"
15024    fi
15025  fi
15026
15027
15028  if test "x$path" != "x$new_path"; then
15029    BOOT_JDK="$new_path"
15030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15031$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15032  fi
15033
15034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15035
15036  path="$BOOT_JDK"
15037  has_colon=`$ECHO $path | $GREP ^.:`
15038  new_path="$path"
15039  if test "x$has_colon" = x; then
15040    # Not in mixed or Windows style, start by that.
15041    new_path=`cmd //c echo $path`
15042  fi
15043
15044
15045  input_path="$new_path"
15046  # Check if we need to convert this using DOS-style short mode. If the path
15047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15048  # take no chances and rewrite it.
15049  # Note: m4 eats our [], so we need to use [ and ] instead.
15050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15051  if test "x$has_forbidden_chars" != x; then
15052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15054  fi
15055
15056
15057  windows_path="$new_path"
15058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15059    unix_path=`$CYGPATH -u "$windows_path"`
15060    new_path="$unix_path"
15061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15063    new_path="$unix_path"
15064  fi
15065
15066  if test "x$path" != "x$new_path"; then
15067    BOOT_JDK="$new_path"
15068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15069$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15070  fi
15071
15072  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15073  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15074
15075  else
15076    # We're on a posix platform. Hooray! :)
15077    path="$BOOT_JDK"
15078
15079    if test ! -f "$path" && test ! -d "$path"; then
15080      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15081    fi
15082
15083    has_space=`$ECHO "$path" | $GREP " "`
15084    if test "x$has_space" != x; then
15085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15086$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15087      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15088    fi
15089  fi
15090
15091              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15092$as_echo_n "checking for Boot JDK... " >&6; }
15093              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15094$as_echo "$BOOT_JDK" >&6; }
15095              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15096$as_echo_n "checking Boot JDK version... " >&6; }
15097              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15098              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15099$as_echo "$BOOT_JDK_VERSION" >&6; }
15100            fi # end check jdk version
15101          fi # end check rt.jar
15102        fi # end check javac
15103      fi # end check java
15104    fi # end check boot jdk found
15105  fi
15106
15107
15108# If we haven't found anything yet, we've truly lost. Give up.
15109if test "x$BOOT_JDK_FOUND" = xno; then
15110
15111    # Print a helpful message on how to acquire the necessary build dependency.
15112    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15113    MISSING_DEPENDENCY=openjdk
15114    PKGHANDLER_COMMAND=
15115
15116    case $PKGHANDLER in
15117	apt-get)
15118                apt_help     $MISSING_DEPENDENCY ;;
15119    yum)
15120                yum_help     $MISSING_DEPENDENCY ;;
15121	port)
15122                port_help    $MISSING_DEPENDENCY ;;
15123	pkgutil)
15124                pkgutil_help $MISSING_DEPENDENCY ;;
15125	pkgadd)
15126                pkgadd_help  $MISSING_DEPENDENCY ;;
15127    * )
15128      break ;;
15129    esac
15130
15131    if test "x$PKGHANDLER_COMMAND" != x; then
15132        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15133    fi
15134
15135  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15136$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15137  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15138$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15139  as_fn_error $? "Cannot continue" "$LINENO" 5
15140fi
15141
15142# Setup proper paths for what we found
15143BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15144if test ! -f "$BOOT_RTJAR"; then
15145    # On MacOSX it is called classes.jar
15146    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15147    if test -f "$BOOT_RTJAR"; then
15148      # Remove the ..
15149      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15150    fi
15151fi
15152BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15153BOOT_JDK="$BOOT_JDK"
15154
15155
15156
15157
15158# Setup tools from the Boot JDK.
15159
15160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15161$as_echo_n "checking for java in Boot JDK... " >&6; }
15162  JAVA=$BOOT_JDK/bin/java
15163  if test ! -x $JAVA; then
15164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15165$as_echo "not found" >&6; }
15166      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15167$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15168      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15169  fi
15170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15171$as_echo "ok" >&6; }
15172
15173
15174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15175$as_echo_n "checking for javac in Boot JDK... " >&6; }
15176  JAVAC=$BOOT_JDK/bin/javac
15177  if test ! -x $JAVAC; then
15178      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15179$as_echo "not found" >&6; }
15180      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15181$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15182      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15183  fi
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15185$as_echo "ok" >&6; }
15186
15187
15188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15189$as_echo_n "checking for javah in Boot JDK... " >&6; }
15190  JAVAH=$BOOT_JDK/bin/javah
15191  if test ! -x $JAVAH; then
15192      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15193$as_echo "not found" >&6; }
15194      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15195$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15196      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15197  fi
15198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15199$as_echo "ok" >&6; }
15200
15201
15202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15203$as_echo_n "checking for javap in Boot JDK... " >&6; }
15204  JAVAP=$BOOT_JDK/bin/javap
15205  if test ! -x $JAVAP; then
15206      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15207$as_echo "not found" >&6; }
15208      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15209$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15210      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15211  fi
15212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15213$as_echo "ok" >&6; }
15214
15215
15216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15217$as_echo_n "checking for jar in Boot JDK... " >&6; }
15218  JAR=$BOOT_JDK/bin/jar
15219  if test ! -x $JAR; then
15220      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15221$as_echo "not found" >&6; }
15222      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15223$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15224      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15225  fi
15226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15227$as_echo "ok" >&6; }
15228
15229
15230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15231$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15232  RMIC=$BOOT_JDK/bin/rmic
15233  if test ! -x $RMIC; then
15234      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15235$as_echo "not found" >&6; }
15236      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15237$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15238      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15239  fi
15240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15241$as_echo "ok" >&6; }
15242
15243
15244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15245$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15246  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15247  if test ! -x $NATIVE2ASCII; then
15248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15249$as_echo "not found" >&6; }
15250      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15251$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15252      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15253  fi
15254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15255$as_echo "ok" >&6; }
15256
15257
15258# Finally, set some other options...
15259
15260# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15261BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15262
15263
15264
15265
15266##############################################################################
15267#
15268# Specify options for anything that is run with the Boot JDK.
15269#
15270
15271# Check whether --with-boot-jdk-jvmargs was given.
15272if test "${with_boot_jdk_jvmargs+set}" = set; then :
15273  withval=$with_boot_jdk_jvmargs;
15274fi
15275
15276
15277if test "x$with_boot_jdk_jvmargs" = x; then
15278    # Not all JVM:s accept the same arguments on the command line.
15279    # OpenJDK specific increase in thread stack for JDK build,
15280    # well more specifically, when running javac.
15281    if test "x$BUILD_NUM_BITS" = x32; then
15282       STACK_SIZE=768
15283    else
15284       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15285       # since 64-bit pointers are pushed on the stach. Apparently, we need
15286       # to increase the stack space when javacing the JDK....
15287       STACK_SIZE=1536
15288    fi
15289
15290    # Minimum amount of heap memory.
15291
15292    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15293    # If so, then append -Xms64M to boot_jdk_jvmargs
15294    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15295    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15296    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15297        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15298    fi
15299
15300    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15301        # Why does macosx need more heap? Its the huge JDK batch.
15302
15303    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15304    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15305    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15306    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15307    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15308        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15309    fi
15310
15311    else
15312
15313    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15314    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15315    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15316    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15317    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15318        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15319    fi
15320
15321    fi
15322    # When is adding -client something that speeds up the JVM?
15323    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15324
15325    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15326    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15327    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15328    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15329    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15330        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15331    fi
15332
15333
15334    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15335    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15336    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15337    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15338    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15339        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15340    fi
15341
15342
15343    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15344    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15345    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15346    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15347    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15348        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15349    fi
15350
15351    # Disable special log output when a debug build is used as Boot JDK...
15352
15353    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15354    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15355    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15356    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15357    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15358        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15359    fi
15360
15361fi
15362
15363BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15364
15365
15366
15367###############################################################################
15368#
15369# Configure the sources to use. We can add or override individual directories.
15370#
15371###############################################################################
15372
15373
15374
15375# Where are the sources. Any of these can be overridden
15376# using --with-override-corba and the likes.
15377LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15378CORBA_TOPDIR="$SRC_ROOT/corba"
15379JAXP_TOPDIR="$SRC_ROOT/jaxp"
15380JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15381HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15382JDK_TOPDIR="$SRC_ROOT/jdk"
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392###############################################################################
15393#
15394# Pickup additional source for a component from outside of the source root
15395# or override source for a component.
15396#
15397
15398# Check whether --with-add-source-root was given.
15399if test "${with_add_source_root+set}" = set; then :
15400  withval=$with_add_source_root;
15401fi
15402
15403
15404
15405# Check whether --with-override-source-root was given.
15406if test "${with_override_source_root+set}" = set; then :
15407  withval=$with_override_source_root;
15408fi
15409
15410
15411
15412# Check whether --with-adds-and-overrides was given.
15413if test "${with_adds_and_overrides+set}" = set; then :
15414  withval=$with_adds_and_overrides;
15415fi
15416
15417
15418if test "x$with_adds_and_overrides" != x; then
15419    with_add_source_root="$with_adds_and_overrides/adds"
15420    with_override_source_root="$with_adds_and_overrides/overrides"
15421fi
15422
15423if test "x$with_add_source_root" != x; then
15424    if ! test -d $with_add_source_root; then
15425       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15426    fi
15427    CURDIR="$PWD"
15428    cd "$with_add_source_root"
15429    ADD_SRC_ROOT="`pwd`"
15430    cd "$CURDIR"
15431    # Verify that the addon source root does not have any root makefiles.
15432    # If it does, then it is usually an error, prevent this.
15433    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15434       test -f $with_add_source_root/langtools/make/Makefile; then
15435        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
15436    fi
15437    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15438       test -f $with_add_source_root/corba/make/Makefile; then
15439        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
15440    fi
15441    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15442       test -f $with_add_source_root/jaxp/make/Makefile; then
15443        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
15444    fi
15445    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15446       test -f $with_add_source_root/jaxws/make/Makefile; then
15447        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
15448    fi
15449    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15450       test -f $with_add_source_root/hotspot/make/Makefile; then
15451        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
15452    fi
15453    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15454       test -f $with_add_source_root/jdk/make/Makefile; then
15455        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
15456    fi
15457fi
15458
15459
15460if test "x$with_override_source_root" != x; then
15461    if ! test -d $with_override_source_root; then
15462       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15463    fi
15464    CURDIR="$PWD"
15465    cd "$with_override_source_root"
15466    OVERRIDE_SRC_ROOT="`pwd`"
15467    cd "$CURDIR"
15468    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15469       test -f $with_override_source_root/langtools/make/Makefile; then
15470        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
15471    fi
15472    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15473       test -f $with_override_source_root/corba/make/Makefile; then
15474        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
15475    fi
15476    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15477       test -f $with_override_source_root/jaxp/make/Makefile; then
15478        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
15479    fi
15480    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15481       test -f $with_override_source_root/jaxws/make/Makefile; then
15482        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
15483    fi
15484    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15485       test -f $with_override_source_root/hotspot/make/Makefile; then
15486        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
15487    fi
15488    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15489       test -f $with_override_source_root/jdk/make/Makefile; then
15490        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
15491    fi
15492fi
15493
15494
15495###############################################################################
15496#
15497# Override a repo completely, this is used for example when you have 3 small
15498# development sandboxes of the langtools sources and want to avoid having 3 full
15499# OpenJDK sources checked out on disk.
15500#
15501# Assuming that the 3 langtools sandboxes are located here:
15502# /home/fredrik/sandbox1/langtools
15503# /home/fredrik/sandbox2/langtools
15504# /home/fredrik/sandbox3/langtools
15505#
15506# From the source root you create build subdirs manually:
15507#     mkdir -p build1 build2 build3
15508# in each build directory run:
15509#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15510#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15511#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15512#
15513
15514
15515# Check whether --with-override-langtools was given.
15516if test "${with_override_langtools+set}" = set; then :
15517  withval=$with_override_langtools;
15518fi
15519
15520
15521
15522# Check whether --with-override-corba was given.
15523if test "${with_override_corba+set}" = set; then :
15524  withval=$with_override_corba;
15525fi
15526
15527
15528
15529# Check whether --with-override-jaxp was given.
15530if test "${with_override_jaxp+set}" = set; then :
15531  withval=$with_override_jaxp;
15532fi
15533
15534
15535
15536# Check whether --with-override-jaxws was given.
15537if test "${with_override_jaxws+set}" = set; then :
15538  withval=$with_override_jaxws;
15539fi
15540
15541
15542
15543# Check whether --with-override-hotspot was given.
15544if test "${with_override_hotspot+set}" = set; then :
15545  withval=$with_override_hotspot;
15546fi
15547
15548
15549
15550# Check whether --with-override-jdk was given.
15551if test "${with_override_jdk+set}" = set; then :
15552  withval=$with_override_jdk;
15553fi
15554
15555
15556if test "x$with_override_langtools" != x; then
15557    CURDIR="$PWD"
15558    cd "$with_override_langtools"
15559    LANGTOOLS_TOPDIR="`pwd`"
15560    cd "$CURDIR"
15561    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15562        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15563    fi
15564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15565$as_echo_n "checking if langtools should be overridden... " >&6; }
15566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15567$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15568fi
15569if test "x$with_override_corba" != x; then
15570    CURDIR="$PWD"
15571    cd "$with_override_corba"
15572    CORBA_TOPDIR="`pwd`"
15573    cd "$CURDIR"
15574    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15575        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15576    fi
15577    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15578$as_echo_n "checking if corba should be overridden... " >&6; }
15579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15580$as_echo "yes with $CORBA_TOPDIR" >&6; }
15581fi
15582if test "x$with_override_jaxp" != x; then
15583    CURDIR="$PWD"
15584    cd "$with_override_jaxp"
15585    JAXP_TOPDIR="`pwd`"
15586    cd "$CURDIR"
15587    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15588        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15589    fi
15590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15591$as_echo_n "checking if jaxp should be overridden... " >&6; }
15592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15593$as_echo "yes with $JAXP_TOPDIR" >&6; }
15594fi
15595if test "x$with_override_jaxws" != x; then
15596    CURDIR="$PWD"
15597    cd "$with_override_jaxws"
15598    JAXWS_TOPDIR="`pwd`"
15599    cd "$CURDIR"
15600    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15601        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15602    fi
15603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15604$as_echo_n "checking if jaxws should be overridden... " >&6; }
15605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15606$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15607fi
15608if test "x$with_override_hotspot" != x; then
15609    CURDIR="$PWD"
15610    cd "$with_override_hotspot"
15611    HOTSPOT_TOPDIR="`pwd`"
15612    cd "$CURDIR"
15613    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15614       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15615        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15616    fi
15617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15618$as_echo_n "checking if hotspot should be overridden... " >&6; }
15619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15620$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15621fi
15622if test "x$with_override_jdk" != x; then
15623    CURDIR="$PWD"
15624    cd "$with_override_jdk"
15625    JDK_TOPDIR="`pwd`"
15626    cd "$CURDIR"
15627    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15628        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15629    fi
15630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15631$as_echo_n "checking if JDK should be overridden... " >&6; }
15632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15633$as_echo "yes with $JDK_TOPDIR" >&6; }
15634fi
15635
15636
15637
15638BUILD_OUTPUT="$OUTPUT_ROOT"
15639
15640
15641HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15642BUILD_HOTSPOT=true
15643
15644
15645
15646# Check whether --with-import-hotspot was given.
15647if test "${with_import_hotspot+set}" = set; then :
15648  withval=$with_import_hotspot;
15649fi
15650
15651if test "x$with_import_hotspot" != x; then
15652    CURDIR="$PWD"
15653    cd "$with_import_hotspot"
15654    HOTSPOT_DIST="`pwd`"
15655    cd "$CURDIR"
15656    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15657        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15658    fi
15659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15660$as_echo_n "checking if hotspot should be imported... " >&6; }
15661    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15662$as_echo "yes from $HOTSPOT_DIST" >&6; }
15663    BUILD_HOTSPOT=false
15664fi
15665
15666JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15667
15668
15669###############################################################################
15670#
15671# Setup the toolchain (compilers etc), i.e. the tools that need to be
15672# cross-compilation aware.
15673#
15674###############################################################################
15675
15676
15677###############################################################################
15678#
15679# Configure the development tool paths and potential sysroot.
15680#
15681ac_ext=cpp
15682ac_cpp='$CXXCPP $CPPFLAGS'
15683ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15684ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15685ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15686
15687
15688# The option used to specify the target .o,.a or .so file.
15689# When compiling, how to specify the to be created object file.
15690CC_OUT_OPTION='-o$(SPACE)'
15691# When linking, how to specify the to be created executable.
15692EXE_OUT_OPTION='-o$(SPACE)'
15693# When linking, how to specify the to be created dynamically linkable library.
15694LD_OUT_OPTION='-o$(SPACE)'
15695# When archiving, how to specify the to be create static archive for object files.
15696AR_OUT_OPTION='rcs$(SPACE)'
15697
15698
15699
15700
15701
15702# Locate the actual tools
15703
15704if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15705
15706  # Store path to cygwin link.exe to help excluding it when searching for
15707  # VS linker. This must be done before changing the PATH when looking for VS.
15708  # Extract the first word of "link", so it can be a program name with args.
15709set dummy link; ac_word=$2
15710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15711$as_echo_n "checking for $ac_word... " >&6; }
15712if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15713  $as_echo_n "(cached) " >&6
15714else
15715  case $CYGWIN_LINK in
15716  [\\/]* | ?:[\\/]*)
15717  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15718  ;;
15719  *)
15720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15721for as_dir in $PATH
15722do
15723  IFS=$as_save_IFS
15724  test -z "$as_dir" && as_dir=.
15725    for ac_exec_ext in '' $ac_executable_extensions; do
15726  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15727    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15729    break 2
15730  fi
15731done
15732  done
15733IFS=$as_save_IFS
15734
15735  ;;
15736esac
15737fi
15738CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15739if test -n "$CYGWIN_LINK"; then
15740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
15741$as_echo "$CYGWIN_LINK" >&6; }
15742else
15743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15744$as_echo "no" >&6; }
15745fi
15746
15747
15748  if test "x$CYGWIN_LINK" != x; then
15749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
15750$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15751    "$CYGWIN_LINK" --version > /dev/null
15752    if test $? -eq 0 ; then
15753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15754$as_echo "yes" >&6; }
15755    else
15756      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15757$as_echo "no" >&6; }
15758      # This might be the VS linker. Don't exclude it later on.
15759      CYGWIN_LINK=""
15760    fi
15761  fi
15762
15763  # First-hand choice is to locate and run the vsvars bat file.
15764
15765  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15766    VCVARSFILE="vc/bin/vcvars32.bat"
15767  else
15768    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
15769  fi
15770
15771  VS_ENV_CMD=""
15772  VS_ENV_ARGS=""
15773  if test "x$with_toolsdir" != x; then
15774
15775  if test "x$VS_ENV_CMD" = x; then
15776    VS100BASE="$with_toolsdir/../.."
15777    METHOD="--with-tools-dir"
15778
15779  windows_path="$VS100BASE"
15780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15781    unix_path=`$CYGPATH -u "$windows_path"`
15782    VS100BASE="$unix_path"
15783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15785    VS100BASE="$unix_path"
15786  fi
15787
15788    if test -d "$VS100BASE"; then
15789      if test -f "$VS100BASE/$VCVARSFILE"; then
15790        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15791$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15792        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15793      else
15794        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15795$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15796        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15797$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15798      fi
15799    fi
15800  fi
15801
15802  fi
15803
15804  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
15805    # Having specified an argument which is incorrect will produce an instant failure;
15806    # we should not go on looking
15807    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
15808$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
15809    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
15810$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
15811    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
15812  fi
15813
15814  if test "x$ProgramW6432" != x; then
15815
15816  if test "x$VS_ENV_CMD" = x; then
15817    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
15818    METHOD="well-known name"
15819
15820  windows_path="$WIN_SDK_BASE"
15821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15822    unix_path=`$CYGPATH -u "$windows_path"`
15823    WIN_SDK_BASE="$unix_path"
15824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15826    WIN_SDK_BASE="$unix_path"
15827  fi
15828
15829    if test -d "$WIN_SDK_BASE"; then
15830      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15831        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15832$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15833        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15834        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15835          VS_ENV_ARGS="/x86"
15836        else
15837          VS_ENV_ARGS="/x64"
15838        fi
15839      else
15840        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15841$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15842        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15843$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15844      fi
15845    fi
15846  fi
15847
15848  fi
15849  if test "x$PROGRAMW6432" != x; then
15850
15851  if test "x$VS_ENV_CMD" = x; then
15852    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
15853    METHOD="well-known name"
15854
15855  windows_path="$WIN_SDK_BASE"
15856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15857    unix_path=`$CYGPATH -u "$windows_path"`
15858    WIN_SDK_BASE="$unix_path"
15859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15861    WIN_SDK_BASE="$unix_path"
15862  fi
15863
15864    if test -d "$WIN_SDK_BASE"; then
15865      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15866        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15867$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15868        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15869        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15870          VS_ENV_ARGS="/x86"
15871        else
15872          VS_ENV_ARGS="/x64"
15873        fi
15874      else
15875        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15876$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15877        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15878$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15879      fi
15880    fi
15881  fi
15882
15883  fi
15884  if test "x$PROGRAMFILES" != x; then
15885
15886  if test "x$VS_ENV_CMD" = x; then
15887    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
15888    METHOD="well-known name"
15889
15890  windows_path="$WIN_SDK_BASE"
15891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15892    unix_path=`$CYGPATH -u "$windows_path"`
15893    WIN_SDK_BASE="$unix_path"
15894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15896    WIN_SDK_BASE="$unix_path"
15897  fi
15898
15899    if test -d "$WIN_SDK_BASE"; then
15900      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15901        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15902$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15903        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15904        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15905          VS_ENV_ARGS="/x86"
15906        else
15907          VS_ENV_ARGS="/x64"
15908        fi
15909      else
15910        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15911$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15912        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15913$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15914      fi
15915    fi
15916  fi
15917
15918  fi
15919
15920  if test "x$VS_ENV_CMD" = x; then
15921    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
15922    METHOD="well-known name"
15923
15924  windows_path="$WIN_SDK_BASE"
15925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15926    unix_path=`$CYGPATH -u "$windows_path"`
15927    WIN_SDK_BASE="$unix_path"
15928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15930    WIN_SDK_BASE="$unix_path"
15931  fi
15932
15933    if test -d "$WIN_SDK_BASE"; then
15934      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15935        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15936$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15937        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15938        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15939          VS_ENV_ARGS="/x86"
15940        else
15941          VS_ENV_ARGS="/x64"
15942        fi
15943      else
15944        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15945$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15946        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15947$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15948      fi
15949    fi
15950  fi
15951
15952
15953  if test "x$VS_ENV_CMD" = x; then
15954    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
15955    METHOD="well-known name"
15956
15957  windows_path="$WIN_SDK_BASE"
15958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15959    unix_path=`$CYGPATH -u "$windows_path"`
15960    WIN_SDK_BASE="$unix_path"
15961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15963    WIN_SDK_BASE="$unix_path"
15964  fi
15965
15966    if test -d "$WIN_SDK_BASE"; then
15967      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15968        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15969$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15970        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15971        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15972          VS_ENV_ARGS="/x86"
15973        else
15974          VS_ENV_ARGS="/x64"
15975        fi
15976      else
15977        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15978$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15979        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15980$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15981      fi
15982    fi
15983  fi
15984
15985
15986  if test "x$VS100COMNTOOLS" != x; then
15987
15988  if test "x$VS_ENV_CMD" = x; then
15989    VS100BASE="$VS100COMNTOOLS/../.."
15990    METHOD="VS100COMNTOOLS variable"
15991
15992  windows_path="$VS100BASE"
15993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15994    unix_path=`$CYGPATH -u "$windows_path"`
15995    VS100BASE="$unix_path"
15996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15998    VS100BASE="$unix_path"
15999  fi
16000
16001    if test -d "$VS100BASE"; then
16002      if test -f "$VS100BASE/$VCVARSFILE"; then
16003        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16004$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16005        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16006      else
16007        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16008$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16009        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16010$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16011      fi
16012    fi
16013  fi
16014
16015  fi
16016  if test "x$PROGRAMFILES" != x; then
16017
16018  if test "x$VS_ENV_CMD" = x; then
16019    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16020    METHOD="well-known name"
16021
16022  windows_path="$VS100BASE"
16023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16024    unix_path=`$CYGPATH -u "$windows_path"`
16025    VS100BASE="$unix_path"
16026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16028    VS100BASE="$unix_path"
16029  fi
16030
16031    if test -d "$VS100BASE"; then
16032      if test -f "$VS100BASE/$VCVARSFILE"; then
16033        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16034$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16035        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16036      else
16037        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16038$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16039        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16040$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16041      fi
16042    fi
16043  fi
16044
16045  fi
16046
16047  if test "x$VS_ENV_CMD" = x; then
16048    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16049    METHOD="well-known name"
16050
16051  windows_path="$VS100BASE"
16052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16053    unix_path=`$CYGPATH -u "$windows_path"`
16054    VS100BASE="$unix_path"
16055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16057    VS100BASE="$unix_path"
16058  fi
16059
16060    if test -d "$VS100BASE"; then
16061      if test -f "$VS100BASE/$VCVARSFILE"; then
16062        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16063$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16064        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16065      else
16066        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16067$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16068        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16069$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16070      fi
16071    fi
16072  fi
16073
16074
16075  if test "x$VS_ENV_CMD" = x; then
16076    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16077    METHOD="well-known name"
16078
16079  windows_path="$VS100BASE"
16080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16081    unix_path=`$CYGPATH -u "$windows_path"`
16082    VS100BASE="$unix_path"
16083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16085    VS100BASE="$unix_path"
16086  fi
16087
16088    if test -d "$VS100BASE"; then
16089      if test -f "$VS100BASE/$VCVARSFILE"; then
16090        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16091$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16092        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16093      else
16094        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16095$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16096        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16097$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16098      fi
16099    fi
16100  fi
16101
16102
16103  if test "x$VS_ENV_CMD" != x; then
16104    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16105
16106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16107
16108  # First separate the path from the arguments. This will split at the first
16109  # space.
16110  complete="$VS_ENV_CMD"
16111  path="${complete%% *}"
16112  tmp="$complete EOL"
16113  arguments="${tmp#* }"
16114
16115  # Input might be given as Windows format, start by converting to
16116  # unix format.
16117  new_path=`$CYGPATH -u "$path"`
16118
16119  # Now try to locate executable using which
16120  new_path=`$WHICH "$new_path" 2> /dev/null`
16121  # bat and cmd files are not always considered executable in cygwin causing which
16122  # to not find them
16123  if test "x$new_path" = x \
16124           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16125           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16126    new_path=`$CYGPATH -u "$path"`
16127  fi
16128  if test "x$new_path" = x; then
16129    # Oops. Which didn't find the executable.
16130    # The splitting of arguments from the executable at a space might have been incorrect,
16131    # since paths with space are more likely in Windows. Give it another try with the whole
16132    # argument.
16133    path="$complete"
16134    arguments="EOL"
16135    new_path=`$CYGPATH -u "$path"`
16136    new_path=`$WHICH "$new_path" 2> /dev/null`
16137    # bat and cmd files are not always considered executable in cygwin causing which
16138    # to not find them
16139    if test "x$new_path" = x \
16140             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16141             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16142      new_path=`$CYGPATH -u "$path"`
16143    fi
16144    if test "x$new_path" = x; then
16145      # It's still not found. Now this is an unrecoverable error.
16146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16147$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16148      has_space=`$ECHO "$complete" | $GREP " "`
16149      if test "x$has_space" != x; then
16150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16152      fi
16153      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16154    fi
16155  fi
16156
16157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16160  # "foo.exe" is OK but "foo" is an error.
16161  #
16162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16163  # It is also a way to make sure we got the proper file name for the real test later on.
16164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16165  if test "x$test_shortpath" = x; then
16166    # Short path failed, file does not exist as specified.
16167    # Try adding .exe or .cmd
16168    if test -f "${new_path}.exe"; then
16169       input_to_shortpath="${new_path}.exe"
16170    elif test -f "${new_path}.cmd"; then
16171       input_to_shortpath="${new_path}.cmd"
16172    else
16173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16174$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16175      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16176$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16177      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16178    fi
16179  else
16180    input_to_shortpath="$new_path"
16181  fi
16182
16183  # Call helper function which possibly converts this using DOS-style short mode.
16184  # If so, the updated path is stored in $new_path.
16185  new_path="$input_to_shortpath"
16186
16187  input_path="$input_to_shortpath"
16188  # Check if we need to convert this using DOS-style short mode. If the path
16189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16190  # take no chances and rewrite it.
16191  # Note: m4 eats our [], so we need to use [ and ] instead.
16192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16193  if test "x$has_forbidden_chars" != x; then
16194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16198      # Going to short mode and back again did indeed matter. Since short mode is
16199      # case insensitive, let's make it lowercase to improve readability.
16200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16201      # Now convert it back to Unix-stile (cygpath)
16202      input_path=`$CYGPATH -u "$shortmode_path"`
16203      new_path="$input_path"
16204    fi
16205  fi
16206
16207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16208  if test "x$test_cygdrive_prefix" = x; then
16209    # As a simple fix, exclude /usr/bin since it's not a real path.
16210    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16212      # a path prefixed by /cygdrive for fixpath to work.
16213      new_path="$CYGWIN_ROOT_PATH$input_path"
16214    fi
16215  fi
16216
16217  # remove trailing .exe if any
16218  new_path="${new_path/%.exe/}"
16219
16220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16221
16222  # First separate the path from the arguments. This will split at the first
16223  # space.
16224  complete="$VS_ENV_CMD"
16225  path="${complete%% *}"
16226  tmp="$complete EOL"
16227  arguments="${tmp#* }"
16228
16229  # Input might be given as Windows format, start by converting to
16230  # unix format.
16231  new_path="$path"
16232
16233  windows_path="$new_path"
16234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16235    unix_path=`$CYGPATH -u "$windows_path"`
16236    new_path="$unix_path"
16237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16239    new_path="$unix_path"
16240  fi
16241
16242
16243  # Now try to locate executable using which
16244  new_path=`$WHICH "$new_path" 2> /dev/null`
16245
16246  if test "x$new_path" = x; then
16247    # Oops. Which didn't find the executable.
16248    # The splitting of arguments from the executable at a space might have been incorrect,
16249    # since paths with space are more likely in Windows. Give it another try with the whole
16250    # argument.
16251    path="$complete"
16252    arguments="EOL"
16253    new_path="$path"
16254
16255  windows_path="$new_path"
16256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16257    unix_path=`$CYGPATH -u "$windows_path"`
16258    new_path="$unix_path"
16259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16261    new_path="$unix_path"
16262  fi
16263
16264
16265    new_path=`$WHICH "$new_path" 2> /dev/null`
16266
16267    if test "x$new_path" = x; then
16268      # It's still not found. Now this is an unrecoverable error.
16269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16270$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16271      has_space=`$ECHO "$complete" | $GREP " "`
16272      if test "x$has_space" != x; then
16273        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16274$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16275      fi
16276      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16277    fi
16278  fi
16279
16280  # Now new_path has a complete unix path to the binary
16281  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16282    # Keep paths in /bin as-is, but remove trailing .exe if any
16283    new_path="${new_path/%.exe/}"
16284    # Do not save /bin paths to all_fixpath_prefixes!
16285  else
16286    # Not in mixed or Windows style, start by that.
16287    new_path=`cmd //c echo $new_path`
16288
16289  input_path="$new_path"
16290  # Check if we need to convert this using DOS-style short mode. If the path
16291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16292  # take no chances and rewrite it.
16293  # Note: m4 eats our [], so we need to use [ and ] instead.
16294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16295  if test "x$has_forbidden_chars" != x; then
16296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16298  fi
16299
16300    # Output is in $new_path
16301
16302  windows_path="$new_path"
16303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16304    unix_path=`$CYGPATH -u "$windows_path"`
16305    new_path="$unix_path"
16306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16308    new_path="$unix_path"
16309  fi
16310
16311    # remove trailing .exe if any
16312    new_path="${new_path/%.exe/}"
16313
16314    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16315    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16316  fi
16317
16318  else
16319    # We're on a posix platform. Hooray! :)
16320    # First separate the path from the arguments. This will split at the first
16321    # space.
16322    complete="$VS_ENV_CMD"
16323    path="${complete%% *}"
16324    tmp="$complete EOL"
16325    arguments="${tmp#* }"
16326
16327    new_path=`$WHICH $path 2> /dev/null`
16328    if test "x$new_path" = x; then
16329      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16330      if test "x$is_absolute_path" != x; then
16331        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&5
16332$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&6;}
16333        new_path="$path"
16334      else
16335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16336$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16337        has_space=`$ECHO "$complete" | $GREP " "`
16338        if test "x$has_space" != x; then
16339          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16340$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16341        fi
16342        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16343      fi
16344    fi
16345  fi
16346
16347  # Now join together the path and the arguments once again
16348  if test "x$arguments" != xEOL; then
16349      new_complete="$new_path ${arguments% *}"
16350  else
16351      new_complete="$new_path"
16352  fi
16353
16354  if test "x$complete" != "x$new_complete"; then
16355    VS_ENV_CMD="$new_complete"
16356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16357$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16358  fi
16359
16360
16361    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16362    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16363$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16364    cd $OUTPUT_ROOT
16365    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16366    # to autoconf standards.
16367
16368    #----
16369
16370    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16371    # but calculate the difference in Cygwin environment before/after running it and then
16372    # apply the diff.
16373
16374    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16375      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16376      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16377      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16378    else
16379      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16380      _dosbash=`cmd //c echo \`which bash\``
16381    fi
16382
16383    # generate the set of exported vars before/after the vs10 setup
16384    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16385    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16386    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16387    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16388
16389    # Now execute the newly created bat file.
16390    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16391    cmd /c localdevenvtmp.bat | cat
16392
16393    # apply the diff (less some non-vs10 vars named by "!")
16394    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16395    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16396    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16397
16398    # cleanup
16399    $RM localdevenvtmp*
16400    #----
16401    cd $CURDIR
16402    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16403      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16404$as_echo "no" >&6; }
16405      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16406$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16407      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16408$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16409      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16410$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16411      as_fn_error $? "Cannot continue" "$LINENO" 5
16412    fi
16413
16414    # Now set all paths and other env variables. This will allow the rest of
16415    # the configure script to find and run the compiler in the proper way.
16416    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16417$as_echo "$as_me: Setting extracted environment variables" >&6;}
16418    . $OUTPUT_ROOT/localdevenv.sh
16419  else
16420    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16421    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16422$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16423  fi
16424
16425  # At this point, we should have corrent variables in the environment, or we can't continue.
16426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16427$as_echo_n "checking for Visual Studio variables... " >&6; }
16428
16429  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16430    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16432$as_echo "present but broken" >&6; }
16433      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16434    else
16435      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16436$as_echo "ok" >&6; }
16437      VS_INCLUDE="$INCLUDE"
16438      VS_LIB="$LIB"
16439      VS_PATH="$PATH"
16440
16441
16442
16443    fi
16444  else
16445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16446$as_echo "not found" >&6; }
16447
16448    if test "x$VS_ENV_CMD" = x; then
16449      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16450$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16451      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16452$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16453    else
16454      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16455$as_echo "$as_me: Running the extraction script failed." >&6;}
16456    fi
16457    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16458$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16459    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16460$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16461    as_fn_error $? "Cannot continue" "$LINENO" 5
16462  fi
16463
16464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16465$as_echo_n "checking for msvcr100.dll... " >&6; }
16466
16467# Check whether --with-msvcr-dll was given.
16468if test "${with_msvcr_dll+set}" = set; then :
16469  withval=$with_msvcr_dll;
16470fi
16471
16472  if test "x$with_msvcr_dll" != x; then
16473    MSVCR_DLL="$with_msvcr_dll"
16474  else
16475    if test "x$VCINSTALLDIR" != x; then
16476      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16477        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16478      else
16479        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16480        if test "x$MSVCR_DLL" = x; then
16481          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16482        fi
16483      fi
16484      if test "x$MSVCR_DLL" != x; then
16485        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16486$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16487      else
16488        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16489$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16490      fi
16491    fi
16492    if test "x$MSVCR_DLL" = x; then
16493      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16494        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16495$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16496        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16497      fi
16498    fi
16499  fi
16500  if test "x$MSVCR_DLL" = x; then
16501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16502$as_echo "no" >&6; }
16503    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16504  fi
16505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16506$as_echo "$MSVCR_DLL" >&6; }
16507
16508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16509
16510  # Input might be given as Windows format, start by converting to
16511  # unix format.
16512  path="$MSVCR_DLL"
16513  new_path=`$CYGPATH -u "$path"`
16514
16515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16518  # "foo.exe" is OK but "foo" is an error.
16519  #
16520  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16521  # It is also a way to make sure we got the proper file name for the real test later on.
16522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16523  if test "x$test_shortpath" = x; then
16524    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16525$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16526    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16527  fi
16528
16529  # Call helper function which possibly converts this using DOS-style short mode.
16530  # If so, the updated path is stored in $new_path.
16531
16532  input_path="$new_path"
16533  # Check if we need to convert this using DOS-style short mode. If the path
16534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16535  # take no chances and rewrite it.
16536  # Note: m4 eats our [], so we need to use [ and ] instead.
16537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16538  if test "x$has_forbidden_chars" != x; then
16539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16543      # Going to short mode and back again did indeed matter. Since short mode is
16544      # case insensitive, let's make it lowercase to improve readability.
16545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16546      # Now convert it back to Unix-stile (cygpath)
16547      input_path=`$CYGPATH -u "$shortmode_path"`
16548      new_path="$input_path"
16549    fi
16550  fi
16551
16552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16553  if test "x$test_cygdrive_prefix" = x; then
16554    # As a simple fix, exclude /usr/bin since it's not a real path.
16555    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16557      # a path prefixed by /cygdrive for fixpath to work.
16558      new_path="$CYGWIN_ROOT_PATH$input_path"
16559    fi
16560  fi
16561
16562
16563  if test "x$path" != "x$new_path"; then
16564    MSVCR_DLL="$new_path"
16565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16566$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16567  fi
16568
16569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16570
16571  path="$MSVCR_DLL"
16572  has_colon=`$ECHO $path | $GREP ^.:`
16573  new_path="$path"
16574  if test "x$has_colon" = x; then
16575    # Not in mixed or Windows style, start by that.
16576    new_path=`cmd //c echo $path`
16577  fi
16578
16579
16580  input_path="$new_path"
16581  # Check if we need to convert this using DOS-style short mode. If the path
16582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16583  # take no chances and rewrite it.
16584  # Note: m4 eats our [], so we need to use [ and ] instead.
16585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16586  if test "x$has_forbidden_chars" != x; then
16587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16589  fi
16590
16591
16592  windows_path="$new_path"
16593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16594    unix_path=`$CYGPATH -u "$windows_path"`
16595    new_path="$unix_path"
16596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16598    new_path="$unix_path"
16599  fi
16600
16601  if test "x$path" != "x$new_path"; then
16602    MSVCR_DLL="$new_path"
16603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16604$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16605  fi
16606
16607  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16608  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16609
16610  else
16611    # We're on a posix platform. Hooray! :)
16612    path="$MSVCR_DLL"
16613
16614    if test ! -f "$path" && test ! -d "$path"; then
16615      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16616    fi
16617
16618    has_space=`$ECHO "$path" | $GREP " "`
16619    if test "x$has_space" != x; then
16620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16621$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16622      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16623    fi
16624  fi
16625
16626
16627fi
16628
16629
16630
16631# If --build AND --host is set, then the configure script will find any
16632# cross compilation tools in the PATH. Cross compilation tools
16633# follows the cross compilation standard where they are prefixed with ${host}.
16634# For example the binary i686-sun-solaris2.10-gcc
16635# will cross compile for i686-sun-solaris2.10
16636# If neither of build and host is not set, then build=host and the
16637# default compiler found in the path will be used.
16638# Setting only --host, does not seem to be really supported.
16639# Please set both --build and --host if you want to cross compile.
16640
16641if test "x$COMPILE_TYPE" = "xcross"; then
16642    # Now we to find a C/C++ compiler that can build executables for the build
16643    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16644    # once. Also, we need to do this before adding a tools dir to the path,
16645    # otherwise we might pick up cross-compilers which don't use standard naming.
16646    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16647    # to wait until they are properly discovered.
16648    for ac_prog in cl cc gcc
16649do
16650  # Extract the first word of "$ac_prog", so it can be a program name with args.
16651set dummy $ac_prog; ac_word=$2
16652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16653$as_echo_n "checking for $ac_word... " >&6; }
16654if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16655  $as_echo_n "(cached) " >&6
16656else
16657  case $BUILD_CC in
16658  [\\/]* | ?:[\\/]*)
16659  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16660  ;;
16661  *)
16662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16663for as_dir in $PATH
16664do
16665  IFS=$as_save_IFS
16666  test -z "$as_dir" && as_dir=.
16667    for ac_exec_ext in '' $ac_executable_extensions; do
16668  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16669    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16671    break 2
16672  fi
16673done
16674  done
16675IFS=$as_save_IFS
16676
16677  ;;
16678esac
16679fi
16680BUILD_CC=$ac_cv_path_BUILD_CC
16681if test -n "$BUILD_CC"; then
16682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
16683$as_echo "$BUILD_CC" >&6; }
16684else
16685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16686$as_echo "no" >&6; }
16687fi
16688
16689
16690  test -n "$BUILD_CC" && break
16691done
16692
16693
16694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16695
16696  # First separate the path from the arguments. This will split at the first
16697  # space.
16698  complete="$BUILD_CC"
16699  path="${complete%% *}"
16700  tmp="$complete EOL"
16701  arguments="${tmp#* }"
16702
16703  # Input might be given as Windows format, start by converting to
16704  # unix format.
16705  new_path=`$CYGPATH -u "$path"`
16706
16707  # Now try to locate executable using which
16708  new_path=`$WHICH "$new_path" 2> /dev/null`
16709  # bat and cmd files are not always considered executable in cygwin causing which
16710  # to not find them
16711  if test "x$new_path" = x \
16712           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16713           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16714    new_path=`$CYGPATH -u "$path"`
16715  fi
16716  if test "x$new_path" = x; then
16717    # Oops. Which didn't find the executable.
16718    # The splitting of arguments from the executable at a space might have been incorrect,
16719    # since paths with space are more likely in Windows. Give it another try with the whole
16720    # argument.
16721    path="$complete"
16722    arguments="EOL"
16723    new_path=`$CYGPATH -u "$path"`
16724    new_path=`$WHICH "$new_path" 2> /dev/null`
16725    # bat and cmd files are not always considered executable in cygwin causing which
16726    # to not find them
16727    if test "x$new_path" = x \
16728             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16729             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16730      new_path=`$CYGPATH -u "$path"`
16731    fi
16732    if test "x$new_path" = x; then
16733      # It's still not found. Now this is an unrecoverable error.
16734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16735$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16736      has_space=`$ECHO "$complete" | $GREP " "`
16737      if test "x$has_space" != x; then
16738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16740      fi
16741      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16742    fi
16743  fi
16744
16745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16748  # "foo.exe" is OK but "foo" is an error.
16749  #
16750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16751  # It is also a way to make sure we got the proper file name for the real test later on.
16752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16753  if test "x$test_shortpath" = x; then
16754    # Short path failed, file does not exist as specified.
16755    # Try adding .exe or .cmd
16756    if test -f "${new_path}.exe"; then
16757       input_to_shortpath="${new_path}.exe"
16758    elif test -f "${new_path}.cmd"; then
16759       input_to_shortpath="${new_path}.cmd"
16760    else
16761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
16762$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
16763      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16764$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16765      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16766    fi
16767  else
16768    input_to_shortpath="$new_path"
16769  fi
16770
16771  # Call helper function which possibly converts this using DOS-style short mode.
16772  # If so, the updated path is stored in $new_path.
16773  new_path="$input_to_shortpath"
16774
16775  input_path="$input_to_shortpath"
16776  # Check if we need to convert this using DOS-style short mode. If the path
16777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16778  # take no chances and rewrite it.
16779  # Note: m4 eats our [], so we need to use [ and ] instead.
16780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16781  if test "x$has_forbidden_chars" != x; then
16782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16786      # Going to short mode and back again did indeed matter. Since short mode is
16787      # case insensitive, let's make it lowercase to improve readability.
16788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16789      # Now convert it back to Unix-stile (cygpath)
16790      input_path=`$CYGPATH -u "$shortmode_path"`
16791      new_path="$input_path"
16792    fi
16793  fi
16794
16795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16796  if test "x$test_cygdrive_prefix" = x; then
16797    # As a simple fix, exclude /usr/bin since it's not a real path.
16798    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16800      # a path prefixed by /cygdrive for fixpath to work.
16801      new_path="$CYGWIN_ROOT_PATH$input_path"
16802    fi
16803  fi
16804
16805  # remove trailing .exe if any
16806  new_path="${new_path/%.exe/}"
16807
16808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16809
16810  # First separate the path from the arguments. This will split at the first
16811  # space.
16812  complete="$BUILD_CC"
16813  path="${complete%% *}"
16814  tmp="$complete EOL"
16815  arguments="${tmp#* }"
16816
16817  # Input might be given as Windows format, start by converting to
16818  # unix format.
16819  new_path="$path"
16820
16821  windows_path="$new_path"
16822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16823    unix_path=`$CYGPATH -u "$windows_path"`
16824    new_path="$unix_path"
16825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16827    new_path="$unix_path"
16828  fi
16829
16830
16831  # Now try to locate executable using which
16832  new_path=`$WHICH "$new_path" 2> /dev/null`
16833
16834  if test "x$new_path" = x; then
16835    # Oops. Which didn't find the executable.
16836    # The splitting of arguments from the executable at a space might have been incorrect,
16837    # since paths with space are more likely in Windows. Give it another try with the whole
16838    # argument.
16839    path="$complete"
16840    arguments="EOL"
16841    new_path="$path"
16842
16843  windows_path="$new_path"
16844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16845    unix_path=`$CYGPATH -u "$windows_path"`
16846    new_path="$unix_path"
16847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16849    new_path="$unix_path"
16850  fi
16851
16852
16853    new_path=`$WHICH "$new_path" 2> /dev/null`
16854
16855    if test "x$new_path" = x; then
16856      # It's still not found. Now this is an unrecoverable error.
16857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16858$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16859      has_space=`$ECHO "$complete" | $GREP " "`
16860      if test "x$has_space" != x; then
16861        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16863      fi
16864      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16865    fi
16866  fi
16867
16868  # Now new_path has a complete unix path to the binary
16869  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16870    # Keep paths in /bin as-is, but remove trailing .exe if any
16871    new_path="${new_path/%.exe/}"
16872    # Do not save /bin paths to all_fixpath_prefixes!
16873  else
16874    # Not in mixed or Windows style, start by that.
16875    new_path=`cmd //c echo $new_path`
16876
16877  input_path="$new_path"
16878  # Check if we need to convert this using DOS-style short mode. If the path
16879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16880  # take no chances and rewrite it.
16881  # Note: m4 eats our [], so we need to use [ and ] instead.
16882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16883  if test "x$has_forbidden_chars" != x; then
16884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16886  fi
16887
16888    # Output is in $new_path
16889
16890  windows_path="$new_path"
16891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16892    unix_path=`$CYGPATH -u "$windows_path"`
16893    new_path="$unix_path"
16894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16896    new_path="$unix_path"
16897  fi
16898
16899    # remove trailing .exe if any
16900    new_path="${new_path/%.exe/}"
16901
16902    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16903    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16904  fi
16905
16906  else
16907    # We're on a posix platform. Hooray! :)
16908    # First separate the path from the arguments. This will split at the first
16909    # space.
16910    complete="$BUILD_CC"
16911    path="${complete%% *}"
16912    tmp="$complete EOL"
16913    arguments="${tmp#* }"
16914
16915    new_path=`$WHICH $path 2> /dev/null`
16916    if test "x$new_path" = x; then
16917      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16918      if test "x$is_absolute_path" != x; then
16919        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&5
16920$as_echo "$as_me: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&6;}
16921        new_path="$path"
16922      else
16923        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16924$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16925        has_space=`$ECHO "$complete" | $GREP " "`
16926        if test "x$has_space" != x; then
16927          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16928$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16929        fi
16930        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16931      fi
16932    fi
16933  fi
16934
16935  # Now join together the path and the arguments once again
16936  if test "x$arguments" != xEOL; then
16937      new_complete="$new_path ${arguments% *}"
16938  else
16939      new_complete="$new_path"
16940  fi
16941
16942  if test "x$complete" != "x$new_complete"; then
16943    BUILD_CC="$new_complete"
16944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
16945$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
16946  fi
16947
16948    for ac_prog in cl CC g++
16949do
16950  # Extract the first word of "$ac_prog", so it can be a program name with args.
16951set dummy $ac_prog; ac_word=$2
16952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16953$as_echo_n "checking for $ac_word... " >&6; }
16954if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
16955  $as_echo_n "(cached) " >&6
16956else
16957  case $BUILD_CXX in
16958  [\\/]* | ?:[\\/]*)
16959  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
16960  ;;
16961  *)
16962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16963for as_dir in $PATH
16964do
16965  IFS=$as_save_IFS
16966  test -z "$as_dir" && as_dir=.
16967    for ac_exec_ext in '' $ac_executable_extensions; do
16968  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16969    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
16970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16971    break 2
16972  fi
16973done
16974  done
16975IFS=$as_save_IFS
16976
16977  ;;
16978esac
16979fi
16980BUILD_CXX=$ac_cv_path_BUILD_CXX
16981if test -n "$BUILD_CXX"; then
16982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
16983$as_echo "$BUILD_CXX" >&6; }
16984else
16985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16986$as_echo "no" >&6; }
16987fi
16988
16989
16990  test -n "$BUILD_CXX" && break
16991done
16992
16993
16994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16995
16996  # First separate the path from the arguments. This will split at the first
16997  # space.
16998  complete="$BUILD_CXX"
16999  path="${complete%% *}"
17000  tmp="$complete EOL"
17001  arguments="${tmp#* }"
17002
17003  # Input might be given as Windows format, start by converting to
17004  # unix format.
17005  new_path=`$CYGPATH -u "$path"`
17006
17007  # Now try to locate executable using which
17008  new_path=`$WHICH "$new_path" 2> /dev/null`
17009  # bat and cmd files are not always considered executable in cygwin causing which
17010  # to not find them
17011  if test "x$new_path" = x \
17012           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17013           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17014    new_path=`$CYGPATH -u "$path"`
17015  fi
17016  if test "x$new_path" = x; then
17017    # Oops. Which didn't find the executable.
17018    # The splitting of arguments from the executable at a space might have been incorrect,
17019    # since paths with space are more likely in Windows. Give it another try with the whole
17020    # argument.
17021    path="$complete"
17022    arguments="EOL"
17023    new_path=`$CYGPATH -u "$path"`
17024    new_path=`$WHICH "$new_path" 2> /dev/null`
17025    # bat and cmd files are not always considered executable in cygwin causing which
17026    # to not find them
17027    if test "x$new_path" = x \
17028             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17029             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17030      new_path=`$CYGPATH -u "$path"`
17031    fi
17032    if test "x$new_path" = x; then
17033      # It's still not found. Now this is an unrecoverable error.
17034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17035$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17036      has_space=`$ECHO "$complete" | $GREP " "`
17037      if test "x$has_space" != x; then
17038        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17039$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17040      fi
17041      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17042    fi
17043  fi
17044
17045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17048  # "foo.exe" is OK but "foo" is an error.
17049  #
17050  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17051  # It is also a way to make sure we got the proper file name for the real test later on.
17052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17053  if test "x$test_shortpath" = x; then
17054    # Short path failed, file does not exist as specified.
17055    # Try adding .exe or .cmd
17056    if test -f "${new_path}.exe"; then
17057       input_to_shortpath="${new_path}.exe"
17058    elif test -f "${new_path}.cmd"; then
17059       input_to_shortpath="${new_path}.cmd"
17060    else
17061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17062$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17063      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17064$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17065      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17066    fi
17067  else
17068    input_to_shortpath="$new_path"
17069  fi
17070
17071  # Call helper function which possibly converts this using DOS-style short mode.
17072  # If so, the updated path is stored in $new_path.
17073  new_path="$input_to_shortpath"
17074
17075  input_path="$input_to_shortpath"
17076  # Check if we need to convert this using DOS-style short mode. If the path
17077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17078  # take no chances and rewrite it.
17079  # Note: m4 eats our [], so we need to use [ and ] instead.
17080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17081  if test "x$has_forbidden_chars" != x; then
17082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17086      # Going to short mode and back again did indeed matter. Since short mode is
17087      # case insensitive, let's make it lowercase to improve readability.
17088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17089      # Now convert it back to Unix-stile (cygpath)
17090      input_path=`$CYGPATH -u "$shortmode_path"`
17091      new_path="$input_path"
17092    fi
17093  fi
17094
17095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17096  if test "x$test_cygdrive_prefix" = x; then
17097    # As a simple fix, exclude /usr/bin since it's not a real path.
17098    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17100      # a path prefixed by /cygdrive for fixpath to work.
17101      new_path="$CYGWIN_ROOT_PATH$input_path"
17102    fi
17103  fi
17104
17105  # remove trailing .exe if any
17106  new_path="${new_path/%.exe/}"
17107
17108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17109
17110  # First separate the path from the arguments. This will split at the first
17111  # space.
17112  complete="$BUILD_CXX"
17113  path="${complete%% *}"
17114  tmp="$complete EOL"
17115  arguments="${tmp#* }"
17116
17117  # Input might be given as Windows format, start by converting to
17118  # unix format.
17119  new_path="$path"
17120
17121  windows_path="$new_path"
17122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17123    unix_path=`$CYGPATH -u "$windows_path"`
17124    new_path="$unix_path"
17125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17127    new_path="$unix_path"
17128  fi
17129
17130
17131  # Now try to locate executable using which
17132  new_path=`$WHICH "$new_path" 2> /dev/null`
17133
17134  if test "x$new_path" = x; then
17135    # Oops. Which didn't find the executable.
17136    # The splitting of arguments from the executable at a space might have been incorrect,
17137    # since paths with space are more likely in Windows. Give it another try with the whole
17138    # argument.
17139    path="$complete"
17140    arguments="EOL"
17141    new_path="$path"
17142
17143  windows_path="$new_path"
17144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17145    unix_path=`$CYGPATH -u "$windows_path"`
17146    new_path="$unix_path"
17147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17149    new_path="$unix_path"
17150  fi
17151
17152
17153    new_path=`$WHICH "$new_path" 2> /dev/null`
17154
17155    if test "x$new_path" = x; then
17156      # It's still not found. Now this is an unrecoverable error.
17157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17158$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17159      has_space=`$ECHO "$complete" | $GREP " "`
17160      if test "x$has_space" != x; then
17161        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17162$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17163      fi
17164      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17165    fi
17166  fi
17167
17168  # Now new_path has a complete unix path to the binary
17169  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17170    # Keep paths in /bin as-is, but remove trailing .exe if any
17171    new_path="${new_path/%.exe/}"
17172    # Do not save /bin paths to all_fixpath_prefixes!
17173  else
17174    # Not in mixed or Windows style, start by that.
17175    new_path=`cmd //c echo $new_path`
17176
17177  input_path="$new_path"
17178  # Check if we need to convert this using DOS-style short mode. If the path
17179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17180  # take no chances and rewrite it.
17181  # Note: m4 eats our [], so we need to use [ and ] instead.
17182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17183  if test "x$has_forbidden_chars" != x; then
17184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17185    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17186  fi
17187
17188    # Output is in $new_path
17189
17190  windows_path="$new_path"
17191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17192    unix_path=`$CYGPATH -u "$windows_path"`
17193    new_path="$unix_path"
17194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17196    new_path="$unix_path"
17197  fi
17198
17199    # remove trailing .exe if any
17200    new_path="${new_path/%.exe/}"
17201
17202    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17203    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17204  fi
17205
17206  else
17207    # We're on a posix platform. Hooray! :)
17208    # First separate the path from the arguments. This will split at the first
17209    # space.
17210    complete="$BUILD_CXX"
17211    path="${complete%% *}"
17212    tmp="$complete EOL"
17213    arguments="${tmp#* }"
17214
17215    new_path=`$WHICH $path 2> /dev/null`
17216    if test "x$new_path" = x; then
17217      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17218      if test "x$is_absolute_path" != x; then
17219        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&5
17220$as_echo "$as_me: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&6;}
17221        new_path="$path"
17222      else
17223        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17224$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17225        has_space=`$ECHO "$complete" | $GREP " "`
17226        if test "x$has_space" != x; then
17227          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17228$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17229        fi
17230        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17231      fi
17232    fi
17233  fi
17234
17235  # Now join together the path and the arguments once again
17236  if test "x$arguments" != xEOL; then
17237      new_complete="$new_path ${arguments% *}"
17238  else
17239      new_complete="$new_path"
17240  fi
17241
17242  if test "x$complete" != "x$new_complete"; then
17243    BUILD_CXX="$new_complete"
17244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17245$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17246  fi
17247
17248    # Extract the first word of "ld", so it can be a program name with args.
17249set dummy ld; ac_word=$2
17250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17251$as_echo_n "checking for $ac_word... " >&6; }
17252if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17253  $as_echo_n "(cached) " >&6
17254else
17255  case $BUILD_LD in
17256  [\\/]* | ?:[\\/]*)
17257  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17258  ;;
17259  *)
17260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17261for as_dir in $PATH
17262do
17263  IFS=$as_save_IFS
17264  test -z "$as_dir" && as_dir=.
17265    for ac_exec_ext in '' $ac_executable_extensions; do
17266  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17267    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17269    break 2
17270  fi
17271done
17272  done
17273IFS=$as_save_IFS
17274
17275  ;;
17276esac
17277fi
17278BUILD_LD=$ac_cv_path_BUILD_LD
17279if test -n "$BUILD_LD"; then
17280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17281$as_echo "$BUILD_LD" >&6; }
17282else
17283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17284$as_echo "no" >&6; }
17285fi
17286
17287
17288
17289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17290
17291  # First separate the path from the arguments. This will split at the first
17292  # space.
17293  complete="$BUILD_LD"
17294  path="${complete%% *}"
17295  tmp="$complete EOL"
17296  arguments="${tmp#* }"
17297
17298  # Input might be given as Windows format, start by converting to
17299  # unix format.
17300  new_path=`$CYGPATH -u "$path"`
17301
17302  # Now try to locate executable using which
17303  new_path=`$WHICH "$new_path" 2> /dev/null`
17304  # bat and cmd files are not always considered executable in cygwin causing which
17305  # to not find them
17306  if test "x$new_path" = x \
17307           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17308           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17309    new_path=`$CYGPATH -u "$path"`
17310  fi
17311  if test "x$new_path" = x; then
17312    # Oops. Which didn't find the executable.
17313    # The splitting of arguments from the executable at a space might have been incorrect,
17314    # since paths with space are more likely in Windows. Give it another try with the whole
17315    # argument.
17316    path="$complete"
17317    arguments="EOL"
17318    new_path=`$CYGPATH -u "$path"`
17319    new_path=`$WHICH "$new_path" 2> /dev/null`
17320    # bat and cmd files are not always considered executable in cygwin causing which
17321    # to not find them
17322    if test "x$new_path" = x \
17323             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17324             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17325      new_path=`$CYGPATH -u "$path"`
17326    fi
17327    if test "x$new_path" = x; then
17328      # It's still not found. Now this is an unrecoverable error.
17329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17330$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17331      has_space=`$ECHO "$complete" | $GREP " "`
17332      if test "x$has_space" != x; then
17333        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17334$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17335      fi
17336      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17337    fi
17338  fi
17339
17340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17343  # "foo.exe" is OK but "foo" is an error.
17344  #
17345  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17346  # It is also a way to make sure we got the proper file name for the real test later on.
17347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17348  if test "x$test_shortpath" = x; then
17349    # Short path failed, file does not exist as specified.
17350    # Try adding .exe or .cmd
17351    if test -f "${new_path}.exe"; then
17352       input_to_shortpath="${new_path}.exe"
17353    elif test -f "${new_path}.cmd"; then
17354       input_to_shortpath="${new_path}.cmd"
17355    else
17356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17357$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17358      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17359$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17360      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17361    fi
17362  else
17363    input_to_shortpath="$new_path"
17364  fi
17365
17366  # Call helper function which possibly converts this using DOS-style short mode.
17367  # If so, the updated path is stored in $new_path.
17368  new_path="$input_to_shortpath"
17369
17370  input_path="$input_to_shortpath"
17371  # Check if we need to convert this using DOS-style short mode. If the path
17372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17373  # take no chances and rewrite it.
17374  # Note: m4 eats our [], so we need to use [ and ] instead.
17375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17376  if test "x$has_forbidden_chars" != x; then
17377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17381      # Going to short mode and back again did indeed matter. Since short mode is
17382      # case insensitive, let's make it lowercase to improve readability.
17383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17384      # Now convert it back to Unix-stile (cygpath)
17385      input_path=`$CYGPATH -u "$shortmode_path"`
17386      new_path="$input_path"
17387    fi
17388  fi
17389
17390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17391  if test "x$test_cygdrive_prefix" = x; then
17392    # As a simple fix, exclude /usr/bin since it's not a real path.
17393    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17395      # a path prefixed by /cygdrive for fixpath to work.
17396      new_path="$CYGWIN_ROOT_PATH$input_path"
17397    fi
17398  fi
17399
17400  # remove trailing .exe if any
17401  new_path="${new_path/%.exe/}"
17402
17403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17404
17405  # First separate the path from the arguments. This will split at the first
17406  # space.
17407  complete="$BUILD_LD"
17408  path="${complete%% *}"
17409  tmp="$complete EOL"
17410  arguments="${tmp#* }"
17411
17412  # Input might be given as Windows format, start by converting to
17413  # unix format.
17414  new_path="$path"
17415
17416  windows_path="$new_path"
17417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17418    unix_path=`$CYGPATH -u "$windows_path"`
17419    new_path="$unix_path"
17420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17422    new_path="$unix_path"
17423  fi
17424
17425
17426  # Now try to locate executable using which
17427  new_path=`$WHICH "$new_path" 2> /dev/null`
17428
17429  if test "x$new_path" = x; then
17430    # Oops. Which didn't find the executable.
17431    # The splitting of arguments from the executable at a space might have been incorrect,
17432    # since paths with space are more likely in Windows. Give it another try with the whole
17433    # argument.
17434    path="$complete"
17435    arguments="EOL"
17436    new_path="$path"
17437
17438  windows_path="$new_path"
17439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17440    unix_path=`$CYGPATH -u "$windows_path"`
17441    new_path="$unix_path"
17442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17444    new_path="$unix_path"
17445  fi
17446
17447
17448    new_path=`$WHICH "$new_path" 2> /dev/null`
17449
17450    if test "x$new_path" = x; then
17451      # It's still not found. Now this is an unrecoverable error.
17452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17453$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17454      has_space=`$ECHO "$complete" | $GREP " "`
17455      if test "x$has_space" != x; then
17456        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17457$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17458      fi
17459      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17460    fi
17461  fi
17462
17463  # Now new_path has a complete unix path to the binary
17464  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17465    # Keep paths in /bin as-is, but remove trailing .exe if any
17466    new_path="${new_path/%.exe/}"
17467    # Do not save /bin paths to all_fixpath_prefixes!
17468  else
17469    # Not in mixed or Windows style, start by that.
17470    new_path=`cmd //c echo $new_path`
17471
17472  input_path="$new_path"
17473  # Check if we need to convert this using DOS-style short mode. If the path
17474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17475  # take no chances and rewrite it.
17476  # Note: m4 eats our [], so we need to use [ and ] instead.
17477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17478  if test "x$has_forbidden_chars" != x; then
17479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17481  fi
17482
17483    # Output is in $new_path
17484
17485  windows_path="$new_path"
17486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17487    unix_path=`$CYGPATH -u "$windows_path"`
17488    new_path="$unix_path"
17489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17491    new_path="$unix_path"
17492  fi
17493
17494    # remove trailing .exe if any
17495    new_path="${new_path/%.exe/}"
17496
17497    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17498    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17499  fi
17500
17501  else
17502    # We're on a posix platform. Hooray! :)
17503    # First separate the path from the arguments. This will split at the first
17504    # space.
17505    complete="$BUILD_LD"
17506    path="${complete%% *}"
17507    tmp="$complete EOL"
17508    arguments="${tmp#* }"
17509
17510    new_path=`$WHICH $path 2> /dev/null`
17511    if test "x$new_path" = x; then
17512      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17513      if test "x$is_absolute_path" != x; then
17514        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&5
17515$as_echo "$as_me: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&6;}
17516        new_path="$path"
17517      else
17518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17519$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17520        has_space=`$ECHO "$complete" | $GREP " "`
17521        if test "x$has_space" != x; then
17522          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17524        fi
17525        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17526      fi
17527    fi
17528  fi
17529
17530  # Now join together the path and the arguments once again
17531  if test "x$arguments" != xEOL; then
17532      new_complete="$new_path ${arguments% *}"
17533  else
17534      new_complete="$new_path"
17535  fi
17536
17537  if test "x$complete" != "x$new_complete"; then
17538    BUILD_LD="$new_complete"
17539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17540$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17541  fi
17542
17543fi
17544
17545
17546
17547
17548# If a devkit is found on the builddeps server, then prepend its path to the
17549# PATH variable. If there are cross compilers available in the devkit, these
17550# will be found by AC_PROG_CC et al.
17551DEVKIT=
17552
17553
17554    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17555        # Source the builddeps file again, to make sure it uses the latest variables!
17556        . $builddepsfile
17557        # Look for a target and build machine specific resource!
17558        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17559        if test "x$resource" = x; then
17560            # Ok, lets instead look for a target specific resource
17561            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17562        fi
17563        if test "x$resource" = x; then
17564            # Ok, lets instead look for a build specific resource
17565            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17566        fi
17567        if test "x$resource" = x; then
17568            # Ok, lets instead look for a generic resource
17569            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17570            resource=${builddep_devkit}
17571        fi
17572        if test "x$resource" != x; then
17573            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17574$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17575	    # If the resource in the builddeps.conf file is an existing directory,
17576	    # for example /java/linux/cups
17577	    if test -d ${resource}; then
17578	       depdir=${resource}
17579	    else
17580
17581# devkit is for example mymodule
17582# $resource is for example libs/general/libmymod_1_2_3.zip
17583# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17584# $with_builddeps_dir is for example /localhome/builddeps
17585# depdir is the name of the variable into which we store the depdir, eg MYMOD
17586# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17587# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17588    filename=`basename $resource`
17589    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17590    filebase=${filename%%.*}
17591    extension=${filename#*.}
17592    installdir=$with_builddeps_dir/$filebase
17593    if test ! -f $installdir/$filename.unpacked; then
17594        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17595$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17596        if test ! -d $installdir; then
17597            mkdir -p $installdir
17598        fi
17599        if test ! -d $installdir; then
17600            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17601        fi
17602        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17603        touch $tmpfile
17604        if test ! -f $tmpfile; then
17605            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17606        fi
17607
17608    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17609    # $tmpfile is the local file name for the downloaded file.
17610    VALID_TOOL=no
17611    if test "x$BDEPS_FTP" = xwget; then
17612       VALID_TOOL=yes
17613       wget -O $tmpfile $with_builddeps_server/$resource
17614    fi
17615    if test "x$BDEPS_FTP" = xlftp; then
17616       VALID_TOOL=yes
17617       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17618    fi
17619    if test "x$BDEPS_FTP" = xftp; then
17620        VALID_TOOL=yes
17621        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17622        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17623        FTPUSERPWD=${FTPSERVER%%@*}
17624        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17625            FTPUSER=${userpwd%%:*}
17626            FTPPWD=${userpwd#*@}
17627            FTPSERVER=${FTPSERVER#*@}
17628        else
17629            FTPUSER=ftp
17630            FTPPWD=ftp
17631        fi
17632        # the "pass" command does not work on some
17633        # ftp clients (read ftp.exe) but if it works,
17634        # passive mode is better!
17635        (\
17636            echo "user $FTPUSER $FTPPWD"        ;\
17637            echo "pass"                         ;\
17638            echo "bin"                          ;\
17639            echo "get $FTPPATH $tmpfile"              ;\
17640        ) | ftp -in $FTPSERVER
17641    fi
17642    if test "x$VALID_TOOL" != xyes; then
17643       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17644    fi
17645
17646        mv $tmpfile $installdir/$filename
17647        if test ! -s $installdir/$filename; then
17648            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17649        fi
17650        case "$extension" in
17651            zip)  echo "Unzipping $installdir/$filename..."
17652               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17653            ;;
17654            tar.gz) echo "Untaring $installdir/$filename..."
17655               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17656            ;;
17657            tgz) echo "Untaring $installdir/$filename..."
17658               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17659            ;;
17660            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
17661            ;;
17662        esac
17663    fi
17664    if test -f $installdir/$filename.unpacked; then
17665        depdir=$installdir
17666    fi
17667
17668	    fi
17669            # Source the builddeps file again, because in the previous command, the depdir
17670            # was updated to point at the current build dependency install directory.
17671            . $builddepsfile
17672            # Now extract variables from the builddeps.conf files.
17673            theroot=${builddep_devkit_ROOT}
17674            thecflags=${builddep_devkit_CFLAGS}
17675            thelibs=${builddep_devkit_LIBS}
17676            if test "x$depdir" = x; then
17677                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
17678            fi
17679            DEVKIT=$depdir
17680            if test "x$theroot" != x; then
17681               DEVKIT="$theroot"
17682            fi
17683            if test "x$thecflags" != x; then
17684               DEVKIT_CFLAGS="$thecflags"
17685            fi
17686            if test "x$thelibs" != x; then
17687               DEVKIT_LIBS="$thelibs"
17688            fi
17689            # Found devkit
17690                     PATH="$DEVKIT/bin:$PATH"
17691                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
17692                     if test "x$x_includes" = "xNONE"; then
17693                         x_includes="$SYS_ROOT/usr/include/X11"
17694                     fi
17695                     if test "x$x_libraries" = "xNONE"; then
17696                         x_libraries="$SYS_ROOT/usr/lib"
17697                     fi
17698
17699
17700        fi
17701
17702    fi
17703
17704
17705if test "x$SYS_ROOT" != "x/" ; then
17706    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
17707    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
17708    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17709    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17710    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
17711    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
17712fi
17713
17714# Store the CFLAGS etal passed to the configure script.
17715ORG_CFLAGS="$CFLAGS"
17716ORG_CXXFLAGS="$CXXFLAGS"
17717ORG_OBJCFLAGS="$OBJCFLAGS"
17718
17719# autoconf magic only relies on PATH, so update it if tools dir is specified
17720OLD_PATH="$PATH"
17721if test "x$TOOLS_DIR" != x; then
17722  PATH=$TOOLS_DIR:$PATH
17723fi
17724
17725
17726### Locate C compiler (CC)
17727
17728# gcc is almost always present, but on Windows we
17729# prefer cl.exe and on Solaris we prefer CC.
17730# Thus test for them in this order.
17731if test "x$OPENJDK_TARGET_OS" = xmacosx; then
17732  # Do not probe for cc on MacOSX.
17733  COMPILER_CHECK_LIST="cl gcc"
17734else
17735  COMPILER_CHECK_LIST="cl cc gcc"
17736fi
17737
17738
17739  COMPILER_NAME=C
17740
17741  # Do a first initial attempt at searching the list of compiler names.
17742  # AC_PATH_PROGS can't be run multiple times with the same variable,
17743  # so create a new name for this run.
17744  for ac_prog in $COMPILER_CHECK_LIST
17745do
17746  # Extract the first word of "$ac_prog", so it can be a program name with args.
17747set dummy $ac_prog; ac_word=$2
17748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17749$as_echo_n "checking for $ac_word... " >&6; }
17750if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
17751  $as_echo_n "(cached) " >&6
17752else
17753  case $POTENTIAL_CC in
17754  [\\/]* | ?:[\\/]*)
17755  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
17756  ;;
17757  *)
17758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17759for as_dir in $PATH
17760do
17761  IFS=$as_save_IFS
17762  test -z "$as_dir" && as_dir=.
17763    for ac_exec_ext in '' $ac_executable_extensions; do
17764  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17765    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
17766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17767    break 2
17768  fi
17769done
17770  done
17771IFS=$as_save_IFS
17772
17773  ;;
17774esac
17775fi
17776POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
17777if test -n "$POTENTIAL_CC"; then
17778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
17779$as_echo "$POTENTIAL_CC" >&6; }
17780else
17781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17782$as_echo "no" >&6; }
17783fi
17784
17785
17786  test -n "$POTENTIAL_CC" && break
17787done
17788
17789  CC=$POTENTIAL_CC
17790
17791  if test "x$$CC" = x; then
17792
17793    # Print a helpful message on how to acquire the necessary build dependency.
17794    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
17795    MISSING_DEPENDENCY=devkit
17796    PKGHANDLER_COMMAND=
17797
17798    case $PKGHANDLER in
17799	apt-get)
17800                apt_help     $MISSING_DEPENDENCY ;;
17801    yum)
17802                yum_help     $MISSING_DEPENDENCY ;;
17803	port)
17804                port_help    $MISSING_DEPENDENCY ;;
17805	pkgutil)
17806                pkgutil_help $MISSING_DEPENDENCY ;;
17807	pkgadd)
17808                pkgadd_help  $MISSING_DEPENDENCY ;;
17809    * )
17810      break ;;
17811    esac
17812
17813    if test "x$PKGHANDLER_COMMAND" != x; then
17814        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
17815    fi
17816
17817      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
17818  fi
17819
17820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17821
17822  # First separate the path from the arguments. This will split at the first
17823  # space.
17824  complete="$CC"
17825  path="${complete%% *}"
17826  tmp="$complete EOL"
17827  arguments="${tmp#* }"
17828
17829  # Input might be given as Windows format, start by converting to
17830  # unix format.
17831  new_path=`$CYGPATH -u "$path"`
17832
17833  # Now try to locate executable using which
17834  new_path=`$WHICH "$new_path" 2> /dev/null`
17835  # bat and cmd files are not always considered executable in cygwin causing which
17836  # to not find them
17837  if test "x$new_path" = x \
17838           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17839           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17840    new_path=`$CYGPATH -u "$path"`
17841  fi
17842  if test "x$new_path" = x; then
17843    # Oops. Which didn't find the executable.
17844    # The splitting of arguments from the executable at a space might have been incorrect,
17845    # since paths with space are more likely in Windows. Give it another try with the whole
17846    # argument.
17847    path="$complete"
17848    arguments="EOL"
17849    new_path=`$CYGPATH -u "$path"`
17850    new_path=`$WHICH "$new_path" 2> /dev/null`
17851    # bat and cmd files are not always considered executable in cygwin causing which
17852    # to not find them
17853    if test "x$new_path" = x \
17854             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17855             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17856      new_path=`$CYGPATH -u "$path"`
17857    fi
17858    if test "x$new_path" = x; then
17859      # It's still not found. Now this is an unrecoverable error.
17860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17861$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17862      has_space=`$ECHO "$complete" | $GREP " "`
17863      if test "x$has_space" != x; then
17864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17866      fi
17867      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17868    fi
17869  fi
17870
17871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17874  # "foo.exe" is OK but "foo" is an error.
17875  #
17876  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17877  # It is also a way to make sure we got the proper file name for the real test later on.
17878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17879  if test "x$test_shortpath" = x; then
17880    # Short path failed, file does not exist as specified.
17881    # Try adding .exe or .cmd
17882    if test -f "${new_path}.exe"; then
17883       input_to_shortpath="${new_path}.exe"
17884    elif test -f "${new_path}.cmd"; then
17885       input_to_shortpath="${new_path}.cmd"
17886    else
17887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
17888$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
17889      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17890$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17891      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17892    fi
17893  else
17894    input_to_shortpath="$new_path"
17895  fi
17896
17897  # Call helper function which possibly converts this using DOS-style short mode.
17898  # If so, the updated path is stored in $new_path.
17899  new_path="$input_to_shortpath"
17900
17901  input_path="$input_to_shortpath"
17902  # Check if we need to convert this using DOS-style short mode. If the path
17903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17904  # take no chances and rewrite it.
17905  # Note: m4 eats our [], so we need to use [ and ] instead.
17906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17907  if test "x$has_forbidden_chars" != x; then
17908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17912      # Going to short mode and back again did indeed matter. Since short mode is
17913      # case insensitive, let's make it lowercase to improve readability.
17914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17915      # Now convert it back to Unix-stile (cygpath)
17916      input_path=`$CYGPATH -u "$shortmode_path"`
17917      new_path="$input_path"
17918    fi
17919  fi
17920
17921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17922  if test "x$test_cygdrive_prefix" = x; then
17923    # As a simple fix, exclude /usr/bin since it's not a real path.
17924    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17926      # a path prefixed by /cygdrive for fixpath to work.
17927      new_path="$CYGWIN_ROOT_PATH$input_path"
17928    fi
17929  fi
17930
17931  # remove trailing .exe if any
17932  new_path="${new_path/%.exe/}"
17933
17934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17935
17936  # First separate the path from the arguments. This will split at the first
17937  # space.
17938  complete="$CC"
17939  path="${complete%% *}"
17940  tmp="$complete EOL"
17941  arguments="${tmp#* }"
17942
17943  # Input might be given as Windows format, start by converting to
17944  # unix format.
17945  new_path="$path"
17946
17947  windows_path="$new_path"
17948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17949    unix_path=`$CYGPATH -u "$windows_path"`
17950    new_path="$unix_path"
17951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17953    new_path="$unix_path"
17954  fi
17955
17956
17957  # Now try to locate executable using which
17958  new_path=`$WHICH "$new_path" 2> /dev/null`
17959
17960  if test "x$new_path" = x; then
17961    # Oops. Which didn't find the executable.
17962    # The splitting of arguments from the executable at a space might have been incorrect,
17963    # since paths with space are more likely in Windows. Give it another try with the whole
17964    # argument.
17965    path="$complete"
17966    arguments="EOL"
17967    new_path="$path"
17968
17969  windows_path="$new_path"
17970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17971    unix_path=`$CYGPATH -u "$windows_path"`
17972    new_path="$unix_path"
17973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17975    new_path="$unix_path"
17976  fi
17977
17978
17979    new_path=`$WHICH "$new_path" 2> /dev/null`
17980
17981    if test "x$new_path" = x; then
17982      # It's still not found. Now this is an unrecoverable error.
17983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17984$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17985      has_space=`$ECHO "$complete" | $GREP " "`
17986      if test "x$has_space" != x; then
17987        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17988$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17989      fi
17990      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17991    fi
17992  fi
17993
17994  # Now new_path has a complete unix path to the binary
17995  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17996    # Keep paths in /bin as-is, but remove trailing .exe if any
17997    new_path="${new_path/%.exe/}"
17998    # Do not save /bin paths to all_fixpath_prefixes!
17999  else
18000    # Not in mixed or Windows style, start by that.
18001    new_path=`cmd //c echo $new_path`
18002
18003  input_path="$new_path"
18004  # Check if we need to convert this using DOS-style short mode. If the path
18005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18006  # take no chances and rewrite it.
18007  # Note: m4 eats our [], so we need to use [ and ] instead.
18008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18009  if test "x$has_forbidden_chars" != x; then
18010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18012  fi
18013
18014    # Output is in $new_path
18015
18016  windows_path="$new_path"
18017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18018    unix_path=`$CYGPATH -u "$windows_path"`
18019    new_path="$unix_path"
18020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18022    new_path="$unix_path"
18023  fi
18024
18025    # remove trailing .exe if any
18026    new_path="${new_path/%.exe/}"
18027
18028    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18029    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18030  fi
18031
18032  else
18033    # We're on a posix platform. Hooray! :)
18034    # First separate the path from the arguments. This will split at the first
18035    # space.
18036    complete="$CC"
18037    path="${complete%% *}"
18038    tmp="$complete EOL"
18039    arguments="${tmp#* }"
18040
18041    new_path=`$WHICH $path 2> /dev/null`
18042    if test "x$new_path" = x; then
18043      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18044      if test "x$is_absolute_path" != x; then
18045        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) with 'which' failed, using $path directly." >&5
18046$as_echo "$as_me: Resolving CC (as $path) with 'which' failed, using $path directly." >&6;}
18047        new_path="$path"
18048      else
18049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18050$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18051        has_space=`$ECHO "$complete" | $GREP " "`
18052        if test "x$has_space" != x; then
18053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18055        fi
18056        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18057      fi
18058    fi
18059  fi
18060
18061  # Now join together the path and the arguments once again
18062  if test "x$arguments" != xEOL; then
18063      new_complete="$new_path ${arguments% *}"
18064  else
18065      new_complete="$new_path"
18066  fi
18067
18068  if test "x$complete" != "x$new_complete"; then
18069    CC="$new_complete"
18070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18071$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18072  fi
18073
18074  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18075$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18076  TEST_COMPILER="$CC"
18077
18078    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18079        # Follow a chain of symbolic links. Use readlink
18080        # where it exists, else fall back to horribly
18081        # complicated shell code.
18082        if test "x$READLINK_TESTED" != yes; then
18083            # On MacOSX there is a readlink tool with a different
18084            # purpose than the GNU readlink tool. Check the found readlink.
18085            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
18086            if test "x$ISGNU" = x; then
18087                 # A readlink that we do not know how to use.
18088                 # Are there other non-GNU readlinks out there?
18089                 READLINK_TESTED=yes
18090                 READLINK=
18091            fi
18092        fi
18093
18094        if test "x$READLINK" != x; then
18095            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18096        else
18097            STARTDIR=$PWD
18098            COUNTER=0
18099            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18100            sym_link_file=`$BASENAME $TEST_COMPILER`
18101            while test $COUNTER -lt 20; do
18102                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18103                if test "x$ISLINK" == x; then
18104                    # This is not a symbolic link! We are done!
18105                    break
18106                fi
18107                # The link might be relative! We have to use cd to travel safely.
18108                cd $sym_link_dir
18109                # ... and we must get the to the absolute path, not one using symbolic links.
18110                cd `pwd -P`
18111                cd `$DIRNAME $ISLINK`
18112                sym_link_dir=`$THEPWDCMD`
18113                sym_link_file=`$BASENAME $ISLINK`
18114                let COUNTER=COUNTER+1
18115            done
18116            cd $STARTDIR
18117            TEST_COMPILER=$sym_link_dir/$sym_link_file
18118        fi
18119    fi
18120
18121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18122$as_echo "$TEST_COMPILER" >&6; }
18123  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18124$as_echo_n "checking if CC is disguised ccache... " >&6; }
18125
18126  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18127  if test "x$COMPILER_BASENAME" = "xccache"; then
18128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18129$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18130    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18131    # We want to control ccache invocation ourselves, so ignore this cc and try
18132    # searching again.
18133
18134    # Remove the path to the fake ccache cc from the PATH
18135    RETRY_COMPILER_SAVED_PATH="$PATH"
18136    COMPILER_DIRNAME=`$DIRNAME $CC`
18137    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18138
18139    # Try again looking for our compiler
18140    if test -n "$ac_tool_prefix"; then
18141  for ac_prog in $COMPILER_CHECK_LIST
18142  do
18143    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18144set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18146$as_echo_n "checking for $ac_word... " >&6; }
18147if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18148  $as_echo_n "(cached) " >&6
18149else
18150  if test -n "$PROPER_COMPILER_CC"; then
18151  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18152else
18153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18154for as_dir in $PATH
18155do
18156  IFS=$as_save_IFS
18157  test -z "$as_dir" && as_dir=.
18158    for ac_exec_ext in '' $ac_executable_extensions; do
18159  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18160    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18162    break 2
18163  fi
18164done
18165  done
18166IFS=$as_save_IFS
18167
18168fi
18169fi
18170PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18171if test -n "$PROPER_COMPILER_CC"; then
18172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18173$as_echo "$PROPER_COMPILER_CC" >&6; }
18174else
18175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18176$as_echo "no" >&6; }
18177fi
18178
18179
18180    test -n "$PROPER_COMPILER_CC" && break
18181  done
18182fi
18183if test -z "$PROPER_COMPILER_CC"; then
18184  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18185  for ac_prog in $COMPILER_CHECK_LIST
18186do
18187  # Extract the first word of "$ac_prog", so it can be a program name with args.
18188set dummy $ac_prog; ac_word=$2
18189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18190$as_echo_n "checking for $ac_word... " >&6; }
18191if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18192  $as_echo_n "(cached) " >&6
18193else
18194  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18195  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18196else
18197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18198for as_dir in $PATH
18199do
18200  IFS=$as_save_IFS
18201  test -z "$as_dir" && as_dir=.
18202    for ac_exec_ext in '' $ac_executable_extensions; do
18203  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18204    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18206    break 2
18207  fi
18208done
18209  done
18210IFS=$as_save_IFS
18211
18212fi
18213fi
18214ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18215if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18217$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18218else
18219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18220$as_echo "no" >&6; }
18221fi
18222
18223
18224  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18225done
18226
18227  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18228    PROPER_COMPILER_CC=""
18229  else
18230    case $cross_compiling:$ac_tool_warned in
18231yes:)
18232{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18233$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18234ac_tool_warned=yes ;;
18235esac
18236    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18237  fi
18238fi
18239
18240
18241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18242
18243  # First separate the path from the arguments. This will split at the first
18244  # space.
18245  complete="$PROPER_COMPILER_CC"
18246  path="${complete%% *}"
18247  tmp="$complete EOL"
18248  arguments="${tmp#* }"
18249
18250  # Input might be given as Windows format, start by converting to
18251  # unix format.
18252  new_path=`$CYGPATH -u "$path"`
18253
18254  # Now try to locate executable using which
18255  new_path=`$WHICH "$new_path" 2> /dev/null`
18256  # bat and cmd files are not always considered executable in cygwin causing which
18257  # to not find them
18258  if test "x$new_path" = x \
18259           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18260           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18261    new_path=`$CYGPATH -u "$path"`
18262  fi
18263  if test "x$new_path" = x; then
18264    # Oops. Which didn't find the executable.
18265    # The splitting of arguments from the executable at a space might have been incorrect,
18266    # since paths with space are more likely in Windows. Give it another try with the whole
18267    # argument.
18268    path="$complete"
18269    arguments="EOL"
18270    new_path=`$CYGPATH -u "$path"`
18271    new_path=`$WHICH "$new_path" 2> /dev/null`
18272    # bat and cmd files are not always considered executable in cygwin causing which
18273    # to not find them
18274    if test "x$new_path" = x \
18275             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18276             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18277      new_path=`$CYGPATH -u "$path"`
18278    fi
18279    if test "x$new_path" = x; then
18280      # It's still not found. Now this is an unrecoverable error.
18281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18282$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18283      has_space=`$ECHO "$complete" | $GREP " "`
18284      if test "x$has_space" != x; then
18285        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18286$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18287      fi
18288      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18289    fi
18290  fi
18291
18292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18295  # "foo.exe" is OK but "foo" is an error.
18296  #
18297  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18298  # It is also a way to make sure we got the proper file name for the real test later on.
18299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18300  if test "x$test_shortpath" = x; then
18301    # Short path failed, file does not exist as specified.
18302    # Try adding .exe or .cmd
18303    if test -f "${new_path}.exe"; then
18304       input_to_shortpath="${new_path}.exe"
18305    elif test -f "${new_path}.cmd"; then
18306       input_to_shortpath="${new_path}.cmd"
18307    else
18308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18309$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18310      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18311$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18312      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18313    fi
18314  else
18315    input_to_shortpath="$new_path"
18316  fi
18317
18318  # Call helper function which possibly converts this using DOS-style short mode.
18319  # If so, the updated path is stored in $new_path.
18320  new_path="$input_to_shortpath"
18321
18322  input_path="$input_to_shortpath"
18323  # Check if we need to convert this using DOS-style short mode. If the path
18324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18325  # take no chances and rewrite it.
18326  # Note: m4 eats our [], so we need to use [ and ] instead.
18327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18328  if test "x$has_forbidden_chars" != x; then
18329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18333      # Going to short mode and back again did indeed matter. Since short mode is
18334      # case insensitive, let's make it lowercase to improve readability.
18335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18336      # Now convert it back to Unix-stile (cygpath)
18337      input_path=`$CYGPATH -u "$shortmode_path"`
18338      new_path="$input_path"
18339    fi
18340  fi
18341
18342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18343  if test "x$test_cygdrive_prefix" = x; then
18344    # As a simple fix, exclude /usr/bin since it's not a real path.
18345    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18347      # a path prefixed by /cygdrive for fixpath to work.
18348      new_path="$CYGWIN_ROOT_PATH$input_path"
18349    fi
18350  fi
18351
18352  # remove trailing .exe if any
18353  new_path="${new_path/%.exe/}"
18354
18355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18356
18357  # First separate the path from the arguments. This will split at the first
18358  # space.
18359  complete="$PROPER_COMPILER_CC"
18360  path="${complete%% *}"
18361  tmp="$complete EOL"
18362  arguments="${tmp#* }"
18363
18364  # Input might be given as Windows format, start by converting to
18365  # unix format.
18366  new_path="$path"
18367
18368  windows_path="$new_path"
18369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18370    unix_path=`$CYGPATH -u "$windows_path"`
18371    new_path="$unix_path"
18372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18374    new_path="$unix_path"
18375  fi
18376
18377
18378  # Now try to locate executable using which
18379  new_path=`$WHICH "$new_path" 2> /dev/null`
18380
18381  if test "x$new_path" = x; then
18382    # Oops. Which didn't find the executable.
18383    # The splitting of arguments from the executable at a space might have been incorrect,
18384    # since paths with space are more likely in Windows. Give it another try with the whole
18385    # argument.
18386    path="$complete"
18387    arguments="EOL"
18388    new_path="$path"
18389
18390  windows_path="$new_path"
18391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18392    unix_path=`$CYGPATH -u "$windows_path"`
18393    new_path="$unix_path"
18394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18396    new_path="$unix_path"
18397  fi
18398
18399
18400    new_path=`$WHICH "$new_path" 2> /dev/null`
18401
18402    if test "x$new_path" = x; then
18403      # It's still not found. Now this is an unrecoverable error.
18404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18405$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18406      has_space=`$ECHO "$complete" | $GREP " "`
18407      if test "x$has_space" != x; then
18408        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18409$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18410      fi
18411      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18412    fi
18413  fi
18414
18415  # Now new_path has a complete unix path to the binary
18416  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18417    # Keep paths in /bin as-is, but remove trailing .exe if any
18418    new_path="${new_path/%.exe/}"
18419    # Do not save /bin paths to all_fixpath_prefixes!
18420  else
18421    # Not in mixed or Windows style, start by that.
18422    new_path=`cmd //c echo $new_path`
18423
18424  input_path="$new_path"
18425  # Check if we need to convert this using DOS-style short mode. If the path
18426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18427  # take no chances and rewrite it.
18428  # Note: m4 eats our [], so we need to use [ and ] instead.
18429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18430  if test "x$has_forbidden_chars" != x; then
18431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18432    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18433  fi
18434
18435    # Output is in $new_path
18436
18437  windows_path="$new_path"
18438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18439    unix_path=`$CYGPATH -u "$windows_path"`
18440    new_path="$unix_path"
18441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18443    new_path="$unix_path"
18444  fi
18445
18446    # remove trailing .exe if any
18447    new_path="${new_path/%.exe/}"
18448
18449    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18450    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18451  fi
18452
18453  else
18454    # We're on a posix platform. Hooray! :)
18455    # First separate the path from the arguments. This will split at the first
18456    # space.
18457    complete="$PROPER_COMPILER_CC"
18458    path="${complete%% *}"
18459    tmp="$complete EOL"
18460    arguments="${tmp#* }"
18461
18462    new_path=`$WHICH $path 2> /dev/null`
18463    if test "x$new_path" = x; then
18464      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18465      if test "x$is_absolute_path" != x; then
18466        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&5
18467$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&6;}
18468        new_path="$path"
18469      else
18470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18471$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18472        has_space=`$ECHO "$complete" | $GREP " "`
18473        if test "x$has_space" != x; then
18474          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18475$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18476        fi
18477        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18478      fi
18479    fi
18480  fi
18481
18482  # Now join together the path and the arguments once again
18483  if test "x$arguments" != xEOL; then
18484      new_complete="$new_path ${arguments% *}"
18485  else
18486      new_complete="$new_path"
18487  fi
18488
18489  if test "x$complete" != "x$new_complete"; then
18490    PROPER_COMPILER_CC="$new_complete"
18491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18492$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18493  fi
18494
18495    PATH="$RETRY_COMPILER_SAVED_PATH"
18496
18497    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18498$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18499
18500    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18501        # Follow a chain of symbolic links. Use readlink
18502        # where it exists, else fall back to horribly
18503        # complicated shell code.
18504        if test "x$READLINK_TESTED" != yes; then
18505            # On MacOSX there is a readlink tool with a different
18506            # purpose than the GNU readlink tool. Check the found readlink.
18507            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
18508            if test "x$ISGNU" = x; then
18509                 # A readlink that we do not know how to use.
18510                 # Are there other non-GNU readlinks out there?
18511                 READLINK_TESTED=yes
18512                 READLINK=
18513            fi
18514        fi
18515
18516        if test "x$READLINK" != x; then
18517            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18518        else
18519            STARTDIR=$PWD
18520            COUNTER=0
18521            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18522            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18523            while test $COUNTER -lt 20; do
18524                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18525                if test "x$ISLINK" == x; then
18526                    # This is not a symbolic link! We are done!
18527                    break
18528                fi
18529                # The link might be relative! We have to use cd to travel safely.
18530                cd $sym_link_dir
18531                # ... and we must get the to the absolute path, not one using symbolic links.
18532                cd `pwd -P`
18533                cd `$DIRNAME $ISLINK`
18534                sym_link_dir=`$THEPWDCMD`
18535                sym_link_file=`$BASENAME $ISLINK`
18536                let COUNTER=COUNTER+1
18537            done
18538            cd $STARTDIR
18539            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18540        fi
18541    fi
18542
18543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18544$as_echo "$PROPER_COMPILER_CC" >&6; }
18545    CC="$PROPER_COMPILER_CC"
18546  else
18547    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18548$as_echo "no, keeping CC" >&6; }
18549    CC="$TEST_COMPILER"
18550  fi
18551
18552  COMPILER=$CC
18553  COMPILER_NAME=$COMPILER_NAME
18554
18555  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18556    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18557    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18558    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18559    if test $? -ne 0; then
18560      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18561
18562      { $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
18563$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18564      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18565$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18566      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18567    else
18568      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18569      COMPILER_VENDOR="Sun Studio"
18570    fi
18571  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18572    # First line typically looks something like:
18573    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18574    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18575    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18576    COMPILER_VENDOR="Microsoft CL.EXE"
18577    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18578    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18579      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18580        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
18581      fi
18582    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18583      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18584        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
18585      fi
18586    fi
18587  else
18588    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18589    # Check that this is likely to be GCC.
18590    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
18591    if test $? -ne 0; then
18592      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
18593$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
18594      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
18595$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
18596      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18597    fi
18598
18599    # First line typically looks something like:
18600    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
18601    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
18602    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
18603  fi
18604  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
18605  CC_VERSION="$COMPILER_VERSION"
18606  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
18607  CC_VENDOR="$COMPILER_VENDOR"
18608
18609  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
18610$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
18611
18612
18613# Now that we have resolved CC ourself, let autoconf have it's go at it
18614ac_ext=c
18615ac_cpp='$CPP $CPPFLAGS'
18616ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18617ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18618ac_compiler_gnu=$ac_cv_c_compiler_gnu
18619if test -n "$ac_tool_prefix"; then
18620  for ac_prog in $CC
18621  do
18622    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18623set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18625$as_echo_n "checking for $ac_word... " >&6; }
18626if test "${ac_cv_prog_CC+set}" = set; then :
18627  $as_echo_n "(cached) " >&6
18628else
18629  if test -n "$CC"; then
18630  ac_cv_prog_CC="$CC" # Let the user override the test.
18631else
18632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18633for as_dir in $PATH
18634do
18635  IFS=$as_save_IFS
18636  test -z "$as_dir" && as_dir=.
18637    for ac_exec_ext in '' $ac_executable_extensions; do
18638  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18639    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
18640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18641    break 2
18642  fi
18643done
18644  done
18645IFS=$as_save_IFS
18646
18647fi
18648fi
18649CC=$ac_cv_prog_CC
18650if test -n "$CC"; then
18651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
18652$as_echo "$CC" >&6; }
18653else
18654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18655$as_echo "no" >&6; }
18656fi
18657
18658
18659    test -n "$CC" && break
18660  done
18661fi
18662if test -z "$CC"; then
18663  ac_ct_CC=$CC
18664  for ac_prog in $CC
18665do
18666  # Extract the first word of "$ac_prog", so it can be a program name with args.
18667set dummy $ac_prog; ac_word=$2
18668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18669$as_echo_n "checking for $ac_word... " >&6; }
18670if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
18671  $as_echo_n "(cached) " >&6
18672else
18673  if test -n "$ac_ct_CC"; then
18674  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
18675else
18676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18677for as_dir in $PATH
18678do
18679  IFS=$as_save_IFS
18680  test -z "$as_dir" && as_dir=.
18681    for ac_exec_ext in '' $ac_executable_extensions; do
18682  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18683    ac_cv_prog_ac_ct_CC="$ac_prog"
18684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18685    break 2
18686  fi
18687done
18688  done
18689IFS=$as_save_IFS
18690
18691fi
18692fi
18693ac_ct_CC=$ac_cv_prog_ac_ct_CC
18694if test -n "$ac_ct_CC"; then
18695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
18696$as_echo "$ac_ct_CC" >&6; }
18697else
18698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18699$as_echo "no" >&6; }
18700fi
18701
18702
18703  test -n "$ac_ct_CC" && break
18704done
18705
18706  if test "x$ac_ct_CC" = x; then
18707    CC=""
18708  else
18709    case $cross_compiling:$ac_tool_warned in
18710yes:)
18711{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18712$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18713ac_tool_warned=yes ;;
18714esac
18715    CC=$ac_ct_CC
18716  fi
18717fi
18718
18719
18720test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18721$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18722as_fn_error $? "no acceptable C compiler found in \$PATH
18723See \`config.log' for more details" "$LINENO" 5 ; }
18724
18725# Provide some information about the compiler.
18726$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
18727set X $ac_compile
18728ac_compiler=$2
18729for ac_option in --version -v -V -qversion; do
18730  { { ac_try="$ac_compiler $ac_option >&5"
18731case "(($ac_try" in
18732  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18733  *) ac_try_echo=$ac_try;;
18734esac
18735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18736$as_echo "$ac_try_echo"; } >&5
18737  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
18738  ac_status=$?
18739  if test -s conftest.err; then
18740    sed '10a\
18741... rest of stderr output deleted ...
18742         10q' conftest.err >conftest.er1
18743    cat conftest.er1 >&5
18744  fi
18745  rm -f conftest.er1 conftest.err
18746  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18747  test $ac_status = 0; }
18748done
18749
18750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18751/* end confdefs.h.  */
18752
18753int
18754main ()
18755{
18756
18757  ;
18758  return 0;
18759}
18760_ACEOF
18761ac_clean_files_save=$ac_clean_files
18762ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
18763# Try to create an executable without -o first, disregard a.out.
18764# It will help us diagnose broken compilers, and finding out an intuition
18765# of exeext.
18766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
18767$as_echo_n "checking whether the C compiler works... " >&6; }
18768ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
18769
18770# The possible output files:
18771ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
18772
18773ac_rmfiles=
18774for ac_file in $ac_files
18775do
18776  case $ac_file in
18777    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18778    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
18779  esac
18780done
18781rm -f $ac_rmfiles
18782
18783if { { ac_try="$ac_link_default"
18784case "(($ac_try" in
18785  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18786  *) ac_try_echo=$ac_try;;
18787esac
18788eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18789$as_echo "$ac_try_echo"; } >&5
18790  (eval "$ac_link_default") 2>&5
18791  ac_status=$?
18792  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18793  test $ac_status = 0; }; then :
18794  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
18795# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
18796# in a Makefile.  We should not override ac_cv_exeext if it was cached,
18797# so that the user can short-circuit this test for compilers unknown to
18798# Autoconf.
18799for ac_file in $ac_files ''
18800do
18801  test -f "$ac_file" || continue
18802  case $ac_file in
18803    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
18804	;;
18805    [ab].out )
18806	# We found the default executable, but exeext='' is most
18807	# certainly right.
18808	break;;
18809    *.* )
18810	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
18811	then :; else
18812	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18813	fi
18814	# We set ac_cv_exeext here because the later test for it is not
18815	# safe: cross compilers may not add the suffix if given an `-o'
18816	# argument, so we may need to know it at that point already.
18817	# Even if this section looks crufty: it has the advantage of
18818	# actually working.
18819	break;;
18820    * )
18821	break;;
18822  esac
18823done
18824test "$ac_cv_exeext" = no && ac_cv_exeext=
18825
18826else
18827  ac_file=''
18828fi
18829if test -z "$ac_file"; then :
18830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18831$as_echo "no" >&6; }
18832$as_echo "$as_me: failed program was:" >&5
18833sed 's/^/| /' conftest.$ac_ext >&5
18834
18835{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18836$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18837as_fn_error 77 "C compiler cannot create executables
18838See \`config.log' for more details" "$LINENO" 5 ; }
18839else
18840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18841$as_echo "yes" >&6; }
18842fi
18843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
18844$as_echo_n "checking for C compiler default output file name... " >&6; }
18845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
18846$as_echo "$ac_file" >&6; }
18847ac_exeext=$ac_cv_exeext
18848
18849rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
18850ac_clean_files=$ac_clean_files_save
18851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
18852$as_echo_n "checking for suffix of executables... " >&6; }
18853if { { ac_try="$ac_link"
18854case "(($ac_try" in
18855  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18856  *) ac_try_echo=$ac_try;;
18857esac
18858eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18859$as_echo "$ac_try_echo"; } >&5
18860  (eval "$ac_link") 2>&5
18861  ac_status=$?
18862  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18863  test $ac_status = 0; }; then :
18864  # If both `conftest.exe' and `conftest' are `present' (well, observable)
18865# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
18866# work properly (i.e., refer to `conftest.exe'), while it won't with
18867# `rm'.
18868for ac_file in conftest.exe conftest conftest.*; do
18869  test -f "$ac_file" || continue
18870  case $ac_file in
18871    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18872    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18873	  break;;
18874    * ) break;;
18875  esac
18876done
18877else
18878  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18880as_fn_error $? "cannot compute suffix of executables: cannot compile and link
18881See \`config.log' for more details" "$LINENO" 5 ; }
18882fi
18883rm -f conftest conftest$ac_cv_exeext
18884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
18885$as_echo "$ac_cv_exeext" >&6; }
18886
18887rm -f conftest.$ac_ext
18888EXEEXT=$ac_cv_exeext
18889ac_exeext=$EXEEXT
18890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18891/* end confdefs.h.  */
18892#include <stdio.h>
18893int
18894main ()
18895{
18896FILE *f = fopen ("conftest.out", "w");
18897 return ferror (f) || fclose (f) != 0;
18898
18899  ;
18900  return 0;
18901}
18902_ACEOF
18903ac_clean_files="$ac_clean_files conftest.out"
18904# Check that the compiler produces executables we can run.  If not, either
18905# the compiler is broken, or we cross compile.
18906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
18907$as_echo_n "checking whether we are cross compiling... " >&6; }
18908if test "$cross_compiling" != yes; then
18909  { { ac_try="$ac_link"
18910case "(($ac_try" in
18911  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18912  *) ac_try_echo=$ac_try;;
18913esac
18914eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18915$as_echo "$ac_try_echo"; } >&5
18916  (eval "$ac_link") 2>&5
18917  ac_status=$?
18918  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18919  test $ac_status = 0; }
18920  if { ac_try='./conftest$ac_cv_exeext'
18921  { { case "(($ac_try" in
18922  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18923  *) ac_try_echo=$ac_try;;
18924esac
18925eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18926$as_echo "$ac_try_echo"; } >&5
18927  (eval "$ac_try") 2>&5
18928  ac_status=$?
18929  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18930  test $ac_status = 0; }; }; then
18931    cross_compiling=no
18932  else
18933    if test "$cross_compiling" = maybe; then
18934	cross_compiling=yes
18935    else
18936	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18937$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18938as_fn_error $? "cannot run C compiled programs.
18939If you meant to cross compile, use \`--host'.
18940See \`config.log' for more details" "$LINENO" 5 ; }
18941    fi
18942  fi
18943fi
18944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
18945$as_echo "$cross_compiling" >&6; }
18946
18947rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
18948ac_clean_files=$ac_clean_files_save
18949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
18950$as_echo_n "checking for suffix of object files... " >&6; }
18951if test "${ac_cv_objext+set}" = set; then :
18952  $as_echo_n "(cached) " >&6
18953else
18954  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18955/* end confdefs.h.  */
18956
18957int
18958main ()
18959{
18960
18961  ;
18962  return 0;
18963}
18964_ACEOF
18965rm -f conftest.o conftest.obj
18966if { { ac_try="$ac_compile"
18967case "(($ac_try" in
18968  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18969  *) ac_try_echo=$ac_try;;
18970esac
18971eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18972$as_echo "$ac_try_echo"; } >&5
18973  (eval "$ac_compile") 2>&5
18974  ac_status=$?
18975  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18976  test $ac_status = 0; }; then :
18977  for ac_file in conftest.o conftest.obj conftest.*; do
18978  test -f "$ac_file" || continue;
18979  case $ac_file in
18980    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
18981    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
18982       break;;
18983  esac
18984done
18985else
18986  $as_echo "$as_me: failed program was:" >&5
18987sed 's/^/| /' conftest.$ac_ext >&5
18988
18989{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18991as_fn_error $? "cannot compute suffix of object files: cannot compile
18992See \`config.log' for more details" "$LINENO" 5 ; }
18993fi
18994rm -f conftest.$ac_cv_objext conftest.$ac_ext
18995fi
18996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
18997$as_echo "$ac_cv_objext" >&6; }
18998OBJEXT=$ac_cv_objext
18999ac_objext=$OBJEXT
19000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19001$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19002if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19003  $as_echo_n "(cached) " >&6
19004else
19005  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19006/* end confdefs.h.  */
19007
19008int
19009main ()
19010{
19011#ifndef __GNUC__
19012       choke me
19013#endif
19014
19015  ;
19016  return 0;
19017}
19018_ACEOF
19019if ac_fn_c_try_compile "$LINENO"; then :
19020  ac_compiler_gnu=yes
19021else
19022  ac_compiler_gnu=no
19023fi
19024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19025ac_cv_c_compiler_gnu=$ac_compiler_gnu
19026
19027fi
19028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19029$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19030if test $ac_compiler_gnu = yes; then
19031  GCC=yes
19032else
19033  GCC=
19034fi
19035ac_test_CFLAGS=${CFLAGS+set}
19036ac_save_CFLAGS=$CFLAGS
19037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19038$as_echo_n "checking whether $CC accepts -g... " >&6; }
19039if test "${ac_cv_prog_cc_g+set}" = set; then :
19040  $as_echo_n "(cached) " >&6
19041else
19042  ac_save_c_werror_flag=$ac_c_werror_flag
19043   ac_c_werror_flag=yes
19044   ac_cv_prog_cc_g=no
19045   CFLAGS="-g"
19046   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19047/* end confdefs.h.  */
19048
19049int
19050main ()
19051{
19052
19053  ;
19054  return 0;
19055}
19056_ACEOF
19057if ac_fn_c_try_compile "$LINENO"; then :
19058  ac_cv_prog_cc_g=yes
19059else
19060  CFLAGS=""
19061      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19062/* end confdefs.h.  */
19063
19064int
19065main ()
19066{
19067
19068  ;
19069  return 0;
19070}
19071_ACEOF
19072if ac_fn_c_try_compile "$LINENO"; then :
19073
19074else
19075  ac_c_werror_flag=$ac_save_c_werror_flag
19076	 CFLAGS="-g"
19077	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19078/* end confdefs.h.  */
19079
19080int
19081main ()
19082{
19083
19084  ;
19085  return 0;
19086}
19087_ACEOF
19088if ac_fn_c_try_compile "$LINENO"; then :
19089  ac_cv_prog_cc_g=yes
19090fi
19091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19092fi
19093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19094fi
19095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19096   ac_c_werror_flag=$ac_save_c_werror_flag
19097fi
19098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19099$as_echo "$ac_cv_prog_cc_g" >&6; }
19100if test "$ac_test_CFLAGS" = set; then
19101  CFLAGS=$ac_save_CFLAGS
19102elif test $ac_cv_prog_cc_g = yes; then
19103  if test "$GCC" = yes; then
19104    CFLAGS="-g -O2"
19105  else
19106    CFLAGS="-g"
19107  fi
19108else
19109  if test "$GCC" = yes; then
19110    CFLAGS="-O2"
19111  else
19112    CFLAGS=
19113  fi
19114fi
19115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19116$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19117if test "${ac_cv_prog_cc_c89+set}" = set; then :
19118  $as_echo_n "(cached) " >&6
19119else
19120  ac_cv_prog_cc_c89=no
19121ac_save_CC=$CC
19122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19123/* end confdefs.h.  */
19124#include <stdarg.h>
19125#include <stdio.h>
19126#include <sys/types.h>
19127#include <sys/stat.h>
19128/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19129struct buf { int x; };
19130FILE * (*rcsopen) (struct buf *, struct stat *, int);
19131static char *e (p, i)
19132     char **p;
19133     int i;
19134{
19135  return p[i];
19136}
19137static char *f (char * (*g) (char **, int), char **p, ...)
19138{
19139  char *s;
19140  va_list v;
19141  va_start (v,p);
19142  s = g (p, va_arg (v,int));
19143  va_end (v);
19144  return s;
19145}
19146
19147/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19148   function prototypes and stuff, but not '\xHH' hex character constants.
19149   These don't provoke an error unfortunately, instead are silently treated
19150   as 'x'.  The following induces an error, until -std is added to get
19151   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19152   array size at least.  It's necessary to write '\x00'==0 to get something
19153   that's true only with -std.  */
19154int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19155
19156/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19157   inside strings and character constants.  */
19158#define FOO(x) 'x'
19159int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19160
19161int test (int i, double x);
19162struct s1 {int (*f) (int a);};
19163struct s2 {int (*f) (double a);};
19164int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19165int argc;
19166char **argv;
19167int
19168main ()
19169{
19170return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19171  ;
19172  return 0;
19173}
19174_ACEOF
19175for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19176	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19177do
19178  CC="$ac_save_CC $ac_arg"
19179  if ac_fn_c_try_compile "$LINENO"; then :
19180  ac_cv_prog_cc_c89=$ac_arg
19181fi
19182rm -f core conftest.err conftest.$ac_objext
19183  test "x$ac_cv_prog_cc_c89" != "xno" && break
19184done
19185rm -f conftest.$ac_ext
19186CC=$ac_save_CC
19187
19188fi
19189# AC_CACHE_VAL
19190case "x$ac_cv_prog_cc_c89" in
19191  x)
19192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19193$as_echo "none needed" >&6; } ;;
19194  xno)
19195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19196$as_echo "unsupported" >&6; } ;;
19197  *)
19198    CC="$CC $ac_cv_prog_cc_c89"
19199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19200$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19201esac
19202if test "x$ac_cv_prog_cc_c89" != xno; then :
19203
19204fi
19205
19206ac_ext=cpp
19207ac_cpp='$CXXCPP $CPPFLAGS'
19208ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19209ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19210ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19211
19212
19213### Locate C++ compiler (CXX)
19214
19215if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19216  # Do not probe for CC on MacOSX.
19217  COMPILER_CHECK_LIST="cl g++"
19218else
19219  COMPILER_CHECK_LIST="cl CC g++"
19220fi
19221
19222  COMPILER_NAME=C++
19223
19224  # Do a first initial attempt at searching the list of compiler names.
19225  # AC_PATH_PROGS can't be run multiple times with the same variable,
19226  # so create a new name for this run.
19227  for ac_prog in $COMPILER_CHECK_LIST
19228do
19229  # Extract the first word of "$ac_prog", so it can be a program name with args.
19230set dummy $ac_prog; ac_word=$2
19231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19232$as_echo_n "checking for $ac_word... " >&6; }
19233if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19234  $as_echo_n "(cached) " >&6
19235else
19236  case $POTENTIAL_CXX in
19237  [\\/]* | ?:[\\/]*)
19238  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19239  ;;
19240  *)
19241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19242for as_dir in $PATH
19243do
19244  IFS=$as_save_IFS
19245  test -z "$as_dir" && as_dir=.
19246    for ac_exec_ext in '' $ac_executable_extensions; do
19247  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19248    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19250    break 2
19251  fi
19252done
19253  done
19254IFS=$as_save_IFS
19255
19256  ;;
19257esac
19258fi
19259POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19260if test -n "$POTENTIAL_CXX"; then
19261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19262$as_echo "$POTENTIAL_CXX" >&6; }
19263else
19264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19265$as_echo "no" >&6; }
19266fi
19267
19268
19269  test -n "$POTENTIAL_CXX" && break
19270done
19271
19272  CXX=$POTENTIAL_CXX
19273
19274  if test "x$$CXX" = x; then
19275
19276    # Print a helpful message on how to acquire the necessary build dependency.
19277    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19278    MISSING_DEPENDENCY=devkit
19279    PKGHANDLER_COMMAND=
19280
19281    case $PKGHANDLER in
19282	apt-get)
19283                apt_help     $MISSING_DEPENDENCY ;;
19284    yum)
19285                yum_help     $MISSING_DEPENDENCY ;;
19286	port)
19287                port_help    $MISSING_DEPENDENCY ;;
19288	pkgutil)
19289                pkgutil_help $MISSING_DEPENDENCY ;;
19290	pkgadd)
19291                pkgadd_help  $MISSING_DEPENDENCY ;;
19292    * )
19293      break ;;
19294    esac
19295
19296    if test "x$PKGHANDLER_COMMAND" != x; then
19297        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19298    fi
19299
19300      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19301  fi
19302
19303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19304
19305  # First separate the path from the arguments. This will split at the first
19306  # space.
19307  complete="$CXX"
19308  path="${complete%% *}"
19309  tmp="$complete EOL"
19310  arguments="${tmp#* }"
19311
19312  # Input might be given as Windows format, start by converting to
19313  # unix format.
19314  new_path=`$CYGPATH -u "$path"`
19315
19316  # Now try to locate executable using which
19317  new_path=`$WHICH "$new_path" 2> /dev/null`
19318  # bat and cmd files are not always considered executable in cygwin causing which
19319  # to not find them
19320  if test "x$new_path" = x \
19321           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19322           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19323    new_path=`$CYGPATH -u "$path"`
19324  fi
19325  if test "x$new_path" = x; then
19326    # Oops. Which didn't find the executable.
19327    # The splitting of arguments from the executable at a space might have been incorrect,
19328    # since paths with space are more likely in Windows. Give it another try with the whole
19329    # argument.
19330    path="$complete"
19331    arguments="EOL"
19332    new_path=`$CYGPATH -u "$path"`
19333    new_path=`$WHICH "$new_path" 2> /dev/null`
19334    # bat and cmd files are not always considered executable in cygwin causing which
19335    # to not find them
19336    if test "x$new_path" = x \
19337             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19338             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19339      new_path=`$CYGPATH -u "$path"`
19340    fi
19341    if test "x$new_path" = x; then
19342      # It's still not found. Now this is an unrecoverable error.
19343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19344$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19345      has_space=`$ECHO "$complete" | $GREP " "`
19346      if test "x$has_space" != x; then
19347        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19348$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19349      fi
19350      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19351    fi
19352  fi
19353
19354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19357  # "foo.exe" is OK but "foo" is an error.
19358  #
19359  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19360  # It is also a way to make sure we got the proper file name for the real test later on.
19361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19362  if test "x$test_shortpath" = x; then
19363    # Short path failed, file does not exist as specified.
19364    # Try adding .exe or .cmd
19365    if test -f "${new_path}.exe"; then
19366       input_to_shortpath="${new_path}.exe"
19367    elif test -f "${new_path}.cmd"; then
19368       input_to_shortpath="${new_path}.cmd"
19369    else
19370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19371$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19372      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19373$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19374      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19375    fi
19376  else
19377    input_to_shortpath="$new_path"
19378  fi
19379
19380  # Call helper function which possibly converts this using DOS-style short mode.
19381  # If so, the updated path is stored in $new_path.
19382  new_path="$input_to_shortpath"
19383
19384  input_path="$input_to_shortpath"
19385  # Check if we need to convert this using DOS-style short mode. If the path
19386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19387  # take no chances and rewrite it.
19388  # Note: m4 eats our [], so we need to use [ and ] instead.
19389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19390  if test "x$has_forbidden_chars" != x; then
19391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19395      # Going to short mode and back again did indeed matter. Since short mode is
19396      # case insensitive, let's make it lowercase to improve readability.
19397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19398      # Now convert it back to Unix-stile (cygpath)
19399      input_path=`$CYGPATH -u "$shortmode_path"`
19400      new_path="$input_path"
19401    fi
19402  fi
19403
19404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19405  if test "x$test_cygdrive_prefix" = x; then
19406    # As a simple fix, exclude /usr/bin since it's not a real path.
19407    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19409      # a path prefixed by /cygdrive for fixpath to work.
19410      new_path="$CYGWIN_ROOT_PATH$input_path"
19411    fi
19412  fi
19413
19414  # remove trailing .exe if any
19415  new_path="${new_path/%.exe/}"
19416
19417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19418
19419  # First separate the path from the arguments. This will split at the first
19420  # space.
19421  complete="$CXX"
19422  path="${complete%% *}"
19423  tmp="$complete EOL"
19424  arguments="${tmp#* }"
19425
19426  # Input might be given as Windows format, start by converting to
19427  # unix format.
19428  new_path="$path"
19429
19430  windows_path="$new_path"
19431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19432    unix_path=`$CYGPATH -u "$windows_path"`
19433    new_path="$unix_path"
19434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19436    new_path="$unix_path"
19437  fi
19438
19439
19440  # Now try to locate executable using which
19441  new_path=`$WHICH "$new_path" 2> /dev/null`
19442
19443  if test "x$new_path" = x; then
19444    # Oops. Which didn't find the executable.
19445    # The splitting of arguments from the executable at a space might have been incorrect,
19446    # since paths with space are more likely in Windows. Give it another try with the whole
19447    # argument.
19448    path="$complete"
19449    arguments="EOL"
19450    new_path="$path"
19451
19452  windows_path="$new_path"
19453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19454    unix_path=`$CYGPATH -u "$windows_path"`
19455    new_path="$unix_path"
19456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19458    new_path="$unix_path"
19459  fi
19460
19461
19462    new_path=`$WHICH "$new_path" 2> /dev/null`
19463
19464    if test "x$new_path" = x; then
19465      # It's still not found. Now this is an unrecoverable error.
19466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19467$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19468      has_space=`$ECHO "$complete" | $GREP " "`
19469      if test "x$has_space" != x; then
19470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19472      fi
19473      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19474    fi
19475  fi
19476
19477  # Now new_path has a complete unix path to the binary
19478  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19479    # Keep paths in /bin as-is, but remove trailing .exe if any
19480    new_path="${new_path/%.exe/}"
19481    # Do not save /bin paths to all_fixpath_prefixes!
19482  else
19483    # Not in mixed or Windows style, start by that.
19484    new_path=`cmd //c echo $new_path`
19485
19486  input_path="$new_path"
19487  # Check if we need to convert this using DOS-style short mode. If the path
19488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19489  # take no chances and rewrite it.
19490  # Note: m4 eats our [], so we need to use [ and ] instead.
19491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19492  if test "x$has_forbidden_chars" != x; then
19493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19495  fi
19496
19497    # Output is in $new_path
19498
19499  windows_path="$new_path"
19500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19501    unix_path=`$CYGPATH -u "$windows_path"`
19502    new_path="$unix_path"
19503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19505    new_path="$unix_path"
19506  fi
19507
19508    # remove trailing .exe if any
19509    new_path="${new_path/%.exe/}"
19510
19511    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19512    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19513  fi
19514
19515  else
19516    # We're on a posix platform. Hooray! :)
19517    # First separate the path from the arguments. This will split at the first
19518    # space.
19519    complete="$CXX"
19520    path="${complete%% *}"
19521    tmp="$complete EOL"
19522    arguments="${tmp#* }"
19523
19524    new_path=`$WHICH $path 2> /dev/null`
19525    if test "x$new_path" = x; then
19526      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19527      if test "x$is_absolute_path" != x; then
19528        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) with 'which' failed, using $path directly." >&5
19529$as_echo "$as_me: Resolving CXX (as $path) with 'which' failed, using $path directly." >&6;}
19530        new_path="$path"
19531      else
19532        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19533$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19534        has_space=`$ECHO "$complete" | $GREP " "`
19535        if test "x$has_space" != x; then
19536          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19537$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19538        fi
19539        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19540      fi
19541    fi
19542  fi
19543
19544  # Now join together the path and the arguments once again
19545  if test "x$arguments" != xEOL; then
19546      new_complete="$new_path ${arguments% *}"
19547  else
19548      new_complete="$new_path"
19549  fi
19550
19551  if test "x$complete" != "x$new_complete"; then
19552    CXX="$new_complete"
19553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
19554$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
19555  fi
19556
19557  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
19558$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
19559  TEST_COMPILER="$CXX"
19560
19561    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19562        # Follow a chain of symbolic links. Use readlink
19563        # where it exists, else fall back to horribly
19564        # complicated shell code.
19565        if test "x$READLINK_TESTED" != yes; then
19566            # On MacOSX there is a readlink tool with a different
19567            # purpose than the GNU readlink tool. Check the found readlink.
19568            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
19569            if test "x$ISGNU" = x; then
19570                 # A readlink that we do not know how to use.
19571                 # Are there other non-GNU readlinks out there?
19572                 READLINK_TESTED=yes
19573                 READLINK=
19574            fi
19575        fi
19576
19577        if test "x$READLINK" != x; then
19578            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19579        else
19580            STARTDIR=$PWD
19581            COUNTER=0
19582            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19583            sym_link_file=`$BASENAME $TEST_COMPILER`
19584            while test $COUNTER -lt 20; do
19585                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19586                if test "x$ISLINK" == x; then
19587                    # This is not a symbolic link! We are done!
19588                    break
19589                fi
19590                # The link might be relative! We have to use cd to travel safely.
19591                cd $sym_link_dir
19592                # ... and we must get the to the absolute path, not one using symbolic links.
19593                cd `pwd -P`
19594                cd `$DIRNAME $ISLINK`
19595                sym_link_dir=`$THEPWDCMD`
19596                sym_link_file=`$BASENAME $ISLINK`
19597                let COUNTER=COUNTER+1
19598            done
19599            cd $STARTDIR
19600            TEST_COMPILER=$sym_link_dir/$sym_link_file
19601        fi
19602    fi
19603
19604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19605$as_echo "$TEST_COMPILER" >&6; }
19606  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
19607$as_echo_n "checking if CXX is disguised ccache... " >&6; }
19608
19609  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19610  if test "x$COMPILER_BASENAME" = "xccache"; then
19611    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19612$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19613    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19614    # We want to control ccache invocation ourselves, so ignore this cc and try
19615    # searching again.
19616
19617    # Remove the path to the fake ccache cc from the PATH
19618    RETRY_COMPILER_SAVED_PATH="$PATH"
19619    COMPILER_DIRNAME=`$DIRNAME $CXX`
19620    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19621
19622    # Try again looking for our compiler
19623    if test -n "$ac_tool_prefix"; then
19624  for ac_prog in $COMPILER_CHECK_LIST
19625  do
19626    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19627set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19629$as_echo_n "checking for $ac_word... " >&6; }
19630if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
19631  $as_echo_n "(cached) " >&6
19632else
19633  if test -n "$PROPER_COMPILER_CXX"; then
19634  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
19635else
19636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19637for as_dir in $PATH
19638do
19639  IFS=$as_save_IFS
19640  test -z "$as_dir" && as_dir=.
19641    for ac_exec_ext in '' $ac_executable_extensions; do
19642  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19643    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
19644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19645    break 2
19646  fi
19647done
19648  done
19649IFS=$as_save_IFS
19650
19651fi
19652fi
19653PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
19654if test -n "$PROPER_COMPILER_CXX"; then
19655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
19656$as_echo "$PROPER_COMPILER_CXX" >&6; }
19657else
19658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19659$as_echo "no" >&6; }
19660fi
19661
19662
19663    test -n "$PROPER_COMPILER_CXX" && break
19664  done
19665fi
19666if test -z "$PROPER_COMPILER_CXX"; then
19667  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
19668  for ac_prog in $COMPILER_CHECK_LIST
19669do
19670  # Extract the first word of "$ac_prog", so it can be a program name with args.
19671set dummy $ac_prog; ac_word=$2
19672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19673$as_echo_n "checking for $ac_word... " >&6; }
19674if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
19675  $as_echo_n "(cached) " >&6
19676else
19677  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19678  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
19679else
19680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19681for as_dir in $PATH
19682do
19683  IFS=$as_save_IFS
19684  test -z "$as_dir" && as_dir=.
19685    for ac_exec_ext in '' $ac_executable_extensions; do
19686  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19687    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
19688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19689    break 2
19690  fi
19691done
19692  done
19693IFS=$as_save_IFS
19694
19695fi
19696fi
19697ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
19698if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
19700$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
19701else
19702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19703$as_echo "no" >&6; }
19704fi
19705
19706
19707  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
19708done
19709
19710  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
19711    PROPER_COMPILER_CXX=""
19712  else
19713    case $cross_compiling:$ac_tool_warned in
19714yes:)
19715{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19716$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19717ac_tool_warned=yes ;;
19718esac
19719    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
19720  fi
19721fi
19722
19723
19724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19725
19726  # First separate the path from the arguments. This will split at the first
19727  # space.
19728  complete="$PROPER_COMPILER_CXX"
19729  path="${complete%% *}"
19730  tmp="$complete EOL"
19731  arguments="${tmp#* }"
19732
19733  # Input might be given as Windows format, start by converting to
19734  # unix format.
19735  new_path=`$CYGPATH -u "$path"`
19736
19737  # Now try to locate executable using which
19738  new_path=`$WHICH "$new_path" 2> /dev/null`
19739  # bat and cmd files are not always considered executable in cygwin causing which
19740  # to not find them
19741  if test "x$new_path" = x \
19742           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19743           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19744    new_path=`$CYGPATH -u "$path"`
19745  fi
19746  if test "x$new_path" = x; then
19747    # Oops. Which didn't find the executable.
19748    # The splitting of arguments from the executable at a space might have been incorrect,
19749    # since paths with space are more likely in Windows. Give it another try with the whole
19750    # argument.
19751    path="$complete"
19752    arguments="EOL"
19753    new_path=`$CYGPATH -u "$path"`
19754    new_path=`$WHICH "$new_path" 2> /dev/null`
19755    # bat and cmd files are not always considered executable in cygwin causing which
19756    # to not find them
19757    if test "x$new_path" = x \
19758             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19759             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19760      new_path=`$CYGPATH -u "$path"`
19761    fi
19762    if test "x$new_path" = x; then
19763      # It's still not found. Now this is an unrecoverable error.
19764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19765$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19766      has_space=`$ECHO "$complete" | $GREP " "`
19767      if test "x$has_space" != x; then
19768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19770      fi
19771      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19772    fi
19773  fi
19774
19775  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19776  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19777  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19778  # "foo.exe" is OK but "foo" is an error.
19779  #
19780  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19781  # It is also a way to make sure we got the proper file name for the real test later on.
19782  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19783  if test "x$test_shortpath" = x; then
19784    # Short path failed, file does not exist as specified.
19785    # Try adding .exe or .cmd
19786    if test -f "${new_path}.exe"; then
19787       input_to_shortpath="${new_path}.exe"
19788    elif test -f "${new_path}.cmd"; then
19789       input_to_shortpath="${new_path}.cmd"
19790    else
19791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
19792$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
19793      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19794$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19795      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19796    fi
19797  else
19798    input_to_shortpath="$new_path"
19799  fi
19800
19801  # Call helper function which possibly converts this using DOS-style short mode.
19802  # If so, the updated path is stored in $new_path.
19803  new_path="$input_to_shortpath"
19804
19805  input_path="$input_to_shortpath"
19806  # Check if we need to convert this using DOS-style short mode. If the path
19807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19808  # take no chances and rewrite it.
19809  # Note: m4 eats our [], so we need to use [ and ] instead.
19810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19811  if test "x$has_forbidden_chars" != x; then
19812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19816      # Going to short mode and back again did indeed matter. Since short mode is
19817      # case insensitive, let's make it lowercase to improve readability.
19818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19819      # Now convert it back to Unix-stile (cygpath)
19820      input_path=`$CYGPATH -u "$shortmode_path"`
19821      new_path="$input_path"
19822    fi
19823  fi
19824
19825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19826  if test "x$test_cygdrive_prefix" = x; then
19827    # As a simple fix, exclude /usr/bin since it's not a real path.
19828    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19830      # a path prefixed by /cygdrive for fixpath to work.
19831      new_path="$CYGWIN_ROOT_PATH$input_path"
19832    fi
19833  fi
19834
19835  # remove trailing .exe if any
19836  new_path="${new_path/%.exe/}"
19837
19838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19839
19840  # First separate the path from the arguments. This will split at the first
19841  # space.
19842  complete="$PROPER_COMPILER_CXX"
19843  path="${complete%% *}"
19844  tmp="$complete EOL"
19845  arguments="${tmp#* }"
19846
19847  # Input might be given as Windows format, start by converting to
19848  # unix format.
19849  new_path="$path"
19850
19851  windows_path="$new_path"
19852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19853    unix_path=`$CYGPATH -u "$windows_path"`
19854    new_path="$unix_path"
19855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19857    new_path="$unix_path"
19858  fi
19859
19860
19861  # Now try to locate executable using which
19862  new_path=`$WHICH "$new_path" 2> /dev/null`
19863
19864  if test "x$new_path" = x; then
19865    # Oops. Which didn't find the executable.
19866    # The splitting of arguments from the executable at a space might have been incorrect,
19867    # since paths with space are more likely in Windows. Give it another try with the whole
19868    # argument.
19869    path="$complete"
19870    arguments="EOL"
19871    new_path="$path"
19872
19873  windows_path="$new_path"
19874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19875    unix_path=`$CYGPATH -u "$windows_path"`
19876    new_path="$unix_path"
19877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19879    new_path="$unix_path"
19880  fi
19881
19882
19883    new_path=`$WHICH "$new_path" 2> /dev/null`
19884
19885    if test "x$new_path" = x; then
19886      # It's still not found. Now this is an unrecoverable error.
19887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19888$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19889      has_space=`$ECHO "$complete" | $GREP " "`
19890      if test "x$has_space" != x; then
19891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19893      fi
19894      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19895    fi
19896  fi
19897
19898  # Now new_path has a complete unix path to the binary
19899  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19900    # Keep paths in /bin as-is, but remove trailing .exe if any
19901    new_path="${new_path/%.exe/}"
19902    # Do not save /bin paths to all_fixpath_prefixes!
19903  else
19904    # Not in mixed or Windows style, start by that.
19905    new_path=`cmd //c echo $new_path`
19906
19907  input_path="$new_path"
19908  # Check if we need to convert this using DOS-style short mode. If the path
19909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19910  # take no chances and rewrite it.
19911  # Note: m4 eats our [], so we need to use [ and ] instead.
19912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19913  if test "x$has_forbidden_chars" != x; then
19914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19916  fi
19917
19918    # Output is in $new_path
19919
19920  windows_path="$new_path"
19921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19922    unix_path=`$CYGPATH -u "$windows_path"`
19923    new_path="$unix_path"
19924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19926    new_path="$unix_path"
19927  fi
19928
19929    # remove trailing .exe if any
19930    new_path="${new_path/%.exe/}"
19931
19932    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19933    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19934  fi
19935
19936  else
19937    # We're on a posix platform. Hooray! :)
19938    # First separate the path from the arguments. This will split at the first
19939    # space.
19940    complete="$PROPER_COMPILER_CXX"
19941    path="${complete%% *}"
19942    tmp="$complete EOL"
19943    arguments="${tmp#* }"
19944
19945    new_path=`$WHICH $path 2> /dev/null`
19946    if test "x$new_path" = x; then
19947      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19948      if test "x$is_absolute_path" != x; then
19949        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&5
19950$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&6;}
19951        new_path="$path"
19952      else
19953        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19954$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19955        has_space=`$ECHO "$complete" | $GREP " "`
19956        if test "x$has_space" != x; then
19957          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19958$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19959        fi
19960        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19961      fi
19962    fi
19963  fi
19964
19965  # Now join together the path and the arguments once again
19966  if test "x$arguments" != xEOL; then
19967      new_complete="$new_path ${arguments% *}"
19968  else
19969      new_complete="$new_path"
19970  fi
19971
19972  if test "x$complete" != "x$new_complete"; then
19973    PROPER_COMPILER_CXX="$new_complete"
19974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
19975$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
19976  fi
19977
19978    PATH="$RETRY_COMPILER_SAVED_PATH"
19979
19980    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
19981$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
19982
19983    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19984        # Follow a chain of symbolic links. Use readlink
19985        # where it exists, else fall back to horribly
19986        # complicated shell code.
19987        if test "x$READLINK_TESTED" != yes; then
19988            # On MacOSX there is a readlink tool with a different
19989            # purpose than the GNU readlink tool. Check the found readlink.
19990            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
19991            if test "x$ISGNU" = x; then
19992                 # A readlink that we do not know how to use.
19993                 # Are there other non-GNU readlinks out there?
19994                 READLINK_TESTED=yes
19995                 READLINK=
19996            fi
19997        fi
19998
19999        if test "x$READLINK" != x; then
20000            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20001        else
20002            STARTDIR=$PWD
20003            COUNTER=0
20004            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20005            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20006            while test $COUNTER -lt 20; do
20007                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20008                if test "x$ISLINK" == x; then
20009                    # This is not a symbolic link! We are done!
20010                    break
20011                fi
20012                # The link might be relative! We have to use cd to travel safely.
20013                cd $sym_link_dir
20014                # ... and we must get the to the absolute path, not one using symbolic links.
20015                cd `pwd -P`
20016                cd `$DIRNAME $ISLINK`
20017                sym_link_dir=`$THEPWDCMD`
20018                sym_link_file=`$BASENAME $ISLINK`
20019                let COUNTER=COUNTER+1
20020            done
20021            cd $STARTDIR
20022            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20023        fi
20024    fi
20025
20026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20027$as_echo "$PROPER_COMPILER_CXX" >&6; }
20028    CXX="$PROPER_COMPILER_CXX"
20029  else
20030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20031$as_echo "no, keeping CXX" >&6; }
20032    CXX="$TEST_COMPILER"
20033  fi
20034
20035  COMPILER=$CXX
20036  COMPILER_NAME=$COMPILER_NAME
20037
20038  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20039    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20040    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20041    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20042    if test $? -ne 0; then
20043      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20044
20045      { $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
20046$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20047      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20048$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20049      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20050    else
20051      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20052      COMPILER_VENDOR="Sun Studio"
20053    fi
20054  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20055    # First line typically looks something like:
20056    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20057    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20058    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20059    COMPILER_VENDOR="Microsoft CL.EXE"
20060    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20061    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20062      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20063        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20064      fi
20065    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20066      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20067        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20068      fi
20069    fi
20070  else
20071    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20072    # Check that this is likely to be GCC.
20073    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20074    if test $? -ne 0; then
20075      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20076$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20077      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20078$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20079      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20080    fi
20081
20082    # First line typically looks something like:
20083    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20084    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20085    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20086  fi
20087  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20088  CXX_VERSION="$COMPILER_VERSION"
20089  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20090  CXX_VENDOR="$COMPILER_VENDOR"
20091
20092  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20093$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20094
20095
20096# Now that we have resolved CXX ourself, let autoconf have it's go at it
20097ac_ext=cpp
20098ac_cpp='$CXXCPP $CPPFLAGS'
20099ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20100ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20101ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20102if test -z "$CXX"; then
20103  if test -n "$CCC"; then
20104    CXX=$CCC
20105  else
20106    if test -n "$ac_tool_prefix"; then
20107  for ac_prog in $CXX
20108  do
20109    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20110set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20112$as_echo_n "checking for $ac_word... " >&6; }
20113if test "${ac_cv_prog_CXX+set}" = set; then :
20114  $as_echo_n "(cached) " >&6
20115else
20116  if test -n "$CXX"; then
20117  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20118else
20119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20120for as_dir in $PATH
20121do
20122  IFS=$as_save_IFS
20123  test -z "$as_dir" && as_dir=.
20124    for ac_exec_ext in '' $ac_executable_extensions; do
20125  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20126    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20128    break 2
20129  fi
20130done
20131  done
20132IFS=$as_save_IFS
20133
20134fi
20135fi
20136CXX=$ac_cv_prog_CXX
20137if test -n "$CXX"; then
20138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20139$as_echo "$CXX" >&6; }
20140else
20141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20142$as_echo "no" >&6; }
20143fi
20144
20145
20146    test -n "$CXX" && break
20147  done
20148fi
20149if test -z "$CXX"; then
20150  ac_ct_CXX=$CXX
20151  for ac_prog in $CXX
20152do
20153  # Extract the first word of "$ac_prog", so it can be a program name with args.
20154set dummy $ac_prog; ac_word=$2
20155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20156$as_echo_n "checking for $ac_word... " >&6; }
20157if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20158  $as_echo_n "(cached) " >&6
20159else
20160  if test -n "$ac_ct_CXX"; then
20161  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20162else
20163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20164for as_dir in $PATH
20165do
20166  IFS=$as_save_IFS
20167  test -z "$as_dir" && as_dir=.
20168    for ac_exec_ext in '' $ac_executable_extensions; do
20169  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20170    ac_cv_prog_ac_ct_CXX="$ac_prog"
20171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20172    break 2
20173  fi
20174done
20175  done
20176IFS=$as_save_IFS
20177
20178fi
20179fi
20180ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20181if test -n "$ac_ct_CXX"; then
20182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20183$as_echo "$ac_ct_CXX" >&6; }
20184else
20185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20186$as_echo "no" >&6; }
20187fi
20188
20189
20190  test -n "$ac_ct_CXX" && break
20191done
20192
20193  if test "x$ac_ct_CXX" = x; then
20194    CXX="g++"
20195  else
20196    case $cross_compiling:$ac_tool_warned in
20197yes:)
20198{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20199$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20200ac_tool_warned=yes ;;
20201esac
20202    CXX=$ac_ct_CXX
20203  fi
20204fi
20205
20206  fi
20207fi
20208# Provide some information about the compiler.
20209$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20210set X $ac_compile
20211ac_compiler=$2
20212for ac_option in --version -v -V -qversion; do
20213  { { ac_try="$ac_compiler $ac_option >&5"
20214case "(($ac_try" in
20215  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20216  *) ac_try_echo=$ac_try;;
20217esac
20218eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20219$as_echo "$ac_try_echo"; } >&5
20220  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20221  ac_status=$?
20222  if test -s conftest.err; then
20223    sed '10a\
20224... rest of stderr output deleted ...
20225         10q' conftest.err >conftest.er1
20226    cat conftest.er1 >&5
20227  fi
20228  rm -f conftest.er1 conftest.err
20229  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20230  test $ac_status = 0; }
20231done
20232
20233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20234$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20235if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20236  $as_echo_n "(cached) " >&6
20237else
20238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20239/* end confdefs.h.  */
20240
20241int
20242main ()
20243{
20244#ifndef __GNUC__
20245       choke me
20246#endif
20247
20248  ;
20249  return 0;
20250}
20251_ACEOF
20252if ac_fn_cxx_try_compile "$LINENO"; then :
20253  ac_compiler_gnu=yes
20254else
20255  ac_compiler_gnu=no
20256fi
20257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20258ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20259
20260fi
20261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20262$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20263if test $ac_compiler_gnu = yes; then
20264  GXX=yes
20265else
20266  GXX=
20267fi
20268ac_test_CXXFLAGS=${CXXFLAGS+set}
20269ac_save_CXXFLAGS=$CXXFLAGS
20270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20271$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20272if test "${ac_cv_prog_cxx_g+set}" = set; then :
20273  $as_echo_n "(cached) " >&6
20274else
20275  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20276   ac_cxx_werror_flag=yes
20277   ac_cv_prog_cxx_g=no
20278   CXXFLAGS="-g"
20279   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20280/* end confdefs.h.  */
20281
20282int
20283main ()
20284{
20285
20286  ;
20287  return 0;
20288}
20289_ACEOF
20290if ac_fn_cxx_try_compile "$LINENO"; then :
20291  ac_cv_prog_cxx_g=yes
20292else
20293  CXXFLAGS=""
20294      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20295/* end confdefs.h.  */
20296
20297int
20298main ()
20299{
20300
20301  ;
20302  return 0;
20303}
20304_ACEOF
20305if ac_fn_cxx_try_compile "$LINENO"; then :
20306
20307else
20308  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20309	 CXXFLAGS="-g"
20310	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20311/* end confdefs.h.  */
20312
20313int
20314main ()
20315{
20316
20317  ;
20318  return 0;
20319}
20320_ACEOF
20321if ac_fn_cxx_try_compile "$LINENO"; then :
20322  ac_cv_prog_cxx_g=yes
20323fi
20324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20325fi
20326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20327fi
20328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20329   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20330fi
20331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20332$as_echo "$ac_cv_prog_cxx_g" >&6; }
20333if test "$ac_test_CXXFLAGS" = set; then
20334  CXXFLAGS=$ac_save_CXXFLAGS
20335elif test $ac_cv_prog_cxx_g = yes; then
20336  if test "$GXX" = yes; then
20337    CXXFLAGS="-g -O2"
20338  else
20339    CXXFLAGS="-g"
20340  fi
20341else
20342  if test "$GXX" = yes; then
20343    CXXFLAGS="-O2"
20344  else
20345    CXXFLAGS=
20346  fi
20347fi
20348ac_ext=cpp
20349ac_cpp='$CXXCPP $CPPFLAGS'
20350ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20351ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20352ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20353
20354
20355### Locate other tools
20356
20357if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20358    ac_ext=m
20359ac_cpp='$OBJCPP $CPPFLAGS'
20360ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20361ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20362ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20363if test -n "$ac_tool_prefix"; then
20364  for ac_prog in gcc objcc objc cc CC
20365  do
20366    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20367set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20369$as_echo_n "checking for $ac_word... " >&6; }
20370if test "${ac_cv_prog_OBJC+set}" = set; then :
20371  $as_echo_n "(cached) " >&6
20372else
20373  if test -n "$OBJC"; then
20374  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20375else
20376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20377for as_dir in $PATH
20378do
20379  IFS=$as_save_IFS
20380  test -z "$as_dir" && as_dir=.
20381    for ac_exec_ext in '' $ac_executable_extensions; do
20382  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20383    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20385    break 2
20386  fi
20387done
20388  done
20389IFS=$as_save_IFS
20390
20391fi
20392fi
20393OBJC=$ac_cv_prog_OBJC
20394if test -n "$OBJC"; then
20395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20396$as_echo "$OBJC" >&6; }
20397else
20398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20399$as_echo "no" >&6; }
20400fi
20401
20402
20403    test -n "$OBJC" && break
20404  done
20405fi
20406if test -z "$OBJC"; then
20407  ac_ct_OBJC=$OBJC
20408  for ac_prog in gcc objcc objc cc CC
20409do
20410  # Extract the first word of "$ac_prog", so it can be a program name with args.
20411set dummy $ac_prog; ac_word=$2
20412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20413$as_echo_n "checking for $ac_word... " >&6; }
20414if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20415  $as_echo_n "(cached) " >&6
20416else
20417  if test -n "$ac_ct_OBJC"; then
20418  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20419else
20420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20421for as_dir in $PATH
20422do
20423  IFS=$as_save_IFS
20424  test -z "$as_dir" && as_dir=.
20425    for ac_exec_ext in '' $ac_executable_extensions; do
20426  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20427    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20429    break 2
20430  fi
20431done
20432  done
20433IFS=$as_save_IFS
20434
20435fi
20436fi
20437ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20438if test -n "$ac_ct_OBJC"; then
20439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20440$as_echo "$ac_ct_OBJC" >&6; }
20441else
20442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20443$as_echo "no" >&6; }
20444fi
20445
20446
20447  test -n "$ac_ct_OBJC" && break
20448done
20449
20450  if test "x$ac_ct_OBJC" = x; then
20451    OBJC="gcc"
20452  else
20453    case $cross_compiling:$ac_tool_warned in
20454yes:)
20455{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20456$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20457ac_tool_warned=yes ;;
20458esac
20459    OBJC=$ac_ct_OBJC
20460  fi
20461fi
20462
20463# Provide some information about the compiler.
20464$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20465set X $ac_compile
20466ac_compiler=$2
20467for ac_option in --version -v -V -qversion; do
20468  { { ac_try="$ac_compiler $ac_option >&5"
20469case "(($ac_try" in
20470  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20471  *) ac_try_echo=$ac_try;;
20472esac
20473eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20474$as_echo "$ac_try_echo"; } >&5
20475  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20476  ac_status=$?
20477  if test -s conftest.err; then
20478    sed '10a\
20479... rest of stderr output deleted ...
20480         10q' conftest.err >conftest.er1
20481    cat conftest.er1 >&5
20482  fi
20483  rm -f conftest.er1 conftest.err
20484  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20485  test $ac_status = 0; }
20486done
20487
20488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
20489$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20490if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
20491  $as_echo_n "(cached) " >&6
20492else
20493  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20494/* end confdefs.h.  */
20495
20496int
20497main ()
20498{
20499#ifndef __GNUC__
20500       choke me
20501#endif
20502
20503  ;
20504  return 0;
20505}
20506_ACEOF
20507if ac_fn_objc_try_compile "$LINENO"; then :
20508  ac_compiler_gnu=yes
20509else
20510  ac_compiler_gnu=no
20511fi
20512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20513ac_cv_objc_compiler_gnu=$ac_compiler_gnu
20514
20515fi
20516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
20517$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
20518if test $ac_compiler_gnu = yes; then
20519  GOBJC=yes
20520else
20521  GOBJC=
20522fi
20523ac_test_OBJCFLAGS=${OBJCFLAGS+set}
20524ac_save_OBJCFLAGS=$OBJCFLAGS
20525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
20526$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
20527if test "${ac_cv_prog_objc_g+set}" = set; then :
20528  $as_echo_n "(cached) " >&6
20529else
20530  ac_save_objc_werror_flag=$ac_objc_werror_flag
20531   ac_objc_werror_flag=yes
20532   ac_cv_prog_objc_g=no
20533   OBJCFLAGS="-g"
20534   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20535/* end confdefs.h.  */
20536
20537int
20538main ()
20539{
20540
20541  ;
20542  return 0;
20543}
20544_ACEOF
20545if ac_fn_objc_try_compile "$LINENO"; then :
20546  ac_cv_prog_objc_g=yes
20547else
20548  OBJCFLAGS=""
20549      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20550/* end confdefs.h.  */
20551
20552int
20553main ()
20554{
20555
20556  ;
20557  return 0;
20558}
20559_ACEOF
20560if ac_fn_objc_try_compile "$LINENO"; then :
20561
20562else
20563  ac_objc_werror_flag=$ac_save_objc_werror_flag
20564	 OBJCFLAGS="-g"
20565	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20566/* end confdefs.h.  */
20567
20568int
20569main ()
20570{
20571
20572  ;
20573  return 0;
20574}
20575_ACEOF
20576if ac_fn_objc_try_compile "$LINENO"; then :
20577  ac_cv_prog_objc_g=yes
20578fi
20579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20580fi
20581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20582fi
20583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20584   ac_objc_werror_flag=$ac_save_objc_werror_flag
20585fi
20586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
20587$as_echo "$ac_cv_prog_objc_g" >&6; }
20588if test "$ac_test_OBJCFLAGS" = set; then
20589  OBJCFLAGS=$ac_save_OBJCFLAGS
20590elif test $ac_cv_prog_objc_g = yes; then
20591  if test "$GOBJC" = yes; then
20592    OBJCFLAGS="-g -O2"
20593  else
20594    OBJCFLAGS="-g"
20595  fi
20596else
20597  if test "$GOBJC" = yes; then
20598    OBJCFLAGS="-O2"
20599  else
20600    OBJCFLAGS=
20601  fi
20602fi
20603ac_ext=cpp
20604ac_cpp='$CXXCPP $CPPFLAGS'
20605ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20606ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20607ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20608
20609
20610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20611
20612  # First separate the path from the arguments. This will split at the first
20613  # space.
20614  complete="$OBJC"
20615  path="${complete%% *}"
20616  tmp="$complete EOL"
20617  arguments="${tmp#* }"
20618
20619  # Input might be given as Windows format, start by converting to
20620  # unix format.
20621  new_path=`$CYGPATH -u "$path"`
20622
20623  # Now try to locate executable using which
20624  new_path=`$WHICH "$new_path" 2> /dev/null`
20625  # bat and cmd files are not always considered executable in cygwin causing which
20626  # to not find them
20627  if test "x$new_path" = x \
20628           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20629           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20630    new_path=`$CYGPATH -u "$path"`
20631  fi
20632  if test "x$new_path" = x; then
20633    # Oops. Which didn't find the executable.
20634    # The splitting of arguments from the executable at a space might have been incorrect,
20635    # since paths with space are more likely in Windows. Give it another try with the whole
20636    # argument.
20637    path="$complete"
20638    arguments="EOL"
20639    new_path=`$CYGPATH -u "$path"`
20640    new_path=`$WHICH "$new_path" 2> /dev/null`
20641    # bat and cmd files are not always considered executable in cygwin causing which
20642    # to not find them
20643    if test "x$new_path" = x \
20644             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20645             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20646      new_path=`$CYGPATH -u "$path"`
20647    fi
20648    if test "x$new_path" = x; then
20649      # It's still not found. Now this is an unrecoverable error.
20650      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20651$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20652      has_space=`$ECHO "$complete" | $GREP " "`
20653      if test "x$has_space" != x; then
20654        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20655$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20656      fi
20657      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20658    fi
20659  fi
20660
20661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20664  # "foo.exe" is OK but "foo" is an error.
20665  #
20666  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20667  # It is also a way to make sure we got the proper file name for the real test later on.
20668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20669  if test "x$test_shortpath" = x; then
20670    # Short path failed, file does not exist as specified.
20671    # Try adding .exe or .cmd
20672    if test -f "${new_path}.exe"; then
20673       input_to_shortpath="${new_path}.exe"
20674    elif test -f "${new_path}.cmd"; then
20675       input_to_shortpath="${new_path}.cmd"
20676    else
20677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
20678$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
20679      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20680$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20681      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20682    fi
20683  else
20684    input_to_shortpath="$new_path"
20685  fi
20686
20687  # Call helper function which possibly converts this using DOS-style short mode.
20688  # If so, the updated path is stored in $new_path.
20689  new_path="$input_to_shortpath"
20690
20691  input_path="$input_to_shortpath"
20692  # Check if we need to convert this using DOS-style short mode. If the path
20693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20694  # take no chances and rewrite it.
20695  # Note: m4 eats our [], so we need to use [ and ] instead.
20696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20697  if test "x$has_forbidden_chars" != x; then
20698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20699    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20700    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20701    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20702      # Going to short mode and back again did indeed matter. Since short mode is
20703      # case insensitive, let's make it lowercase to improve readability.
20704      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20705      # Now convert it back to Unix-stile (cygpath)
20706      input_path=`$CYGPATH -u "$shortmode_path"`
20707      new_path="$input_path"
20708    fi
20709  fi
20710
20711  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20712  if test "x$test_cygdrive_prefix" = x; then
20713    # As a simple fix, exclude /usr/bin since it's not a real path.
20714    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20715      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20716      # a path prefixed by /cygdrive for fixpath to work.
20717      new_path="$CYGWIN_ROOT_PATH$input_path"
20718    fi
20719  fi
20720
20721  # remove trailing .exe if any
20722  new_path="${new_path/%.exe/}"
20723
20724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20725
20726  # First separate the path from the arguments. This will split at the first
20727  # space.
20728  complete="$OBJC"
20729  path="${complete%% *}"
20730  tmp="$complete EOL"
20731  arguments="${tmp#* }"
20732
20733  # Input might be given as Windows format, start by converting to
20734  # unix format.
20735  new_path="$path"
20736
20737  windows_path="$new_path"
20738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20739    unix_path=`$CYGPATH -u "$windows_path"`
20740    new_path="$unix_path"
20741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20743    new_path="$unix_path"
20744  fi
20745
20746
20747  # Now try to locate executable using which
20748  new_path=`$WHICH "$new_path" 2> /dev/null`
20749
20750  if test "x$new_path" = x; then
20751    # Oops. Which didn't find the executable.
20752    # The splitting of arguments from the executable at a space might have been incorrect,
20753    # since paths with space are more likely in Windows. Give it another try with the whole
20754    # argument.
20755    path="$complete"
20756    arguments="EOL"
20757    new_path="$path"
20758
20759  windows_path="$new_path"
20760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20761    unix_path=`$CYGPATH -u "$windows_path"`
20762    new_path="$unix_path"
20763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20765    new_path="$unix_path"
20766  fi
20767
20768
20769    new_path=`$WHICH "$new_path" 2> /dev/null`
20770
20771    if test "x$new_path" = x; then
20772      # It's still not found. Now this is an unrecoverable error.
20773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20774$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20775      has_space=`$ECHO "$complete" | $GREP " "`
20776      if test "x$has_space" != x; then
20777        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20778$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20779      fi
20780      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20781    fi
20782  fi
20783
20784  # Now new_path has a complete unix path to the binary
20785  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20786    # Keep paths in /bin as-is, but remove trailing .exe if any
20787    new_path="${new_path/%.exe/}"
20788    # Do not save /bin paths to all_fixpath_prefixes!
20789  else
20790    # Not in mixed or Windows style, start by that.
20791    new_path=`cmd //c echo $new_path`
20792
20793  input_path="$new_path"
20794  # Check if we need to convert this using DOS-style short mode. If the path
20795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20796  # take no chances and rewrite it.
20797  # Note: m4 eats our [], so we need to use [ and ] instead.
20798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20799  if test "x$has_forbidden_chars" != x; then
20800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20802  fi
20803
20804    # Output is in $new_path
20805
20806  windows_path="$new_path"
20807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20808    unix_path=`$CYGPATH -u "$windows_path"`
20809    new_path="$unix_path"
20810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20812    new_path="$unix_path"
20813  fi
20814
20815    # remove trailing .exe if any
20816    new_path="${new_path/%.exe/}"
20817
20818    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20819    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20820  fi
20821
20822  else
20823    # We're on a posix platform. Hooray! :)
20824    # First separate the path from the arguments. This will split at the first
20825    # space.
20826    complete="$OBJC"
20827    path="${complete%% *}"
20828    tmp="$complete EOL"
20829    arguments="${tmp#* }"
20830
20831    new_path=`$WHICH $path 2> /dev/null`
20832    if test "x$new_path" = x; then
20833      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20834      if test "x$is_absolute_path" != x; then
20835        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&5
20836$as_echo "$as_me: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&6;}
20837        new_path="$path"
20838      else
20839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20840$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20841        has_space=`$ECHO "$complete" | $GREP " "`
20842        if test "x$has_space" != x; then
20843          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20844$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20845        fi
20846        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20847      fi
20848    fi
20849  fi
20850
20851  # Now join together the path and the arguments once again
20852  if test "x$arguments" != xEOL; then
20853      new_complete="$new_path ${arguments% *}"
20854  else
20855      new_complete="$new_path"
20856  fi
20857
20858  if test "x$complete" != "x$new_complete"; then
20859    OBJC="$new_complete"
20860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
20861$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
20862  fi
20863
20864else
20865    OBJC=
20866fi
20867
20868# Restore the flags to the user specified values.
20869# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
20870CFLAGS="$ORG_CFLAGS"
20871CXXFLAGS="$ORG_CXXFLAGS"
20872OBJCFLAGS="$ORG_OBJCFLAGS"
20873
20874LD="$CC"
20875LDEXE="$CC"
20876LDCXX="$CXX"
20877LDEXECXX="$CXX"
20878
20879# LDEXE is the linker to use, when creating executables.
20880
20881# Linking C++ libraries.
20882
20883# Linking C++ executables.
20884
20885
20886if test "x$OPENJDK_TARGET_OS" != xwindows; then
20887    if test -n "$ac_tool_prefix"; then
20888  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
20889set dummy ${ac_tool_prefix}ar; ac_word=$2
20890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20891$as_echo_n "checking for $ac_word... " >&6; }
20892if test "${ac_cv_prog_AR+set}" = set; then :
20893  $as_echo_n "(cached) " >&6
20894else
20895  if test -n "$AR"; then
20896  ac_cv_prog_AR="$AR" # Let the user override the test.
20897else
20898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20899for as_dir in $PATH
20900do
20901  IFS=$as_save_IFS
20902  test -z "$as_dir" && as_dir=.
20903    for ac_exec_ext in '' $ac_executable_extensions; do
20904  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20905    ac_cv_prog_AR="${ac_tool_prefix}ar"
20906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20907    break 2
20908  fi
20909done
20910  done
20911IFS=$as_save_IFS
20912
20913fi
20914fi
20915AR=$ac_cv_prog_AR
20916if test -n "$AR"; then
20917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
20918$as_echo "$AR" >&6; }
20919else
20920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20921$as_echo "no" >&6; }
20922fi
20923
20924
20925fi
20926if test -z "$ac_cv_prog_AR"; then
20927  ac_ct_AR=$AR
20928  # Extract the first word of "ar", so it can be a program name with args.
20929set dummy ar; ac_word=$2
20930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20931$as_echo_n "checking for $ac_word... " >&6; }
20932if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
20933  $as_echo_n "(cached) " >&6
20934else
20935  if test -n "$ac_ct_AR"; then
20936  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
20937else
20938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20939for as_dir in $PATH
20940do
20941  IFS=$as_save_IFS
20942  test -z "$as_dir" && as_dir=.
20943    for ac_exec_ext in '' $ac_executable_extensions; do
20944  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20945    ac_cv_prog_ac_ct_AR="ar"
20946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20947    break 2
20948  fi
20949done
20950  done
20951IFS=$as_save_IFS
20952
20953fi
20954fi
20955ac_ct_AR=$ac_cv_prog_ac_ct_AR
20956if test -n "$ac_ct_AR"; then
20957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
20958$as_echo "$ac_ct_AR" >&6; }
20959else
20960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20961$as_echo "no" >&6; }
20962fi
20963
20964  if test "x$ac_ct_AR" = x; then
20965    AR=""
20966  else
20967    case $cross_compiling:$ac_tool_warned in
20968yes:)
20969{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20970$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20971ac_tool_warned=yes ;;
20972esac
20973    AR=$ac_ct_AR
20974  fi
20975else
20976  AR="$ac_cv_prog_AR"
20977fi
20978
20979
20980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20981
20982  # First separate the path from the arguments. This will split at the first
20983  # space.
20984  complete="$AR"
20985  path="${complete%% *}"
20986  tmp="$complete EOL"
20987  arguments="${tmp#* }"
20988
20989  # Input might be given as Windows format, start by converting to
20990  # unix format.
20991  new_path=`$CYGPATH -u "$path"`
20992
20993  # Now try to locate executable using which
20994  new_path=`$WHICH "$new_path" 2> /dev/null`
20995  # bat and cmd files are not always considered executable in cygwin causing which
20996  # to not find them
20997  if test "x$new_path" = x \
20998           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20999           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21000    new_path=`$CYGPATH -u "$path"`
21001  fi
21002  if test "x$new_path" = x; then
21003    # Oops. Which didn't find the executable.
21004    # The splitting of arguments from the executable at a space might have been incorrect,
21005    # since paths with space are more likely in Windows. Give it another try with the whole
21006    # argument.
21007    path="$complete"
21008    arguments="EOL"
21009    new_path=`$CYGPATH -u "$path"`
21010    new_path=`$WHICH "$new_path" 2> /dev/null`
21011    # bat and cmd files are not always considered executable in cygwin causing which
21012    # to not find them
21013    if test "x$new_path" = x \
21014             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21015             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21016      new_path=`$CYGPATH -u "$path"`
21017    fi
21018    if test "x$new_path" = x; then
21019      # It's still not found. Now this is an unrecoverable error.
21020      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21021$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21022      has_space=`$ECHO "$complete" | $GREP " "`
21023      if test "x$has_space" != x; then
21024        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21025$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21026      fi
21027      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21028    fi
21029  fi
21030
21031  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21032  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21033  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21034  # "foo.exe" is OK but "foo" is an error.
21035  #
21036  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21037  # It is also a way to make sure we got the proper file name for the real test later on.
21038  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21039  if test "x$test_shortpath" = x; then
21040    # Short path failed, file does not exist as specified.
21041    # Try adding .exe or .cmd
21042    if test -f "${new_path}.exe"; then
21043       input_to_shortpath="${new_path}.exe"
21044    elif test -f "${new_path}.cmd"; then
21045       input_to_shortpath="${new_path}.cmd"
21046    else
21047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21048$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21049      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21050$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21051      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21052    fi
21053  else
21054    input_to_shortpath="$new_path"
21055  fi
21056
21057  # Call helper function which possibly converts this using DOS-style short mode.
21058  # If so, the updated path is stored in $new_path.
21059  new_path="$input_to_shortpath"
21060
21061  input_path="$input_to_shortpath"
21062  # Check if we need to convert this using DOS-style short mode. If the path
21063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21064  # take no chances and rewrite it.
21065  # Note: m4 eats our [], so we need to use [ and ] instead.
21066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21067  if test "x$has_forbidden_chars" != x; then
21068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21072      # Going to short mode and back again did indeed matter. Since short mode is
21073      # case insensitive, let's make it lowercase to improve readability.
21074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21075      # Now convert it back to Unix-stile (cygpath)
21076      input_path=`$CYGPATH -u "$shortmode_path"`
21077      new_path="$input_path"
21078    fi
21079  fi
21080
21081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21082  if test "x$test_cygdrive_prefix" = x; then
21083    # As a simple fix, exclude /usr/bin since it's not a real path.
21084    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21086      # a path prefixed by /cygdrive for fixpath to work.
21087      new_path="$CYGWIN_ROOT_PATH$input_path"
21088    fi
21089  fi
21090
21091  # remove trailing .exe if any
21092  new_path="${new_path/%.exe/}"
21093
21094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21095
21096  # First separate the path from the arguments. This will split at the first
21097  # space.
21098  complete="$AR"
21099  path="${complete%% *}"
21100  tmp="$complete EOL"
21101  arguments="${tmp#* }"
21102
21103  # Input might be given as Windows format, start by converting to
21104  # unix format.
21105  new_path="$path"
21106
21107  windows_path="$new_path"
21108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21109    unix_path=`$CYGPATH -u "$windows_path"`
21110    new_path="$unix_path"
21111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21113    new_path="$unix_path"
21114  fi
21115
21116
21117  # Now try to locate executable using which
21118  new_path=`$WHICH "$new_path" 2> /dev/null`
21119
21120  if test "x$new_path" = x; then
21121    # Oops. Which didn't find the executable.
21122    # The splitting of arguments from the executable at a space might have been incorrect,
21123    # since paths with space are more likely in Windows. Give it another try with the whole
21124    # argument.
21125    path="$complete"
21126    arguments="EOL"
21127    new_path="$path"
21128
21129  windows_path="$new_path"
21130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21131    unix_path=`$CYGPATH -u "$windows_path"`
21132    new_path="$unix_path"
21133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21135    new_path="$unix_path"
21136  fi
21137
21138
21139    new_path=`$WHICH "$new_path" 2> /dev/null`
21140
21141    if test "x$new_path" = x; then
21142      # It's still not found. Now this is an unrecoverable error.
21143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21144$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21145      has_space=`$ECHO "$complete" | $GREP " "`
21146      if test "x$has_space" != x; then
21147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21149      fi
21150      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21151    fi
21152  fi
21153
21154  # Now new_path has a complete unix path to the binary
21155  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21156    # Keep paths in /bin as-is, but remove trailing .exe if any
21157    new_path="${new_path/%.exe/}"
21158    # Do not save /bin paths to all_fixpath_prefixes!
21159  else
21160    # Not in mixed or Windows style, start by that.
21161    new_path=`cmd //c echo $new_path`
21162
21163  input_path="$new_path"
21164  # Check if we need to convert this using DOS-style short mode. If the path
21165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21166  # take no chances and rewrite it.
21167  # Note: m4 eats our [], so we need to use [ and ] instead.
21168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21169  if test "x$has_forbidden_chars" != x; then
21170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21172  fi
21173
21174    # Output is in $new_path
21175
21176  windows_path="$new_path"
21177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21178    unix_path=`$CYGPATH -u "$windows_path"`
21179    new_path="$unix_path"
21180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21182    new_path="$unix_path"
21183  fi
21184
21185    # remove trailing .exe if any
21186    new_path="${new_path/%.exe/}"
21187
21188    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21189    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21190  fi
21191
21192  else
21193    # We're on a posix platform. Hooray! :)
21194    # First separate the path from the arguments. This will split at the first
21195    # space.
21196    complete="$AR"
21197    path="${complete%% *}"
21198    tmp="$complete EOL"
21199    arguments="${tmp#* }"
21200
21201    new_path=`$WHICH $path 2> /dev/null`
21202    if test "x$new_path" = x; then
21203      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21204      if test "x$is_absolute_path" != x; then
21205        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) with 'which' failed, using $path directly." >&5
21206$as_echo "$as_me: Resolving AR (as $path) with 'which' failed, using $path directly." >&6;}
21207        new_path="$path"
21208      else
21209        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21210$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21211        has_space=`$ECHO "$complete" | $GREP " "`
21212        if test "x$has_space" != x; then
21213          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21214$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21215        fi
21216        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21217      fi
21218    fi
21219  fi
21220
21221  # Now join together the path and the arguments once again
21222  if test "x$arguments" != xEOL; then
21223      new_complete="$new_path ${arguments% *}"
21224  else
21225      new_complete="$new_path"
21226  fi
21227
21228  if test "x$complete" != "x$new_complete"; then
21229    AR="$new_complete"
21230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21231$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21232  fi
21233
21234fi
21235if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21236    ARFLAGS="-r"
21237else
21238    ARFLAGS=""
21239fi
21240
21241
21242# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21243HOTSPOT_CXX="$CXX"
21244HOTSPOT_LD="$LD"
21245
21246
21247
21248COMPILER_NAME=gcc
21249COMPILER_TYPE=CC
21250if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21251
21252    # For now, assume that we are always compiling using cl.exe.
21253    CC_OUT_OPTION=-Fo
21254    EXE_OUT_OPTION=-out:
21255    LD_OUT_OPTION=-out:
21256    AR_OUT_OPTION=-out:
21257    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21258    # program for something completely different.
21259    # Extract the first word of "link", so it can be a program name with args.
21260set dummy link; ac_word=$2
21261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21262$as_echo_n "checking for $ac_word... " >&6; }
21263if test "${ac_cv_prog_WINLD+set}" = set; then :
21264  $as_echo_n "(cached) " >&6
21265else
21266  if test -n "$WINLD"; then
21267  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21268else
21269  ac_prog_rejected=no
21270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21271for as_dir in $PATH
21272do
21273  IFS=$as_save_IFS
21274  test -z "$as_dir" && as_dir=.
21275    for ac_exec_ext in '' $ac_executable_extensions; do
21276  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21277    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21278       ac_prog_rejected=yes
21279       continue
21280     fi
21281    ac_cv_prog_WINLD="link"
21282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21283    break 2
21284  fi
21285done
21286  done
21287IFS=$as_save_IFS
21288
21289if test $ac_prog_rejected = yes; then
21290  # We found a bogon in the path, so make sure we never use it.
21291  set dummy $ac_cv_prog_WINLD
21292  shift
21293  if test $# != 0; then
21294    # We chose a different compiler from the bogus one.
21295    # However, it has the same basename, so the bogon will be chosen
21296    # first if we set WINLD to just the basename; use the full file name.
21297    shift
21298    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21299  fi
21300fi
21301fi
21302fi
21303WINLD=$ac_cv_prog_WINLD
21304if test -n "$WINLD"; then
21305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21306$as_echo "$WINLD" >&6; }
21307else
21308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21309$as_echo "no" >&6; }
21310fi
21311
21312
21313    # Since we must ignore the first found link, WINLD will contain
21314    # the full path to the link.exe program.
21315
21316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21317
21318  # First separate the path from the arguments. This will split at the first
21319  # space.
21320  complete="$WINLD"
21321  path="${complete%% *}"
21322  tmp="$complete EOL"
21323  arguments="${tmp#* }"
21324
21325  # Input might be given as Windows format, start by converting to
21326  # unix format.
21327  new_path=`$CYGPATH -u "$path"`
21328
21329  # Now try to locate executable using which
21330  new_path=`$WHICH "$new_path" 2> /dev/null`
21331  # bat and cmd files are not always considered executable in cygwin causing which
21332  # to not find them
21333  if test "x$new_path" = x \
21334           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21335           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21336    new_path=`$CYGPATH -u "$path"`
21337  fi
21338  if test "x$new_path" = x; then
21339    # Oops. Which didn't find the executable.
21340    # The splitting of arguments from the executable at a space might have been incorrect,
21341    # since paths with space are more likely in Windows. Give it another try with the whole
21342    # argument.
21343    path="$complete"
21344    arguments="EOL"
21345    new_path=`$CYGPATH -u "$path"`
21346    new_path=`$WHICH "$new_path" 2> /dev/null`
21347    # bat and cmd files are not always considered executable in cygwin causing which
21348    # to not find them
21349    if test "x$new_path" = x \
21350             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21351             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21352      new_path=`$CYGPATH -u "$path"`
21353    fi
21354    if test "x$new_path" = x; then
21355      # It's still not found. Now this is an unrecoverable error.
21356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21357$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21358      has_space=`$ECHO "$complete" | $GREP " "`
21359      if test "x$has_space" != x; then
21360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21362      fi
21363      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21364    fi
21365  fi
21366
21367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21370  # "foo.exe" is OK but "foo" is an error.
21371  #
21372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21373  # It is also a way to make sure we got the proper file name for the real test later on.
21374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21375  if test "x$test_shortpath" = x; then
21376    # Short path failed, file does not exist as specified.
21377    # Try adding .exe or .cmd
21378    if test -f "${new_path}.exe"; then
21379       input_to_shortpath="${new_path}.exe"
21380    elif test -f "${new_path}.cmd"; then
21381       input_to_shortpath="${new_path}.cmd"
21382    else
21383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21384$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21385      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21386$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21387      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21388    fi
21389  else
21390    input_to_shortpath="$new_path"
21391  fi
21392
21393  # Call helper function which possibly converts this using DOS-style short mode.
21394  # If so, the updated path is stored in $new_path.
21395  new_path="$input_to_shortpath"
21396
21397  input_path="$input_to_shortpath"
21398  # Check if we need to convert this using DOS-style short mode. If the path
21399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21400  # take no chances and rewrite it.
21401  # Note: m4 eats our [], so we need to use [ and ] instead.
21402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21403  if test "x$has_forbidden_chars" != x; then
21404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21408      # Going to short mode and back again did indeed matter. Since short mode is
21409      # case insensitive, let's make it lowercase to improve readability.
21410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21411      # Now convert it back to Unix-stile (cygpath)
21412      input_path=`$CYGPATH -u "$shortmode_path"`
21413      new_path="$input_path"
21414    fi
21415  fi
21416
21417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21418  if test "x$test_cygdrive_prefix" = x; then
21419    # As a simple fix, exclude /usr/bin since it's not a real path.
21420    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21422      # a path prefixed by /cygdrive for fixpath to work.
21423      new_path="$CYGWIN_ROOT_PATH$input_path"
21424    fi
21425  fi
21426
21427  # remove trailing .exe if any
21428  new_path="${new_path/%.exe/}"
21429
21430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21431
21432  # First separate the path from the arguments. This will split at the first
21433  # space.
21434  complete="$WINLD"
21435  path="${complete%% *}"
21436  tmp="$complete EOL"
21437  arguments="${tmp#* }"
21438
21439  # Input might be given as Windows format, start by converting to
21440  # unix format.
21441  new_path="$path"
21442
21443  windows_path="$new_path"
21444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21445    unix_path=`$CYGPATH -u "$windows_path"`
21446    new_path="$unix_path"
21447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21449    new_path="$unix_path"
21450  fi
21451
21452
21453  # Now try to locate executable using which
21454  new_path=`$WHICH "$new_path" 2> /dev/null`
21455
21456  if test "x$new_path" = x; then
21457    # Oops. Which didn't find the executable.
21458    # The splitting of arguments from the executable at a space might have been incorrect,
21459    # since paths with space are more likely in Windows. Give it another try with the whole
21460    # argument.
21461    path="$complete"
21462    arguments="EOL"
21463    new_path="$path"
21464
21465  windows_path="$new_path"
21466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21467    unix_path=`$CYGPATH -u "$windows_path"`
21468    new_path="$unix_path"
21469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21471    new_path="$unix_path"
21472  fi
21473
21474
21475    new_path=`$WHICH "$new_path" 2> /dev/null`
21476
21477    if test "x$new_path" = x; then
21478      # It's still not found. Now this is an unrecoverable error.
21479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21480$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21481      has_space=`$ECHO "$complete" | $GREP " "`
21482      if test "x$has_space" != x; then
21483        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21484$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21485      fi
21486      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21487    fi
21488  fi
21489
21490  # Now new_path has a complete unix path to the binary
21491  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21492    # Keep paths in /bin as-is, but remove trailing .exe if any
21493    new_path="${new_path/%.exe/}"
21494    # Do not save /bin paths to all_fixpath_prefixes!
21495  else
21496    # Not in mixed or Windows style, start by that.
21497    new_path=`cmd //c echo $new_path`
21498
21499  input_path="$new_path"
21500  # Check if we need to convert this using DOS-style short mode. If the path
21501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21502  # take no chances and rewrite it.
21503  # Note: m4 eats our [], so we need to use [ and ] instead.
21504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21505  if test "x$has_forbidden_chars" != x; then
21506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21508  fi
21509
21510    # Output is in $new_path
21511
21512  windows_path="$new_path"
21513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21514    unix_path=`$CYGPATH -u "$windows_path"`
21515    new_path="$unix_path"
21516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21518    new_path="$unix_path"
21519  fi
21520
21521    # remove trailing .exe if any
21522    new_path="${new_path/%.exe/}"
21523
21524    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21525    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21526  fi
21527
21528  else
21529    # We're on a posix platform. Hooray! :)
21530    # First separate the path from the arguments. This will split at the first
21531    # space.
21532    complete="$WINLD"
21533    path="${complete%% *}"
21534    tmp="$complete EOL"
21535    arguments="${tmp#* }"
21536
21537    new_path=`$WHICH $path 2> /dev/null`
21538    if test "x$new_path" = x; then
21539      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21540      if test "x$is_absolute_path" != x; then
21541        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&5
21542$as_echo "$as_me: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&6;}
21543        new_path="$path"
21544      else
21545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21546$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21547        has_space=`$ECHO "$complete" | $GREP " "`
21548        if test "x$has_space" != x; then
21549          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21550$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21551        fi
21552        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21553      fi
21554    fi
21555  fi
21556
21557  # Now join together the path and the arguments once again
21558  if test "x$arguments" != xEOL; then
21559      new_complete="$new_path ${arguments% *}"
21560  else
21561      new_complete="$new_path"
21562  fi
21563
21564  if test "x$complete" != "x$new_complete"; then
21565    WINLD="$new_complete"
21566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
21567$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
21568  fi
21569
21570    printf "Windows linker was found at $WINLD\n"
21571    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
21572$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
21573    "$WINLD" --version > /dev/null
21574    if test $? -eq 0 ; then
21575      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21576$as_echo "no" >&6; }
21577      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
21578    else
21579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21580$as_echo "yes" >&6; }
21581    fi
21582    LD="$WINLD"
21583    LDEXE="$WINLD"
21584    LDCXX="$WINLD"
21585    LDEXECXX="$WINLD"
21586
21587    # Extract the first word of "mt", so it can be a program name with args.
21588set dummy mt; ac_word=$2
21589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21590$as_echo_n "checking for $ac_word... " >&6; }
21591if test "${ac_cv_prog_MT+set}" = set; then :
21592  $as_echo_n "(cached) " >&6
21593else
21594  if test -n "$MT"; then
21595  ac_cv_prog_MT="$MT" # Let the user override the test.
21596else
21597  ac_prog_rejected=no
21598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21599for as_dir in $PATH
21600do
21601  IFS=$as_save_IFS
21602  test -z "$as_dir" && as_dir=.
21603    for ac_exec_ext in '' $ac_executable_extensions; do
21604  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21605    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
21606       ac_prog_rejected=yes
21607       continue
21608     fi
21609    ac_cv_prog_MT="mt"
21610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21611    break 2
21612  fi
21613done
21614  done
21615IFS=$as_save_IFS
21616
21617if test $ac_prog_rejected = yes; then
21618  # We found a bogon in the path, so make sure we never use it.
21619  set dummy $ac_cv_prog_MT
21620  shift
21621  if test $# != 0; then
21622    # We chose a different compiler from the bogus one.
21623    # However, it has the same basename, so the bogon will be chosen
21624    # first if we set MT to just the basename; use the full file name.
21625    shift
21626    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
21627  fi
21628fi
21629fi
21630fi
21631MT=$ac_cv_prog_MT
21632if test -n "$MT"; then
21633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
21634$as_echo "$MT" >&6; }
21635else
21636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21637$as_echo "no" >&6; }
21638fi
21639
21640
21641
21642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21643
21644  # First separate the path from the arguments. This will split at the first
21645  # space.
21646  complete="$MT"
21647  path="${complete%% *}"
21648  tmp="$complete EOL"
21649  arguments="${tmp#* }"
21650
21651  # Input might be given as Windows format, start by converting to
21652  # unix format.
21653  new_path=`$CYGPATH -u "$path"`
21654
21655  # Now try to locate executable using which
21656  new_path=`$WHICH "$new_path" 2> /dev/null`
21657  # bat and cmd files are not always considered executable in cygwin causing which
21658  # to not find them
21659  if test "x$new_path" = x \
21660           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21661           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21662    new_path=`$CYGPATH -u "$path"`
21663  fi
21664  if test "x$new_path" = x; then
21665    # Oops. Which didn't find the executable.
21666    # The splitting of arguments from the executable at a space might have been incorrect,
21667    # since paths with space are more likely in Windows. Give it another try with the whole
21668    # argument.
21669    path="$complete"
21670    arguments="EOL"
21671    new_path=`$CYGPATH -u "$path"`
21672    new_path=`$WHICH "$new_path" 2> /dev/null`
21673    # bat and cmd files are not always considered executable in cygwin causing which
21674    # to not find them
21675    if test "x$new_path" = x \
21676             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21677             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21678      new_path=`$CYGPATH -u "$path"`
21679    fi
21680    if test "x$new_path" = x; then
21681      # It's still not found. Now this is an unrecoverable error.
21682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21683$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21684      has_space=`$ECHO "$complete" | $GREP " "`
21685      if test "x$has_space" != x; then
21686        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21687$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21688      fi
21689      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21690    fi
21691  fi
21692
21693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21696  # "foo.exe" is OK but "foo" is an error.
21697  #
21698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21699  # It is also a way to make sure we got the proper file name for the real test later on.
21700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21701  if test "x$test_shortpath" = x; then
21702    # Short path failed, file does not exist as specified.
21703    # Try adding .exe or .cmd
21704    if test -f "${new_path}.exe"; then
21705       input_to_shortpath="${new_path}.exe"
21706    elif test -f "${new_path}.cmd"; then
21707       input_to_shortpath="${new_path}.cmd"
21708    else
21709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
21710$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
21711      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21712$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21713      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21714    fi
21715  else
21716    input_to_shortpath="$new_path"
21717  fi
21718
21719  # Call helper function which possibly converts this using DOS-style short mode.
21720  # If so, the updated path is stored in $new_path.
21721  new_path="$input_to_shortpath"
21722
21723  input_path="$input_to_shortpath"
21724  # Check if we need to convert this using DOS-style short mode. If the path
21725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21726  # take no chances and rewrite it.
21727  # Note: m4 eats our [], so we need to use [ and ] instead.
21728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21729  if test "x$has_forbidden_chars" != x; then
21730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21734      # Going to short mode and back again did indeed matter. Since short mode is
21735      # case insensitive, let's make it lowercase to improve readability.
21736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21737      # Now convert it back to Unix-stile (cygpath)
21738      input_path=`$CYGPATH -u "$shortmode_path"`
21739      new_path="$input_path"
21740    fi
21741  fi
21742
21743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21744  if test "x$test_cygdrive_prefix" = x; then
21745    # As a simple fix, exclude /usr/bin since it's not a real path.
21746    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21748      # a path prefixed by /cygdrive for fixpath to work.
21749      new_path="$CYGWIN_ROOT_PATH$input_path"
21750    fi
21751  fi
21752
21753  # remove trailing .exe if any
21754  new_path="${new_path/%.exe/}"
21755
21756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21757
21758  # First separate the path from the arguments. This will split at the first
21759  # space.
21760  complete="$MT"
21761  path="${complete%% *}"
21762  tmp="$complete EOL"
21763  arguments="${tmp#* }"
21764
21765  # Input might be given as Windows format, start by converting to
21766  # unix format.
21767  new_path="$path"
21768
21769  windows_path="$new_path"
21770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21771    unix_path=`$CYGPATH -u "$windows_path"`
21772    new_path="$unix_path"
21773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21775    new_path="$unix_path"
21776  fi
21777
21778
21779  # Now try to locate executable using which
21780  new_path=`$WHICH "$new_path" 2> /dev/null`
21781
21782  if test "x$new_path" = x; then
21783    # Oops. Which didn't find the executable.
21784    # The splitting of arguments from the executable at a space might have been incorrect,
21785    # since paths with space are more likely in Windows. Give it another try with the whole
21786    # argument.
21787    path="$complete"
21788    arguments="EOL"
21789    new_path="$path"
21790
21791  windows_path="$new_path"
21792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21793    unix_path=`$CYGPATH -u "$windows_path"`
21794    new_path="$unix_path"
21795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21797    new_path="$unix_path"
21798  fi
21799
21800
21801    new_path=`$WHICH "$new_path" 2> /dev/null`
21802
21803    if test "x$new_path" = x; then
21804      # It's still not found. Now this is an unrecoverable error.
21805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21806$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21807      has_space=`$ECHO "$complete" | $GREP " "`
21808      if test "x$has_space" != x; then
21809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21811      fi
21812      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21813    fi
21814  fi
21815
21816  # Now new_path has a complete unix path to the binary
21817  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21818    # Keep paths in /bin as-is, but remove trailing .exe if any
21819    new_path="${new_path/%.exe/}"
21820    # Do not save /bin paths to all_fixpath_prefixes!
21821  else
21822    # Not in mixed or Windows style, start by that.
21823    new_path=`cmd //c echo $new_path`
21824
21825  input_path="$new_path"
21826  # Check if we need to convert this using DOS-style short mode. If the path
21827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21828  # take no chances and rewrite it.
21829  # Note: m4 eats our [], so we need to use [ and ] instead.
21830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21831  if test "x$has_forbidden_chars" != x; then
21832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21834  fi
21835
21836    # Output is in $new_path
21837
21838  windows_path="$new_path"
21839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21840    unix_path=`$CYGPATH -u "$windows_path"`
21841    new_path="$unix_path"
21842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21844    new_path="$unix_path"
21845  fi
21846
21847    # remove trailing .exe if any
21848    new_path="${new_path/%.exe/}"
21849
21850    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21851    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21852  fi
21853
21854  else
21855    # We're on a posix platform. Hooray! :)
21856    # First separate the path from the arguments. This will split at the first
21857    # space.
21858    complete="$MT"
21859    path="${complete%% *}"
21860    tmp="$complete EOL"
21861    arguments="${tmp#* }"
21862
21863    new_path=`$WHICH $path 2> /dev/null`
21864    if test "x$new_path" = x; then
21865      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21866      if test "x$is_absolute_path" != x; then
21867        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) with 'which' failed, using $path directly." >&5
21868$as_echo "$as_me: Resolving MT (as $path) with 'which' failed, using $path directly." >&6;}
21869        new_path="$path"
21870      else
21871        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21872$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21873        has_space=`$ECHO "$complete" | $GREP " "`
21874        if test "x$has_space" != x; then
21875          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21876$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21877        fi
21878        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21879      fi
21880    fi
21881  fi
21882
21883  # Now join together the path and the arguments once again
21884  if test "x$arguments" != xEOL; then
21885      new_complete="$new_path ${arguments% *}"
21886  else
21887      new_complete="$new_path"
21888  fi
21889
21890  if test "x$complete" != "x$new_complete"; then
21891    MT="$new_complete"
21892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
21893$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
21894  fi
21895
21896    # The resource compiler
21897    # Extract the first word of "rc", so it can be a program name with args.
21898set dummy rc; ac_word=$2
21899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21900$as_echo_n "checking for $ac_word... " >&6; }
21901if test "${ac_cv_prog_RC+set}" = set; then :
21902  $as_echo_n "(cached) " >&6
21903else
21904  if test -n "$RC"; then
21905  ac_cv_prog_RC="$RC" # Let the user override the test.
21906else
21907  ac_prog_rejected=no
21908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21909for as_dir in $PATH
21910do
21911  IFS=$as_save_IFS
21912  test -z "$as_dir" && as_dir=.
21913    for ac_exec_ext in '' $ac_executable_extensions; do
21914  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21915    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
21916       ac_prog_rejected=yes
21917       continue
21918     fi
21919    ac_cv_prog_RC="rc"
21920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21921    break 2
21922  fi
21923done
21924  done
21925IFS=$as_save_IFS
21926
21927if test $ac_prog_rejected = yes; then
21928  # We found a bogon in the path, so make sure we never use it.
21929  set dummy $ac_cv_prog_RC
21930  shift
21931  if test $# != 0; then
21932    # We chose a different compiler from the bogus one.
21933    # However, it has the same basename, so the bogon will be chosen
21934    # first if we set RC to just the basename; use the full file name.
21935    shift
21936    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
21937  fi
21938fi
21939fi
21940fi
21941RC=$ac_cv_prog_RC
21942if test -n "$RC"; then
21943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
21944$as_echo "$RC" >&6; }
21945else
21946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21947$as_echo "no" >&6; }
21948fi
21949
21950
21951
21952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21953
21954  # First separate the path from the arguments. This will split at the first
21955  # space.
21956  complete="$RC"
21957  path="${complete%% *}"
21958  tmp="$complete EOL"
21959  arguments="${tmp#* }"
21960
21961  # Input might be given as Windows format, start by converting to
21962  # unix format.
21963  new_path=`$CYGPATH -u "$path"`
21964
21965  # Now try to locate executable using which
21966  new_path=`$WHICH "$new_path" 2> /dev/null`
21967  # bat and cmd files are not always considered executable in cygwin causing which
21968  # to not find them
21969  if test "x$new_path" = x \
21970           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21971           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21972    new_path=`$CYGPATH -u "$path"`
21973  fi
21974  if test "x$new_path" = x; then
21975    # Oops. Which didn't find the executable.
21976    # The splitting of arguments from the executable at a space might have been incorrect,
21977    # since paths with space are more likely in Windows. Give it another try with the whole
21978    # argument.
21979    path="$complete"
21980    arguments="EOL"
21981    new_path=`$CYGPATH -u "$path"`
21982    new_path=`$WHICH "$new_path" 2> /dev/null`
21983    # bat and cmd files are not always considered executable in cygwin causing which
21984    # to not find them
21985    if test "x$new_path" = x \
21986             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21987             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21988      new_path=`$CYGPATH -u "$path"`
21989    fi
21990    if test "x$new_path" = x; then
21991      # It's still not found. Now this is an unrecoverable error.
21992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
21993$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
21994      has_space=`$ECHO "$complete" | $GREP " "`
21995      if test "x$has_space" != x; then
21996        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21997$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21998      fi
21999      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22000    fi
22001  fi
22002
22003  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22004  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22005  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22006  # "foo.exe" is OK but "foo" is an error.
22007  #
22008  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22009  # It is also a way to make sure we got the proper file name for the real test later on.
22010  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22011  if test "x$test_shortpath" = x; then
22012    # Short path failed, file does not exist as specified.
22013    # Try adding .exe or .cmd
22014    if test -f "${new_path}.exe"; then
22015       input_to_shortpath="${new_path}.exe"
22016    elif test -f "${new_path}.cmd"; then
22017       input_to_shortpath="${new_path}.cmd"
22018    else
22019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22020$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22021      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22022$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22023      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22024    fi
22025  else
22026    input_to_shortpath="$new_path"
22027  fi
22028
22029  # Call helper function which possibly converts this using DOS-style short mode.
22030  # If so, the updated path is stored in $new_path.
22031  new_path="$input_to_shortpath"
22032
22033  input_path="$input_to_shortpath"
22034  # Check if we need to convert this using DOS-style short mode. If the path
22035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22036  # take no chances and rewrite it.
22037  # Note: m4 eats our [], so we need to use [ and ] instead.
22038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22039  if test "x$has_forbidden_chars" != x; then
22040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22041    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22042    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22043    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22044      # Going to short mode and back again did indeed matter. Since short mode is
22045      # case insensitive, let's make it lowercase to improve readability.
22046      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22047      # Now convert it back to Unix-stile (cygpath)
22048      input_path=`$CYGPATH -u "$shortmode_path"`
22049      new_path="$input_path"
22050    fi
22051  fi
22052
22053  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22054  if test "x$test_cygdrive_prefix" = x; then
22055    # As a simple fix, exclude /usr/bin since it's not a real path.
22056    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22057      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22058      # a path prefixed by /cygdrive for fixpath to work.
22059      new_path="$CYGWIN_ROOT_PATH$input_path"
22060    fi
22061  fi
22062
22063  # remove trailing .exe if any
22064  new_path="${new_path/%.exe/}"
22065
22066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22067
22068  # First separate the path from the arguments. This will split at the first
22069  # space.
22070  complete="$RC"
22071  path="${complete%% *}"
22072  tmp="$complete EOL"
22073  arguments="${tmp#* }"
22074
22075  # Input might be given as Windows format, start by converting to
22076  # unix format.
22077  new_path="$path"
22078
22079  windows_path="$new_path"
22080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22081    unix_path=`$CYGPATH -u "$windows_path"`
22082    new_path="$unix_path"
22083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22085    new_path="$unix_path"
22086  fi
22087
22088
22089  # Now try to locate executable using which
22090  new_path=`$WHICH "$new_path" 2> /dev/null`
22091
22092  if test "x$new_path" = x; then
22093    # Oops. Which didn't find the executable.
22094    # The splitting of arguments from the executable at a space might have been incorrect,
22095    # since paths with space are more likely in Windows. Give it another try with the whole
22096    # argument.
22097    path="$complete"
22098    arguments="EOL"
22099    new_path="$path"
22100
22101  windows_path="$new_path"
22102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22103    unix_path=`$CYGPATH -u "$windows_path"`
22104    new_path="$unix_path"
22105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22107    new_path="$unix_path"
22108  fi
22109
22110
22111    new_path=`$WHICH "$new_path" 2> /dev/null`
22112
22113    if test "x$new_path" = x; then
22114      # It's still not found. Now this is an unrecoverable error.
22115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22116$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22117      has_space=`$ECHO "$complete" | $GREP " "`
22118      if test "x$has_space" != x; then
22119        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22120$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22121      fi
22122      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22123    fi
22124  fi
22125
22126  # Now new_path has a complete unix path to the binary
22127  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22128    # Keep paths in /bin as-is, but remove trailing .exe if any
22129    new_path="${new_path/%.exe/}"
22130    # Do not save /bin paths to all_fixpath_prefixes!
22131  else
22132    # Not in mixed or Windows style, start by that.
22133    new_path=`cmd //c echo $new_path`
22134
22135  input_path="$new_path"
22136  # Check if we need to convert this using DOS-style short mode. If the path
22137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22138  # take no chances and rewrite it.
22139  # Note: m4 eats our [], so we need to use [ and ] instead.
22140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22141  if test "x$has_forbidden_chars" != x; then
22142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22143    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22144  fi
22145
22146    # Output is in $new_path
22147
22148  windows_path="$new_path"
22149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22150    unix_path=`$CYGPATH -u "$windows_path"`
22151    new_path="$unix_path"
22152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22154    new_path="$unix_path"
22155  fi
22156
22157    # remove trailing .exe if any
22158    new_path="${new_path/%.exe/}"
22159
22160    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22161    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22162  fi
22163
22164  else
22165    # We're on a posix platform. Hooray! :)
22166    # First separate the path from the arguments. This will split at the first
22167    # space.
22168    complete="$RC"
22169    path="${complete%% *}"
22170    tmp="$complete EOL"
22171    arguments="${tmp#* }"
22172
22173    new_path=`$WHICH $path 2> /dev/null`
22174    if test "x$new_path" = x; then
22175      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22176      if test "x$is_absolute_path" != x; then
22177        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) with 'which' failed, using $path directly." >&5
22178$as_echo "$as_me: Resolving RC (as $path) with 'which' failed, using $path directly." >&6;}
22179        new_path="$path"
22180      else
22181        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22182$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22183        has_space=`$ECHO "$complete" | $GREP " "`
22184        if test "x$has_space" != x; then
22185          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22186$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22187        fi
22188        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22189      fi
22190    fi
22191  fi
22192
22193  # Now join together the path and the arguments once again
22194  if test "x$arguments" != xEOL; then
22195      new_complete="$new_path ${arguments% *}"
22196  else
22197      new_complete="$new_path"
22198  fi
22199
22200  if test "x$complete" != "x$new_complete"; then
22201    RC="$new_complete"
22202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22203$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22204  fi
22205
22206
22207    # For hotspot, we need these in Windows mixed path,
22208    # so rewrite them all. Need added .exe suffix.
22209    HOTSPOT_CXX="$CXX.exe"
22210    HOTSPOT_LD="$LD.exe"
22211    HOTSPOT_MT="$MT.exe"
22212    HOTSPOT_RC="$RC.exe"
22213
22214  unix_path="$HOTSPOT_CXX"
22215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22216    windows_path=`$CYGPATH -m "$unix_path"`
22217    HOTSPOT_CXX="$windows_path"
22218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22219    windows_path=`cmd //c echo $unix_path`
22220    HOTSPOT_CXX="$windows_path"
22221  fi
22222
22223
22224  unix_path="$HOTSPOT_LD"
22225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22226    windows_path=`$CYGPATH -m "$unix_path"`
22227    HOTSPOT_LD="$windows_path"
22228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22229    windows_path=`cmd //c echo $unix_path`
22230    HOTSPOT_LD="$windows_path"
22231  fi
22232
22233
22234  unix_path="$HOTSPOT_MT"
22235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22236    windows_path=`$CYGPATH -m "$unix_path"`
22237    HOTSPOT_MT="$windows_path"
22238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22239    windows_path=`cmd //c echo $unix_path`
22240    HOTSPOT_MT="$windows_path"
22241  fi
22242
22243
22244  unix_path="$HOTSPOT_RC"
22245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22246    windows_path=`$CYGPATH -m "$unix_path"`
22247    HOTSPOT_RC="$windows_path"
22248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22249    windows_path=`cmd //c echo $unix_path`
22250    HOTSPOT_RC="$windows_path"
22251  fi
22252
22253
22254
22255
22256    RC_FLAGS="-nologo -l 0x409 -r"
22257    if test "x$VARIANT" = xOPT; then :
22258
22259        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22260
22261fi
22262    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22263    if test "x$JDK_UPDATE_VERSION" = x; then :
22264
22265        JDK_UPDATE_VERSION_NOTNULL=0
22266
22267fi
22268    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22269    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22270    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22271    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22272    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22273    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22274    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22275
22276    # lib.exe is used to create static libraries.
22277    # Extract the first word of "lib", so it can be a program name with args.
22278set dummy lib; ac_word=$2
22279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22280$as_echo_n "checking for $ac_word... " >&6; }
22281if test "${ac_cv_prog_WINAR+set}" = set; then :
22282  $as_echo_n "(cached) " >&6
22283else
22284  if test -n "$WINAR"; then
22285  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22286else
22287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22288for as_dir in $PATH
22289do
22290  IFS=$as_save_IFS
22291  test -z "$as_dir" && as_dir=.
22292    for ac_exec_ext in '' $ac_executable_extensions; do
22293  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22294    ac_cv_prog_WINAR="lib"
22295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22296    break 2
22297  fi
22298done
22299  done
22300IFS=$as_save_IFS
22301
22302fi
22303fi
22304WINAR=$ac_cv_prog_WINAR
22305if test -n "$WINAR"; then
22306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22307$as_echo "$WINAR" >&6; }
22308else
22309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22310$as_echo "no" >&6; }
22311fi
22312
22313
22314
22315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22316
22317  # First separate the path from the arguments. This will split at the first
22318  # space.
22319  complete="$WINAR"
22320  path="${complete%% *}"
22321  tmp="$complete EOL"
22322  arguments="${tmp#* }"
22323
22324  # Input might be given as Windows format, start by converting to
22325  # unix format.
22326  new_path=`$CYGPATH -u "$path"`
22327
22328  # Now try to locate executable using which
22329  new_path=`$WHICH "$new_path" 2> /dev/null`
22330  # bat and cmd files are not always considered executable in cygwin causing which
22331  # to not find them
22332  if test "x$new_path" = x \
22333           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22334           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22335    new_path=`$CYGPATH -u "$path"`
22336  fi
22337  if test "x$new_path" = x; then
22338    # Oops. Which didn't find the executable.
22339    # The splitting of arguments from the executable at a space might have been incorrect,
22340    # since paths with space are more likely in Windows. Give it another try with the whole
22341    # argument.
22342    path="$complete"
22343    arguments="EOL"
22344    new_path=`$CYGPATH -u "$path"`
22345    new_path=`$WHICH "$new_path" 2> /dev/null`
22346    # bat and cmd files are not always considered executable in cygwin causing which
22347    # to not find them
22348    if test "x$new_path" = x \
22349             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22350             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22351      new_path=`$CYGPATH -u "$path"`
22352    fi
22353    if test "x$new_path" = x; then
22354      # It's still not found. Now this is an unrecoverable error.
22355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22356$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22357      has_space=`$ECHO "$complete" | $GREP " "`
22358      if test "x$has_space" != x; then
22359        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22361      fi
22362      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22363    fi
22364  fi
22365
22366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22369  # "foo.exe" is OK but "foo" is an error.
22370  #
22371  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22372  # It is also a way to make sure we got the proper file name for the real test later on.
22373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22374  if test "x$test_shortpath" = x; then
22375    # Short path failed, file does not exist as specified.
22376    # Try adding .exe or .cmd
22377    if test -f "${new_path}.exe"; then
22378       input_to_shortpath="${new_path}.exe"
22379    elif test -f "${new_path}.cmd"; then
22380       input_to_shortpath="${new_path}.cmd"
22381    else
22382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22383$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22384      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22385$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22386      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22387    fi
22388  else
22389    input_to_shortpath="$new_path"
22390  fi
22391
22392  # Call helper function which possibly converts this using DOS-style short mode.
22393  # If so, the updated path is stored in $new_path.
22394  new_path="$input_to_shortpath"
22395
22396  input_path="$input_to_shortpath"
22397  # Check if we need to convert this using DOS-style short mode. If the path
22398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22399  # take no chances and rewrite it.
22400  # Note: m4 eats our [], so we need to use [ and ] instead.
22401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22402  if test "x$has_forbidden_chars" != x; then
22403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22407      # Going to short mode and back again did indeed matter. Since short mode is
22408      # case insensitive, let's make it lowercase to improve readability.
22409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22410      # Now convert it back to Unix-stile (cygpath)
22411      input_path=`$CYGPATH -u "$shortmode_path"`
22412      new_path="$input_path"
22413    fi
22414  fi
22415
22416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22417  if test "x$test_cygdrive_prefix" = x; then
22418    # As a simple fix, exclude /usr/bin since it's not a real path.
22419    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22421      # a path prefixed by /cygdrive for fixpath to work.
22422      new_path="$CYGWIN_ROOT_PATH$input_path"
22423    fi
22424  fi
22425
22426  # remove trailing .exe if any
22427  new_path="${new_path/%.exe/}"
22428
22429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22430
22431  # First separate the path from the arguments. This will split at the first
22432  # space.
22433  complete="$WINAR"
22434  path="${complete%% *}"
22435  tmp="$complete EOL"
22436  arguments="${tmp#* }"
22437
22438  # Input might be given as Windows format, start by converting to
22439  # unix format.
22440  new_path="$path"
22441
22442  windows_path="$new_path"
22443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22444    unix_path=`$CYGPATH -u "$windows_path"`
22445    new_path="$unix_path"
22446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22448    new_path="$unix_path"
22449  fi
22450
22451
22452  # Now try to locate executable using which
22453  new_path=`$WHICH "$new_path" 2> /dev/null`
22454
22455  if test "x$new_path" = x; then
22456    # Oops. Which didn't find the executable.
22457    # The splitting of arguments from the executable at a space might have been incorrect,
22458    # since paths with space are more likely in Windows. Give it another try with the whole
22459    # argument.
22460    path="$complete"
22461    arguments="EOL"
22462    new_path="$path"
22463
22464  windows_path="$new_path"
22465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22466    unix_path=`$CYGPATH -u "$windows_path"`
22467    new_path="$unix_path"
22468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22470    new_path="$unix_path"
22471  fi
22472
22473
22474    new_path=`$WHICH "$new_path" 2> /dev/null`
22475
22476    if test "x$new_path" = x; then
22477      # It's still not found. Now this is an unrecoverable error.
22478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22479$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22480      has_space=`$ECHO "$complete" | $GREP " "`
22481      if test "x$has_space" != x; then
22482        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22483$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22484      fi
22485      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22486    fi
22487  fi
22488
22489  # Now new_path has a complete unix path to the binary
22490  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22491    # Keep paths in /bin as-is, but remove trailing .exe if any
22492    new_path="${new_path/%.exe/}"
22493    # Do not save /bin paths to all_fixpath_prefixes!
22494  else
22495    # Not in mixed or Windows style, start by that.
22496    new_path=`cmd //c echo $new_path`
22497
22498  input_path="$new_path"
22499  # Check if we need to convert this using DOS-style short mode. If the path
22500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22501  # take no chances and rewrite it.
22502  # Note: m4 eats our [], so we need to use [ and ] instead.
22503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22504  if test "x$has_forbidden_chars" != x; then
22505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22507  fi
22508
22509    # Output is in $new_path
22510
22511  windows_path="$new_path"
22512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22513    unix_path=`$CYGPATH -u "$windows_path"`
22514    new_path="$unix_path"
22515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22517    new_path="$unix_path"
22518  fi
22519
22520    # remove trailing .exe if any
22521    new_path="${new_path/%.exe/}"
22522
22523    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22524    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22525  fi
22526
22527  else
22528    # We're on a posix platform. Hooray! :)
22529    # First separate the path from the arguments. This will split at the first
22530    # space.
22531    complete="$WINAR"
22532    path="${complete%% *}"
22533    tmp="$complete EOL"
22534    arguments="${tmp#* }"
22535
22536    new_path=`$WHICH $path 2> /dev/null`
22537    if test "x$new_path" = x; then
22538      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22539      if test "x$is_absolute_path" != x; then
22540        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&5
22541$as_echo "$as_me: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&6;}
22542        new_path="$path"
22543      else
22544        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22545$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22546        has_space=`$ECHO "$complete" | $GREP " "`
22547        if test "x$has_space" != x; then
22548          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22549$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22550        fi
22551        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22552      fi
22553    fi
22554  fi
22555
22556  # Now join together the path and the arguments once again
22557  if test "x$arguments" != xEOL; then
22558      new_complete="$new_path ${arguments% *}"
22559  else
22560      new_complete="$new_path"
22561  fi
22562
22563  if test "x$complete" != "x$new_complete"; then
22564    WINAR="$new_complete"
22565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
22566$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
22567  fi
22568
22569    AR="$WINAR"
22570    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
22571
22572    # Extract the first word of "dumpbin", so it can be a program name with args.
22573set dummy dumpbin; ac_word=$2
22574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22575$as_echo_n "checking for $ac_word... " >&6; }
22576if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
22577  $as_echo_n "(cached) " >&6
22578else
22579  if test -n "$DUMPBIN"; then
22580  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
22581else
22582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22583for as_dir in $PATH
22584do
22585  IFS=$as_save_IFS
22586  test -z "$as_dir" && as_dir=.
22587    for ac_exec_ext in '' $ac_executable_extensions; do
22588  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22589    ac_cv_prog_DUMPBIN="dumpbin"
22590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22591    break 2
22592  fi
22593done
22594  done
22595IFS=$as_save_IFS
22596
22597fi
22598fi
22599DUMPBIN=$ac_cv_prog_DUMPBIN
22600if test -n "$DUMPBIN"; then
22601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
22602$as_echo "$DUMPBIN" >&6; }
22603else
22604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22605$as_echo "no" >&6; }
22606fi
22607
22608
22609
22610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22611
22612  # First separate the path from the arguments. This will split at the first
22613  # space.
22614  complete="$DUMPBIN"
22615  path="${complete%% *}"
22616  tmp="$complete EOL"
22617  arguments="${tmp#* }"
22618
22619  # Input might be given as Windows format, start by converting to
22620  # unix format.
22621  new_path=`$CYGPATH -u "$path"`
22622
22623  # Now try to locate executable using which
22624  new_path=`$WHICH "$new_path" 2> /dev/null`
22625  # bat and cmd files are not always considered executable in cygwin causing which
22626  # to not find them
22627  if test "x$new_path" = x \
22628           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22629           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22630    new_path=`$CYGPATH -u "$path"`
22631  fi
22632  if test "x$new_path" = x; then
22633    # Oops. Which didn't find the executable.
22634    # The splitting of arguments from the executable at a space might have been incorrect,
22635    # since paths with space are more likely in Windows. Give it another try with the whole
22636    # argument.
22637    path="$complete"
22638    arguments="EOL"
22639    new_path=`$CYGPATH -u "$path"`
22640    new_path=`$WHICH "$new_path" 2> /dev/null`
22641    # bat and cmd files are not always considered executable in cygwin causing which
22642    # to not find them
22643    if test "x$new_path" = x \
22644             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22645             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22646      new_path=`$CYGPATH -u "$path"`
22647    fi
22648    if test "x$new_path" = x; then
22649      # It's still not found. Now this is an unrecoverable error.
22650      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22651$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22652      has_space=`$ECHO "$complete" | $GREP " "`
22653      if test "x$has_space" != x; then
22654        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22655$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22656      fi
22657      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22658    fi
22659  fi
22660
22661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22664  # "foo.exe" is OK but "foo" is an error.
22665  #
22666  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22667  # It is also a way to make sure we got the proper file name for the real test later on.
22668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22669  if test "x$test_shortpath" = x; then
22670    # Short path failed, file does not exist as specified.
22671    # Try adding .exe or .cmd
22672    if test -f "${new_path}.exe"; then
22673       input_to_shortpath="${new_path}.exe"
22674    elif test -f "${new_path}.cmd"; then
22675       input_to_shortpath="${new_path}.cmd"
22676    else
22677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
22678$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
22679      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22680$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22681      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22682    fi
22683  else
22684    input_to_shortpath="$new_path"
22685  fi
22686
22687  # Call helper function which possibly converts this using DOS-style short mode.
22688  # If so, the updated path is stored in $new_path.
22689  new_path="$input_to_shortpath"
22690
22691  input_path="$input_to_shortpath"
22692  # Check if we need to convert this using DOS-style short mode. If the path
22693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22694  # take no chances and rewrite it.
22695  # Note: m4 eats our [], so we need to use [ and ] instead.
22696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22697  if test "x$has_forbidden_chars" != x; then
22698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22699    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22700    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22701    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22702      # Going to short mode and back again did indeed matter. Since short mode is
22703      # case insensitive, let's make it lowercase to improve readability.
22704      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22705      # Now convert it back to Unix-stile (cygpath)
22706      input_path=`$CYGPATH -u "$shortmode_path"`
22707      new_path="$input_path"
22708    fi
22709  fi
22710
22711  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22712  if test "x$test_cygdrive_prefix" = x; then
22713    # As a simple fix, exclude /usr/bin since it's not a real path.
22714    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22715      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22716      # a path prefixed by /cygdrive for fixpath to work.
22717      new_path="$CYGWIN_ROOT_PATH$input_path"
22718    fi
22719  fi
22720
22721  # remove trailing .exe if any
22722  new_path="${new_path/%.exe/}"
22723
22724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22725
22726  # First separate the path from the arguments. This will split at the first
22727  # space.
22728  complete="$DUMPBIN"
22729  path="${complete%% *}"
22730  tmp="$complete EOL"
22731  arguments="${tmp#* }"
22732
22733  # Input might be given as Windows format, start by converting to
22734  # unix format.
22735  new_path="$path"
22736
22737  windows_path="$new_path"
22738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22739    unix_path=`$CYGPATH -u "$windows_path"`
22740    new_path="$unix_path"
22741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22743    new_path="$unix_path"
22744  fi
22745
22746
22747  # Now try to locate executable using which
22748  new_path=`$WHICH "$new_path" 2> /dev/null`
22749
22750  if test "x$new_path" = x; then
22751    # Oops. Which didn't find the executable.
22752    # The splitting of arguments from the executable at a space might have been incorrect,
22753    # since paths with space are more likely in Windows. Give it another try with the whole
22754    # argument.
22755    path="$complete"
22756    arguments="EOL"
22757    new_path="$path"
22758
22759  windows_path="$new_path"
22760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22761    unix_path=`$CYGPATH -u "$windows_path"`
22762    new_path="$unix_path"
22763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22765    new_path="$unix_path"
22766  fi
22767
22768
22769    new_path=`$WHICH "$new_path" 2> /dev/null`
22770
22771    if test "x$new_path" = x; then
22772      # It's still not found. Now this is an unrecoverable error.
22773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22774$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22775      has_space=`$ECHO "$complete" | $GREP " "`
22776      if test "x$has_space" != x; then
22777        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22778$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22779      fi
22780      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22781    fi
22782  fi
22783
22784  # Now new_path has a complete unix path to the binary
22785  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22786    # Keep paths in /bin as-is, but remove trailing .exe if any
22787    new_path="${new_path/%.exe/}"
22788    # Do not save /bin paths to all_fixpath_prefixes!
22789  else
22790    # Not in mixed or Windows style, start by that.
22791    new_path=`cmd //c echo $new_path`
22792
22793  input_path="$new_path"
22794  # Check if we need to convert this using DOS-style short mode. If the path
22795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22796  # take no chances and rewrite it.
22797  # Note: m4 eats our [], so we need to use [ and ] instead.
22798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22799  if test "x$has_forbidden_chars" != x; then
22800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22802  fi
22803
22804    # Output is in $new_path
22805
22806  windows_path="$new_path"
22807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22808    unix_path=`$CYGPATH -u "$windows_path"`
22809    new_path="$unix_path"
22810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22812    new_path="$unix_path"
22813  fi
22814
22815    # remove trailing .exe if any
22816    new_path="${new_path/%.exe/}"
22817
22818    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22819    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22820  fi
22821
22822  else
22823    # We're on a posix platform. Hooray! :)
22824    # First separate the path from the arguments. This will split at the first
22825    # space.
22826    complete="$DUMPBIN"
22827    path="${complete%% *}"
22828    tmp="$complete EOL"
22829    arguments="${tmp#* }"
22830
22831    new_path=`$WHICH $path 2> /dev/null`
22832    if test "x$new_path" = x; then
22833      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22834      if test "x$is_absolute_path" != x; then
22835        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&5
22836$as_echo "$as_me: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&6;}
22837        new_path="$path"
22838      else
22839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22840$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22841        has_space=`$ECHO "$complete" | $GREP " "`
22842        if test "x$has_space" != x; then
22843          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22844$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22845        fi
22846        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22847      fi
22848    fi
22849  fi
22850
22851  # Now join together the path and the arguments once again
22852  if test "x$arguments" != xEOL; then
22853      new_complete="$new_path ${arguments% *}"
22854  else
22855      new_complete="$new_path"
22856  fi
22857
22858  if test "x$complete" != "x$new_complete"; then
22859    DUMPBIN="$new_complete"
22860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
22861$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
22862  fi
22863
22864
22865    COMPILER_TYPE=CL
22866    CCXXFLAGS="$CCXXFLAGS -nologo"
22867
22868fi
22869
22870
22871
22872ac_ext=c
22873ac_cpp='$CPP $CPPFLAGS'
22874ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22875ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22876ac_compiler_gnu=$ac_cv_c_compiler_gnu
22877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
22878$as_echo_n "checking how to run the C preprocessor... " >&6; }
22879# On Suns, sometimes $CPP names a directory.
22880if test -n "$CPP" && test -d "$CPP"; then
22881  CPP=
22882fi
22883if test -z "$CPP"; then
22884  if test "${ac_cv_prog_CPP+set}" = set; then :
22885  $as_echo_n "(cached) " >&6
22886else
22887      # Double quotes because CPP needs to be expanded
22888    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
22889    do
22890      ac_preproc_ok=false
22891for ac_c_preproc_warn_flag in '' yes
22892do
22893  # Use a header file that comes with gcc, so configuring glibc
22894  # with a fresh cross-compiler works.
22895  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22896  # <limits.h> exists even on freestanding compilers.
22897  # On the NeXT, cc -E runs the code through the compiler's parser,
22898  # not just through cpp. "Syntax error" is here to catch this case.
22899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22900/* end confdefs.h.  */
22901#ifdef __STDC__
22902# include <limits.h>
22903#else
22904# include <assert.h>
22905#endif
22906		     Syntax error
22907_ACEOF
22908if ac_fn_c_try_cpp "$LINENO"; then :
22909
22910else
22911  # Broken: fails on valid input.
22912continue
22913fi
22914rm -f conftest.err conftest.i conftest.$ac_ext
22915
22916  # OK, works on sane cases.  Now check whether nonexistent headers
22917  # can be detected and how.
22918  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22919/* end confdefs.h.  */
22920#include <ac_nonexistent.h>
22921_ACEOF
22922if ac_fn_c_try_cpp "$LINENO"; then :
22923  # Broken: success on invalid input.
22924continue
22925else
22926  # Passes both tests.
22927ac_preproc_ok=:
22928break
22929fi
22930rm -f conftest.err conftest.i conftest.$ac_ext
22931
22932done
22933# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22934rm -f conftest.i conftest.err conftest.$ac_ext
22935if $ac_preproc_ok; then :
22936  break
22937fi
22938
22939    done
22940    ac_cv_prog_CPP=$CPP
22941
22942fi
22943  CPP=$ac_cv_prog_CPP
22944else
22945  ac_cv_prog_CPP=$CPP
22946fi
22947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
22948$as_echo "$CPP" >&6; }
22949ac_preproc_ok=false
22950for ac_c_preproc_warn_flag in '' yes
22951do
22952  # Use a header file that comes with gcc, so configuring glibc
22953  # with a fresh cross-compiler works.
22954  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22955  # <limits.h> exists even on freestanding compilers.
22956  # On the NeXT, cc -E runs the code through the compiler's parser,
22957  # not just through cpp. "Syntax error" is here to catch this case.
22958  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22959/* end confdefs.h.  */
22960#ifdef __STDC__
22961# include <limits.h>
22962#else
22963# include <assert.h>
22964#endif
22965		     Syntax error
22966_ACEOF
22967if ac_fn_c_try_cpp "$LINENO"; then :
22968
22969else
22970  # Broken: fails on valid input.
22971continue
22972fi
22973rm -f conftest.err conftest.i conftest.$ac_ext
22974
22975  # OK, works on sane cases.  Now check whether nonexistent headers
22976  # can be detected and how.
22977  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22978/* end confdefs.h.  */
22979#include <ac_nonexistent.h>
22980_ACEOF
22981if ac_fn_c_try_cpp "$LINENO"; then :
22982  # Broken: success on invalid input.
22983continue
22984else
22985  # Passes both tests.
22986ac_preproc_ok=:
22987break
22988fi
22989rm -f conftest.err conftest.i conftest.$ac_ext
22990
22991done
22992# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22993rm -f conftest.i conftest.err conftest.$ac_ext
22994if $ac_preproc_ok; then :
22995
22996else
22997  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22999as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23000See \`config.log' for more details" "$LINENO" 5 ; }
23001fi
23002
23003ac_ext=cpp
23004ac_cpp='$CXXCPP $CPPFLAGS'
23005ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23006ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23007ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23008
23009
23010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23011
23012  # First separate the path from the arguments. This will split at the first
23013  # space.
23014  complete="$CPP"
23015  path="${complete%% *}"
23016  tmp="$complete EOL"
23017  arguments="${tmp#* }"
23018
23019  # Input might be given as Windows format, start by converting to
23020  # unix format.
23021  new_path=`$CYGPATH -u "$path"`
23022
23023  # Now try to locate executable using which
23024  new_path=`$WHICH "$new_path" 2> /dev/null`
23025  # bat and cmd files are not always considered executable in cygwin causing which
23026  # to not find them
23027  if test "x$new_path" = x \
23028           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23029           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23030    new_path=`$CYGPATH -u "$path"`
23031  fi
23032  if test "x$new_path" = x; then
23033    # Oops. Which didn't find the executable.
23034    # The splitting of arguments from the executable at a space might have been incorrect,
23035    # since paths with space are more likely in Windows. Give it another try with the whole
23036    # argument.
23037    path="$complete"
23038    arguments="EOL"
23039    new_path=`$CYGPATH -u "$path"`
23040    new_path=`$WHICH "$new_path" 2> /dev/null`
23041    # bat and cmd files are not always considered executable in cygwin causing which
23042    # to not find them
23043    if test "x$new_path" = x \
23044             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23045             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23046      new_path=`$CYGPATH -u "$path"`
23047    fi
23048    if test "x$new_path" = x; then
23049      # It's still not found. Now this is an unrecoverable error.
23050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23051$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23052      has_space=`$ECHO "$complete" | $GREP " "`
23053      if test "x$has_space" != x; then
23054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23056      fi
23057      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23058    fi
23059  fi
23060
23061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23064  # "foo.exe" is OK but "foo" is an error.
23065  #
23066  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23067  # It is also a way to make sure we got the proper file name for the real test later on.
23068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23069  if test "x$test_shortpath" = x; then
23070    # Short path failed, file does not exist as specified.
23071    # Try adding .exe or .cmd
23072    if test -f "${new_path}.exe"; then
23073       input_to_shortpath="${new_path}.exe"
23074    elif test -f "${new_path}.cmd"; then
23075       input_to_shortpath="${new_path}.cmd"
23076    else
23077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23078$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23079      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23080$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23081      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23082    fi
23083  else
23084    input_to_shortpath="$new_path"
23085  fi
23086
23087  # Call helper function which possibly converts this using DOS-style short mode.
23088  # If so, the updated path is stored in $new_path.
23089  new_path="$input_to_shortpath"
23090
23091  input_path="$input_to_shortpath"
23092  # Check if we need to convert this using DOS-style short mode. If the path
23093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23094  # take no chances and rewrite it.
23095  # Note: m4 eats our [], so we need to use [ and ] instead.
23096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23097  if test "x$has_forbidden_chars" != x; then
23098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23102      # Going to short mode and back again did indeed matter. Since short mode is
23103      # case insensitive, let's make it lowercase to improve readability.
23104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23105      # Now convert it back to Unix-stile (cygpath)
23106      input_path=`$CYGPATH -u "$shortmode_path"`
23107      new_path="$input_path"
23108    fi
23109  fi
23110
23111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23112  if test "x$test_cygdrive_prefix" = x; then
23113    # As a simple fix, exclude /usr/bin since it's not a real path.
23114    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23116      # a path prefixed by /cygdrive for fixpath to work.
23117      new_path="$CYGWIN_ROOT_PATH$input_path"
23118    fi
23119  fi
23120
23121  # remove trailing .exe if any
23122  new_path="${new_path/%.exe/}"
23123
23124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23125
23126  # First separate the path from the arguments. This will split at the first
23127  # space.
23128  complete="$CPP"
23129  path="${complete%% *}"
23130  tmp="$complete EOL"
23131  arguments="${tmp#* }"
23132
23133  # Input might be given as Windows format, start by converting to
23134  # unix format.
23135  new_path="$path"
23136
23137  windows_path="$new_path"
23138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23139    unix_path=`$CYGPATH -u "$windows_path"`
23140    new_path="$unix_path"
23141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23143    new_path="$unix_path"
23144  fi
23145
23146
23147  # Now try to locate executable using which
23148  new_path=`$WHICH "$new_path" 2> /dev/null`
23149
23150  if test "x$new_path" = x; then
23151    # Oops. Which didn't find the executable.
23152    # The splitting of arguments from the executable at a space might have been incorrect,
23153    # since paths with space are more likely in Windows. Give it another try with the whole
23154    # argument.
23155    path="$complete"
23156    arguments="EOL"
23157    new_path="$path"
23158
23159  windows_path="$new_path"
23160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23161    unix_path=`$CYGPATH -u "$windows_path"`
23162    new_path="$unix_path"
23163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23165    new_path="$unix_path"
23166  fi
23167
23168
23169    new_path=`$WHICH "$new_path" 2> /dev/null`
23170
23171    if test "x$new_path" = x; then
23172      # It's still not found. Now this is an unrecoverable error.
23173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23174$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23175      has_space=`$ECHO "$complete" | $GREP " "`
23176      if test "x$has_space" != x; then
23177        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23178$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23179      fi
23180      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23181    fi
23182  fi
23183
23184  # Now new_path has a complete unix path to the binary
23185  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23186    # Keep paths in /bin as-is, but remove trailing .exe if any
23187    new_path="${new_path/%.exe/}"
23188    # Do not save /bin paths to all_fixpath_prefixes!
23189  else
23190    # Not in mixed or Windows style, start by that.
23191    new_path=`cmd //c echo $new_path`
23192
23193  input_path="$new_path"
23194  # Check if we need to convert this using DOS-style short mode. If the path
23195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23196  # take no chances and rewrite it.
23197  # Note: m4 eats our [], so we need to use [ and ] instead.
23198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23199  if test "x$has_forbidden_chars" != x; then
23200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23202  fi
23203
23204    # Output is in $new_path
23205
23206  windows_path="$new_path"
23207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23208    unix_path=`$CYGPATH -u "$windows_path"`
23209    new_path="$unix_path"
23210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23212    new_path="$unix_path"
23213  fi
23214
23215    # remove trailing .exe if any
23216    new_path="${new_path/%.exe/}"
23217
23218    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23219    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23220  fi
23221
23222  else
23223    # We're on a posix platform. Hooray! :)
23224    # First separate the path from the arguments. This will split at the first
23225    # space.
23226    complete="$CPP"
23227    path="${complete%% *}"
23228    tmp="$complete EOL"
23229    arguments="${tmp#* }"
23230
23231    new_path=`$WHICH $path 2> /dev/null`
23232    if test "x$new_path" = x; then
23233      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23234      if test "x$is_absolute_path" != x; then
23235        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) with 'which' failed, using $path directly." >&5
23236$as_echo "$as_me: Resolving CPP (as $path) with 'which' failed, using $path directly." >&6;}
23237        new_path="$path"
23238      else
23239        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23240$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23241        has_space=`$ECHO "$complete" | $GREP " "`
23242        if test "x$has_space" != x; then
23243          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23244$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23245        fi
23246        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23247      fi
23248    fi
23249  fi
23250
23251  # Now join together the path and the arguments once again
23252  if test "x$arguments" != xEOL; then
23253      new_complete="$new_path ${arguments% *}"
23254  else
23255      new_complete="$new_path"
23256  fi
23257
23258  if test "x$complete" != "x$new_complete"; then
23259    CPP="$new_complete"
23260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23261$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23262  fi
23263
23264
23265ac_ext=cpp
23266ac_cpp='$CXXCPP $CPPFLAGS'
23267ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23268ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23269ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23271$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23272if test -z "$CXXCPP"; then
23273  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23274  $as_echo_n "(cached) " >&6
23275else
23276      # Double quotes because CXXCPP needs to be expanded
23277    for CXXCPP in "$CXX -E" "/lib/cpp"
23278    do
23279      ac_preproc_ok=false
23280for ac_cxx_preproc_warn_flag in '' yes
23281do
23282  # Use a header file that comes with gcc, so configuring glibc
23283  # with a fresh cross-compiler works.
23284  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23285  # <limits.h> exists even on freestanding compilers.
23286  # On the NeXT, cc -E runs the code through the compiler's parser,
23287  # not just through cpp. "Syntax error" is here to catch this case.
23288  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23289/* end confdefs.h.  */
23290#ifdef __STDC__
23291# include <limits.h>
23292#else
23293# include <assert.h>
23294#endif
23295		     Syntax error
23296_ACEOF
23297if ac_fn_cxx_try_cpp "$LINENO"; then :
23298
23299else
23300  # Broken: fails on valid input.
23301continue
23302fi
23303rm -f conftest.err conftest.i conftest.$ac_ext
23304
23305  # OK, works on sane cases.  Now check whether nonexistent headers
23306  # can be detected and how.
23307  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23308/* end confdefs.h.  */
23309#include <ac_nonexistent.h>
23310_ACEOF
23311if ac_fn_cxx_try_cpp "$LINENO"; then :
23312  # Broken: success on invalid input.
23313continue
23314else
23315  # Passes both tests.
23316ac_preproc_ok=:
23317break
23318fi
23319rm -f conftest.err conftest.i conftest.$ac_ext
23320
23321done
23322# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23323rm -f conftest.i conftest.err conftest.$ac_ext
23324if $ac_preproc_ok; then :
23325  break
23326fi
23327
23328    done
23329    ac_cv_prog_CXXCPP=$CXXCPP
23330
23331fi
23332  CXXCPP=$ac_cv_prog_CXXCPP
23333else
23334  ac_cv_prog_CXXCPP=$CXXCPP
23335fi
23336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23337$as_echo "$CXXCPP" >&6; }
23338ac_preproc_ok=false
23339for ac_cxx_preproc_warn_flag in '' yes
23340do
23341  # Use a header file that comes with gcc, so configuring glibc
23342  # with a fresh cross-compiler works.
23343  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23344  # <limits.h> exists even on freestanding compilers.
23345  # On the NeXT, cc -E runs the code through the compiler's parser,
23346  # not just through cpp. "Syntax error" is here to catch this case.
23347  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23348/* end confdefs.h.  */
23349#ifdef __STDC__
23350# include <limits.h>
23351#else
23352# include <assert.h>
23353#endif
23354		     Syntax error
23355_ACEOF
23356if ac_fn_cxx_try_cpp "$LINENO"; then :
23357
23358else
23359  # Broken: fails on valid input.
23360continue
23361fi
23362rm -f conftest.err conftest.i conftest.$ac_ext
23363
23364  # OK, works on sane cases.  Now check whether nonexistent headers
23365  # can be detected and how.
23366  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23367/* end confdefs.h.  */
23368#include <ac_nonexistent.h>
23369_ACEOF
23370if ac_fn_cxx_try_cpp "$LINENO"; then :
23371  # Broken: success on invalid input.
23372continue
23373else
23374  # Passes both tests.
23375ac_preproc_ok=:
23376break
23377fi
23378rm -f conftest.err conftest.i conftest.$ac_ext
23379
23380done
23381# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23382rm -f conftest.i conftest.err conftest.$ac_ext
23383if $ac_preproc_ok; then :
23384
23385else
23386  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23387$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23388as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
23389See \`config.log' for more details" "$LINENO" 5 ; }
23390fi
23391
23392ac_ext=cpp
23393ac_cpp='$CXXCPP $CPPFLAGS'
23394ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23395ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23396ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23397
23398
23399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23400
23401  # First separate the path from the arguments. This will split at the first
23402  # space.
23403  complete="$CXXCPP"
23404  path="${complete%% *}"
23405  tmp="$complete EOL"
23406  arguments="${tmp#* }"
23407
23408  # Input might be given as Windows format, start by converting to
23409  # unix format.
23410  new_path=`$CYGPATH -u "$path"`
23411
23412  # Now try to locate executable using which
23413  new_path=`$WHICH "$new_path" 2> /dev/null`
23414  # bat and cmd files are not always considered executable in cygwin causing which
23415  # to not find them
23416  if test "x$new_path" = x \
23417           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23418           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23419    new_path=`$CYGPATH -u "$path"`
23420  fi
23421  if test "x$new_path" = x; then
23422    # Oops. Which didn't find the executable.
23423    # The splitting of arguments from the executable at a space might have been incorrect,
23424    # since paths with space are more likely in Windows. Give it another try with the whole
23425    # argument.
23426    path="$complete"
23427    arguments="EOL"
23428    new_path=`$CYGPATH -u "$path"`
23429    new_path=`$WHICH "$new_path" 2> /dev/null`
23430    # bat and cmd files are not always considered executable in cygwin causing which
23431    # to not find them
23432    if test "x$new_path" = x \
23433             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23434             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23435      new_path=`$CYGPATH -u "$path"`
23436    fi
23437    if test "x$new_path" = x; then
23438      # It's still not found. Now this is an unrecoverable error.
23439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23440$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23441      has_space=`$ECHO "$complete" | $GREP " "`
23442      if test "x$has_space" != x; then
23443        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23444$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23445      fi
23446      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23447    fi
23448  fi
23449
23450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23453  # "foo.exe" is OK but "foo" is an error.
23454  #
23455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23456  # It is also a way to make sure we got the proper file name for the real test later on.
23457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23458  if test "x$test_shortpath" = x; then
23459    # Short path failed, file does not exist as specified.
23460    # Try adding .exe or .cmd
23461    if test -f "${new_path}.exe"; then
23462       input_to_shortpath="${new_path}.exe"
23463    elif test -f "${new_path}.cmd"; then
23464       input_to_shortpath="${new_path}.cmd"
23465    else
23466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
23467$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
23468      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23469$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23470      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23471    fi
23472  else
23473    input_to_shortpath="$new_path"
23474  fi
23475
23476  # Call helper function which possibly converts this using DOS-style short mode.
23477  # If so, the updated path is stored in $new_path.
23478  new_path="$input_to_shortpath"
23479
23480  input_path="$input_to_shortpath"
23481  # Check if we need to convert this using DOS-style short mode. If the path
23482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23483  # take no chances and rewrite it.
23484  # Note: m4 eats our [], so we need to use [ and ] instead.
23485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23486  if test "x$has_forbidden_chars" != x; then
23487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23491      # Going to short mode and back again did indeed matter. Since short mode is
23492      # case insensitive, let's make it lowercase to improve readability.
23493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23494      # Now convert it back to Unix-stile (cygpath)
23495      input_path=`$CYGPATH -u "$shortmode_path"`
23496      new_path="$input_path"
23497    fi
23498  fi
23499
23500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23501  if test "x$test_cygdrive_prefix" = x; then
23502    # As a simple fix, exclude /usr/bin since it's not a real path.
23503    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23505      # a path prefixed by /cygdrive for fixpath to work.
23506      new_path="$CYGWIN_ROOT_PATH$input_path"
23507    fi
23508  fi
23509
23510  # remove trailing .exe if any
23511  new_path="${new_path/%.exe/}"
23512
23513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23514
23515  # First separate the path from the arguments. This will split at the first
23516  # space.
23517  complete="$CXXCPP"
23518  path="${complete%% *}"
23519  tmp="$complete EOL"
23520  arguments="${tmp#* }"
23521
23522  # Input might be given as Windows format, start by converting to
23523  # unix format.
23524  new_path="$path"
23525
23526  windows_path="$new_path"
23527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23528    unix_path=`$CYGPATH -u "$windows_path"`
23529    new_path="$unix_path"
23530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23532    new_path="$unix_path"
23533  fi
23534
23535
23536  # Now try to locate executable using which
23537  new_path=`$WHICH "$new_path" 2> /dev/null`
23538
23539  if test "x$new_path" = x; then
23540    # Oops. Which didn't find the executable.
23541    # The splitting of arguments from the executable at a space might have been incorrect,
23542    # since paths with space are more likely in Windows. Give it another try with the whole
23543    # argument.
23544    path="$complete"
23545    arguments="EOL"
23546    new_path="$path"
23547
23548  windows_path="$new_path"
23549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23550    unix_path=`$CYGPATH -u "$windows_path"`
23551    new_path="$unix_path"
23552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23554    new_path="$unix_path"
23555  fi
23556
23557
23558    new_path=`$WHICH "$new_path" 2> /dev/null`
23559
23560    if test "x$new_path" = x; then
23561      # It's still not found. Now this is an unrecoverable error.
23562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23563$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23564      has_space=`$ECHO "$complete" | $GREP " "`
23565      if test "x$has_space" != x; then
23566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23568      fi
23569      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23570    fi
23571  fi
23572
23573  # Now new_path has a complete unix path to the binary
23574  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23575    # Keep paths in /bin as-is, but remove trailing .exe if any
23576    new_path="${new_path/%.exe/}"
23577    # Do not save /bin paths to all_fixpath_prefixes!
23578  else
23579    # Not in mixed or Windows style, start by that.
23580    new_path=`cmd //c echo $new_path`
23581
23582  input_path="$new_path"
23583  # Check if we need to convert this using DOS-style short mode. If the path
23584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23585  # take no chances and rewrite it.
23586  # Note: m4 eats our [], so we need to use [ and ] instead.
23587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23588  if test "x$has_forbidden_chars" != x; then
23589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23591  fi
23592
23593    # Output is in $new_path
23594
23595  windows_path="$new_path"
23596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23597    unix_path=`$CYGPATH -u "$windows_path"`
23598    new_path="$unix_path"
23599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23601    new_path="$unix_path"
23602  fi
23603
23604    # remove trailing .exe if any
23605    new_path="${new_path/%.exe/}"
23606
23607    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23608    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23609  fi
23610
23611  else
23612    # We're on a posix platform. Hooray! :)
23613    # First separate the path from the arguments. This will split at the first
23614    # space.
23615    complete="$CXXCPP"
23616    path="${complete%% *}"
23617    tmp="$complete EOL"
23618    arguments="${tmp#* }"
23619
23620    new_path=`$WHICH $path 2> /dev/null`
23621    if test "x$new_path" = x; then
23622      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23623      if test "x$is_absolute_path" != x; then
23624        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&5
23625$as_echo "$as_me: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&6;}
23626        new_path="$path"
23627      else
23628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23629$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23630        has_space=`$ECHO "$complete" | $GREP " "`
23631        if test "x$has_space" != x; then
23632          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23633$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23634        fi
23635        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23636      fi
23637    fi
23638  fi
23639
23640  # Now join together the path and the arguments once again
23641  if test "x$arguments" != xEOL; then
23642      new_complete="$new_path ${arguments% *}"
23643  else
23644      new_complete="$new_path"
23645  fi
23646
23647  if test "x$complete" != "x$new_complete"; then
23648    CXXCPP="$new_complete"
23649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
23650$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
23651  fi
23652
23653
23654if test "x$COMPILE_TYPE" != "xcross"; then
23655    # If we are not cross compiling, use the same compilers for
23656    # building the build platform executables. The cross-compilation
23657    # case needed to be done earlier, but this can only be done after
23658    # the native tools have been localized.
23659    BUILD_CC="$CC"
23660    BUILD_CXX="$CXX"
23661    BUILD_LD="$LD"
23662fi
23663
23664# for solaris we really need solaris tools, and not gnu equivalent
23665#   these seems to normally reside in /usr/ccs/bin so add that to path before
23666#   starting to probe
23667#
23668#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
23669#         so that it can be overriden --with-tools-dir
23670if test "x$OPENJDK_BUILD_OS" = xsolaris; then
23671    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
23672fi
23673
23674# Find the right assembler.
23675if test "x$OPENJDK_TARGET_OS" = xsolaris; then
23676    # Extract the first word of "as", so it can be a program name with args.
23677set dummy as; ac_word=$2
23678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23679$as_echo_n "checking for $ac_word... " >&6; }
23680if test "${ac_cv_path_AS+set}" = set; then :
23681  $as_echo_n "(cached) " >&6
23682else
23683  case $AS in
23684  [\\/]* | ?:[\\/]*)
23685  ac_cv_path_AS="$AS" # Let the user override the test with a path.
23686  ;;
23687  *)
23688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23689for as_dir in $PATH
23690do
23691  IFS=$as_save_IFS
23692  test -z "$as_dir" && as_dir=.
23693    for ac_exec_ext in '' $ac_executable_extensions; do
23694  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23695    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
23696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23697    break 2
23698  fi
23699done
23700  done
23701IFS=$as_save_IFS
23702
23703  ;;
23704esac
23705fi
23706AS=$ac_cv_path_AS
23707if test -n "$AS"; then
23708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
23709$as_echo "$AS" >&6; }
23710else
23711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23712$as_echo "no" >&6; }
23713fi
23714
23715
23716
23717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23718
23719  # First separate the path from the arguments. This will split at the first
23720  # space.
23721  complete="$AS"
23722  path="${complete%% *}"
23723  tmp="$complete EOL"
23724  arguments="${tmp#* }"
23725
23726  # Input might be given as Windows format, start by converting to
23727  # unix format.
23728  new_path=`$CYGPATH -u "$path"`
23729
23730  # Now try to locate executable using which
23731  new_path=`$WHICH "$new_path" 2> /dev/null`
23732  # bat and cmd files are not always considered executable in cygwin causing which
23733  # to not find them
23734  if test "x$new_path" = x \
23735           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23736           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23737    new_path=`$CYGPATH -u "$path"`
23738  fi
23739  if test "x$new_path" = x; then
23740    # Oops. Which didn't find the executable.
23741    # The splitting of arguments from the executable at a space might have been incorrect,
23742    # since paths with space are more likely in Windows. Give it another try with the whole
23743    # argument.
23744    path="$complete"
23745    arguments="EOL"
23746    new_path=`$CYGPATH -u "$path"`
23747    new_path=`$WHICH "$new_path" 2> /dev/null`
23748    # bat and cmd files are not always considered executable in cygwin causing which
23749    # to not find them
23750    if test "x$new_path" = x \
23751             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23752             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23753      new_path=`$CYGPATH -u "$path"`
23754    fi
23755    if test "x$new_path" = x; then
23756      # It's still not found. Now this is an unrecoverable error.
23757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23758$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23759      has_space=`$ECHO "$complete" | $GREP " "`
23760      if test "x$has_space" != x; then
23761        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23762$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23763      fi
23764      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23765    fi
23766  fi
23767
23768  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23769  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23770  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23771  # "foo.exe" is OK but "foo" is an error.
23772  #
23773  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23774  # It is also a way to make sure we got the proper file name for the real test later on.
23775  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23776  if test "x$test_shortpath" = x; then
23777    # Short path failed, file does not exist as specified.
23778    # Try adding .exe or .cmd
23779    if test -f "${new_path}.exe"; then
23780       input_to_shortpath="${new_path}.exe"
23781    elif test -f "${new_path}.cmd"; then
23782       input_to_shortpath="${new_path}.cmd"
23783    else
23784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
23785$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
23786      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23787$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23788      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23789    fi
23790  else
23791    input_to_shortpath="$new_path"
23792  fi
23793
23794  # Call helper function which possibly converts this using DOS-style short mode.
23795  # If so, the updated path is stored in $new_path.
23796  new_path="$input_to_shortpath"
23797
23798  input_path="$input_to_shortpath"
23799  # Check if we need to convert this using DOS-style short mode. If the path
23800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23801  # take no chances and rewrite it.
23802  # Note: m4 eats our [], so we need to use [ and ] instead.
23803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23804  if test "x$has_forbidden_chars" != x; then
23805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23806    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23807    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23808    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23809      # Going to short mode and back again did indeed matter. Since short mode is
23810      # case insensitive, let's make it lowercase to improve readability.
23811      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23812      # Now convert it back to Unix-stile (cygpath)
23813      input_path=`$CYGPATH -u "$shortmode_path"`
23814      new_path="$input_path"
23815    fi
23816  fi
23817
23818  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23819  if test "x$test_cygdrive_prefix" = x; then
23820    # As a simple fix, exclude /usr/bin since it's not a real path.
23821    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23822      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23823      # a path prefixed by /cygdrive for fixpath to work.
23824      new_path="$CYGWIN_ROOT_PATH$input_path"
23825    fi
23826  fi
23827
23828  # remove trailing .exe if any
23829  new_path="${new_path/%.exe/}"
23830
23831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23832
23833  # First separate the path from the arguments. This will split at the first
23834  # space.
23835  complete="$AS"
23836  path="${complete%% *}"
23837  tmp="$complete EOL"
23838  arguments="${tmp#* }"
23839
23840  # Input might be given as Windows format, start by converting to
23841  # unix format.
23842  new_path="$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
23854  # Now try to locate executable using which
23855  new_path=`$WHICH "$new_path" 2> /dev/null`
23856
23857  if test "x$new_path" = x; then
23858    # Oops. Which didn't find the executable.
23859    # The splitting of arguments from the executable at a space might have been incorrect,
23860    # since paths with space are more likely in Windows. Give it another try with the whole
23861    # argument.
23862    path="$complete"
23863    arguments="EOL"
23864    new_path="$path"
23865
23866  windows_path="$new_path"
23867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23868    unix_path=`$CYGPATH -u "$windows_path"`
23869    new_path="$unix_path"
23870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23872    new_path="$unix_path"
23873  fi
23874
23875
23876    new_path=`$WHICH "$new_path" 2> /dev/null`
23877
23878    if test "x$new_path" = x; then
23879      # It's still not found. Now this is an unrecoverable error.
23880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23881$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23882      has_space=`$ECHO "$complete" | $GREP " "`
23883      if test "x$has_space" != x; then
23884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23886      fi
23887      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23888    fi
23889  fi
23890
23891  # Now new_path has a complete unix path to the binary
23892  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23893    # Keep paths in /bin as-is, but remove trailing .exe if any
23894    new_path="${new_path/%.exe/}"
23895    # Do not save /bin paths to all_fixpath_prefixes!
23896  else
23897    # Not in mixed or Windows style, start by that.
23898    new_path=`cmd //c echo $new_path`
23899
23900  input_path="$new_path"
23901  # Check if we need to convert this using DOS-style short mode. If the path
23902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23903  # take no chances and rewrite it.
23904  # Note: m4 eats our [], so we need to use [ and ] instead.
23905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23906  if test "x$has_forbidden_chars" != x; then
23907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23909  fi
23910
23911    # Output is in $new_path
23912
23913  windows_path="$new_path"
23914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23915    unix_path=`$CYGPATH -u "$windows_path"`
23916    new_path="$unix_path"
23917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23919    new_path="$unix_path"
23920  fi
23921
23922    # remove trailing .exe if any
23923    new_path="${new_path/%.exe/}"
23924
23925    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23926    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23927  fi
23928
23929  else
23930    # We're on a posix platform. Hooray! :)
23931    # First separate the path from the arguments. This will split at the first
23932    # space.
23933    complete="$AS"
23934    path="${complete%% *}"
23935    tmp="$complete EOL"
23936    arguments="${tmp#* }"
23937
23938    new_path=`$WHICH $path 2> /dev/null`
23939    if test "x$new_path" = x; then
23940      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23941      if test "x$is_absolute_path" != x; then
23942        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) with 'which' failed, using $path directly." >&5
23943$as_echo "$as_me: Resolving AS (as $path) with 'which' failed, using $path directly." >&6;}
23944        new_path="$path"
23945      else
23946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23947$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23948        has_space=`$ECHO "$complete" | $GREP " "`
23949        if test "x$has_space" != x; then
23950          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23951$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23952        fi
23953        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23954      fi
23955    fi
23956  fi
23957
23958  # Now join together the path and the arguments once again
23959  if test "x$arguments" != xEOL; then
23960      new_complete="$new_path ${arguments% *}"
23961  else
23962      new_complete="$new_path"
23963  fi
23964
23965  if test "x$complete" != "x$new_complete"; then
23966    AS="$new_complete"
23967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
23968$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
23969  fi
23970
23971else
23972    AS="$CC -c"
23973fi
23974
23975
23976if test "x$OPENJDK_TARGET_OS" = xsolaris; then
23977    for ac_prog in gnm nm
23978do
23979  # Extract the first word of "$ac_prog", so it can be a program name with args.
23980set dummy $ac_prog; ac_word=$2
23981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23982$as_echo_n "checking for $ac_word... " >&6; }
23983if test "${ac_cv_path_NM+set}" = set; then :
23984  $as_echo_n "(cached) " >&6
23985else
23986  case $NM in
23987  [\\/]* | ?:[\\/]*)
23988  ac_cv_path_NM="$NM" # Let the user override the test with a path.
23989  ;;
23990  *)
23991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23992for as_dir in $PATH
23993do
23994  IFS=$as_save_IFS
23995  test -z "$as_dir" && as_dir=.
23996    for ac_exec_ext in '' $ac_executable_extensions; do
23997  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23998    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
23999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24000    break 2
24001  fi
24002done
24003  done
24004IFS=$as_save_IFS
24005
24006  ;;
24007esac
24008fi
24009NM=$ac_cv_path_NM
24010if test -n "$NM"; then
24011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24012$as_echo "$NM" >&6; }
24013else
24014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24015$as_echo "no" >&6; }
24016fi
24017
24018
24019  test -n "$NM" && break
24020done
24021
24022
24023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24024
24025  # First separate the path from the arguments. This will split at the first
24026  # space.
24027  complete="$NM"
24028  path="${complete%% *}"
24029  tmp="$complete EOL"
24030  arguments="${tmp#* }"
24031
24032  # Input might be given as Windows format, start by converting to
24033  # unix format.
24034  new_path=`$CYGPATH -u "$path"`
24035
24036  # Now try to locate executable using which
24037  new_path=`$WHICH "$new_path" 2> /dev/null`
24038  # bat and cmd files are not always considered executable in cygwin causing which
24039  # to not find them
24040  if test "x$new_path" = x \
24041           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24042           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24043    new_path=`$CYGPATH -u "$path"`
24044  fi
24045  if test "x$new_path" = x; then
24046    # Oops. Which didn't find the executable.
24047    # The splitting of arguments from the executable at a space might have been incorrect,
24048    # since paths with space are more likely in Windows. Give it another try with the whole
24049    # argument.
24050    path="$complete"
24051    arguments="EOL"
24052    new_path=`$CYGPATH -u "$path"`
24053    new_path=`$WHICH "$new_path" 2> /dev/null`
24054    # bat and cmd files are not always considered executable in cygwin causing which
24055    # to not find them
24056    if test "x$new_path" = x \
24057             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24058             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24059      new_path=`$CYGPATH -u "$path"`
24060    fi
24061    if test "x$new_path" = x; then
24062      # It's still not found. Now this is an unrecoverable error.
24063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24064$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24065      has_space=`$ECHO "$complete" | $GREP " "`
24066      if test "x$has_space" != x; then
24067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24069      fi
24070      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24071    fi
24072  fi
24073
24074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24077  # "foo.exe" is OK but "foo" is an error.
24078  #
24079  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24080  # It is also a way to make sure we got the proper file name for the real test later on.
24081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24082  if test "x$test_shortpath" = x; then
24083    # Short path failed, file does not exist as specified.
24084    # Try adding .exe or .cmd
24085    if test -f "${new_path}.exe"; then
24086       input_to_shortpath="${new_path}.exe"
24087    elif test -f "${new_path}.cmd"; then
24088       input_to_shortpath="${new_path}.cmd"
24089    else
24090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24091$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24092      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24093$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24094      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24095    fi
24096  else
24097    input_to_shortpath="$new_path"
24098  fi
24099
24100  # Call helper function which possibly converts this using DOS-style short mode.
24101  # If so, the updated path is stored in $new_path.
24102  new_path="$input_to_shortpath"
24103
24104  input_path="$input_to_shortpath"
24105  # Check if we need to convert this using DOS-style short mode. If the path
24106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24107  # take no chances and rewrite it.
24108  # Note: m4 eats our [], so we need to use [ and ] instead.
24109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24110  if test "x$has_forbidden_chars" != x; then
24111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24115      # Going to short mode and back again did indeed matter. Since short mode is
24116      # case insensitive, let's make it lowercase to improve readability.
24117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24118      # Now convert it back to Unix-stile (cygpath)
24119      input_path=`$CYGPATH -u "$shortmode_path"`
24120      new_path="$input_path"
24121    fi
24122  fi
24123
24124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24125  if test "x$test_cygdrive_prefix" = x; then
24126    # As a simple fix, exclude /usr/bin since it's not a real path.
24127    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24129      # a path prefixed by /cygdrive for fixpath to work.
24130      new_path="$CYGWIN_ROOT_PATH$input_path"
24131    fi
24132  fi
24133
24134  # remove trailing .exe if any
24135  new_path="${new_path/%.exe/}"
24136
24137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24138
24139  # First separate the path from the arguments. This will split at the first
24140  # space.
24141  complete="$NM"
24142  path="${complete%% *}"
24143  tmp="$complete EOL"
24144  arguments="${tmp#* }"
24145
24146  # Input might be given as Windows format, start by converting to
24147  # unix format.
24148  new_path="$path"
24149
24150  windows_path="$new_path"
24151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24152    unix_path=`$CYGPATH -u "$windows_path"`
24153    new_path="$unix_path"
24154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24156    new_path="$unix_path"
24157  fi
24158
24159
24160  # Now try to locate executable using which
24161  new_path=`$WHICH "$new_path" 2> /dev/null`
24162
24163  if test "x$new_path" = x; then
24164    # Oops. Which didn't find the executable.
24165    # The splitting of arguments from the executable at a space might have been incorrect,
24166    # since paths with space are more likely in Windows. Give it another try with the whole
24167    # argument.
24168    path="$complete"
24169    arguments="EOL"
24170    new_path="$path"
24171
24172  windows_path="$new_path"
24173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24174    unix_path=`$CYGPATH -u "$windows_path"`
24175    new_path="$unix_path"
24176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24178    new_path="$unix_path"
24179  fi
24180
24181
24182    new_path=`$WHICH "$new_path" 2> /dev/null`
24183
24184    if test "x$new_path" = x; then
24185      # It's still not found. Now this is an unrecoverable error.
24186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24187$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24188      has_space=`$ECHO "$complete" | $GREP " "`
24189      if test "x$has_space" != x; then
24190        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24191$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24192      fi
24193      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24194    fi
24195  fi
24196
24197  # Now new_path has a complete unix path to the binary
24198  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24199    # Keep paths in /bin as-is, but remove trailing .exe if any
24200    new_path="${new_path/%.exe/}"
24201    # Do not save /bin paths to all_fixpath_prefixes!
24202  else
24203    # Not in mixed or Windows style, start by that.
24204    new_path=`cmd //c echo $new_path`
24205
24206  input_path="$new_path"
24207  # Check if we need to convert this using DOS-style short mode. If the path
24208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24209  # take no chances and rewrite it.
24210  # Note: m4 eats our [], so we need to use [ and ] instead.
24211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24212  if test "x$has_forbidden_chars" != x; then
24213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24215  fi
24216
24217    # Output is in $new_path
24218
24219  windows_path="$new_path"
24220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24221    unix_path=`$CYGPATH -u "$windows_path"`
24222    new_path="$unix_path"
24223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24225    new_path="$unix_path"
24226  fi
24227
24228    # remove trailing .exe if any
24229    new_path="${new_path/%.exe/}"
24230
24231    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24232    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24233  fi
24234
24235  else
24236    # We're on a posix platform. Hooray! :)
24237    # First separate the path from the arguments. This will split at the first
24238    # space.
24239    complete="$NM"
24240    path="${complete%% *}"
24241    tmp="$complete EOL"
24242    arguments="${tmp#* }"
24243
24244    new_path=`$WHICH $path 2> /dev/null`
24245    if test "x$new_path" = x; then
24246      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24247      if test "x$is_absolute_path" != x; then
24248        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
24249$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
24250        new_path="$path"
24251      else
24252        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24253$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24254        has_space=`$ECHO "$complete" | $GREP " "`
24255        if test "x$has_space" != x; then
24256          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24257$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24258        fi
24259        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24260      fi
24261    fi
24262  fi
24263
24264  # Now join together the path and the arguments once again
24265  if test "x$arguments" != xEOL; then
24266      new_complete="$new_path ${arguments% *}"
24267  else
24268      new_complete="$new_path"
24269  fi
24270
24271  if test "x$complete" != "x$new_complete"; then
24272    NM="$new_complete"
24273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24274$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24275  fi
24276
24277    # Extract the first word of "strip", so it can be a program name with args.
24278set dummy strip; ac_word=$2
24279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24280$as_echo_n "checking for $ac_word... " >&6; }
24281if test "${ac_cv_path_STRIP+set}" = set; then :
24282  $as_echo_n "(cached) " >&6
24283else
24284  case $STRIP in
24285  [\\/]* | ?:[\\/]*)
24286  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24287  ;;
24288  *)
24289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24290for as_dir in $PATH
24291do
24292  IFS=$as_save_IFS
24293  test -z "$as_dir" && as_dir=.
24294    for ac_exec_ext in '' $ac_executable_extensions; do
24295  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24296    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24298    break 2
24299  fi
24300done
24301  done
24302IFS=$as_save_IFS
24303
24304  ;;
24305esac
24306fi
24307STRIP=$ac_cv_path_STRIP
24308if test -n "$STRIP"; then
24309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24310$as_echo "$STRIP" >&6; }
24311else
24312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24313$as_echo "no" >&6; }
24314fi
24315
24316
24317
24318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24319
24320  # First separate the path from the arguments. This will split at the first
24321  # space.
24322  complete="$STRIP"
24323  path="${complete%% *}"
24324  tmp="$complete EOL"
24325  arguments="${tmp#* }"
24326
24327  # Input might be given as Windows format, start by converting to
24328  # unix format.
24329  new_path=`$CYGPATH -u "$path"`
24330
24331  # Now try to locate executable using which
24332  new_path=`$WHICH "$new_path" 2> /dev/null`
24333  # bat and cmd files are not always considered executable in cygwin causing which
24334  # to not find them
24335  if test "x$new_path" = x \
24336           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24337           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24338    new_path=`$CYGPATH -u "$path"`
24339  fi
24340  if test "x$new_path" = x; then
24341    # Oops. Which didn't find the executable.
24342    # The splitting of arguments from the executable at a space might have been incorrect,
24343    # since paths with space are more likely in Windows. Give it another try with the whole
24344    # argument.
24345    path="$complete"
24346    arguments="EOL"
24347    new_path=`$CYGPATH -u "$path"`
24348    new_path=`$WHICH "$new_path" 2> /dev/null`
24349    # bat and cmd files are not always considered executable in cygwin causing which
24350    # to not find them
24351    if test "x$new_path" = x \
24352             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24353             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24354      new_path=`$CYGPATH -u "$path"`
24355    fi
24356    if test "x$new_path" = x; then
24357      # It's still not found. Now this is an unrecoverable error.
24358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24359$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24360      has_space=`$ECHO "$complete" | $GREP " "`
24361      if test "x$has_space" != x; then
24362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24364      fi
24365      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24366    fi
24367  fi
24368
24369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24372  # "foo.exe" is OK but "foo" is an error.
24373  #
24374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24375  # It is also a way to make sure we got the proper file name for the real test later on.
24376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24377  if test "x$test_shortpath" = x; then
24378    # Short path failed, file does not exist as specified.
24379    # Try adding .exe or .cmd
24380    if test -f "${new_path}.exe"; then
24381       input_to_shortpath="${new_path}.exe"
24382    elif test -f "${new_path}.cmd"; then
24383       input_to_shortpath="${new_path}.cmd"
24384    else
24385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
24386$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
24387      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24388$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24389      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24390    fi
24391  else
24392    input_to_shortpath="$new_path"
24393  fi
24394
24395  # Call helper function which possibly converts this using DOS-style short mode.
24396  # If so, the updated path is stored in $new_path.
24397  new_path="$input_to_shortpath"
24398
24399  input_path="$input_to_shortpath"
24400  # Check if we need to convert this using DOS-style short mode. If the path
24401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24402  # take no chances and rewrite it.
24403  # Note: m4 eats our [], so we need to use [ and ] instead.
24404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24405  if test "x$has_forbidden_chars" != x; then
24406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24410      # Going to short mode and back again did indeed matter. Since short mode is
24411      # case insensitive, let's make it lowercase to improve readability.
24412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24413      # Now convert it back to Unix-stile (cygpath)
24414      input_path=`$CYGPATH -u "$shortmode_path"`
24415      new_path="$input_path"
24416    fi
24417  fi
24418
24419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24420  if test "x$test_cygdrive_prefix" = x; then
24421    # As a simple fix, exclude /usr/bin since it's not a real path.
24422    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24424      # a path prefixed by /cygdrive for fixpath to work.
24425      new_path="$CYGWIN_ROOT_PATH$input_path"
24426    fi
24427  fi
24428
24429  # remove trailing .exe if any
24430  new_path="${new_path/%.exe/}"
24431
24432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24433
24434  # First separate the path from the arguments. This will split at the first
24435  # space.
24436  complete="$STRIP"
24437  path="${complete%% *}"
24438  tmp="$complete EOL"
24439  arguments="${tmp#* }"
24440
24441  # Input might be given as Windows format, start by converting to
24442  # unix format.
24443  new_path="$path"
24444
24445  windows_path="$new_path"
24446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24447    unix_path=`$CYGPATH -u "$windows_path"`
24448    new_path="$unix_path"
24449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24451    new_path="$unix_path"
24452  fi
24453
24454
24455  # Now try to locate executable using which
24456  new_path=`$WHICH "$new_path" 2> /dev/null`
24457
24458  if test "x$new_path" = x; then
24459    # Oops. Which didn't find the executable.
24460    # The splitting of arguments from the executable at a space might have been incorrect,
24461    # since paths with space are more likely in Windows. Give it another try with the whole
24462    # argument.
24463    path="$complete"
24464    arguments="EOL"
24465    new_path="$path"
24466
24467  windows_path="$new_path"
24468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24469    unix_path=`$CYGPATH -u "$windows_path"`
24470    new_path="$unix_path"
24471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24473    new_path="$unix_path"
24474  fi
24475
24476
24477    new_path=`$WHICH "$new_path" 2> /dev/null`
24478
24479    if test "x$new_path" = x; then
24480      # It's still not found. Now this is an unrecoverable error.
24481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24482$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24483      has_space=`$ECHO "$complete" | $GREP " "`
24484      if test "x$has_space" != x; then
24485        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24486$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24487      fi
24488      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24489    fi
24490  fi
24491
24492  # Now new_path has a complete unix path to the binary
24493  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24494    # Keep paths in /bin as-is, but remove trailing .exe if any
24495    new_path="${new_path/%.exe/}"
24496    # Do not save /bin paths to all_fixpath_prefixes!
24497  else
24498    # Not in mixed or Windows style, start by that.
24499    new_path=`cmd //c echo $new_path`
24500
24501  input_path="$new_path"
24502  # Check if we need to convert this using DOS-style short mode. If the path
24503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24504  # take no chances and rewrite it.
24505  # Note: m4 eats our [], so we need to use [ and ] instead.
24506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24507  if test "x$has_forbidden_chars" != x; then
24508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24510  fi
24511
24512    # Output is in $new_path
24513
24514  windows_path="$new_path"
24515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24516    unix_path=`$CYGPATH -u "$windows_path"`
24517    new_path="$unix_path"
24518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24520    new_path="$unix_path"
24521  fi
24522
24523    # remove trailing .exe if any
24524    new_path="${new_path/%.exe/}"
24525
24526    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24527    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24528  fi
24529
24530  else
24531    # We're on a posix platform. Hooray! :)
24532    # First separate the path from the arguments. This will split at the first
24533    # space.
24534    complete="$STRIP"
24535    path="${complete%% *}"
24536    tmp="$complete EOL"
24537    arguments="${tmp#* }"
24538
24539    new_path=`$WHICH $path 2> /dev/null`
24540    if test "x$new_path" = x; then
24541      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24542      if test "x$is_absolute_path" != x; then
24543        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
24544$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
24545        new_path="$path"
24546      else
24547        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24548$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24549        has_space=`$ECHO "$complete" | $GREP " "`
24550        if test "x$has_space" != x; then
24551          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24552$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24553        fi
24554        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24555      fi
24556    fi
24557  fi
24558
24559  # Now join together the path and the arguments once again
24560  if test "x$arguments" != xEOL; then
24561      new_complete="$new_path ${arguments% *}"
24562  else
24563      new_complete="$new_path"
24564  fi
24565
24566  if test "x$complete" != "x$new_complete"; then
24567    STRIP="$new_complete"
24568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
24569$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
24570  fi
24571
24572    # Extract the first word of "mcs", so it can be a program name with args.
24573set dummy mcs; ac_word=$2
24574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24575$as_echo_n "checking for $ac_word... " >&6; }
24576if test "${ac_cv_path_MCS+set}" = set; then :
24577  $as_echo_n "(cached) " >&6
24578else
24579  case $MCS in
24580  [\\/]* | ?:[\\/]*)
24581  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
24582  ;;
24583  *)
24584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24585for as_dir in $PATH
24586do
24587  IFS=$as_save_IFS
24588  test -z "$as_dir" && as_dir=.
24589    for ac_exec_ext in '' $ac_executable_extensions; do
24590  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24591    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
24592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24593    break 2
24594  fi
24595done
24596  done
24597IFS=$as_save_IFS
24598
24599  ;;
24600esac
24601fi
24602MCS=$ac_cv_path_MCS
24603if test -n "$MCS"; then
24604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
24605$as_echo "$MCS" >&6; }
24606else
24607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24608$as_echo "no" >&6; }
24609fi
24610
24611
24612
24613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24614
24615  # First separate the path from the arguments. This will split at the first
24616  # space.
24617  complete="$MCS"
24618  path="${complete%% *}"
24619  tmp="$complete EOL"
24620  arguments="${tmp#* }"
24621
24622  # Input might be given as Windows format, start by converting to
24623  # unix format.
24624  new_path=`$CYGPATH -u "$path"`
24625
24626  # Now try to locate executable using which
24627  new_path=`$WHICH "$new_path" 2> /dev/null`
24628  # bat and cmd files are not always considered executable in cygwin causing which
24629  # to not find them
24630  if test "x$new_path" = x \
24631           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24632           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24633    new_path=`$CYGPATH -u "$path"`
24634  fi
24635  if test "x$new_path" = x; then
24636    # Oops. Which didn't find the executable.
24637    # The splitting of arguments from the executable at a space might have been incorrect,
24638    # since paths with space are more likely in Windows. Give it another try with the whole
24639    # argument.
24640    path="$complete"
24641    arguments="EOL"
24642    new_path=`$CYGPATH -u "$path"`
24643    new_path=`$WHICH "$new_path" 2> /dev/null`
24644    # bat and cmd files are not always considered executable in cygwin causing which
24645    # to not find them
24646    if test "x$new_path" = x \
24647             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24648             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24649      new_path=`$CYGPATH -u "$path"`
24650    fi
24651    if test "x$new_path" = x; then
24652      # It's still not found. Now this is an unrecoverable error.
24653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24654$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24655      has_space=`$ECHO "$complete" | $GREP " "`
24656      if test "x$has_space" != x; then
24657        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24658$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24659      fi
24660      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24661    fi
24662  fi
24663
24664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24667  # "foo.exe" is OK but "foo" is an error.
24668  #
24669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24670  # It is also a way to make sure we got the proper file name for the real test later on.
24671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24672  if test "x$test_shortpath" = x; then
24673    # Short path failed, file does not exist as specified.
24674    # Try adding .exe or .cmd
24675    if test -f "${new_path}.exe"; then
24676       input_to_shortpath="${new_path}.exe"
24677    elif test -f "${new_path}.cmd"; then
24678       input_to_shortpath="${new_path}.cmd"
24679    else
24680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
24681$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
24682      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24683$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24684      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24685    fi
24686  else
24687    input_to_shortpath="$new_path"
24688  fi
24689
24690  # Call helper function which possibly converts this using DOS-style short mode.
24691  # If so, the updated path is stored in $new_path.
24692  new_path="$input_to_shortpath"
24693
24694  input_path="$input_to_shortpath"
24695  # Check if we need to convert this using DOS-style short mode. If the path
24696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24697  # take no chances and rewrite it.
24698  # Note: m4 eats our [], so we need to use [ and ] instead.
24699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24700  if test "x$has_forbidden_chars" != x; then
24701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24705      # Going to short mode and back again did indeed matter. Since short mode is
24706      # case insensitive, let's make it lowercase to improve readability.
24707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24708      # Now convert it back to Unix-stile (cygpath)
24709      input_path=`$CYGPATH -u "$shortmode_path"`
24710      new_path="$input_path"
24711    fi
24712  fi
24713
24714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24715  if test "x$test_cygdrive_prefix" = x; then
24716    # As a simple fix, exclude /usr/bin since it's not a real path.
24717    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24719      # a path prefixed by /cygdrive for fixpath to work.
24720      new_path="$CYGWIN_ROOT_PATH$input_path"
24721    fi
24722  fi
24723
24724  # remove trailing .exe if any
24725  new_path="${new_path/%.exe/}"
24726
24727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24728
24729  # First separate the path from the arguments. This will split at the first
24730  # space.
24731  complete="$MCS"
24732  path="${complete%% *}"
24733  tmp="$complete EOL"
24734  arguments="${tmp#* }"
24735
24736  # Input might be given as Windows format, start by converting to
24737  # unix format.
24738  new_path="$path"
24739
24740  windows_path="$new_path"
24741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24742    unix_path=`$CYGPATH -u "$windows_path"`
24743    new_path="$unix_path"
24744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24746    new_path="$unix_path"
24747  fi
24748
24749
24750  # Now try to locate executable using which
24751  new_path=`$WHICH "$new_path" 2> /dev/null`
24752
24753  if test "x$new_path" = x; then
24754    # Oops. Which didn't find the executable.
24755    # The splitting of arguments from the executable at a space might have been incorrect,
24756    # since paths with space are more likely in Windows. Give it another try with the whole
24757    # argument.
24758    path="$complete"
24759    arguments="EOL"
24760    new_path="$path"
24761
24762  windows_path="$new_path"
24763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24764    unix_path=`$CYGPATH -u "$windows_path"`
24765    new_path="$unix_path"
24766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24768    new_path="$unix_path"
24769  fi
24770
24771
24772    new_path=`$WHICH "$new_path" 2> /dev/null`
24773
24774    if test "x$new_path" = x; then
24775      # It's still not found. Now this is an unrecoverable error.
24776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24777$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24778      has_space=`$ECHO "$complete" | $GREP " "`
24779      if test "x$has_space" != x; then
24780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24782      fi
24783      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24784    fi
24785  fi
24786
24787  # Now new_path has a complete unix path to the binary
24788  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24789    # Keep paths in /bin as-is, but remove trailing .exe if any
24790    new_path="${new_path/%.exe/}"
24791    # Do not save /bin paths to all_fixpath_prefixes!
24792  else
24793    # Not in mixed or Windows style, start by that.
24794    new_path=`cmd //c echo $new_path`
24795
24796  input_path="$new_path"
24797  # Check if we need to convert this using DOS-style short mode. If the path
24798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24799  # take no chances and rewrite it.
24800  # Note: m4 eats our [], so we need to use [ and ] instead.
24801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24802  if test "x$has_forbidden_chars" != x; then
24803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24805  fi
24806
24807    # Output is in $new_path
24808
24809  windows_path="$new_path"
24810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24811    unix_path=`$CYGPATH -u "$windows_path"`
24812    new_path="$unix_path"
24813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24815    new_path="$unix_path"
24816  fi
24817
24818    # remove trailing .exe if any
24819    new_path="${new_path/%.exe/}"
24820
24821    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24822    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24823  fi
24824
24825  else
24826    # We're on a posix platform. Hooray! :)
24827    # First separate the path from the arguments. This will split at the first
24828    # space.
24829    complete="$MCS"
24830    path="${complete%% *}"
24831    tmp="$complete EOL"
24832    arguments="${tmp#* }"
24833
24834    new_path=`$WHICH $path 2> /dev/null`
24835    if test "x$new_path" = x; then
24836      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24837      if test "x$is_absolute_path" != x; then
24838        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) with 'which' failed, using $path directly." >&5
24839$as_echo "$as_me: Resolving MCS (as $path) with 'which' failed, using $path directly." >&6;}
24840        new_path="$path"
24841      else
24842        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24843$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24844        has_space=`$ECHO "$complete" | $GREP " "`
24845        if test "x$has_space" != x; then
24846          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24847$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24848        fi
24849        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24850      fi
24851    fi
24852  fi
24853
24854  # Now join together the path and the arguments once again
24855  if test "x$arguments" != xEOL; then
24856      new_complete="$new_path ${arguments% *}"
24857  else
24858      new_complete="$new_path"
24859  fi
24860
24861  if test "x$complete" != "x$new_complete"; then
24862    MCS="$new_complete"
24863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
24864$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
24865  fi
24866
24867elif test "x$OPENJDK_TARGET_OS" != xwindows; then
24868    if test -n "$ac_tool_prefix"; then
24869  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
24870set dummy ${ac_tool_prefix}nm; ac_word=$2
24871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24872$as_echo_n "checking for $ac_word... " >&6; }
24873if test "${ac_cv_prog_NM+set}" = set; then :
24874  $as_echo_n "(cached) " >&6
24875else
24876  if test -n "$NM"; then
24877  ac_cv_prog_NM="$NM" # Let the user override the test.
24878else
24879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24880for as_dir in $PATH
24881do
24882  IFS=$as_save_IFS
24883  test -z "$as_dir" && as_dir=.
24884    for ac_exec_ext in '' $ac_executable_extensions; do
24885  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24886    ac_cv_prog_NM="${ac_tool_prefix}nm"
24887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24888    break 2
24889  fi
24890done
24891  done
24892IFS=$as_save_IFS
24893
24894fi
24895fi
24896NM=$ac_cv_prog_NM
24897if test -n "$NM"; then
24898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24899$as_echo "$NM" >&6; }
24900else
24901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24902$as_echo "no" >&6; }
24903fi
24904
24905
24906fi
24907if test -z "$ac_cv_prog_NM"; then
24908  ac_ct_NM=$NM
24909  # Extract the first word of "nm", so it can be a program name with args.
24910set dummy nm; ac_word=$2
24911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24912$as_echo_n "checking for $ac_word... " >&6; }
24913if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
24914  $as_echo_n "(cached) " >&6
24915else
24916  if test -n "$ac_ct_NM"; then
24917  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
24918else
24919as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24920for as_dir in $PATH
24921do
24922  IFS=$as_save_IFS
24923  test -z "$as_dir" && as_dir=.
24924    for ac_exec_ext in '' $ac_executable_extensions; do
24925  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24926    ac_cv_prog_ac_ct_NM="nm"
24927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24928    break 2
24929  fi
24930done
24931  done
24932IFS=$as_save_IFS
24933
24934fi
24935fi
24936ac_ct_NM=$ac_cv_prog_ac_ct_NM
24937if test -n "$ac_ct_NM"; then
24938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
24939$as_echo "$ac_ct_NM" >&6; }
24940else
24941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24942$as_echo "no" >&6; }
24943fi
24944
24945  if test "x$ac_ct_NM" = x; then
24946    NM=""
24947  else
24948    case $cross_compiling:$ac_tool_warned in
24949yes:)
24950{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24951$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24952ac_tool_warned=yes ;;
24953esac
24954    NM=$ac_ct_NM
24955  fi
24956else
24957  NM="$ac_cv_prog_NM"
24958fi
24959
24960
24961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24962
24963  # First separate the path from the arguments. This will split at the first
24964  # space.
24965  complete="$NM"
24966  path="${complete%% *}"
24967  tmp="$complete EOL"
24968  arguments="${tmp#* }"
24969
24970  # Input might be given as Windows format, start by converting to
24971  # unix format.
24972  new_path=`$CYGPATH -u "$path"`
24973
24974  # Now try to locate executable using which
24975  new_path=`$WHICH "$new_path" 2> /dev/null`
24976  # bat and cmd files are not always considered executable in cygwin causing which
24977  # to not find them
24978  if test "x$new_path" = x \
24979           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24980           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24981    new_path=`$CYGPATH -u "$path"`
24982  fi
24983  if test "x$new_path" = x; then
24984    # Oops. Which didn't find the executable.
24985    # The splitting of arguments from the executable at a space might have been incorrect,
24986    # since paths with space are more likely in Windows. Give it another try with the whole
24987    # argument.
24988    path="$complete"
24989    arguments="EOL"
24990    new_path=`$CYGPATH -u "$path"`
24991    new_path=`$WHICH "$new_path" 2> /dev/null`
24992    # bat and cmd files are not always considered executable in cygwin causing which
24993    # to not find them
24994    if test "x$new_path" = x \
24995             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24996             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24997      new_path=`$CYGPATH -u "$path"`
24998    fi
24999    if test "x$new_path" = x; then
25000      # It's still not found. Now this is an unrecoverable error.
25001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25002$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25003      has_space=`$ECHO "$complete" | $GREP " "`
25004      if test "x$has_space" != x; then
25005        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25006$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25007      fi
25008      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25009    fi
25010  fi
25011
25012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25015  # "foo.exe" is OK but "foo" is an error.
25016  #
25017  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25018  # It is also a way to make sure we got the proper file name for the real test later on.
25019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25020  if test "x$test_shortpath" = x; then
25021    # Short path failed, file does not exist as specified.
25022    # Try adding .exe or .cmd
25023    if test -f "${new_path}.exe"; then
25024       input_to_shortpath="${new_path}.exe"
25025    elif test -f "${new_path}.cmd"; then
25026       input_to_shortpath="${new_path}.cmd"
25027    else
25028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25029$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25030      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25031$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25032      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25033    fi
25034  else
25035    input_to_shortpath="$new_path"
25036  fi
25037
25038  # Call helper function which possibly converts this using DOS-style short mode.
25039  # If so, the updated path is stored in $new_path.
25040  new_path="$input_to_shortpath"
25041
25042  input_path="$input_to_shortpath"
25043  # Check if we need to convert this using DOS-style short mode. If the path
25044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25045  # take no chances and rewrite it.
25046  # Note: m4 eats our [], so we need to use [ and ] instead.
25047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25048  if test "x$has_forbidden_chars" != x; then
25049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25053      # Going to short mode and back again did indeed matter. Since short mode is
25054      # case insensitive, let's make it lowercase to improve readability.
25055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25056      # Now convert it back to Unix-stile (cygpath)
25057      input_path=`$CYGPATH -u "$shortmode_path"`
25058      new_path="$input_path"
25059    fi
25060  fi
25061
25062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25063  if test "x$test_cygdrive_prefix" = x; then
25064    # As a simple fix, exclude /usr/bin since it's not a real path.
25065    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25067      # a path prefixed by /cygdrive for fixpath to work.
25068      new_path="$CYGWIN_ROOT_PATH$input_path"
25069    fi
25070  fi
25071
25072  # remove trailing .exe if any
25073  new_path="${new_path/%.exe/}"
25074
25075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25076
25077  # First separate the path from the arguments. This will split at the first
25078  # space.
25079  complete="$NM"
25080  path="${complete%% *}"
25081  tmp="$complete EOL"
25082  arguments="${tmp#* }"
25083
25084  # Input might be given as Windows format, start by converting to
25085  # unix format.
25086  new_path="$path"
25087
25088  windows_path="$new_path"
25089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25090    unix_path=`$CYGPATH -u "$windows_path"`
25091    new_path="$unix_path"
25092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25094    new_path="$unix_path"
25095  fi
25096
25097
25098  # Now try to locate executable using which
25099  new_path=`$WHICH "$new_path" 2> /dev/null`
25100
25101  if test "x$new_path" = x; then
25102    # Oops. Which didn't find the executable.
25103    # The splitting of arguments from the executable at a space might have been incorrect,
25104    # since paths with space are more likely in Windows. Give it another try with the whole
25105    # argument.
25106    path="$complete"
25107    arguments="EOL"
25108    new_path="$path"
25109
25110  windows_path="$new_path"
25111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25112    unix_path=`$CYGPATH -u "$windows_path"`
25113    new_path="$unix_path"
25114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25116    new_path="$unix_path"
25117  fi
25118
25119
25120    new_path=`$WHICH "$new_path" 2> /dev/null`
25121
25122    if test "x$new_path" = x; then
25123      # It's still not found. Now this is an unrecoverable error.
25124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25125$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25126      has_space=`$ECHO "$complete" | $GREP " "`
25127      if test "x$has_space" != x; then
25128        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25129$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25130      fi
25131      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25132    fi
25133  fi
25134
25135  # Now new_path has a complete unix path to the binary
25136  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25137    # Keep paths in /bin as-is, but remove trailing .exe if any
25138    new_path="${new_path/%.exe/}"
25139    # Do not save /bin paths to all_fixpath_prefixes!
25140  else
25141    # Not in mixed or Windows style, start by that.
25142    new_path=`cmd //c echo $new_path`
25143
25144  input_path="$new_path"
25145  # Check if we need to convert this using DOS-style short mode. If the path
25146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25147  # take no chances and rewrite it.
25148  # Note: m4 eats our [], so we need to use [ and ] instead.
25149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25150  if test "x$has_forbidden_chars" != x; then
25151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25152    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25153  fi
25154
25155    # Output is in $new_path
25156
25157  windows_path="$new_path"
25158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25159    unix_path=`$CYGPATH -u "$windows_path"`
25160    new_path="$unix_path"
25161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25163    new_path="$unix_path"
25164  fi
25165
25166    # remove trailing .exe if any
25167    new_path="${new_path/%.exe/}"
25168
25169    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25170    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25171  fi
25172
25173  else
25174    # We're on a posix platform. Hooray! :)
25175    # First separate the path from the arguments. This will split at the first
25176    # space.
25177    complete="$NM"
25178    path="${complete%% *}"
25179    tmp="$complete EOL"
25180    arguments="${tmp#* }"
25181
25182    new_path=`$WHICH $path 2> /dev/null`
25183    if test "x$new_path" = x; then
25184      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25185      if test "x$is_absolute_path" != x; then
25186        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
25187$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
25188        new_path="$path"
25189      else
25190        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25191$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25192        has_space=`$ECHO "$complete" | $GREP " "`
25193        if test "x$has_space" != x; then
25194          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25195$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25196        fi
25197        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25198      fi
25199    fi
25200  fi
25201
25202  # Now join together the path and the arguments once again
25203  if test "x$arguments" != xEOL; then
25204      new_complete="$new_path ${arguments% *}"
25205  else
25206      new_complete="$new_path"
25207  fi
25208
25209  if test "x$complete" != "x$new_complete"; then
25210    NM="$new_complete"
25211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25212$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25213  fi
25214
25215    if test -n "$ac_tool_prefix"; then
25216  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25217set dummy ${ac_tool_prefix}strip; ac_word=$2
25218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25219$as_echo_n "checking for $ac_word... " >&6; }
25220if test "${ac_cv_prog_STRIP+set}" = set; then :
25221  $as_echo_n "(cached) " >&6
25222else
25223  if test -n "$STRIP"; then
25224  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25225else
25226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25227for as_dir in $PATH
25228do
25229  IFS=$as_save_IFS
25230  test -z "$as_dir" && as_dir=.
25231    for ac_exec_ext in '' $ac_executable_extensions; do
25232  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25233    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25235    break 2
25236  fi
25237done
25238  done
25239IFS=$as_save_IFS
25240
25241fi
25242fi
25243STRIP=$ac_cv_prog_STRIP
25244if test -n "$STRIP"; then
25245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25246$as_echo "$STRIP" >&6; }
25247else
25248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25249$as_echo "no" >&6; }
25250fi
25251
25252
25253fi
25254if test -z "$ac_cv_prog_STRIP"; then
25255  ac_ct_STRIP=$STRIP
25256  # Extract the first word of "strip", so it can be a program name with args.
25257set dummy strip; ac_word=$2
25258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25259$as_echo_n "checking for $ac_word... " >&6; }
25260if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25261  $as_echo_n "(cached) " >&6
25262else
25263  if test -n "$ac_ct_STRIP"; then
25264  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25265else
25266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25267for as_dir in $PATH
25268do
25269  IFS=$as_save_IFS
25270  test -z "$as_dir" && as_dir=.
25271    for ac_exec_ext in '' $ac_executable_extensions; do
25272  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25273    ac_cv_prog_ac_ct_STRIP="strip"
25274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25275    break 2
25276  fi
25277done
25278  done
25279IFS=$as_save_IFS
25280
25281fi
25282fi
25283ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25284if test -n "$ac_ct_STRIP"; then
25285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25286$as_echo "$ac_ct_STRIP" >&6; }
25287else
25288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25289$as_echo "no" >&6; }
25290fi
25291
25292  if test "x$ac_ct_STRIP" = x; then
25293    STRIP=""
25294  else
25295    case $cross_compiling:$ac_tool_warned in
25296yes:)
25297{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25298$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25299ac_tool_warned=yes ;;
25300esac
25301    STRIP=$ac_ct_STRIP
25302  fi
25303else
25304  STRIP="$ac_cv_prog_STRIP"
25305fi
25306
25307
25308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25309
25310  # First separate the path from the arguments. This will split at the first
25311  # space.
25312  complete="$STRIP"
25313  path="${complete%% *}"
25314  tmp="$complete EOL"
25315  arguments="${tmp#* }"
25316
25317  # Input might be given as Windows format, start by converting to
25318  # unix format.
25319  new_path=`$CYGPATH -u "$path"`
25320
25321  # Now try to locate executable using which
25322  new_path=`$WHICH "$new_path" 2> /dev/null`
25323  # bat and cmd files are not always considered executable in cygwin causing which
25324  # to not find them
25325  if test "x$new_path" = x \
25326           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25327           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25328    new_path=`$CYGPATH -u "$path"`
25329  fi
25330  if test "x$new_path" = x; then
25331    # Oops. Which didn't find the executable.
25332    # The splitting of arguments from the executable at a space might have been incorrect,
25333    # since paths with space are more likely in Windows. Give it another try with the whole
25334    # argument.
25335    path="$complete"
25336    arguments="EOL"
25337    new_path=`$CYGPATH -u "$path"`
25338    new_path=`$WHICH "$new_path" 2> /dev/null`
25339    # bat and cmd files are not always considered executable in cygwin causing which
25340    # to not find them
25341    if test "x$new_path" = x \
25342             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25343             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25344      new_path=`$CYGPATH -u "$path"`
25345    fi
25346    if test "x$new_path" = x; then
25347      # It's still not found. Now this is an unrecoverable error.
25348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25349$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25350      has_space=`$ECHO "$complete" | $GREP " "`
25351      if test "x$has_space" != x; then
25352        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25353$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25354      fi
25355      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25356    fi
25357  fi
25358
25359  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25360  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25361  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25362  # "foo.exe" is OK but "foo" is an error.
25363  #
25364  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25365  # It is also a way to make sure we got the proper file name for the real test later on.
25366  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25367  if test "x$test_shortpath" = x; then
25368    # Short path failed, file does not exist as specified.
25369    # Try adding .exe or .cmd
25370    if test -f "${new_path}.exe"; then
25371       input_to_shortpath="${new_path}.exe"
25372    elif test -f "${new_path}.cmd"; then
25373       input_to_shortpath="${new_path}.cmd"
25374    else
25375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25376$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25377      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25378$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25379      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25380    fi
25381  else
25382    input_to_shortpath="$new_path"
25383  fi
25384
25385  # Call helper function which possibly converts this using DOS-style short mode.
25386  # If so, the updated path is stored in $new_path.
25387  new_path="$input_to_shortpath"
25388
25389  input_path="$input_to_shortpath"
25390  # Check if we need to convert this using DOS-style short mode. If the path
25391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25392  # take no chances and rewrite it.
25393  # Note: m4 eats our [], so we need to use [ and ] instead.
25394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25395  if test "x$has_forbidden_chars" != x; then
25396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25400      # Going to short mode and back again did indeed matter. Since short mode is
25401      # case insensitive, let's make it lowercase to improve readability.
25402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25403      # Now convert it back to Unix-stile (cygpath)
25404      input_path=`$CYGPATH -u "$shortmode_path"`
25405      new_path="$input_path"
25406    fi
25407  fi
25408
25409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25410  if test "x$test_cygdrive_prefix" = x; then
25411    # As a simple fix, exclude /usr/bin since it's not a real path.
25412    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25414      # a path prefixed by /cygdrive for fixpath to work.
25415      new_path="$CYGWIN_ROOT_PATH$input_path"
25416    fi
25417  fi
25418
25419  # remove trailing .exe if any
25420  new_path="${new_path/%.exe/}"
25421
25422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25423
25424  # First separate the path from the arguments. This will split at the first
25425  # space.
25426  complete="$STRIP"
25427  path="${complete%% *}"
25428  tmp="$complete EOL"
25429  arguments="${tmp#* }"
25430
25431  # Input might be given as Windows format, start by converting to
25432  # unix format.
25433  new_path="$path"
25434
25435  windows_path="$new_path"
25436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25437    unix_path=`$CYGPATH -u "$windows_path"`
25438    new_path="$unix_path"
25439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25441    new_path="$unix_path"
25442  fi
25443
25444
25445  # Now try to locate executable using which
25446  new_path=`$WHICH "$new_path" 2> /dev/null`
25447
25448  if test "x$new_path" = x; then
25449    # Oops. Which didn't find the executable.
25450    # The splitting of arguments from the executable at a space might have been incorrect,
25451    # since paths with space are more likely in Windows. Give it another try with the whole
25452    # argument.
25453    path="$complete"
25454    arguments="EOL"
25455    new_path="$path"
25456
25457  windows_path="$new_path"
25458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25459    unix_path=`$CYGPATH -u "$windows_path"`
25460    new_path="$unix_path"
25461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25463    new_path="$unix_path"
25464  fi
25465
25466
25467    new_path=`$WHICH "$new_path" 2> /dev/null`
25468
25469    if test "x$new_path" = x; then
25470      # It's still not found. Now this is an unrecoverable error.
25471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25472$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25473      has_space=`$ECHO "$complete" | $GREP " "`
25474      if test "x$has_space" != x; then
25475        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25476$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25477      fi
25478      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25479    fi
25480  fi
25481
25482  # Now new_path has a complete unix path to the binary
25483  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25484    # Keep paths in /bin as-is, but remove trailing .exe if any
25485    new_path="${new_path/%.exe/}"
25486    # Do not save /bin paths to all_fixpath_prefixes!
25487  else
25488    # Not in mixed or Windows style, start by that.
25489    new_path=`cmd //c echo $new_path`
25490
25491  input_path="$new_path"
25492  # Check if we need to convert this using DOS-style short mode. If the path
25493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25494  # take no chances and rewrite it.
25495  # Note: m4 eats our [], so we need to use [ and ] instead.
25496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25497  if test "x$has_forbidden_chars" != x; then
25498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25500  fi
25501
25502    # Output is in $new_path
25503
25504  windows_path="$new_path"
25505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25506    unix_path=`$CYGPATH -u "$windows_path"`
25507    new_path="$unix_path"
25508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25510    new_path="$unix_path"
25511  fi
25512
25513    # remove trailing .exe if any
25514    new_path="${new_path/%.exe/}"
25515
25516    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25517    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25518  fi
25519
25520  else
25521    # We're on a posix platform. Hooray! :)
25522    # First separate the path from the arguments. This will split at the first
25523    # space.
25524    complete="$STRIP"
25525    path="${complete%% *}"
25526    tmp="$complete EOL"
25527    arguments="${tmp#* }"
25528
25529    new_path=`$WHICH $path 2> /dev/null`
25530    if test "x$new_path" = x; then
25531      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25532      if test "x$is_absolute_path" != x; then
25533        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
25534$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
25535        new_path="$path"
25536      else
25537        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25538$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25539        has_space=`$ECHO "$complete" | $GREP " "`
25540        if test "x$has_space" != x; then
25541          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25542$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25543        fi
25544        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25545      fi
25546    fi
25547  fi
25548
25549  # Now join together the path and the arguments once again
25550  if test "x$arguments" != xEOL; then
25551      new_complete="$new_path ${arguments% *}"
25552  else
25553      new_complete="$new_path"
25554  fi
25555
25556  if test "x$complete" != "x$new_complete"; then
25557    STRIP="$new_complete"
25558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25559$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25560  fi
25561
25562fi
25563
25564# objcopy is used for moving debug symbols to separate files when
25565# full debug symbols are enabled.
25566if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
25567    if test -n "$ac_tool_prefix"; then
25568  for ac_prog in gobjcopy objcopy
25569  do
25570    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
25571set dummy $ac_tool_prefix$ac_prog; ac_word=$2
25572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25573$as_echo_n "checking for $ac_word... " >&6; }
25574if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
25575  $as_echo_n "(cached) " >&6
25576else
25577  if test -n "$OBJCOPY"; then
25578  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
25579else
25580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25581for as_dir in $PATH
25582do
25583  IFS=$as_save_IFS
25584  test -z "$as_dir" && as_dir=.
25585    for ac_exec_ext in '' $ac_executable_extensions; do
25586  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25587    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
25588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25589    break 2
25590  fi
25591done
25592  done
25593IFS=$as_save_IFS
25594
25595fi
25596fi
25597OBJCOPY=$ac_cv_prog_OBJCOPY
25598if test -n "$OBJCOPY"; then
25599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
25600$as_echo "$OBJCOPY" >&6; }
25601else
25602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25603$as_echo "no" >&6; }
25604fi
25605
25606
25607    test -n "$OBJCOPY" && break
25608  done
25609fi
25610if test -z "$OBJCOPY"; then
25611  ac_ct_OBJCOPY=$OBJCOPY
25612  for ac_prog in gobjcopy objcopy
25613do
25614  # Extract the first word of "$ac_prog", so it can be a program name with args.
25615set dummy $ac_prog; ac_word=$2
25616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25617$as_echo_n "checking for $ac_word... " >&6; }
25618if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
25619  $as_echo_n "(cached) " >&6
25620else
25621  if test -n "$ac_ct_OBJCOPY"; then
25622  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
25623else
25624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25625for as_dir in $PATH
25626do
25627  IFS=$as_save_IFS
25628  test -z "$as_dir" && as_dir=.
25629    for ac_exec_ext in '' $ac_executable_extensions; do
25630  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25631    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
25632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25633    break 2
25634  fi
25635done
25636  done
25637IFS=$as_save_IFS
25638
25639fi
25640fi
25641ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
25642if test -n "$ac_ct_OBJCOPY"; then
25643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
25644$as_echo "$ac_ct_OBJCOPY" >&6; }
25645else
25646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25647$as_echo "no" >&6; }
25648fi
25649
25650
25651  test -n "$ac_ct_OBJCOPY" && break
25652done
25653
25654  if test "x$ac_ct_OBJCOPY" = x; then
25655    OBJCOPY=""
25656  else
25657    case $cross_compiling:$ac_tool_warned in
25658yes:)
25659{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25660$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25661ac_tool_warned=yes ;;
25662esac
25663    OBJCOPY=$ac_ct_OBJCOPY
25664  fi
25665fi
25666
25667    # Only call fixup if objcopy was found.
25668    if test -n "$OBJCOPY"; then
25669
25670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25671
25672  # First separate the path from the arguments. This will split at the first
25673  # space.
25674  complete="$OBJCOPY"
25675  path="${complete%% *}"
25676  tmp="$complete EOL"
25677  arguments="${tmp#* }"
25678
25679  # Input might be given as Windows format, start by converting to
25680  # unix format.
25681  new_path=`$CYGPATH -u "$path"`
25682
25683  # Now try to locate executable using which
25684  new_path=`$WHICH "$new_path" 2> /dev/null`
25685  # bat and cmd files are not always considered executable in cygwin causing which
25686  # to not find them
25687  if test "x$new_path" = x \
25688           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25689           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25690    new_path=`$CYGPATH -u "$path"`
25691  fi
25692  if test "x$new_path" = x; then
25693    # Oops. Which didn't find the executable.
25694    # The splitting of arguments from the executable at a space might have been incorrect,
25695    # since paths with space are more likely in Windows. Give it another try with the whole
25696    # argument.
25697    path="$complete"
25698    arguments="EOL"
25699    new_path=`$CYGPATH -u "$path"`
25700    new_path=`$WHICH "$new_path" 2> /dev/null`
25701    # bat and cmd files are not always considered executable in cygwin causing which
25702    # to not find them
25703    if test "x$new_path" = x \
25704             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25705             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25706      new_path=`$CYGPATH -u "$path"`
25707    fi
25708    if test "x$new_path" = x; then
25709      # It's still not found. Now this is an unrecoverable error.
25710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25711$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25712      has_space=`$ECHO "$complete" | $GREP " "`
25713      if test "x$has_space" != x; then
25714        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25715$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25716      fi
25717      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25718    fi
25719  fi
25720
25721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25724  # "foo.exe" is OK but "foo" is an error.
25725  #
25726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25727  # It is also a way to make sure we got the proper file name for the real test later on.
25728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25729  if test "x$test_shortpath" = x; then
25730    # Short path failed, file does not exist as specified.
25731    # Try adding .exe or .cmd
25732    if test -f "${new_path}.exe"; then
25733       input_to_shortpath="${new_path}.exe"
25734    elif test -f "${new_path}.cmd"; then
25735       input_to_shortpath="${new_path}.cmd"
25736    else
25737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
25738$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
25739      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25740$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25741      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25742    fi
25743  else
25744    input_to_shortpath="$new_path"
25745  fi
25746
25747  # Call helper function which possibly converts this using DOS-style short mode.
25748  # If so, the updated path is stored in $new_path.
25749  new_path="$input_to_shortpath"
25750
25751  input_path="$input_to_shortpath"
25752  # Check if we need to convert this using DOS-style short mode. If the path
25753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25754  # take no chances and rewrite it.
25755  # Note: m4 eats our [], so we need to use [ and ] instead.
25756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25757  if test "x$has_forbidden_chars" != x; then
25758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25762      # Going to short mode and back again did indeed matter. Since short mode is
25763      # case insensitive, let's make it lowercase to improve readability.
25764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25765      # Now convert it back to Unix-stile (cygpath)
25766      input_path=`$CYGPATH -u "$shortmode_path"`
25767      new_path="$input_path"
25768    fi
25769  fi
25770
25771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25772  if test "x$test_cygdrive_prefix" = x; then
25773    # As a simple fix, exclude /usr/bin since it's not a real path.
25774    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25776      # a path prefixed by /cygdrive for fixpath to work.
25777      new_path="$CYGWIN_ROOT_PATH$input_path"
25778    fi
25779  fi
25780
25781  # remove trailing .exe if any
25782  new_path="${new_path/%.exe/}"
25783
25784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25785
25786  # First separate the path from the arguments. This will split at the first
25787  # space.
25788  complete="$OBJCOPY"
25789  path="${complete%% *}"
25790  tmp="$complete EOL"
25791  arguments="${tmp#* }"
25792
25793  # Input might be given as Windows format, start by converting to
25794  # unix format.
25795  new_path="$path"
25796
25797  windows_path="$new_path"
25798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25799    unix_path=`$CYGPATH -u "$windows_path"`
25800    new_path="$unix_path"
25801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25803    new_path="$unix_path"
25804  fi
25805
25806
25807  # Now try to locate executable using which
25808  new_path=`$WHICH "$new_path" 2> /dev/null`
25809
25810  if test "x$new_path" = x; then
25811    # Oops. Which didn't find the executable.
25812    # The splitting of arguments from the executable at a space might have been incorrect,
25813    # since paths with space are more likely in Windows. Give it another try with the whole
25814    # argument.
25815    path="$complete"
25816    arguments="EOL"
25817    new_path="$path"
25818
25819  windows_path="$new_path"
25820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25821    unix_path=`$CYGPATH -u "$windows_path"`
25822    new_path="$unix_path"
25823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25825    new_path="$unix_path"
25826  fi
25827
25828
25829    new_path=`$WHICH "$new_path" 2> /dev/null`
25830
25831    if test "x$new_path" = x; then
25832      # It's still not found. Now this is an unrecoverable error.
25833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25834$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25835      has_space=`$ECHO "$complete" | $GREP " "`
25836      if test "x$has_space" != x; then
25837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25839      fi
25840      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25841    fi
25842  fi
25843
25844  # Now new_path has a complete unix path to the binary
25845  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25846    # Keep paths in /bin as-is, but remove trailing .exe if any
25847    new_path="${new_path/%.exe/}"
25848    # Do not save /bin paths to all_fixpath_prefixes!
25849  else
25850    # Not in mixed or Windows style, start by that.
25851    new_path=`cmd //c echo $new_path`
25852
25853  input_path="$new_path"
25854  # Check if we need to convert this using DOS-style short mode. If the path
25855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25856  # take no chances and rewrite it.
25857  # Note: m4 eats our [], so we need to use [ and ] instead.
25858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25859  if test "x$has_forbidden_chars" != x; then
25860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25862  fi
25863
25864    # Output is in $new_path
25865
25866  windows_path="$new_path"
25867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25868    unix_path=`$CYGPATH -u "$windows_path"`
25869    new_path="$unix_path"
25870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25872    new_path="$unix_path"
25873  fi
25874
25875    # remove trailing .exe if any
25876    new_path="${new_path/%.exe/}"
25877
25878    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25879    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25880  fi
25881
25882  else
25883    # We're on a posix platform. Hooray! :)
25884    # First separate the path from the arguments. This will split at the first
25885    # space.
25886    complete="$OBJCOPY"
25887    path="${complete%% *}"
25888    tmp="$complete EOL"
25889    arguments="${tmp#* }"
25890
25891    new_path=`$WHICH $path 2> /dev/null`
25892    if test "x$new_path" = x; then
25893      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25894      if test "x$is_absolute_path" != x; then
25895        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&5
25896$as_echo "$as_me: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&6;}
25897        new_path="$path"
25898      else
25899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25900$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25901        has_space=`$ECHO "$complete" | $GREP " "`
25902        if test "x$has_space" != x; then
25903          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25904$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25905        fi
25906        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25907      fi
25908    fi
25909  fi
25910
25911  # Now join together the path and the arguments once again
25912  if test "x$arguments" != xEOL; then
25913      new_complete="$new_path ${arguments% *}"
25914  else
25915      new_complete="$new_path"
25916  fi
25917
25918  if test "x$complete" != "x$new_complete"; then
25919    OBJCOPY="$new_complete"
25920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
25921$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
25922  fi
25923
25924    fi
25925fi
25926
25927if test -n "$ac_tool_prefix"; then
25928  for ac_prog in gobjdump objdump
25929  do
25930    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
25931set dummy $ac_tool_prefix$ac_prog; ac_word=$2
25932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25933$as_echo_n "checking for $ac_word... " >&6; }
25934if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
25935  $as_echo_n "(cached) " >&6
25936else
25937  if test -n "$OBJDUMP"; then
25938  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
25939else
25940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25941for as_dir in $PATH
25942do
25943  IFS=$as_save_IFS
25944  test -z "$as_dir" && as_dir=.
25945    for ac_exec_ext in '' $ac_executable_extensions; do
25946  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25947    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
25948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25949    break 2
25950  fi
25951done
25952  done
25953IFS=$as_save_IFS
25954
25955fi
25956fi
25957OBJDUMP=$ac_cv_prog_OBJDUMP
25958if test -n "$OBJDUMP"; then
25959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
25960$as_echo "$OBJDUMP" >&6; }
25961else
25962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25963$as_echo "no" >&6; }
25964fi
25965
25966
25967    test -n "$OBJDUMP" && break
25968  done
25969fi
25970if test -z "$OBJDUMP"; then
25971  ac_ct_OBJDUMP=$OBJDUMP
25972  for ac_prog in gobjdump objdump
25973do
25974  # Extract the first word of "$ac_prog", so it can be a program name with args.
25975set dummy $ac_prog; ac_word=$2
25976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25977$as_echo_n "checking for $ac_word... " >&6; }
25978if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
25979  $as_echo_n "(cached) " >&6
25980else
25981  if test -n "$ac_ct_OBJDUMP"; then
25982  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
25983else
25984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25985for as_dir in $PATH
25986do
25987  IFS=$as_save_IFS
25988  test -z "$as_dir" && as_dir=.
25989    for ac_exec_ext in '' $ac_executable_extensions; do
25990  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25991    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
25992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25993    break 2
25994  fi
25995done
25996  done
25997IFS=$as_save_IFS
25998
25999fi
26000fi
26001ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26002if test -n "$ac_ct_OBJDUMP"; then
26003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26004$as_echo "$ac_ct_OBJDUMP" >&6; }
26005else
26006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26007$as_echo "no" >&6; }
26008fi
26009
26010
26011  test -n "$ac_ct_OBJDUMP" && break
26012done
26013
26014  if test "x$ac_ct_OBJDUMP" = x; then
26015    OBJDUMP=""
26016  else
26017    case $cross_compiling:$ac_tool_warned in
26018yes:)
26019{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26020$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26021ac_tool_warned=yes ;;
26022esac
26023    OBJDUMP=$ac_ct_OBJDUMP
26024  fi
26025fi
26026
26027if test "x$OBJDUMP" != x; then
26028  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26029
26030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26031
26032  # First separate the path from the arguments. This will split at the first
26033  # space.
26034  complete="$OBJDUMP"
26035  path="${complete%% *}"
26036  tmp="$complete EOL"
26037  arguments="${tmp#* }"
26038
26039  # Input might be given as Windows format, start by converting to
26040  # unix format.
26041  new_path=`$CYGPATH -u "$path"`
26042
26043  # Now try to locate executable using which
26044  new_path=`$WHICH "$new_path" 2> /dev/null`
26045  # bat and cmd files are not always considered executable in cygwin causing which
26046  # to not find them
26047  if test "x$new_path" = x \
26048           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26049           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26050    new_path=`$CYGPATH -u "$path"`
26051  fi
26052  if test "x$new_path" = x; then
26053    # Oops. Which didn't find the executable.
26054    # The splitting of arguments from the executable at a space might have been incorrect,
26055    # since paths with space are more likely in Windows. Give it another try with the whole
26056    # argument.
26057    path="$complete"
26058    arguments="EOL"
26059    new_path=`$CYGPATH -u "$path"`
26060    new_path=`$WHICH "$new_path" 2> /dev/null`
26061    # bat and cmd files are not always considered executable in cygwin causing which
26062    # to not find them
26063    if test "x$new_path" = x \
26064             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26065             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26066      new_path=`$CYGPATH -u "$path"`
26067    fi
26068    if test "x$new_path" = x; then
26069      # It's still not found. Now this is an unrecoverable error.
26070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26071$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26072      has_space=`$ECHO "$complete" | $GREP " "`
26073      if test "x$has_space" != x; then
26074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26076      fi
26077      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26078    fi
26079  fi
26080
26081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26084  # "foo.exe" is OK but "foo" is an error.
26085  #
26086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26087  # It is also a way to make sure we got the proper file name for the real test later on.
26088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26089  if test "x$test_shortpath" = x; then
26090    # Short path failed, file does not exist as specified.
26091    # Try adding .exe or .cmd
26092    if test -f "${new_path}.exe"; then
26093       input_to_shortpath="${new_path}.exe"
26094    elif test -f "${new_path}.cmd"; then
26095       input_to_shortpath="${new_path}.cmd"
26096    else
26097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26098$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26099      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26100$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26101      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26102    fi
26103  else
26104    input_to_shortpath="$new_path"
26105  fi
26106
26107  # Call helper function which possibly converts this using DOS-style short mode.
26108  # If so, the updated path is stored in $new_path.
26109  new_path="$input_to_shortpath"
26110
26111  input_path="$input_to_shortpath"
26112  # Check if we need to convert this using DOS-style short mode. If the path
26113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26114  # take no chances and rewrite it.
26115  # Note: m4 eats our [], so we need to use [ and ] instead.
26116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26117  if test "x$has_forbidden_chars" != x; then
26118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26122      # Going to short mode and back again did indeed matter. Since short mode is
26123      # case insensitive, let's make it lowercase to improve readability.
26124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26125      # Now convert it back to Unix-stile (cygpath)
26126      input_path=`$CYGPATH -u "$shortmode_path"`
26127      new_path="$input_path"
26128    fi
26129  fi
26130
26131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26132  if test "x$test_cygdrive_prefix" = x; then
26133    # As a simple fix, exclude /usr/bin since it's not a real path.
26134    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26136      # a path prefixed by /cygdrive for fixpath to work.
26137      new_path="$CYGWIN_ROOT_PATH$input_path"
26138    fi
26139  fi
26140
26141  # remove trailing .exe if any
26142  new_path="${new_path/%.exe/}"
26143
26144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26145
26146  # First separate the path from the arguments. This will split at the first
26147  # space.
26148  complete="$OBJDUMP"
26149  path="${complete%% *}"
26150  tmp="$complete EOL"
26151  arguments="${tmp#* }"
26152
26153  # Input might be given as Windows format, start by converting to
26154  # unix format.
26155  new_path="$path"
26156
26157  windows_path="$new_path"
26158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26159    unix_path=`$CYGPATH -u "$windows_path"`
26160    new_path="$unix_path"
26161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26163    new_path="$unix_path"
26164  fi
26165
26166
26167  # Now try to locate executable using which
26168  new_path=`$WHICH "$new_path" 2> /dev/null`
26169
26170  if test "x$new_path" = x; then
26171    # Oops. Which didn't find the executable.
26172    # The splitting of arguments from the executable at a space might have been incorrect,
26173    # since paths with space are more likely in Windows. Give it another try with the whole
26174    # argument.
26175    path="$complete"
26176    arguments="EOL"
26177    new_path="$path"
26178
26179  windows_path="$new_path"
26180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26181    unix_path=`$CYGPATH -u "$windows_path"`
26182    new_path="$unix_path"
26183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26185    new_path="$unix_path"
26186  fi
26187
26188
26189    new_path=`$WHICH "$new_path" 2> /dev/null`
26190
26191    if test "x$new_path" = x; then
26192      # It's still not found. Now this is an unrecoverable error.
26193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26194$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26195      has_space=`$ECHO "$complete" | $GREP " "`
26196      if test "x$has_space" != x; then
26197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26199      fi
26200      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26201    fi
26202  fi
26203
26204  # Now new_path has a complete unix path to the binary
26205  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26206    # Keep paths in /bin as-is, but remove trailing .exe if any
26207    new_path="${new_path/%.exe/}"
26208    # Do not save /bin paths to all_fixpath_prefixes!
26209  else
26210    # Not in mixed or Windows style, start by that.
26211    new_path=`cmd //c echo $new_path`
26212
26213  input_path="$new_path"
26214  # Check if we need to convert this using DOS-style short mode. If the path
26215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26216  # take no chances and rewrite it.
26217  # Note: m4 eats our [], so we need to use [ and ] instead.
26218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26219  if test "x$has_forbidden_chars" != x; then
26220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26222  fi
26223
26224    # Output is in $new_path
26225
26226  windows_path="$new_path"
26227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26228    unix_path=`$CYGPATH -u "$windows_path"`
26229    new_path="$unix_path"
26230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26232    new_path="$unix_path"
26233  fi
26234
26235    # remove trailing .exe if any
26236    new_path="${new_path/%.exe/}"
26237
26238    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26239    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26240  fi
26241
26242  else
26243    # We're on a posix platform. Hooray! :)
26244    # First separate the path from the arguments. This will split at the first
26245    # space.
26246    complete="$OBJDUMP"
26247    path="${complete%% *}"
26248    tmp="$complete EOL"
26249    arguments="${tmp#* }"
26250
26251    new_path=`$WHICH $path 2> /dev/null`
26252    if test "x$new_path" = x; then
26253      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26254      if test "x$is_absolute_path" != x; then
26255        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&5
26256$as_echo "$as_me: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&6;}
26257        new_path="$path"
26258      else
26259        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26260$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26261        has_space=`$ECHO "$complete" | $GREP " "`
26262        if test "x$has_space" != x; then
26263          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26264$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26265        fi
26266        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26267      fi
26268    fi
26269  fi
26270
26271  # Now join together the path and the arguments once again
26272  if test "x$arguments" != xEOL; then
26273      new_complete="$new_path ${arguments% *}"
26274  else
26275      new_complete="$new_path"
26276  fi
26277
26278  if test "x$complete" != "x$new_complete"; then
26279    OBJDUMP="$new_complete"
26280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26281$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26282  fi
26283
26284fi
26285
26286if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26287   # Extract the first word of "lipo", so it can be a program name with args.
26288set dummy lipo; ac_word=$2
26289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26290$as_echo_n "checking for $ac_word... " >&6; }
26291if test "${ac_cv_path_LIPO+set}" = set; then :
26292  $as_echo_n "(cached) " >&6
26293else
26294  case $LIPO in
26295  [\\/]* | ?:[\\/]*)
26296  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26297  ;;
26298  *)
26299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26300for as_dir in $PATH
26301do
26302  IFS=$as_save_IFS
26303  test -z "$as_dir" && as_dir=.
26304    for ac_exec_ext in '' $ac_executable_extensions; do
26305  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26306    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26308    break 2
26309  fi
26310done
26311  done
26312IFS=$as_save_IFS
26313
26314  ;;
26315esac
26316fi
26317LIPO=$ac_cv_path_LIPO
26318if test -n "$LIPO"; then
26319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
26320$as_echo "$LIPO" >&6; }
26321else
26322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26323$as_echo "no" >&6; }
26324fi
26325
26326
26327
26328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26329
26330  # First separate the path from the arguments. This will split at the first
26331  # space.
26332  complete="$LIPO"
26333  path="${complete%% *}"
26334  tmp="$complete EOL"
26335  arguments="${tmp#* }"
26336
26337  # Input might be given as Windows format, start by converting to
26338  # unix format.
26339  new_path=`$CYGPATH -u "$path"`
26340
26341  # Now try to locate executable using which
26342  new_path=`$WHICH "$new_path" 2> /dev/null`
26343  # bat and cmd files are not always considered executable in cygwin causing which
26344  # to not find them
26345  if test "x$new_path" = x \
26346           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26347           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26348    new_path=`$CYGPATH -u "$path"`
26349  fi
26350  if test "x$new_path" = x; then
26351    # Oops. Which didn't find the executable.
26352    # The splitting of arguments from the executable at a space might have been incorrect,
26353    # since paths with space are more likely in Windows. Give it another try with the whole
26354    # argument.
26355    path="$complete"
26356    arguments="EOL"
26357    new_path=`$CYGPATH -u "$path"`
26358    new_path=`$WHICH "$new_path" 2> /dev/null`
26359    # bat and cmd files are not always considered executable in cygwin causing which
26360    # to not find them
26361    if test "x$new_path" = x \
26362             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26363             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26364      new_path=`$CYGPATH -u "$path"`
26365    fi
26366    if test "x$new_path" = x; then
26367      # It's still not found. Now this is an unrecoverable error.
26368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26369$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26370      has_space=`$ECHO "$complete" | $GREP " "`
26371      if test "x$has_space" != x; then
26372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26374      fi
26375      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26376    fi
26377  fi
26378
26379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26382  # "foo.exe" is OK but "foo" is an error.
26383  #
26384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26385  # It is also a way to make sure we got the proper file name for the real test later on.
26386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26387  if test "x$test_shortpath" = x; then
26388    # Short path failed, file does not exist as specified.
26389    # Try adding .exe or .cmd
26390    if test -f "${new_path}.exe"; then
26391       input_to_shortpath="${new_path}.exe"
26392    elif test -f "${new_path}.cmd"; then
26393       input_to_shortpath="${new_path}.cmd"
26394    else
26395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
26396$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
26397      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26398$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26399      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26400    fi
26401  else
26402    input_to_shortpath="$new_path"
26403  fi
26404
26405  # Call helper function which possibly converts this using DOS-style short mode.
26406  # If so, the updated path is stored in $new_path.
26407  new_path="$input_to_shortpath"
26408
26409  input_path="$input_to_shortpath"
26410  # Check if we need to convert this using DOS-style short mode. If the path
26411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26412  # take no chances and rewrite it.
26413  # Note: m4 eats our [], so we need to use [ and ] instead.
26414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26415  if test "x$has_forbidden_chars" != x; then
26416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26420      # Going to short mode and back again did indeed matter. Since short mode is
26421      # case insensitive, let's make it lowercase to improve readability.
26422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26423      # Now convert it back to Unix-stile (cygpath)
26424      input_path=`$CYGPATH -u "$shortmode_path"`
26425      new_path="$input_path"
26426    fi
26427  fi
26428
26429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26430  if test "x$test_cygdrive_prefix" = x; then
26431    # As a simple fix, exclude /usr/bin since it's not a real path.
26432    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26434      # a path prefixed by /cygdrive for fixpath to work.
26435      new_path="$CYGWIN_ROOT_PATH$input_path"
26436    fi
26437  fi
26438
26439  # remove trailing .exe if any
26440  new_path="${new_path/%.exe/}"
26441
26442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26443
26444  # First separate the path from the arguments. This will split at the first
26445  # space.
26446  complete="$LIPO"
26447  path="${complete%% *}"
26448  tmp="$complete EOL"
26449  arguments="${tmp#* }"
26450
26451  # Input might be given as Windows format, start by converting to
26452  # unix format.
26453  new_path="$path"
26454
26455  windows_path="$new_path"
26456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26457    unix_path=`$CYGPATH -u "$windows_path"`
26458    new_path="$unix_path"
26459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26461    new_path="$unix_path"
26462  fi
26463
26464
26465  # Now try to locate executable using which
26466  new_path=`$WHICH "$new_path" 2> /dev/null`
26467
26468  if test "x$new_path" = x; then
26469    # Oops. Which didn't find the executable.
26470    # The splitting of arguments from the executable at a space might have been incorrect,
26471    # since paths with space are more likely in Windows. Give it another try with the whole
26472    # argument.
26473    path="$complete"
26474    arguments="EOL"
26475    new_path="$path"
26476
26477  windows_path="$new_path"
26478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26479    unix_path=`$CYGPATH -u "$windows_path"`
26480    new_path="$unix_path"
26481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26483    new_path="$unix_path"
26484  fi
26485
26486
26487    new_path=`$WHICH "$new_path" 2> /dev/null`
26488
26489    if test "x$new_path" = x; then
26490      # It's still not found. Now this is an unrecoverable error.
26491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26492$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26493      has_space=`$ECHO "$complete" | $GREP " "`
26494      if test "x$has_space" != x; then
26495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26497      fi
26498      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26499    fi
26500  fi
26501
26502  # Now new_path has a complete unix path to the binary
26503  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26504    # Keep paths in /bin as-is, but remove trailing .exe if any
26505    new_path="${new_path/%.exe/}"
26506    # Do not save /bin paths to all_fixpath_prefixes!
26507  else
26508    # Not in mixed or Windows style, start by that.
26509    new_path=`cmd //c echo $new_path`
26510
26511  input_path="$new_path"
26512  # Check if we need to convert this using DOS-style short mode. If the path
26513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26514  # take no chances and rewrite it.
26515  # Note: m4 eats our [], so we need to use [ and ] instead.
26516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26517  if test "x$has_forbidden_chars" != x; then
26518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26520  fi
26521
26522    # Output is in $new_path
26523
26524  windows_path="$new_path"
26525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26526    unix_path=`$CYGPATH -u "$windows_path"`
26527    new_path="$unix_path"
26528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26530    new_path="$unix_path"
26531  fi
26532
26533    # remove trailing .exe if any
26534    new_path="${new_path/%.exe/}"
26535
26536    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26537    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26538  fi
26539
26540  else
26541    # We're on a posix platform. Hooray! :)
26542    # First separate the path from the arguments. This will split at the first
26543    # space.
26544    complete="$LIPO"
26545    path="${complete%% *}"
26546    tmp="$complete EOL"
26547    arguments="${tmp#* }"
26548
26549    new_path=`$WHICH $path 2> /dev/null`
26550    if test "x$new_path" = x; then
26551      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26552      if test "x$is_absolute_path" != x; then
26553        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&5
26554$as_echo "$as_me: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&6;}
26555        new_path="$path"
26556      else
26557        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26558$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26559        has_space=`$ECHO "$complete" | $GREP " "`
26560        if test "x$has_space" != x; then
26561          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26562$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26563        fi
26564        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26565      fi
26566    fi
26567  fi
26568
26569  # Now join together the path and the arguments once again
26570  if test "x$arguments" != xEOL; then
26571      new_complete="$new_path ${arguments% *}"
26572  else
26573      new_complete="$new_path"
26574  fi
26575
26576  if test "x$complete" != "x$new_complete"; then
26577    LIPO="$new_complete"
26578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
26579$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
26580  fi
26581
26582fi
26583
26584# Restore old path without tools dir
26585PATH="$OLD_PATH"
26586
26587
26588# FIXME: Currently we must test this after paths but before flags. Fix!
26589
26590# And we can test some aspects on the target using configure macros.
26591
26592
26593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
26594$as_echo_n "checking for ANSI C header files... " >&6; }
26595if test "${ac_cv_header_stdc+set}" = set; then :
26596  $as_echo_n "(cached) " >&6
26597else
26598  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26599/* end confdefs.h.  */
26600#include <stdlib.h>
26601#include <stdarg.h>
26602#include <string.h>
26603#include <float.h>
26604
26605int
26606main ()
26607{
26608
26609  ;
26610  return 0;
26611}
26612_ACEOF
26613if ac_fn_cxx_try_compile "$LINENO"; then :
26614  ac_cv_header_stdc=yes
26615else
26616  ac_cv_header_stdc=no
26617fi
26618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26619
26620if test $ac_cv_header_stdc = yes; then
26621  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
26622  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26623/* end confdefs.h.  */
26624#include <string.h>
26625
26626_ACEOF
26627if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26628  $EGREP "memchr" >/dev/null 2>&1; then :
26629
26630else
26631  ac_cv_header_stdc=no
26632fi
26633rm -f conftest*
26634
26635fi
26636
26637if test $ac_cv_header_stdc = yes; then
26638  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
26639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26640/* end confdefs.h.  */
26641#include <stdlib.h>
26642
26643_ACEOF
26644if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26645  $EGREP "free" >/dev/null 2>&1; then :
26646
26647else
26648  ac_cv_header_stdc=no
26649fi
26650rm -f conftest*
26651
26652fi
26653
26654if test $ac_cv_header_stdc = yes; then
26655  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
26656  if test "$cross_compiling" = yes; then :
26657  :
26658else
26659  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26660/* end confdefs.h.  */
26661#include <ctype.h>
26662#include <stdlib.h>
26663#if ((' ' & 0x0FF) == 0x020)
26664# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
26665# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
26666#else
26667# define ISLOWER(c) \
26668		   (('a' <= (c) && (c) <= 'i') \
26669		     || ('j' <= (c) && (c) <= 'r') \
26670		     || ('s' <= (c) && (c) <= 'z'))
26671# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
26672#endif
26673
26674#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
26675int
26676main ()
26677{
26678  int i;
26679  for (i = 0; i < 256; i++)
26680    if (XOR (islower (i), ISLOWER (i))
26681	|| toupper (i) != TOUPPER (i))
26682      return 2;
26683  return 0;
26684}
26685_ACEOF
26686if ac_fn_cxx_try_run "$LINENO"; then :
26687
26688else
26689  ac_cv_header_stdc=no
26690fi
26691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26692  conftest.$ac_objext conftest.beam conftest.$ac_ext
26693fi
26694
26695fi
26696fi
26697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
26698$as_echo "$ac_cv_header_stdc" >&6; }
26699if test $ac_cv_header_stdc = yes; then
26700
26701$as_echo "#define STDC_HEADERS 1" >>confdefs.h
26702
26703fi
26704
26705# On IRIX 5.3, sys/types and inttypes.h are conflicting.
26706for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
26707		  inttypes.h stdint.h unistd.h
26708do :
26709  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26710ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
26711"
26712if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26713  cat >>confdefs.h <<_ACEOF
26714#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26715_ACEOF
26716
26717fi
26718
26719done
26720
26721
26722
26723###############################################################################
26724#
26725# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
26726# (The JVM can use 32 or 64 bit Java pointers but that decision
26727# is made at runtime.)
26728#
26729if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26730  # Always specify -m flags on Solaris
26731
26732  # keep track of c/cxx flags that we added outselves...
26733  #   to prevent emitting warning...
26734  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26735  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26736  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26737
26738  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
26739  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
26740  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
26741
26742  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
26743  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
26744  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
26745
26746elif test "x$COMPILE_TYPE" = xreduced; then
26747  if test "x$OPENJDK_TARGET_OS" != xwindows; then
26748    # Specify -m if running reduced on other Posix platforms
26749
26750  # keep track of c/cxx flags that we added outselves...
26751  #   to prevent emitting warning...
26752  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26753  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26754  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26755
26756  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
26757  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
26758  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
26759
26760  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
26761  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
26762  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
26763
26764  fi
26765fi
26766
26767# Make compilation sanity check
26768for ac_header in stdio.h
26769do :
26770  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
26771if test "x$ac_cv_header_stdio_h" = x""yes; then :
26772  cat >>confdefs.h <<_ACEOF
26773#define HAVE_STDIO_H 1
26774_ACEOF
26775
26776else
26777
26778  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
26779$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
26780  if test "x$COMPILE_TYPE" = xreduced; then
26781    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
26782$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
26783  elif test "x$COMPILE_TYPE" = xcross; then
26784    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
26785$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
26786  fi
26787  as_fn_error $? "Cannot continue." "$LINENO" 5
26788
26789fi
26790
26791done
26792
26793
26794# The cast to long int works around a bug in the HP C Compiler
26795# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
26796# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
26797# This bug is HP SR number 8606223364.
26798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
26799$as_echo_n "checking size of int *... " >&6; }
26800if test "${ac_cv_sizeof_int_p+set}" = set; then :
26801  $as_echo_n "(cached) " >&6
26802else
26803  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
26804
26805else
26806  if test "$ac_cv_type_int_p" = yes; then
26807     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
26808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26809as_fn_error 77 "cannot compute sizeof (int *)
26810See \`config.log' for more details" "$LINENO" 5 ; }
26811   else
26812     ac_cv_sizeof_int_p=0
26813   fi
26814fi
26815
26816fi
26817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
26818$as_echo "$ac_cv_sizeof_int_p" >&6; }
26819
26820
26821
26822cat >>confdefs.h <<_ACEOF
26823#define SIZEOF_INT_P $ac_cv_sizeof_int_p
26824_ACEOF
26825
26826
26827
26828if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
26829  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
26830  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
26831fi
26832
26833if test "x$SIZEOF_INT_P" = x; then
26834    # The test failed, lets stick to the assumed value.
26835    { $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
26836$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
26837else
26838    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
26839
26840    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
26841        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
26842    fi
26843fi
26844
26845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
26846$as_echo_n "checking for target address size... " >&6; }
26847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
26848$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
26849
26850
26851###############################################################################
26852#
26853# Is the target little of big endian?
26854#
26855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
26856$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
26857if test "${ac_cv_c_bigendian+set}" = set; then :
26858  $as_echo_n "(cached) " >&6
26859else
26860  ac_cv_c_bigendian=unknown
26861    # See if we're dealing with a universal compiler.
26862    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26863/* end confdefs.h.  */
26864#ifndef __APPLE_CC__
26865	       not a universal capable compiler
26866	     #endif
26867	     typedef int dummy;
26868
26869_ACEOF
26870if ac_fn_cxx_try_compile "$LINENO"; then :
26871
26872	# Check for potential -arch flags.  It is not universal unless
26873	# there are at least two -arch flags with different values.
26874	ac_arch=
26875	ac_prev=
26876	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
26877	 if test -n "$ac_prev"; then
26878	   case $ac_word in
26879	     i?86 | x86_64 | ppc | ppc64)
26880	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
26881		 ac_arch=$ac_word
26882	       else
26883		 ac_cv_c_bigendian=universal
26884		 break
26885	       fi
26886	       ;;
26887	   esac
26888	   ac_prev=
26889	 elif test "x$ac_word" = "x-arch"; then
26890	   ac_prev=arch
26891	 fi
26892       done
26893fi
26894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26895    if test $ac_cv_c_bigendian = unknown; then
26896      # See if sys/param.h defines the BYTE_ORDER macro.
26897      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26898/* end confdefs.h.  */
26899#include <sys/types.h>
26900	     #include <sys/param.h>
26901
26902int
26903main ()
26904{
26905#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
26906		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
26907		     && LITTLE_ENDIAN)
26908	      bogus endian macros
26909	     #endif
26910
26911  ;
26912  return 0;
26913}
26914_ACEOF
26915if ac_fn_cxx_try_compile "$LINENO"; then :
26916  # It does; now see whether it defined to BIG_ENDIAN or not.
26917	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26918/* end confdefs.h.  */
26919#include <sys/types.h>
26920		#include <sys/param.h>
26921
26922int
26923main ()
26924{
26925#if BYTE_ORDER != BIG_ENDIAN
26926		 not big endian
26927		#endif
26928
26929  ;
26930  return 0;
26931}
26932_ACEOF
26933if ac_fn_cxx_try_compile "$LINENO"; then :
26934  ac_cv_c_bigendian=yes
26935else
26936  ac_cv_c_bigendian=no
26937fi
26938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26939fi
26940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26941    fi
26942    if test $ac_cv_c_bigendian = unknown; then
26943      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
26944      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26945/* end confdefs.h.  */
26946#include <limits.h>
26947
26948int
26949main ()
26950{
26951#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
26952	      bogus endian macros
26953	     #endif
26954
26955  ;
26956  return 0;
26957}
26958_ACEOF
26959if ac_fn_cxx_try_compile "$LINENO"; then :
26960  # It does; now see whether it defined to _BIG_ENDIAN or not.
26961	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26962/* end confdefs.h.  */
26963#include <limits.h>
26964
26965int
26966main ()
26967{
26968#ifndef _BIG_ENDIAN
26969		 not big endian
26970		#endif
26971
26972  ;
26973  return 0;
26974}
26975_ACEOF
26976if ac_fn_cxx_try_compile "$LINENO"; then :
26977  ac_cv_c_bigendian=yes
26978else
26979  ac_cv_c_bigendian=no
26980fi
26981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26982fi
26983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26984    fi
26985    if test $ac_cv_c_bigendian = unknown; then
26986      # Compile a test program.
26987      if test "$cross_compiling" = yes; then :
26988  # Try to guess by grepping values from an object file.
26989	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26990/* end confdefs.h.  */
26991short int ascii_mm[] =
26992		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
26993		short int ascii_ii[] =
26994		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
26995		int use_ascii (int i) {
26996		  return ascii_mm[i] + ascii_ii[i];
26997		}
26998		short int ebcdic_ii[] =
26999		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27000		short int ebcdic_mm[] =
27001		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27002		int use_ebcdic (int i) {
27003		  return ebcdic_mm[i] + ebcdic_ii[i];
27004		}
27005		extern int foo;
27006
27007int
27008main ()
27009{
27010return use_ascii (foo) == use_ebcdic (foo);
27011  ;
27012  return 0;
27013}
27014_ACEOF
27015if ac_fn_cxx_try_compile "$LINENO"; then :
27016  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27017	      ac_cv_c_bigendian=yes
27018	    fi
27019	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27020	      if test "$ac_cv_c_bigendian" = unknown; then
27021		ac_cv_c_bigendian=no
27022	      else
27023		# finding both strings is unlikely to happen, but who knows?
27024		ac_cv_c_bigendian=unknown
27025	      fi
27026	    fi
27027fi
27028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27029else
27030  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27031/* end confdefs.h.  */
27032$ac_includes_default
27033int
27034main ()
27035{
27036
27037	     /* Are we little or big endian?  From Harbison&Steele.  */
27038	     union
27039	     {
27040	       long int l;
27041	       char c[sizeof (long int)];
27042	     } u;
27043	     u.l = 1;
27044	     return u.c[sizeof (long int) - 1] == 1;
27045
27046  ;
27047  return 0;
27048}
27049_ACEOF
27050if ac_fn_cxx_try_run "$LINENO"; then :
27051  ac_cv_c_bigendian=no
27052else
27053  ac_cv_c_bigendian=yes
27054fi
27055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27056  conftest.$ac_objext conftest.beam conftest.$ac_ext
27057fi
27058
27059    fi
27060fi
27061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27062$as_echo "$ac_cv_c_bigendian" >&6; }
27063 case $ac_cv_c_bigendian in #(
27064   yes)
27065     ENDIAN="big";; #(
27066   no)
27067     ENDIAN="little" ;; #(
27068   universal)
27069     ENDIAN="universal_endianness"
27070     ;; #(
27071   *)
27072     ENDIAN="unknown" ;;
27073 esac
27074
27075
27076if test "x$ENDIAN" = xuniversal_endianness; then
27077    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27078fi
27079if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27080    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
27081fi
27082
27083
27084# Configure flags for the tools
27085
27086
27087###############################################################################
27088#
27089# How to compile shared libraries.
27090#
27091
27092if test "x$GCC" = xyes; then
27093    COMPILER_NAME=gcc
27094    PICFLAG="-fPIC"
27095    LIBRARY_PREFIX=lib
27096    SHARED_LIBRARY='lib$1.so'
27097    STATIC_LIBRARY='lib$1.a'
27098    SHARED_LIBRARY_FLAGS="-shared"
27099    SHARED_LIBRARY_SUFFIX='.so'
27100    STATIC_LIBRARY_SUFFIX='.a'
27101    OBJ_SUFFIX='.o'
27102    EXE_SUFFIX=''
27103    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27104    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27105    C_FLAG_REORDER=''
27106    CXX_FLAG_REORDER=''
27107    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27108    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27109    LD="$CC"
27110    LDEXE="$CC"
27111    LDCXX="$CXX"
27112    LDEXECXX="$CXX"
27113    POST_STRIP_CMD="$STRIP -g"
27114
27115    # Linking is different on MacOSX
27116    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27117        # Might change in the future to clang.
27118        COMPILER_NAME=gcc
27119        SHARED_LIBRARY='lib$1.dylib'
27120        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27121        SHARED_LIBRARY_SUFFIX='.dylib'
27122        EXE_SUFFIX=''
27123        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27124        SET_SHARED_LIBRARY_MAPFILE=''
27125        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27126        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27127        POST_STRIP_CMD="$STRIP -S"
27128    fi
27129else
27130    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27131        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27132        COMPILER_NAME=ossc
27133        PICFLAG="-KPIC"
27134        LIBRARY_PREFIX=lib
27135        SHARED_LIBRARY='lib$1.so'
27136        STATIC_LIBRARY='lib$1.a'
27137        SHARED_LIBRARY_FLAGS="-G"
27138        SHARED_LIBRARY_SUFFIX='.so'
27139        STATIC_LIBRARY_SUFFIX='.a'
27140        OBJ_SUFFIX='.o'
27141        EXE_SUFFIX=''
27142        SET_SHARED_LIBRARY_NAME=''
27143        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27144	C_FLAG_REORDER='-xF'
27145	CXX_FLAG_REORDER='-xF'
27146        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27147        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27148        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27149        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27150        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27151        POST_STRIP_CMD="$STRIP -x"
27152        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27153    fi
27154    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27155        # If it is not gcc, then assume it is the MS Visual Studio compiler
27156        COMPILER_NAME=cl
27157        PICFLAG=""
27158        LIBRARY_PREFIX=
27159        SHARED_LIBRARY='$1.dll'
27160        STATIC_LIBRARY='$1.lib'
27161        SHARED_LIBRARY_FLAGS="-LD"
27162        SHARED_LIBRARY_SUFFIX='.dll'
27163        STATIC_LIBRARY_SUFFIX='.lib'
27164        OBJ_SUFFIX='.obj'
27165        EXE_SUFFIX='.exe'
27166        SET_SHARED_LIBRARY_NAME=''
27167        SET_SHARED_LIBRARY_MAPFILE=''
27168        SET_SHARED_LIBRARY_ORIGIN=''
27169        SET_EXECUTABLE_ORIGIN=''
27170    fi
27171fi
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189
27190# The (cross) compiler is now configured, we can now test capabilities
27191# of the target platform.
27192
27193
27194
27195###############################################################################
27196#
27197# Setup the opt flags for different compilers
27198# and different operating systems.
27199#
27200
27201#
27202# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27203#
27204if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27205    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27206    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27207    CFLAGS="$CFLAGS -mstackrealign"
27208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27209$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27210    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27211/* end confdefs.h.  */
27212int main() { return 0; }
27213_ACEOF
27214if ac_fn_cxx_try_link "$LINENO"; then :
27215
27216		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27217$as_echo "yes" >&6; }
27218
27219else
27220
27221		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27222$as_echo "no" >&6; }
27223	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27224
27225fi
27226rm -f core conftest.err conftest.$ac_objext \
27227    conftest$ac_exeext conftest.$ac_ext
27228fi
27229
27230C_FLAG_DEPS="-MMD -MF"
27231CXX_FLAG_DEPS="-MMD -MF"
27232
27233case $COMPILER_TYPE in
27234  CC )
27235    D_FLAG="-g"
27236    case $COMPILER_NAME in
27237      gcc )
27238      	case $OPENJDK_TARGET_OS in
27239	  macosx )
27240	    # On MacOSX we optimize for size, something
27241	    # we should do for all platforms?
27242	    C_O_FLAG_HI="-Os"
27243	    C_O_FLAG_NORM="-Os"
27244	    C_O_FLAG_NONE=""
27245	    ;;
27246	  *)
27247	    C_O_FLAG_HI="-O3"
27248	    C_O_FLAG_NORM="-O2"
27249	    C_O_FLAG_NONE="-O0"
27250	    CFLAGS_DEBUG_SYMBOLS="-g"
27251	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27252	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27253	       CFLAGS_DEBUG_SYMBOLS="-g1"
27254	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27255	    fi
27256	    ;;
27257	esac
27258        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27259        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27260        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27261        ;;
27262      ossc )
27263        #
27264        # Forte has different names for this with their C++ compiler...
27265        #
27266        C_FLAG_DEPS="-xMMD -xMF"
27267        CXX_FLAG_DEPS="-xMMD -xMF"
27268
27269        # Extra options used with HIGHEST
27270        #
27271        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27272        #          done with care, there are some assumptions below that need to
27273        #          be understood about the use of pointers, and IEEE behavior.
27274        #
27275        # Use non-standard floating point mode (not IEEE 754)
27276        CC_HIGHEST="$CC_HIGHEST -fns"
27277        # Do some simplification of floating point arithmetic (not IEEE 754)
27278        CC_HIGHEST="$CC_HIGHEST -fsimple"
27279        # Use single precision floating point with 'float'
27280        CC_HIGHEST="$CC_HIGHEST -fsingle"
27281        # Assume memory references via basic pointer types do not alias
27282        #   (Source with excessing pointer casting and data access with mixed
27283        #    pointer types are not recommended)
27284        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
27285        # Use intrinsic or inline versions for math/std functions
27286        #   (If you expect perfect errno behavior, do not use this)
27287        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
27288        # Loop data dependency optimizations (need -xO3 or higher)
27289        CC_HIGHEST="$CC_HIGHEST -xdepend"
27290        # Pointer parameters to functions do not overlap
27291        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
27292        #    If you pass in multiple pointers to the same data, do not use this)
27293        CC_HIGHEST="$CC_HIGHEST -xrestrict"
27294        # Inline some library routines
27295        #   (If you expect perfect errno behavior, do not use this)
27296        CC_HIGHEST="$CC_HIGHEST -xlibmil"
27297        # Use optimized math routines
27298        #   (If you expect perfect errno behavior, do not use this)
27299        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
27300        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
27301
27302        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
27303          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
27304          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
27305        fi
27306
27307        case $OPENJDK_TARGET_CPU_ARCH in
27308          x86)
27309            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
27310            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
27311            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
27312            C_O_FLAG_NONE="-xregs=no%frameptr"
27313            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
27314            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
27315            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
27316            CXX_O_FLAG_NONE="-xregs=no%frameptr"
27317            if test "x$OPENJDK_TARGET_CPU" = xx86; then
27318               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
27319               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
27320            fi
27321            ;;
27322          sparc)
27323            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27324            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27325            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27326            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27327            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27328            C_O_FLAG_NONE=""
27329            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27330            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27331            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27332            CXX_O_FLAG_NONE=""
27333            ;;
27334        esac
27335
27336    CFLAGS_DEBUG_SYMBOLS="-g -xs"
27337    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
27338    esac
27339    ;;
27340  CL )
27341    D_FLAG=
27342    C_O_FLAG_HIGHEST="-O2"
27343    C_O_FLAG_HI="-O1"
27344    C_O_FLAG_NORM="-O1"
27345    C_O_FLAG_NONE="-Od"
27346    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
27347    CXX_O_FLAG_HI="$C_O_FLAG_HI"
27348    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27349    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27350    ;;
27351esac
27352
27353if test -z "$C_O_FLAG_HIGHEST"; then
27354   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
27355fi
27356
27357if test -z "$CXX_O_FLAG_HIGHEST"; then
27358   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
27359fi
27360
27361
27362
27363
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
27375   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
27376$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
27377fi
27378
27379if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
27380   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
27381$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
27382fi
27383
27384if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
27385   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
27386$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
27387fi
27388
27389
27390# Check whether --with-extra-cflags was given.
27391if test "${with_extra_cflags+set}" = set; then :
27392  withval=$with_extra_cflags;
27393fi
27394
27395
27396
27397# Check whether --with-extra-cxxflags was given.
27398if test "${with_extra_cxxflags+set}" = set; then :
27399  withval=$with_extra_cxxflags;
27400fi
27401
27402
27403
27404# Check whether --with-extra-ldflags was given.
27405if test "${with_extra_ldflags+set}" = set; then :
27406  withval=$with_extra_ldflags;
27407fi
27408
27409
27410CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
27411CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
27412LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
27413
27414# Hotspot needs these set in their legacy form
27415LEGACY_EXTRA_CFLAGS=$with_extra_cflags
27416LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
27417LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
27418
27419
27420
27421
27422
27423###############################################################################
27424#
27425# Now setup the CFLAGS and LDFLAGS for the JDK build.
27426# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
27427#
27428case $COMPILER_NAME in
27429      gcc )
27430      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
27431                          -pipe \
27432                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
27433	  case $OPENJDK_TARGET_CPU_ARCH in
27434	  arm )
27435            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
27436	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27437	  ;;
27438	  ppc )
27439            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
27440	  ;;
27441	  * )
27442	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
27443	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27444          ;;
27445	  esac
27446          ;;
27447      ossc )
27448          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
27449          case $OPENJDK_TARGET_CPU_ARCH in
27450          x86 )
27451            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
27452       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
27453          ;;
27454          esac
27455
27456      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
27457      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
27458
27459          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
27460          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
27461          ;;
27462      cl )
27463          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
27464               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
27465	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
27466	       -DWIN32 -DIAL"
27467          case $OPENJDK_TARGET_CPU in
27468              x86 )
27469                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
27470                  ;;
27471              x86_64 )
27472                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
27473                  ;;
27474          esac
27475          ;;
27476esac
27477
27478###############################################################################
27479
27480CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
27481
27482# The package path is used only on macosx?
27483PACKAGE_PATH=/opt/local
27484
27485
27486if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
27487    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
27488    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
27489    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
27490    #   Note: -Dmacro         is the same as    #define macro 1
27491    #         -Dmacro=	    is the same as    #define macro
27492    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27493        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
27494    else
27495        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
27496    fi
27497else
27498    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
27499fi
27500if test "x$OPENJDK_TARGET_OS" = xlinux; then
27501    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
27502fi
27503if test "x$OPENJDK_TARGET_OS" = xwindows; then
27504    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
27505fi
27506if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27507    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
27508fi
27509if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27510    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
27511fi
27512if test "x$OPENJDK_TARGET_OS" = xbsd; then
27513    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
27514fi
27515if test "x$DEBUG_LEVEL" = xrelease; then
27516    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
27517    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27518        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
27519    fi
27520else
27521    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
27522fi
27523
27524CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
27525CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
27526
27527CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
27528        -I${JDK_OUTPUTDIR}/include \
27529        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
27530        -I${JDK_TOPDIR}/src/share/javavm/export \
27531        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
27532        -I${JDK_TOPDIR}/src/share/native/common \
27533        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
27534
27535# The shared libraries are compiled using the picflag.
27536CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
27537CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
27538
27539# Executable flags
27540CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
27541CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
27542
27543# Now this is odd. The JDK native libraries have to link against libjvm.so
27544# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
27545# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
27546# is identical for client and server? Yes. Which is picked at runtime (client or server)?
27547# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
27548# libraries will link to whatever is in memory. Yuck.
27549#
27550# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
27551if test "x$COMPILER_NAME" = xcl; then
27552    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
27553    if test "x$OPENJDK_TARGET_CPU" = xx86; then
27554        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
27555    fi
27556    # TODO: make -debug optional "--disable-full-debug-symbols"
27557    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
27558    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
27559    LDFLAGS_JDKLIB_SUFFIX=""
27560    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
27561        LDFLAGS_STACK_SIZE=1048576
27562    else
27563        LDFLAGS_STACK_SIZE=327680
27564    fi
27565    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
27566else
27567    if test "x$COMPILER_NAME" = xgcc; then
27568        # If this is a --hash-style=gnu system, use --hash-style=both, why?
27569        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
27570        if test -n "$HAS_GNU_HASH"; then
27571            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
27572        fi
27573        if test "x$OPENJDK_TARGET_OS" = xlinux; then
27574          # And since we now know that the linker is gnu, then add -z defs, to forbid
27575          # undefined symbols in object files.
27576          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
27577          if test "x$DEBUG_LEVEL" = "xrelease"; then
27578              # When building release libraries, tell the linker optimize them.
27579              # Should this be supplied to the OSS linker as well?
27580              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
27581          fi
27582        fi
27583    fi
27584    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
27585                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
27586
27587    # On some platforms (mac) the linker warns about non existing -L dirs.
27588    # Add server first if available. Linking aginst client does not always produce the same results.
27589    # Only add client dir if client is being built. Default to server for other variants.
27590    if test "x$JVM_VARIANT_SERVER" = xtrue; then
27591        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
27592    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
27593        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
27594    else
27595        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
27596    fi
27597
27598    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
27599    if test "x$COMPILER_NAME" = xossc; then
27600        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
27601    fi
27602
27603    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
27604    if test "x$OPENJDK_TARGET_OS" = xlinux; then
27605        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
27606    fi
27607fi
27608
27609# Adjust flags according to debug level.
27610case $DEBUG_LEVEL in
27611      fastdebug )
27612              CFLAGS="$CFLAGS $D_FLAG"
27613              JAVAC_FLAGS="$JAVAC_FLAGS -g"
27614              ;;
27615      slowdebug )
27616              CFLAGS="$CFLAGS $D_FLAG"
27617	      C_O_FLAG_HI="$C_O_FLAG_NONE"
27618	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
27619	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
27620	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
27621              JAVAC_FLAGS="$JAVAC_FLAGS -g"
27622              ;;
27623esac
27624
27625
27626
27627
27628
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639# Setup debug symbols (need objcopy from the toolchain for that)
27640
27641#
27642# ENABLE_DEBUG_SYMBOLS
27643# This must be done after the toolchain is setup, since we're looking at objcopy.
27644#
27645ENABLE_DEBUG_SYMBOLS=default
27646
27647# default on macosx is no...
27648if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27649   ENABLE_DEBUG_SYMBOLS=no
27650fi
27651
27652# Check whether --enable-debug-symbols was given.
27653if test "${enable_debug_symbols+set}" = set; then :
27654  enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}
27655fi
27656
27657
27658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
27659$as_echo_n "checking if we should generate debug symbols... " >&6; }
27660
27661if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
27662   # explicit enabling of enable-debug-symbols and can't find objcopy
27663   #   this is an error
27664   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
27665fi
27666
27667if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
27668  # Default is on if objcopy is found, otherwise off
27669  if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
27670     ENABLE_DEBUG_SYMBOLS=yes
27671  else
27672     ENABLE_DEBUG_SYMBOLS=no
27673  fi
27674fi
27675
27676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
27677$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
27678
27679#
27680# ZIP_DEBUGINFO_FILES
27681#
27682ZIP_DEBUGINFO_FILES=yes
27683
27684# Check whether --enable-zip-debug-info was given.
27685if test "${enable_zip_debug_info+set}" = set; then :
27686  enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}
27687fi
27688
27689
27690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
27691$as_echo_n "checking if we should zip debug-info files... " >&6; }
27692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP_DEBUGINFO_FILES" >&5
27693$as_echo "$ZIP_DEBUGINFO_FILES" >&6; }
27694
27695# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
27696#   use that...
27697if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
27698   ZIP_DEBUGINFO_FILES=1
27699else
27700   ZIP_DEBUGINFO_FILES=0
27701fi
27702
27703
27704
27705
27706
27707
27708
27709###############################################################################
27710#
27711# Check dependencies for external and internal libraries.
27712#
27713###############################################################################
27714
27715
27716
27717###############################################################################
27718#
27719# OS specific settings that we never will need to probe.
27720#
27721if test "x$OPENJDK_TARGET_OS" = xlinux; then
27722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
27723$as_echo_n "checking what is not needed on Linux?... " >&6; }
27724    PULSE_NOT_NEEDED=yes
27725    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
27726$as_echo "pulse" >&6; }
27727fi
27728
27729if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27730    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
27731$as_echo_n "checking what is not needed on Solaris?... " >&6; }
27732    ALSA_NOT_NEEDED=yes
27733    PULSE_NOT_NEEDED=yes
27734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
27735$as_echo "alsa pulse" >&6; }
27736fi
27737
27738if test "x$OPENJDK_TARGET_OS" = xwindows; then
27739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
27740$as_echo_n "checking what is not needed on Windows?... " >&6; }
27741    CUPS_NOT_NEEDED=yes
27742    ALSA_NOT_NEEDED=yes
27743    PULSE_NOT_NEEDED=yes
27744    X11_NOT_NEEDED=yes
27745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
27746$as_echo "alsa cups pulse x11" >&6; }
27747fi
27748
27749if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27750    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
27751$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
27752    ALSA_NOT_NEEDED=yes
27753    PULSE_NOT_NEEDED=yes
27754    X11_NOT_NEEDED=yes
27755    FREETYPE2_NOT_NEEDED=yes
27756    # If the java runtime framework is disabled, then we need X11.
27757    # This will be adjusted below.
27758    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
27759$as_echo "alsa pulse x11" >&6; }
27760fi
27761
27762if test "x$OPENJDK_TARGET_OS" = xbsd; then
27763    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
27764$as_echo_n "checking what is not needed on bsd?... " >&6; }
27765    ALSA_NOT_NEEDED=yes
27766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
27767$as_echo "alsa" >&6; }
27768fi
27769
27770if test "x$OPENJDK" = "xfalse"; then
27771    FREETYPE2_NOT_NEEDED=yes
27772fi
27773
27774if test "x$SUPPORT_HEADFUL" = xno; then
27775    X11_NOT_NEEDED=yes
27776fi
27777
27778###############################################################################
27779#
27780# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
27781# that uses this API.
27782#
27783# Check whether --enable-macosx-runtime-support was given.
27784if test "${enable_macosx_runtime_support+set}" = set; then :
27785  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
27786else
27787  MACOSX_RUNTIME_SUPPORT="no"
27788fi
27789
27790
27791USE_MACOSX_RUNTIME_SUPPORT=no
27792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
27793$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
27794if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
27795    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
27796        MACOSX_RUNTIME_SUPPORT=yes
27797        USE_MACOSX_RUNTIME_SUPPORT=yes
27798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
27799$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
27800    else
27801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
27802$as_echo "yes, but explicitly disabled." >&6; }
27803    fi
27804else
27805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27806$as_echo "no" >&6; }
27807fi
27808
27809if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
27810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
27811$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
27812    X11_NOT_NEEDED=
27813    FREETYPE2_NOT_NEEDED=
27814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
27815$as_echo "alsa pulse" >&6; }
27816fi
27817
27818
27819
27820
27821###############################################################################
27822#
27823# Check for X Windows
27824#
27825
27826# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
27827# Make a simple check for the libraries at the sysroot, and setup --x-includes and
27828# --x-libraries for the sysroot, if that seems to be correct.
27829if test "x$SYS_ROOT" != "x/"; then
27830  if test "x$x_includes" = xNONE; then
27831    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
27832      x_includes="$SYS_ROOT/usr/X11R6/include"
27833    fi
27834  fi
27835  if test "x$x_libraries" = xNONE; then
27836    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
27837      x_libraries="$SYS_ROOT/usr/X11R6/lib"
27838    fi
27839  fi
27840fi
27841
27842# Now let autoconf do it's magic
27843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
27844$as_echo_n "checking for X... " >&6; }
27845
27846
27847# Check whether --with-x was given.
27848if test "${with_x+set}" = set; then :
27849  withval=$with_x;
27850fi
27851
27852# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
27853if test "x$with_x" = xno; then
27854  # The user explicitly disabled X.
27855  have_x=disabled
27856else
27857  case $x_includes,$x_libraries in #(
27858    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
27859    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
27860  $as_echo_n "(cached) " >&6
27861else
27862  # One or both of the vars are not set, and there is no cached value.
27863ac_x_includes=no ac_x_libraries=no
27864rm -f -r conftest.dir
27865if mkdir conftest.dir; then
27866  cd conftest.dir
27867  cat >Imakefile <<'_ACEOF'
27868incroot:
27869	@echo incroot='${INCROOT}'
27870usrlibdir:
27871	@echo usrlibdir='${USRLIBDIR}'
27872libdir:
27873	@echo libdir='${LIBDIR}'
27874_ACEOF
27875  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
27876    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
27877    for ac_var in incroot usrlibdir libdir; do
27878      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
27879    done
27880    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
27881    for ac_extension in a so sl dylib la dll; do
27882      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
27883	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
27884	ac_im_usrlibdir=$ac_im_libdir; break
27885      fi
27886    done
27887    # Screen out bogus values from the imake configuration.  They are
27888    # bogus both because they are the default anyway, and because
27889    # using them would break gcc on systems where it needs fixed includes.
27890    case $ac_im_incroot in
27891	/usr/include) ac_x_includes= ;;
27892	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
27893    esac
27894    case $ac_im_usrlibdir in
27895	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
27896	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
27897    esac
27898  fi
27899  cd ..
27900  rm -f -r conftest.dir
27901fi
27902
27903# Standard set of common directories for X headers.
27904# Check X11 before X11Rn because it is often a symlink to the current release.
27905ac_x_header_dirs='
27906/usr/X11/include
27907/usr/X11R7/include
27908/usr/X11R6/include
27909/usr/X11R5/include
27910/usr/X11R4/include
27911
27912/usr/include/X11
27913/usr/include/X11R7
27914/usr/include/X11R6
27915/usr/include/X11R5
27916/usr/include/X11R4
27917
27918/usr/local/X11/include
27919/usr/local/X11R7/include
27920/usr/local/X11R6/include
27921/usr/local/X11R5/include
27922/usr/local/X11R4/include
27923
27924/usr/local/include/X11
27925/usr/local/include/X11R7
27926/usr/local/include/X11R6
27927/usr/local/include/X11R5
27928/usr/local/include/X11R4
27929
27930/usr/X386/include
27931/usr/x386/include
27932/usr/XFree86/include/X11
27933
27934/usr/include
27935/usr/local/include
27936/usr/unsupported/include
27937/usr/athena/include
27938/usr/local/x11r5/include
27939/usr/lpp/Xamples/include
27940
27941/usr/openwin/include
27942/usr/openwin/share/include'
27943
27944if test "$ac_x_includes" = no; then
27945  # Guess where to find include files, by looking for Xlib.h.
27946  # First, try using that file with no special directory specified.
27947  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27948/* end confdefs.h.  */
27949#include <X11/Xlib.h>
27950_ACEOF
27951if ac_fn_cxx_try_cpp "$LINENO"; then :
27952  # We can compile using X headers with no special include directory.
27953ac_x_includes=
27954else
27955  for ac_dir in $ac_x_header_dirs; do
27956  if test -r "$ac_dir/X11/Xlib.h"; then
27957    ac_x_includes=$ac_dir
27958    break
27959  fi
27960done
27961fi
27962rm -f conftest.err conftest.i conftest.$ac_ext
27963fi # $ac_x_includes = no
27964
27965if test "$ac_x_libraries" = no; then
27966  # Check for the libraries.
27967  # See if we find them without any special options.
27968  # Don't add to $LIBS permanently.
27969  ac_save_LIBS=$LIBS
27970  LIBS="-lX11 $LIBS"
27971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27972/* end confdefs.h.  */
27973#include <X11/Xlib.h>
27974int
27975main ()
27976{
27977XrmInitialize ()
27978  ;
27979  return 0;
27980}
27981_ACEOF
27982if ac_fn_cxx_try_link "$LINENO"; then :
27983  LIBS=$ac_save_LIBS
27984# We can link X programs with no special library path.
27985ac_x_libraries=
27986else
27987  LIBS=$ac_save_LIBS
27988for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
27989do
27990  # Don't even attempt the hair of trying to link an X program!
27991  for ac_extension in a so sl dylib la dll; do
27992    if test -r "$ac_dir/libX11.$ac_extension"; then
27993      ac_x_libraries=$ac_dir
27994      break 2
27995    fi
27996  done
27997done
27998fi
27999rm -f core conftest.err conftest.$ac_objext \
28000    conftest$ac_exeext conftest.$ac_ext
28001fi # $ac_x_libraries = no
28002
28003case $ac_x_includes,$ac_x_libraries in #(
28004  no,* | *,no | *\'*)
28005    # Didn't find X, or a directory has "'" in its name.
28006    ac_cv_have_x="have_x=no";; #(
28007  *)
28008    # Record where we found X for the cache.
28009    ac_cv_have_x="have_x=yes\
28010	ac_x_includes='$ac_x_includes'\
28011	ac_x_libraries='$ac_x_libraries'"
28012esac
28013fi
28014;; #(
28015    *) have_x=yes;;
28016  esac
28017  eval "$ac_cv_have_x"
28018fi # $with_x != no
28019
28020if test "$have_x" != yes; then
28021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28022$as_echo "$have_x" >&6; }
28023  no_x=yes
28024else
28025  # If each of the values was on the command line, it overrides each guess.
28026  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28027  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28028  # Update the cache value to reflect the command line values.
28029  ac_cv_have_x="have_x=yes\
28030	ac_x_includes='$x_includes'\
28031	ac_x_libraries='$x_libraries'"
28032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28033$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28034fi
28035
28036if test "$no_x" = yes; then
28037  # Not all programs may use this symbol, but it does not hurt to define it.
28038
28039$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28040
28041  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28042else
28043  if test -n "$x_includes"; then
28044    X_CFLAGS="$X_CFLAGS -I$x_includes"
28045  fi
28046
28047  # It would also be nice to do this for all -L options, not just this one.
28048  if test -n "$x_libraries"; then
28049    X_LIBS="$X_LIBS -L$x_libraries"
28050    # For Solaris; some versions of Sun CC require a space after -R and
28051    # others require no space.  Words are not sufficient . . . .
28052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28053$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28054    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28055    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28056    ac_cxx_werror_flag=yes
28057    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28058/* end confdefs.h.  */
28059
28060int
28061main ()
28062{
28063
28064  ;
28065  return 0;
28066}
28067_ACEOF
28068if ac_fn_cxx_try_link "$LINENO"; then :
28069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28070$as_echo "no" >&6; }
28071       X_LIBS="$X_LIBS -R$x_libraries"
28072else
28073  LIBS="$ac_xsave_LIBS -R $x_libraries"
28074       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28075/* end confdefs.h.  */
28076
28077int
28078main ()
28079{
28080
28081  ;
28082  return 0;
28083}
28084_ACEOF
28085if ac_fn_cxx_try_link "$LINENO"; then :
28086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28087$as_echo "yes" >&6; }
28088	  X_LIBS="$X_LIBS -R $x_libraries"
28089else
28090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28091$as_echo "neither works" >&6; }
28092fi
28093rm -f core conftest.err conftest.$ac_objext \
28094    conftest$ac_exeext conftest.$ac_ext
28095fi
28096rm -f core conftest.err conftest.$ac_objext \
28097    conftest$ac_exeext conftest.$ac_ext
28098    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28099    LIBS=$ac_xsave_LIBS
28100  fi
28101
28102  # Check for system-dependent libraries X programs must link with.
28103  # Do this before checking for the system-independent R6 libraries
28104  # (-lICE), since we may need -lsocket or whatever for X linking.
28105
28106  if test "$ISC" = yes; then
28107    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28108  else
28109    # Martyn Johnson says this is needed for Ultrix, if the X
28110    # libraries were built with DECnet support.  And Karl Berry says
28111    # the Alpha needs dnet_stub (dnet does not exist).
28112    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28113    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28114/* end confdefs.h.  */
28115
28116/* Override any GCC internal prototype to avoid an error.
28117   Use char because int might match the return type of a GCC
28118   builtin and then its argument prototype would still apply.  */
28119#ifdef __cplusplus
28120extern "C"
28121#endif
28122char XOpenDisplay ();
28123int
28124main ()
28125{
28126return XOpenDisplay ();
28127  ;
28128  return 0;
28129}
28130_ACEOF
28131if ac_fn_cxx_try_link "$LINENO"; then :
28132
28133else
28134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28135$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28136if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28137  $as_echo_n "(cached) " >&6
28138else
28139  ac_check_lib_save_LIBS=$LIBS
28140LIBS="-ldnet  $LIBS"
28141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28142/* end confdefs.h.  */
28143
28144/* Override any GCC internal prototype to avoid an error.
28145   Use char because int might match the return type of a GCC
28146   builtin and then its argument prototype would still apply.  */
28147#ifdef __cplusplus
28148extern "C"
28149#endif
28150char dnet_ntoa ();
28151int
28152main ()
28153{
28154return dnet_ntoa ();
28155  ;
28156  return 0;
28157}
28158_ACEOF
28159if ac_fn_cxx_try_link "$LINENO"; then :
28160  ac_cv_lib_dnet_dnet_ntoa=yes
28161else
28162  ac_cv_lib_dnet_dnet_ntoa=no
28163fi
28164rm -f core conftest.err conftest.$ac_objext \
28165    conftest$ac_exeext conftest.$ac_ext
28166LIBS=$ac_check_lib_save_LIBS
28167fi
28168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28169$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28170if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28171  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28172fi
28173
28174    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28175      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28176$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28177if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28178  $as_echo_n "(cached) " >&6
28179else
28180  ac_check_lib_save_LIBS=$LIBS
28181LIBS="-ldnet_stub  $LIBS"
28182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28183/* end confdefs.h.  */
28184
28185/* Override any GCC internal prototype to avoid an error.
28186   Use char because int might match the return type of a GCC
28187   builtin and then its argument prototype would still apply.  */
28188#ifdef __cplusplus
28189extern "C"
28190#endif
28191char dnet_ntoa ();
28192int
28193main ()
28194{
28195return dnet_ntoa ();
28196  ;
28197  return 0;
28198}
28199_ACEOF
28200if ac_fn_cxx_try_link "$LINENO"; then :
28201  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28202else
28203  ac_cv_lib_dnet_stub_dnet_ntoa=no
28204fi
28205rm -f core conftest.err conftest.$ac_objext \
28206    conftest$ac_exeext conftest.$ac_ext
28207LIBS=$ac_check_lib_save_LIBS
28208fi
28209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28210$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28211if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28212  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28213fi
28214
28215    fi
28216fi
28217rm -f core conftest.err conftest.$ac_objext \
28218    conftest$ac_exeext conftest.$ac_ext
28219    LIBS="$ac_xsave_LIBS"
28220
28221    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28222    # to get the SysV transport functions.
28223    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28224    # needs -lnsl.
28225    # The nsl library prevents programs from opening the X display
28226    # on Irix 5.2, according to T.E. Dickey.
28227    # The functions gethostbyname, getservbyname, and inet_addr are
28228    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28229    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28230if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28231
28232fi
28233
28234    if test $ac_cv_func_gethostbyname = no; then
28235      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28236$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28237if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28238  $as_echo_n "(cached) " >&6
28239else
28240  ac_check_lib_save_LIBS=$LIBS
28241LIBS="-lnsl  $LIBS"
28242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28243/* end confdefs.h.  */
28244
28245/* Override any GCC internal prototype to avoid an error.
28246   Use char because int might match the return type of a GCC
28247   builtin and then its argument prototype would still apply.  */
28248#ifdef __cplusplus
28249extern "C"
28250#endif
28251char gethostbyname ();
28252int
28253main ()
28254{
28255return gethostbyname ();
28256  ;
28257  return 0;
28258}
28259_ACEOF
28260if ac_fn_cxx_try_link "$LINENO"; then :
28261  ac_cv_lib_nsl_gethostbyname=yes
28262else
28263  ac_cv_lib_nsl_gethostbyname=no
28264fi
28265rm -f core conftest.err conftest.$ac_objext \
28266    conftest$ac_exeext conftest.$ac_ext
28267LIBS=$ac_check_lib_save_LIBS
28268fi
28269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
28270$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
28271if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
28272  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
28273fi
28274
28275      if test $ac_cv_lib_nsl_gethostbyname = no; then
28276	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
28277$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
28278if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
28279  $as_echo_n "(cached) " >&6
28280else
28281  ac_check_lib_save_LIBS=$LIBS
28282LIBS="-lbsd  $LIBS"
28283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28284/* end confdefs.h.  */
28285
28286/* Override any GCC internal prototype to avoid an error.
28287   Use char because int might match the return type of a GCC
28288   builtin and then its argument prototype would still apply.  */
28289#ifdef __cplusplus
28290extern "C"
28291#endif
28292char gethostbyname ();
28293int
28294main ()
28295{
28296return gethostbyname ();
28297  ;
28298  return 0;
28299}
28300_ACEOF
28301if ac_fn_cxx_try_link "$LINENO"; then :
28302  ac_cv_lib_bsd_gethostbyname=yes
28303else
28304  ac_cv_lib_bsd_gethostbyname=no
28305fi
28306rm -f core conftest.err conftest.$ac_objext \
28307    conftest$ac_exeext conftest.$ac_ext
28308LIBS=$ac_check_lib_save_LIBS
28309fi
28310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
28311$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
28312if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
28313  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
28314fi
28315
28316      fi
28317    fi
28318
28319    # lieder@skyler.mavd.honeywell.com says without -lsocket,
28320    # socket/setsockopt and other routines are undefined under SCO ODT
28321    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
28322    # on later versions), says Simon Leinen: it contains gethostby*
28323    # variants that don't use the name server (or something).  -lsocket
28324    # must be given before -lnsl if both are needed.  We assume that
28325    # if connect needs -lnsl, so does gethostbyname.
28326    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
28327if test "x$ac_cv_func_connect" = x""yes; then :
28328
28329fi
28330
28331    if test $ac_cv_func_connect = no; then
28332      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
28333$as_echo_n "checking for connect in -lsocket... " >&6; }
28334if test "${ac_cv_lib_socket_connect+set}" = set; then :
28335  $as_echo_n "(cached) " >&6
28336else
28337  ac_check_lib_save_LIBS=$LIBS
28338LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
28339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28340/* end confdefs.h.  */
28341
28342/* Override any GCC internal prototype to avoid an error.
28343   Use char because int might match the return type of a GCC
28344   builtin and then its argument prototype would still apply.  */
28345#ifdef __cplusplus
28346extern "C"
28347#endif
28348char connect ();
28349int
28350main ()
28351{
28352return connect ();
28353  ;
28354  return 0;
28355}
28356_ACEOF
28357if ac_fn_cxx_try_link "$LINENO"; then :
28358  ac_cv_lib_socket_connect=yes
28359else
28360  ac_cv_lib_socket_connect=no
28361fi
28362rm -f core conftest.err conftest.$ac_objext \
28363    conftest$ac_exeext conftest.$ac_ext
28364LIBS=$ac_check_lib_save_LIBS
28365fi
28366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
28367$as_echo "$ac_cv_lib_socket_connect" >&6; }
28368if test "x$ac_cv_lib_socket_connect" = x""yes; then :
28369  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
28370fi
28371
28372    fi
28373
28374    # Guillermo Gomez says -lposix is necessary on A/UX.
28375    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
28376if test "x$ac_cv_func_remove" = x""yes; then :
28377
28378fi
28379
28380    if test $ac_cv_func_remove = no; then
28381      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
28382$as_echo_n "checking for remove in -lposix... " >&6; }
28383if test "${ac_cv_lib_posix_remove+set}" = set; then :
28384  $as_echo_n "(cached) " >&6
28385else
28386  ac_check_lib_save_LIBS=$LIBS
28387LIBS="-lposix  $LIBS"
28388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28389/* end confdefs.h.  */
28390
28391/* Override any GCC internal prototype to avoid an error.
28392   Use char because int might match the return type of a GCC
28393   builtin and then its argument prototype would still apply.  */
28394#ifdef __cplusplus
28395extern "C"
28396#endif
28397char remove ();
28398int
28399main ()
28400{
28401return remove ();
28402  ;
28403  return 0;
28404}
28405_ACEOF
28406if ac_fn_cxx_try_link "$LINENO"; then :
28407  ac_cv_lib_posix_remove=yes
28408else
28409  ac_cv_lib_posix_remove=no
28410fi
28411rm -f core conftest.err conftest.$ac_objext \
28412    conftest$ac_exeext conftest.$ac_ext
28413LIBS=$ac_check_lib_save_LIBS
28414fi
28415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
28416$as_echo "$ac_cv_lib_posix_remove" >&6; }
28417if test "x$ac_cv_lib_posix_remove" = x""yes; then :
28418  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
28419fi
28420
28421    fi
28422
28423    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
28424    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
28425if test "x$ac_cv_func_shmat" = x""yes; then :
28426
28427fi
28428
28429    if test $ac_cv_func_shmat = no; then
28430      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
28431$as_echo_n "checking for shmat in -lipc... " >&6; }
28432if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
28433  $as_echo_n "(cached) " >&6
28434else
28435  ac_check_lib_save_LIBS=$LIBS
28436LIBS="-lipc  $LIBS"
28437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28438/* end confdefs.h.  */
28439
28440/* Override any GCC internal prototype to avoid an error.
28441   Use char because int might match the return type of a GCC
28442   builtin and then its argument prototype would still apply.  */
28443#ifdef __cplusplus
28444extern "C"
28445#endif
28446char shmat ();
28447int
28448main ()
28449{
28450return shmat ();
28451  ;
28452  return 0;
28453}
28454_ACEOF
28455if ac_fn_cxx_try_link "$LINENO"; then :
28456  ac_cv_lib_ipc_shmat=yes
28457else
28458  ac_cv_lib_ipc_shmat=no
28459fi
28460rm -f core conftest.err conftest.$ac_objext \
28461    conftest$ac_exeext conftest.$ac_ext
28462LIBS=$ac_check_lib_save_LIBS
28463fi
28464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
28465$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
28466if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
28467  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
28468fi
28469
28470    fi
28471  fi
28472
28473  # Check for libraries that X11R6 Xt/Xaw programs need.
28474  ac_save_LDFLAGS=$LDFLAGS
28475  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
28476  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
28477  # check for ICE first), but we must link in the order -lSM -lICE or
28478  # we get undefined symbols.  So assume we have SM if we have ICE.
28479  # These have to be linked with before -lX11, unlike the other
28480  # libraries we check for below, so use a different variable.
28481  # John Interrante, Karl Berry
28482  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
28483$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
28484if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
28485  $as_echo_n "(cached) " >&6
28486else
28487  ac_check_lib_save_LIBS=$LIBS
28488LIBS="-lICE $X_EXTRA_LIBS $LIBS"
28489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28490/* end confdefs.h.  */
28491
28492/* Override any GCC internal prototype to avoid an error.
28493   Use char because int might match the return type of a GCC
28494   builtin and then its argument prototype would still apply.  */
28495#ifdef __cplusplus
28496extern "C"
28497#endif
28498char IceConnectionNumber ();
28499int
28500main ()
28501{
28502return IceConnectionNumber ();
28503  ;
28504  return 0;
28505}
28506_ACEOF
28507if ac_fn_cxx_try_link "$LINENO"; then :
28508  ac_cv_lib_ICE_IceConnectionNumber=yes
28509else
28510  ac_cv_lib_ICE_IceConnectionNumber=no
28511fi
28512rm -f core conftest.err conftest.$ac_objext \
28513    conftest$ac_exeext conftest.$ac_ext
28514LIBS=$ac_check_lib_save_LIBS
28515fi
28516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
28517$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
28518if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
28519  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
28520fi
28521
28522  LDFLAGS=$ac_save_LDFLAGS
28523
28524fi
28525
28526
28527if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
28528
28529    # Print a helpful message on how to acquire the necessary build dependency.
28530    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
28531    MISSING_DEPENDENCY=x11
28532    PKGHANDLER_COMMAND=
28533
28534    case $PKGHANDLER in
28535	apt-get)
28536                apt_help     $MISSING_DEPENDENCY ;;
28537    yum)
28538                yum_help     $MISSING_DEPENDENCY ;;
28539	port)
28540                port_help    $MISSING_DEPENDENCY ;;
28541	pkgutil)
28542                pkgutil_help $MISSING_DEPENDENCY ;;
28543	pkgadd)
28544                pkgadd_help  $MISSING_DEPENDENCY ;;
28545    * )
28546      break ;;
28547    esac
28548
28549    if test "x$PKGHANDLER_COMMAND" != x; then
28550        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28551    fi
28552
28553    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
28554fi
28555
28556# Some of the old makefiles require a setting of OPENWIN_HOME
28557# Since the X11R6 directory has disappeared on later Linuxes,
28558# we need to probe for it.
28559if test "x$OPENJDK_TARGET_OS" = xlinux; then
28560    if test -d "$SYS_ROOT/usr/X11R6"; then
28561        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
28562    fi
28563    if test -d "$SYS_ROOT/usr/include/X11"; then
28564        OPENWIN_HOME="$SYS_ROOT/usr"
28565    fi
28566fi
28567if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28568    OPENWIN_HOME="/usr/openwin"
28569fi
28570
28571
28572
28573#
28574# Weird Sol10 something check...TODO change to try compile
28575#
28576if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
28577  if test "`uname -r`" = "5.10"; then
28578     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
28579     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
28580     fi
28581  fi
28582fi
28583
28584ac_ext=c
28585ac_cpp='$CPP $CPPFLAGS'
28586ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28587ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28588ac_compiler_gnu=$ac_cv_c_compiler_gnu
28589
28590OLD_CFLAGS="$CFLAGS"
28591CFLAGS="$CFLAGS $X_CFLAGS"
28592
28593# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
28594for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
28595do :
28596  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28597ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
28598                   # include <X11/Xutil.h>
28599
28600"
28601if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28602  cat >>confdefs.h <<_ACEOF
28603#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28604_ACEOF
28605 X11_A_OK=yes
28606else
28607  X11_A_OK=no
28608fi
28609
28610done
28611
28612
28613CFLAGS="$OLD_CFLAGS"
28614ac_ext=cpp
28615ac_cpp='$CXXCPP $CPPFLAGS'
28616ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28617ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28618ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
28619
28620
28621if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
28622
28623    # Print a helpful message on how to acquire the necessary build dependency.
28624    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
28625    MISSING_DEPENDENCY=x11
28626    PKGHANDLER_COMMAND=
28627
28628    case $PKGHANDLER in
28629	apt-get)
28630                apt_help     $MISSING_DEPENDENCY ;;
28631    yum)
28632                yum_help     $MISSING_DEPENDENCY ;;
28633	port)
28634                port_help    $MISSING_DEPENDENCY ;;
28635	pkgutil)
28636                pkgutil_help $MISSING_DEPENDENCY ;;
28637	pkgadd)
28638                pkgadd_help  $MISSING_DEPENDENCY ;;
28639    * )
28640      break ;;
28641    esac
28642
28643    if test "x$PKGHANDLER_COMMAND" != x; then
28644        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28645    fi
28646
28647    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
28648fi
28649
28650
28651
28652
28653
28654
28655###############################################################################
28656#
28657# The common unix printing system cups is used to print from java.
28658#
28659
28660# Check whether --with-cups was given.
28661if test "${with_cups+set}" = set; then :
28662  withval=$with_cups;
28663fi
28664
28665
28666# Check whether --with-cups-include was given.
28667if test "${with_cups_include+set}" = set; then :
28668  withval=$with_cups_include;
28669fi
28670
28671
28672if test "x$CUPS_NOT_NEEDED" = xyes; then
28673	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
28674		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
28675$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
28676	fi
28677	CUPS_CFLAGS=
28678else
28679	CUPS_FOUND=no
28680
28681	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
28682	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
28683	fi
28684
28685	if test "x${with_cups}" != x; then
28686	    CUPS_CFLAGS="-I${with_cups}/include"
28687	    CUPS_FOUND=yes
28688	fi
28689	if test "x${with_cups_include}" != x; then
28690	    CUPS_CFLAGS="-I${with_cups_include}"
28691	    CUPS_FOUND=yes
28692	fi
28693	if test "x$CUPS_FOUND" = xno; then
28694
28695
28696    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
28697        # Source the builddeps file again, to make sure it uses the latest variables!
28698        . $builddepsfile
28699        # Look for a target and build machine specific resource!
28700        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
28701        if test "x$resource" = x; then
28702            # Ok, lets instead look for a target specific resource
28703            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
28704        fi
28705        if test "x$resource" = x; then
28706            # Ok, lets instead look for a build specific resource
28707            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
28708        fi
28709        if test "x$resource" = x; then
28710            # Ok, lets instead look for a generic resource
28711            # (The cups comes from M4 and not the shell, thus no need for eval here.)
28712            resource=${builddep_cups}
28713        fi
28714        if test "x$resource" != x; then
28715            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
28716$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
28717	    # If the resource in the builddeps.conf file is an existing directory,
28718	    # for example /java/linux/cups
28719	    if test -d ${resource}; then
28720	       depdir=${resource}
28721	    else
28722
28723# cups is for example mymodule
28724# $resource is for example libs/general/libmymod_1_2_3.zip
28725# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
28726# $with_builddeps_dir is for example /localhome/builddeps
28727# depdir is the name of the variable into which we store the depdir, eg MYMOD
28728# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
28729# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
28730    filename=`basename $resource`
28731    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
28732    filebase=${filename%%.*}
28733    extension=${filename#*.}
28734    installdir=$with_builddeps_dir/$filebase
28735    if test ! -f $installdir/$filename.unpacked; then
28736        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
28737$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
28738        if test ! -d $installdir; then
28739            mkdir -p $installdir
28740        fi
28741        if test ! -d $installdir; then
28742            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
28743        fi
28744        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
28745        touch $tmpfile
28746        if test ! -f $tmpfile; then
28747            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
28748        fi
28749
28750    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
28751    # $tmpfile is the local file name for the downloaded file.
28752    VALID_TOOL=no
28753    if test "x$BDEPS_FTP" = xwget; then
28754       VALID_TOOL=yes
28755       wget -O $tmpfile $with_builddeps_server/$resource
28756    fi
28757    if test "x$BDEPS_FTP" = xlftp; then
28758       VALID_TOOL=yes
28759       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
28760    fi
28761    if test "x$BDEPS_FTP" = xftp; then
28762        VALID_TOOL=yes
28763        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
28764        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
28765        FTPUSERPWD=${FTPSERVER%%@*}
28766        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
28767            FTPUSER=${userpwd%%:*}
28768            FTPPWD=${userpwd#*@}
28769            FTPSERVER=${FTPSERVER#*@}
28770        else
28771            FTPUSER=ftp
28772            FTPPWD=ftp
28773        fi
28774        # the "pass" command does not work on some
28775        # ftp clients (read ftp.exe) but if it works,
28776        # passive mode is better!
28777        (\
28778            echo "user $FTPUSER $FTPPWD"        ;\
28779            echo "pass"                         ;\
28780            echo "bin"                          ;\
28781            echo "get $FTPPATH $tmpfile"              ;\
28782        ) | ftp -in $FTPSERVER
28783    fi
28784    if test "x$VALID_TOOL" != xyes; then
28785       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
28786    fi
28787
28788        mv $tmpfile $installdir/$filename
28789        if test ! -s $installdir/$filename; then
28790            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
28791        fi
28792        case "$extension" in
28793            zip)  echo "Unzipping $installdir/$filename..."
28794               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
28795            ;;
28796            tar.gz) echo "Untaring $installdir/$filename..."
28797               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28798            ;;
28799            tgz) echo "Untaring $installdir/$filename..."
28800               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28801            ;;
28802            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
28803            ;;
28804        esac
28805    fi
28806    if test -f $installdir/$filename.unpacked; then
28807        depdir=$installdir
28808    fi
28809
28810	    fi
28811            # Source the builddeps file again, because in the previous command, the depdir
28812            # was updated to point at the current build dependency install directory.
28813            . $builddepsfile
28814            # Now extract variables from the builddeps.conf files.
28815            theroot=${builddep_cups_ROOT}
28816            thecflags=${builddep_cups_CFLAGS}
28817            thelibs=${builddep_cups_LIBS}
28818            if test "x$depdir" = x; then
28819                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
28820            fi
28821            CUPS=$depdir
28822            if test "x$theroot" != x; then
28823               CUPS="$theroot"
28824            fi
28825            if test "x$thecflags" != x; then
28826               CUPS_CFLAGS="$thecflags"
28827            fi
28828            if test "x$thelibs" != x; then
28829               CUPS_LIBS="$thelibs"
28830            fi
28831            CUPS_FOUND=yes
28832
28833        fi
28834
28835    fi
28836
28837	fi
28838	if test "x$CUPS_FOUND" = xno; then
28839	    # Are the cups headers installed in the default /usr/include location?
28840	    for ac_header in cups/cups.h cups/ppd.h
28841do :
28842  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28843ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
28844if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28845  cat >>confdefs.h <<_ACEOF
28846#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28847_ACEOF
28848 CUPS_FOUND=yes
28849	                      CUPS_CFLAGS=
28850	                      DEFAULT_CUPS=yes
28851fi
28852
28853done
28854
28855	fi
28856	if test "x$CUPS_FOUND" = xno; then
28857	    # Getting nervous now? Lets poke around for standard Solaris third-party
28858	    # package installation locations.
28859	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
28860$as_echo_n "checking for cups headers... " >&6; }
28861	    if test -s /opt/sfw/cups/include/cups/cups.h; then
28862	       # An SFW package seems to be installed!
28863	       CUPS_FOUND=yes
28864	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
28865	    elif test -s /opt/csw/include/cups/cups.h; then
28866	       # A CSW package seems to be installed!
28867	       CUPS_FOUND=yes
28868	       CUPS_CFLAGS="-I/opt/csw/include"
28869	    fi
28870	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
28871$as_echo "$CUPS_FOUND" >&6; }
28872	fi
28873	if test "x$CUPS_FOUND" = xno; then
28874
28875    # Print a helpful message on how to acquire the necessary build dependency.
28876    # cups is the help tag: freetyp2, cups, pulse, alsa etc
28877    MISSING_DEPENDENCY=cups
28878    PKGHANDLER_COMMAND=
28879
28880    case $PKGHANDLER in
28881	apt-get)
28882                apt_help     $MISSING_DEPENDENCY ;;
28883    yum)
28884                yum_help     $MISSING_DEPENDENCY ;;
28885	port)
28886                port_help    $MISSING_DEPENDENCY ;;
28887	pkgutil)
28888                pkgutil_help $MISSING_DEPENDENCY ;;
28889	pkgadd)
28890                pkgadd_help  $MISSING_DEPENDENCY ;;
28891    * )
28892      break ;;
28893    esac
28894
28895    if test "x$PKGHANDLER_COMMAND" != x; then
28896        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28897    fi
28898
28899	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
28900	fi
28901fi
28902
28903
28904
28905
28906
28907
28908###############################################################################
28909#
28910# The ubiquitous freetype2 library is used to render fonts.
28911#
28912
28913# Check whether --with-freetype was given.
28914if test "${with_freetype+set}" = set; then :
28915  withval=$with_freetype;
28916fi
28917
28918
28919# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
28920USING_SYSTEM_FT_LIB=false
28921
28922if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
28923	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
28924		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
28925$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
28926	fi
28927	FREETYPE2_CFLAGS=
28928	FREETYPE2_LIBS=
28929        FREETYPE2_LIB_PATH=
28930else
28931	FREETYPE2_FOUND=no
28932
28933	if test "x$with_freetype" != x; then
28934
28935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28936
28937  # Input might be given as Windows format, start by converting to
28938  # unix format.
28939  path="$with_freetype"
28940  new_path=`$CYGPATH -u "$path"`
28941
28942  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28943  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28944  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28945  # "foo.exe" is OK but "foo" is an error.
28946  #
28947  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28948  # It is also a way to make sure we got the proper file name for the real test later on.
28949  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28950  if test "x$test_shortpath" = x; then
28951    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
28952$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
28953    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
28954  fi
28955
28956  # Call helper function which possibly converts this using DOS-style short mode.
28957  # If so, the updated path is stored in $new_path.
28958
28959  input_path="$new_path"
28960  # Check if we need to convert this using DOS-style short mode. If the path
28961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28962  # take no chances and rewrite it.
28963  # Note: m4 eats our [], so we need to use [ and ] instead.
28964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28965  if test "x$has_forbidden_chars" != x; then
28966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28967    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28968    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28969    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28970      # Going to short mode and back again did indeed matter. Since short mode is
28971      # case insensitive, let's make it lowercase to improve readability.
28972      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28973      # Now convert it back to Unix-stile (cygpath)
28974      input_path=`$CYGPATH -u "$shortmode_path"`
28975      new_path="$input_path"
28976    fi
28977  fi
28978
28979  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28980  if test "x$test_cygdrive_prefix" = x; then
28981    # As a simple fix, exclude /usr/bin since it's not a real path.
28982    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28983      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28984      # a path prefixed by /cygdrive for fixpath to work.
28985      new_path="$CYGWIN_ROOT_PATH$input_path"
28986    fi
28987  fi
28988
28989
28990  if test "x$path" != "x$new_path"; then
28991    with_freetype="$new_path"
28992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
28993$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
28994  fi
28995
28996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28997
28998  path="$with_freetype"
28999  has_colon=`$ECHO $path | $GREP ^.:`
29000  new_path="$path"
29001  if test "x$has_colon" = x; then
29002    # Not in mixed or Windows style, start by that.
29003    new_path=`cmd //c echo $path`
29004  fi
29005
29006
29007  input_path="$new_path"
29008  # Check if we need to convert this using DOS-style short mode. If the path
29009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29010  # take no chances and rewrite it.
29011  # Note: m4 eats our [], so we need to use [ and ] instead.
29012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29013  if test "x$has_forbidden_chars" != x; then
29014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29015    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29016  fi
29017
29018
29019  windows_path="$new_path"
29020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29021    unix_path=`$CYGPATH -u "$windows_path"`
29022    new_path="$unix_path"
29023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29025    new_path="$unix_path"
29026  fi
29027
29028  if test "x$path" != "x$new_path"; then
29029    with_freetype="$new_path"
29030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29031$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29032  fi
29033
29034  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29035  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29036
29037  else
29038    # We're on a posix platform. Hooray! :)
29039    path="$with_freetype"
29040
29041    if test ! -f "$path" && test ! -d "$path"; then
29042      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29043    fi
29044
29045    has_space=`$ECHO "$path" | $GREP " "`
29046    if test "x$has_space" != x; then
29047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29048$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29049      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29050    fi
29051  fi
29052
29053	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29054            FREETYPE2_LIB_PATH="$with_freetype/lib"
29055            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29056                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29057                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29058            fi
29059            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29060                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29061            fi
29062	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29063            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29064                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29065            fi
29066 	    FREETYPE2_FOUND=yes
29067   	    if test "x$FREETYPE2_FOUND" = xyes; then
29068	        # Verify that the directories exist
29069                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29070		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29071		fi
29072	        # List the contents of the lib.
29073		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29074                if test "x$FREETYPELIB" = x; then
29075		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29076		fi
29077	        # Check one h-file
29078                if ! test -s "$with_freetype/include/ft2build.h"; then
29079		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29080		fi
29081            fi
29082        fi
29083	if test "x$FREETYPE2_FOUND" = xno; then
29084
29085
29086    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29087        # Source the builddeps file again, to make sure it uses the latest variables!
29088        . $builddepsfile
29089        # Look for a target and build machine specific resource!
29090        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29091        if test "x$resource" = x; then
29092            # Ok, lets instead look for a target specific resource
29093            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29094        fi
29095        if test "x$resource" = x; then
29096            # Ok, lets instead look for a build specific resource
29097            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29098        fi
29099        if test "x$resource" = x; then
29100            # Ok, lets instead look for a generic resource
29101            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29102            resource=${builddep_freetype2}
29103        fi
29104        if test "x$resource" != x; then
29105            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29106$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29107	    # If the resource in the builddeps.conf file is an existing directory,
29108	    # for example /java/linux/cups
29109	    if test -d ${resource}; then
29110	       depdir=${resource}
29111	    else
29112
29113# freetype2 is for example mymodule
29114# $resource is for example libs/general/libmymod_1_2_3.zip
29115# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29116# $with_builddeps_dir is for example /localhome/builddeps
29117# depdir is the name of the variable into which we store the depdir, eg MYMOD
29118# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29119# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29120    filename=`basename $resource`
29121    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29122    filebase=${filename%%.*}
29123    extension=${filename#*.}
29124    installdir=$with_builddeps_dir/$filebase
29125    if test ! -f $installdir/$filename.unpacked; then
29126        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29127$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29128        if test ! -d $installdir; then
29129            mkdir -p $installdir
29130        fi
29131        if test ! -d $installdir; then
29132            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29133        fi
29134        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29135        touch $tmpfile
29136        if test ! -f $tmpfile; then
29137            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29138        fi
29139
29140    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29141    # $tmpfile is the local file name for the downloaded file.
29142    VALID_TOOL=no
29143    if test "x$BDEPS_FTP" = xwget; then
29144       VALID_TOOL=yes
29145       wget -O $tmpfile $with_builddeps_server/$resource
29146    fi
29147    if test "x$BDEPS_FTP" = xlftp; then
29148       VALID_TOOL=yes
29149       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29150    fi
29151    if test "x$BDEPS_FTP" = xftp; then
29152        VALID_TOOL=yes
29153        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29154        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29155        FTPUSERPWD=${FTPSERVER%%@*}
29156        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29157            FTPUSER=${userpwd%%:*}
29158            FTPPWD=${userpwd#*@}
29159            FTPSERVER=${FTPSERVER#*@}
29160        else
29161            FTPUSER=ftp
29162            FTPPWD=ftp
29163        fi
29164        # the "pass" command does not work on some
29165        # ftp clients (read ftp.exe) but if it works,
29166        # passive mode is better!
29167        (\
29168            echo "user $FTPUSER $FTPPWD"        ;\
29169            echo "pass"                         ;\
29170            echo "bin"                          ;\
29171            echo "get $FTPPATH $tmpfile"              ;\
29172        ) | ftp -in $FTPSERVER
29173    fi
29174    if test "x$VALID_TOOL" != xyes; then
29175       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29176    fi
29177
29178        mv $tmpfile $installdir/$filename
29179        if test ! -s $installdir/$filename; then
29180            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29181        fi
29182        case "$extension" in
29183            zip)  echo "Unzipping $installdir/$filename..."
29184               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29185            ;;
29186            tar.gz) echo "Untaring $installdir/$filename..."
29187               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29188            ;;
29189            tgz) echo "Untaring $installdir/$filename..."
29190               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29191            ;;
29192            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29193            ;;
29194        esac
29195    fi
29196    if test -f $installdir/$filename.unpacked; then
29197        depdir=$installdir
29198    fi
29199
29200	    fi
29201            # Source the builddeps file again, because in the previous command, the depdir
29202            # was updated to point at the current build dependency install directory.
29203            . $builddepsfile
29204            # Now extract variables from the builddeps.conf files.
29205            theroot=${builddep_freetype2_ROOT}
29206            thecflags=${builddep_freetype2_CFLAGS}
29207            thelibs=${builddep_freetype2_LIBS}
29208            if test "x$depdir" = x; then
29209                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29210            fi
29211            FREETYPE2=$depdir
29212            if test "x$theroot" != x; then
29213               FREETYPE2="$theroot"
29214            fi
29215            if test "x$thecflags" != x; then
29216               FREETYPE2_CFLAGS="$thecflags"
29217            fi
29218            if test "x$thelibs" != x; then
29219               FREETYPE2_LIBS="$thelibs"
29220            fi
29221            FREETYPE2_FOUND=yes
29222            else FREETYPE2_FOUND=no
29223
29224        fi
29225        else FREETYPE2_FOUND=no
29226
29227    fi
29228
29229            USING_SYSTEM_FT_LIB=true
29230	fi
29231	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29232            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29233
29234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29235
29236  # Input might be given as Windows format, start by converting to
29237  # unix format.
29238  path="$FREETYPELOCATION"
29239  new_path=`$CYGPATH -u "$path"`
29240
29241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29244  # "foo.exe" is OK but "foo" is an error.
29245  #
29246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29247  # It is also a way to make sure we got the proper file name for the real test later on.
29248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29249  if test "x$test_shortpath" = x; then
29250    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29251$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29252    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29253  fi
29254
29255  # Call helper function which possibly converts this using DOS-style short mode.
29256  # If so, the updated path is stored in $new_path.
29257
29258  input_path="$new_path"
29259  # Check if we need to convert this using DOS-style short mode. If the path
29260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29261  # take no chances and rewrite it.
29262  # Note: m4 eats our [], so we need to use [ and ] instead.
29263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29264  if test "x$has_forbidden_chars" != x; then
29265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29269      # Going to short mode and back again did indeed matter. Since short mode is
29270      # case insensitive, let's make it lowercase to improve readability.
29271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29272      # Now convert it back to Unix-stile (cygpath)
29273      input_path=`$CYGPATH -u "$shortmode_path"`
29274      new_path="$input_path"
29275    fi
29276  fi
29277
29278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29279  if test "x$test_cygdrive_prefix" = x; then
29280    # As a simple fix, exclude /usr/bin since it's not a real path.
29281    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29283      # a path prefixed by /cygdrive for fixpath to work.
29284      new_path="$CYGWIN_ROOT_PATH$input_path"
29285    fi
29286  fi
29287
29288
29289  if test "x$path" != "x$new_path"; then
29290    FREETYPELOCATION="$new_path"
29291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29292$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29293  fi
29294
29295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29296
29297  path="$FREETYPELOCATION"
29298  has_colon=`$ECHO $path | $GREP ^.:`
29299  new_path="$path"
29300  if test "x$has_colon" = x; then
29301    # Not in mixed or Windows style, start by that.
29302    new_path=`cmd //c echo $path`
29303  fi
29304
29305
29306  input_path="$new_path"
29307  # Check if we need to convert this using DOS-style short mode. If the path
29308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29309  # take no chances and rewrite it.
29310  # Note: m4 eats our [], so we need to use [ and ] instead.
29311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29312  if test "x$has_forbidden_chars" != x; then
29313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29315  fi
29316
29317
29318  windows_path="$new_path"
29319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29320    unix_path=`$CYGPATH -u "$windows_path"`
29321    new_path="$unix_path"
29322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29324    new_path="$unix_path"
29325  fi
29326
29327  if test "x$path" != "x$new_path"; then
29328    FREETYPELOCATION="$new_path"
29329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29330$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29331  fi
29332
29333  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29334  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29335
29336  else
29337    # We're on a posix platform. Hooray! :)
29338    path="$FREETYPELOCATION"
29339
29340    if test ! -f "$path" && test ! -d "$path"; then
29341      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
29342    fi
29343
29344    has_space=`$ECHO "$path" | $GREP " "`
29345    if test "x$has_space" != x; then
29346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29347$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29348      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29349    fi
29350  fi
29351
29352	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
29353$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
29354	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
29355	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
29356	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
29357 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
29358                if ! test -s "$FREETYPE2_LIBS"; then
29359		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
29360		fi
29361                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
29362		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
29363		fi
29364                USING_SYSTEM_FT_LIB=true
29365                FREETYPE2_FOUND=yes
29366	    fi
29367	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
29368$as_echo "$FREETYPE2_FOUND" >&6; }
29369        fi
29370	if test "x$FREETYPE2_FOUND" = xno; then
29371
29372pkg_failed=no
29373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
29374$as_echo_n "checking for FREETYPE2... " >&6; }
29375
29376if test -n "$FREETYPE2_CFLAGS"; then
29377    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
29378 elif test -n "$PKG_CONFIG"; then
29379    if test -n "$PKG_CONFIG" && \
29380    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29381  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29382  ac_status=$?
29383  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29384  test $ac_status = 0; }; then
29385  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
29386else
29387  pkg_failed=yes
29388fi
29389 else
29390    pkg_failed=untried
29391fi
29392if test -n "$FREETYPE2_LIBS"; then
29393    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
29394 elif test -n "$PKG_CONFIG"; then
29395    if test -n "$PKG_CONFIG" && \
29396    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29397  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29398  ac_status=$?
29399  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29400  test $ac_status = 0; }; then
29401  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
29402else
29403  pkg_failed=yes
29404fi
29405 else
29406    pkg_failed=untried
29407fi
29408
29409
29410
29411if test $pkg_failed = yes; then
29412
29413if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29414        _pkg_short_errors_supported=yes
29415else
29416        _pkg_short_errors_supported=no
29417fi
29418        if test $_pkg_short_errors_supported = yes; then
29419	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
29420        else
29421	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
29422        fi
29423	# Put the nasty error message in config.log where it belongs
29424	echo "$FREETYPE2_PKG_ERRORS" >&5
29425
29426	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29427$as_echo "no" >&6; }
29428                FREETYPE2_FOUND=no
29429elif test $pkg_failed = untried; then
29430	FREETYPE2_FOUND=no
29431else
29432	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
29433	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
29434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29435$as_echo "yes" >&6; }
29436	FREETYPE2_FOUND=yes
29437fi
29438            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
29439            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
29440            USING_SYSTEM_FT_LIB=true
29441            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
29442            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
29443              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
29444            fi
29445	fi
29446	if test "x$FREETYPE2_FOUND" = xno; then
29447	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
29448$as_echo_n "checking for freetype in some standard locations... " >&6; }
29449
29450	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
29451	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
29452	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
29453	    fi
29454	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
29455	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
29456	        DEFAULT_FREETYPE_LIBS="-lfreetype"
29457	    fi
29458
29459	    PREV_CXXCFLAGS="$CXXFLAGS"
29460	    PREV_LDFLAGS="$LDFLAGS"
29461	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
29462	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
29463	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29464/* end confdefs.h.  */
29465#include<ft2build.h>
29466	                    #include FT_FREETYPE_H
29467	                   int main() { return 0; }
29468
29469_ACEOF
29470if ac_fn_cxx_try_link "$LINENO"; then :
29471
29472	                      # Yes, the default cflags and libs did the trick.
29473	                      FREETYPE2_FOUND=yes
29474	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
29475	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
29476
29477else
29478
29479	                      FREETYPE2_FOUND=no
29480
29481fi
29482rm -f core conftest.err conftest.$ac_objext \
29483    conftest$ac_exeext conftest.$ac_ext
29484            CXXCFLAGS="$PREV_CXXFLAGS"
29485	    LDFLAGS="$PREV_LDFLAGS"
29486	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
29487$as_echo "$FREETYPE2_FOUND" >&6; }
29488            USING_SYSTEM_FT_LIB=true
29489	fi
29490	if test "x$FREETYPE2_FOUND" = xno; then
29491
29492    # Print a helpful message on how to acquire the necessary build dependency.
29493    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
29494    MISSING_DEPENDENCY=freetype2
29495    PKGHANDLER_COMMAND=
29496
29497    case $PKGHANDLER in
29498	apt-get)
29499                apt_help     $MISSING_DEPENDENCY ;;
29500    yum)
29501                yum_help     $MISSING_DEPENDENCY ;;
29502	port)
29503                port_help    $MISSING_DEPENDENCY ;;
29504	pkgutil)
29505                pkgutil_help $MISSING_DEPENDENCY ;;
29506	pkgadd)
29507                pkgadd_help  $MISSING_DEPENDENCY ;;
29508    * )
29509      break ;;
29510    esac
29511
29512    if test "x$PKGHANDLER_COMMAND" != x; then
29513        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29514    fi
29515
29516		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
29517	fi
29518
29519        if test "x$OPENJDK_TARGET_OS" != xwindows; then
29520            # AC_CHECK_LIB does not support use of cl.exe
29521            PREV_LDFLAGS="$LDFLAGS"
29522            LDFLAGS="$FREETYPE2_LIBS"
29523            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
29524$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
29525if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
29526  $as_echo_n "(cached) " >&6
29527else
29528  ac_check_lib_save_LIBS=$LIBS
29529LIBS="-lfreetype  $LIBS"
29530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29531/* end confdefs.h.  */
29532
29533/* Override any GCC internal prototype to avoid an error.
29534   Use char because int might match the return type of a GCC
29535   builtin and then its argument prototype would still apply.  */
29536#ifdef __cplusplus
29537extern "C"
29538#endif
29539char FT_Init_FreeType ();
29540int
29541main ()
29542{
29543return FT_Init_FreeType ();
29544  ;
29545  return 0;
29546}
29547_ACEOF
29548if ac_fn_cxx_try_link "$LINENO"; then :
29549  ac_cv_lib_freetype_FT_Init_FreeType=yes
29550else
29551  ac_cv_lib_freetype_FT_Init_FreeType=no
29552fi
29553rm -f core conftest.err conftest.$ac_objext \
29554    conftest$ac_exeext conftest.$ac_ext
29555LIBS=$ac_check_lib_save_LIBS
29556fi
29557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
29558$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
29559if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
29560  FREETYPE2_FOUND=true
29561else
29562  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
29563fi
29564
29565            LDFLAGS="$PREV_LDFLAGS"
29566        fi
29567fi
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577###############################################################################
29578#
29579# Check for alsa headers and libraries. Used on Linux/GNU systems.
29580#
29581
29582# Check whether --with-alsa was given.
29583if test "${with_alsa+set}" = set; then :
29584  withval=$with_alsa;
29585fi
29586
29587
29588# Check whether --with-alsa-include was given.
29589if test "${with_alsa_include+set}" = set; then :
29590  withval=$with_alsa_include;
29591fi
29592
29593
29594# Check whether --with-alsa-lib was given.
29595if test "${with_alsa_lib+set}" = set; then :
29596  withval=$with_alsa_lib;
29597fi
29598
29599
29600if test "x$ALSA_NOT_NEEDED" = xyes; then
29601	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
29602		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
29603$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
29604	fi
29605	ALSA_CFLAGS=
29606	ALSA_LIBS=
29607else
29608	ALSA_FOUND=no
29609
29610	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
29611	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
29612	fi
29613
29614	if test "x${with_alsa}" != x; then
29615	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
29616	    ALSA_CFLAGS="-I${with_alsa}/include"
29617	    ALSA_FOUND=yes
29618	fi
29619	if test "x${with_alsa_include}" != x; then
29620	    ALSA_CFLAGS="-I${with_alsa_include}"
29621	    ALSA_FOUND=yes
29622	fi
29623	if test "x${with_alsa_lib}" != x; then
29624	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
29625	    ALSA_FOUND=yes
29626	fi
29627	if test "x$ALSA_FOUND" = xno; then
29628
29629
29630    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29631        # Source the builddeps file again, to make sure it uses the latest variables!
29632        . $builddepsfile
29633        # Look for a target and build machine specific resource!
29634        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29635        if test "x$resource" = x; then
29636            # Ok, lets instead look for a target specific resource
29637            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
29638        fi
29639        if test "x$resource" = x; then
29640            # Ok, lets instead look for a build specific resource
29641            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
29642        fi
29643        if test "x$resource" = x; then
29644            # Ok, lets instead look for a generic resource
29645            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
29646            resource=${builddep_alsa}
29647        fi
29648        if test "x$resource" != x; then
29649            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
29650$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
29651	    # If the resource in the builddeps.conf file is an existing directory,
29652	    # for example /java/linux/cups
29653	    if test -d ${resource}; then
29654	       depdir=${resource}
29655	    else
29656
29657# alsa is for example mymodule
29658# $resource is for example libs/general/libmymod_1_2_3.zip
29659# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29660# $with_builddeps_dir is for example /localhome/builddeps
29661# depdir is the name of the variable into which we store the depdir, eg MYMOD
29662# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29663# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29664    filename=`basename $resource`
29665    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29666    filebase=${filename%%.*}
29667    extension=${filename#*.}
29668    installdir=$with_builddeps_dir/$filebase
29669    if test ! -f $installdir/$filename.unpacked; then
29670        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
29671$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29672        if test ! -d $installdir; then
29673            mkdir -p $installdir
29674        fi
29675        if test ! -d $installdir; then
29676            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29677        fi
29678        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
29679        touch $tmpfile
29680        if test ! -f $tmpfile; then
29681            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29682        fi
29683
29684    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29685    # $tmpfile is the local file name for the downloaded file.
29686    VALID_TOOL=no
29687    if test "x$BDEPS_FTP" = xwget; then
29688       VALID_TOOL=yes
29689       wget -O $tmpfile $with_builddeps_server/$resource
29690    fi
29691    if test "x$BDEPS_FTP" = xlftp; then
29692       VALID_TOOL=yes
29693       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29694    fi
29695    if test "x$BDEPS_FTP" = xftp; then
29696        VALID_TOOL=yes
29697        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29698        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29699        FTPUSERPWD=${FTPSERVER%%@*}
29700        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29701            FTPUSER=${userpwd%%:*}
29702            FTPPWD=${userpwd#*@}
29703            FTPSERVER=${FTPSERVER#*@}
29704        else
29705            FTPUSER=ftp
29706            FTPPWD=ftp
29707        fi
29708        # the "pass" command does not work on some
29709        # ftp clients (read ftp.exe) but if it works,
29710        # passive mode is better!
29711        (\
29712            echo "user $FTPUSER $FTPPWD"        ;\
29713            echo "pass"                         ;\
29714            echo "bin"                          ;\
29715            echo "get $FTPPATH $tmpfile"              ;\
29716        ) | ftp -in $FTPSERVER
29717    fi
29718    if test "x$VALID_TOOL" != xyes; then
29719       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29720    fi
29721
29722        mv $tmpfile $installdir/$filename
29723        if test ! -s $installdir/$filename; then
29724            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29725        fi
29726        case "$extension" in
29727            zip)  echo "Unzipping $installdir/$filename..."
29728               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29729            ;;
29730            tar.gz) echo "Untaring $installdir/$filename..."
29731               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29732            ;;
29733            tgz) echo "Untaring $installdir/$filename..."
29734               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29735            ;;
29736            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29737            ;;
29738        esac
29739    fi
29740    if test -f $installdir/$filename.unpacked; then
29741        depdir=$installdir
29742    fi
29743
29744	    fi
29745            # Source the builddeps file again, because in the previous command, the depdir
29746            # was updated to point at the current build dependency install directory.
29747            . $builddepsfile
29748            # Now extract variables from the builddeps.conf files.
29749            theroot=${builddep_alsa_ROOT}
29750            thecflags=${builddep_alsa_CFLAGS}
29751            thelibs=${builddep_alsa_LIBS}
29752            if test "x$depdir" = x; then
29753                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
29754            fi
29755            ALSA=$depdir
29756            if test "x$theroot" != x; then
29757               ALSA="$theroot"
29758            fi
29759            if test "x$thecflags" != x; then
29760               ALSA_CFLAGS="$thecflags"
29761            fi
29762            if test "x$thelibs" != x; then
29763               ALSA_LIBS="$thelibs"
29764            fi
29765            ALSA_FOUND=yes
29766            else ALSA_FOUND=no
29767
29768        fi
29769        else ALSA_FOUND=no
29770
29771    fi
29772
29773	fi
29774	if test "x$ALSA_FOUND" = xno; then
29775
29776pkg_failed=no
29777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
29778$as_echo_n "checking for ALSA... " >&6; }
29779
29780if test -n "$ALSA_CFLAGS"; then
29781    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
29782 elif test -n "$PKG_CONFIG"; then
29783    if test -n "$PKG_CONFIG" && \
29784    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
29785  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
29786  ac_status=$?
29787  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29788  test $ac_status = 0; }; then
29789  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
29790else
29791  pkg_failed=yes
29792fi
29793 else
29794    pkg_failed=untried
29795fi
29796if test -n "$ALSA_LIBS"; then
29797    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
29798 elif test -n "$PKG_CONFIG"; then
29799    if test -n "$PKG_CONFIG" && \
29800    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
29801  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
29802  ac_status=$?
29803  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29804  test $ac_status = 0; }; then
29805  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
29806else
29807  pkg_failed=yes
29808fi
29809 else
29810    pkg_failed=untried
29811fi
29812
29813
29814
29815if test $pkg_failed = yes; then
29816
29817if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29818        _pkg_short_errors_supported=yes
29819else
29820        _pkg_short_errors_supported=no
29821fi
29822        if test $_pkg_short_errors_supported = yes; then
29823	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
29824        else
29825	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
29826        fi
29827	# Put the nasty error message in config.log where it belongs
29828	echo "$ALSA_PKG_ERRORS" >&5
29829
29830	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29831$as_echo "no" >&6; }
29832                ALSA_FOUND=no
29833elif test $pkg_failed = untried; then
29834	ALSA_FOUND=no
29835else
29836	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
29837	ALSA_LIBS=$pkg_cv_ALSA_LIBS
29838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29839$as_echo "yes" >&6; }
29840	ALSA_FOUND=yes
29841fi
29842	fi
29843	if test "x$ALSA_FOUND" = xno; then
29844	    for ac_header in alsa/asoundlib.h
29845do :
29846  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
29847if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
29848  cat >>confdefs.h <<_ACEOF
29849#define HAVE_ALSA_ASOUNDLIB_H 1
29850_ACEOF
29851 ALSA_FOUND=yes
29852	                      ALSA_CFLAGS=-Iignoreme
29853	                      ALSA_LIBS=-lasound
29854	                      DEFAULT_ALSA=yes
29855else
29856  ALSA_FOUND=no
29857fi
29858
29859done
29860
29861	fi
29862	if test "x$ALSA_FOUND" = xno; then
29863
29864    # Print a helpful message on how to acquire the necessary build dependency.
29865    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
29866    MISSING_DEPENDENCY=alsa
29867    PKGHANDLER_COMMAND=
29868
29869    case $PKGHANDLER in
29870	apt-get)
29871                apt_help     $MISSING_DEPENDENCY ;;
29872    yum)
29873                yum_help     $MISSING_DEPENDENCY ;;
29874	port)
29875                port_help    $MISSING_DEPENDENCY ;;
29876	pkgutil)
29877                pkgutil_help $MISSING_DEPENDENCY ;;
29878	pkgadd)
29879                pkgadd_help  $MISSING_DEPENDENCY ;;
29880    * )
29881      break ;;
29882    esac
29883
29884    if test "x$PKGHANDLER_COMMAND" != x; then
29885        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29886    fi
29887
29888	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
29889	fi
29890fi
29891
29892
29893
29894
29895
29896
29897
29898###############################################################################
29899#
29900# Check for the jpeg library
29901#
29902
29903USE_EXTERNAL_LIBJPEG=true
29904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
29905$as_echo_n "checking for main in -ljpeg... " >&6; }
29906if test "${ac_cv_lib_jpeg_main+set}" = set; then :
29907  $as_echo_n "(cached) " >&6
29908else
29909  ac_check_lib_save_LIBS=$LIBS
29910LIBS="-ljpeg  $LIBS"
29911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29912/* end confdefs.h.  */
29913
29914
29915int
29916main ()
29917{
29918return main ();
29919  ;
29920  return 0;
29921}
29922_ACEOF
29923if ac_fn_cxx_try_link "$LINENO"; then :
29924  ac_cv_lib_jpeg_main=yes
29925else
29926  ac_cv_lib_jpeg_main=no
29927fi
29928rm -f core conftest.err conftest.$ac_objext \
29929    conftest$ac_exeext conftest.$ac_ext
29930LIBS=$ac_check_lib_save_LIBS
29931fi
29932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
29933$as_echo "$ac_cv_lib_jpeg_main" >&6; }
29934if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
29935  cat >>confdefs.h <<_ACEOF
29936#define HAVE_LIBJPEG 1
29937_ACEOF
29938
29939  LIBS="-ljpeg $LIBS"
29940
29941else
29942   USE_EXTERNAL_LIBJPEG=false
29943               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
29944$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
29945
29946fi
29947
29948
29949
29950###############################################################################
29951#
29952# Check for the gif library
29953#
29954
29955USE_EXTERNAL_LIBJPEG=true
29956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
29957$as_echo_n "checking for main in -lgif... " >&6; }
29958if test "${ac_cv_lib_gif_main+set}" = set; then :
29959  $as_echo_n "(cached) " >&6
29960else
29961  ac_check_lib_save_LIBS=$LIBS
29962LIBS="-lgif  $LIBS"
29963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29964/* end confdefs.h.  */
29965
29966
29967int
29968main ()
29969{
29970return main ();
29971  ;
29972  return 0;
29973}
29974_ACEOF
29975if ac_fn_cxx_try_link "$LINENO"; then :
29976  ac_cv_lib_gif_main=yes
29977else
29978  ac_cv_lib_gif_main=no
29979fi
29980rm -f core conftest.err conftest.$ac_objext \
29981    conftest$ac_exeext conftest.$ac_ext
29982LIBS=$ac_check_lib_save_LIBS
29983fi
29984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
29985$as_echo "$ac_cv_lib_gif_main" >&6; }
29986if test "x$ac_cv_lib_gif_main" = x""yes; then :
29987  cat >>confdefs.h <<_ACEOF
29988#define HAVE_LIBGIF 1
29989_ACEOF
29990
29991  LIBS="-lgif $LIBS"
29992
29993else
29994   USE_EXTERNAL_LIBGIF=false
29995               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
29996$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
29997
29998fi
29999
30000
30001
30002###############################################################################
30003#
30004# Check for the zlib library
30005#
30006
30007
30008# Check whether --with-zlib was given.
30009if test "${with_zlib+set}" = set; then :
30010  withval=$with_zlib;
30011fi
30012
30013
30014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30015$as_echo_n "checking for compress in -lz... " >&6; }
30016if test "${ac_cv_lib_z_compress+set}" = set; then :
30017  $as_echo_n "(cached) " >&6
30018else
30019  ac_check_lib_save_LIBS=$LIBS
30020LIBS="-lz  $LIBS"
30021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30022/* end confdefs.h.  */
30023
30024/* Override any GCC internal prototype to avoid an error.
30025   Use char because int might match the return type of a GCC
30026   builtin and then its argument prototype would still apply.  */
30027#ifdef __cplusplus
30028extern "C"
30029#endif
30030char compress ();
30031int
30032main ()
30033{
30034return compress ();
30035  ;
30036  return 0;
30037}
30038_ACEOF
30039if ac_fn_cxx_try_link "$LINENO"; then :
30040  ac_cv_lib_z_compress=yes
30041else
30042  ac_cv_lib_z_compress=no
30043fi
30044rm -f core conftest.err conftest.$ac_objext \
30045    conftest$ac_exeext conftest.$ac_ext
30046LIBS=$ac_check_lib_save_LIBS
30047fi
30048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30049$as_echo "$ac_cv_lib_z_compress" >&6; }
30050if test "x$ac_cv_lib_z_compress" = x""yes; then :
30051   ZLIB_FOUND=yes
30052else
30053   ZLIB_FOUND=no
30054fi
30055
30056
30057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30058$as_echo_n "checking for which zlib to use... " >&6; }
30059
30060DEFAULT_ZLIB=bundled
30061if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30062#
30063# On macosx default is system...on others default is
30064#
30065    DEFAULT_ZLIB=system
30066fi
30067
30068if test "x${ZLIB_FOUND}" != "xyes"; then
30069#
30070# If we don't find any system...set default to bundled
30071#
30072    DEFAULT_ZLIB=bundled
30073fi
30074
30075#
30076# If user didn't specify, use DEFAULT_ZLIB
30077#
30078if test "x${with_zlib}" = "x"; then
30079    with_zlib=${DEFAULT_ZLIB}
30080fi
30081
30082if test "x${with_zlib}" = "xbundled"; then
30083    USE_EXTERNAL_LIBZ=false
30084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30085$as_echo "bundled" >&6; }
30086elif test "x${with_zlib}" = "xsystem"; then
30087    if test "x${ZLIB_FOUND}" = "xyes"; then
30088        USE_EXTERNAL_LIBZ=true
30089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30090$as_echo "system" >&6; }
30091    else
30092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30093$as_echo "system not found" >&6; }
30094        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30095    fi
30096else
30097    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30098fi
30099
30100
30101
30102###############################################################################
30103LIBZIP_CAN_USE_MMAP=true
30104
30105
30106
30107###############################################################################
30108#
30109# Check if altzone exists in time.h
30110#
30111
30112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30113/* end confdefs.h.  */
30114#include <time.h>
30115int
30116main ()
30117{
30118return (int)altzone;
30119  ;
30120  return 0;
30121}
30122_ACEOF
30123if ac_fn_cxx_try_link "$LINENO"; then :
30124  has_altzone=yes
30125else
30126  has_altzone=no
30127fi
30128rm -f core conftest.err conftest.$ac_objext \
30129    conftest$ac_exeext conftest.$ac_ext
30130if test "x$has_altzone" = xyes; then
30131
30132$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30133
30134fi
30135
30136###############################################################################
30137#
30138# Check the maths library
30139#
30140
30141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30142$as_echo_n "checking for cos in -lm... " >&6; }
30143if test "${ac_cv_lib_m_cos+set}" = set; then :
30144  $as_echo_n "(cached) " >&6
30145else
30146  ac_check_lib_save_LIBS=$LIBS
30147LIBS="-lm  $LIBS"
30148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30149/* end confdefs.h.  */
30150
30151/* Override any GCC internal prototype to avoid an error.
30152   Use char because int might match the return type of a GCC
30153   builtin and then its argument prototype would still apply.  */
30154#ifdef __cplusplus
30155extern "C"
30156#endif
30157char cos ();
30158int
30159main ()
30160{
30161return cos ();
30162  ;
30163  return 0;
30164}
30165_ACEOF
30166if ac_fn_cxx_try_link "$LINENO"; then :
30167  ac_cv_lib_m_cos=yes
30168else
30169  ac_cv_lib_m_cos=no
30170fi
30171rm -f core conftest.err conftest.$ac_objext \
30172    conftest$ac_exeext conftest.$ac_ext
30173LIBS=$ac_check_lib_save_LIBS
30174fi
30175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30176$as_echo "$ac_cv_lib_m_cos" >&6; }
30177if test "x$ac_cv_lib_m_cos" = x""yes; then :
30178  cat >>confdefs.h <<_ACEOF
30179#define HAVE_LIBM 1
30180_ACEOF
30181
30182  LIBS="-lm $LIBS"
30183
30184else
30185
30186                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30187$as_echo "$as_me: Maths library was not found" >&6;}
30188
30189fi
30190
30191
30192
30193###############################################################################
30194#
30195# Check for libdl.so
30196
30197save_LIBS="$LIBS"
30198LIBS=""
30199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30200$as_echo_n "checking for dlopen in -ldl... " >&6; }
30201if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30202  $as_echo_n "(cached) " >&6
30203else
30204  ac_check_lib_save_LIBS=$LIBS
30205LIBS="-ldl  $LIBS"
30206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30207/* end confdefs.h.  */
30208
30209/* Override any GCC internal prototype to avoid an error.
30210   Use char because int might match the return type of a GCC
30211   builtin and then its argument prototype would still apply.  */
30212#ifdef __cplusplus
30213extern "C"
30214#endif
30215char dlopen ();
30216int
30217main ()
30218{
30219return dlopen ();
30220  ;
30221  return 0;
30222}
30223_ACEOF
30224if ac_fn_cxx_try_link "$LINENO"; then :
30225  ac_cv_lib_dl_dlopen=yes
30226else
30227  ac_cv_lib_dl_dlopen=no
30228fi
30229rm -f core conftest.err conftest.$ac_objext \
30230    conftest$ac_exeext conftest.$ac_ext
30231LIBS=$ac_check_lib_save_LIBS
30232fi
30233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30234$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30235if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30236  cat >>confdefs.h <<_ACEOF
30237#define HAVE_LIBDL 1
30238_ACEOF
30239
30240  LIBS="-ldl $LIBS"
30241
30242fi
30243
30244LIBDL="$LIBS"
30245
30246LIBS="$save_LIBS"
30247
30248
30249
30250###############################################################################
30251#
30252# statically link libstdc++ before C++ ABI is stablized on Linux unless
30253# dynamic build is configured on command line.
30254#
30255
30256# Check whether --with-stdc++lib was given.
30257if test "${with_stdc__lib+set}" = set; then :
30258  withval=$with_stdc__lib;
30259    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30260        && test "x$with_stdc__lib" != xdefault; then
30261      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
30262    fi
30263
30264else
30265  with_stdc__lib=default
30266
30267fi
30268
30269
30270if test "x$OPENJDK_TARGET_OS" = xlinux; then
30271    # Test if -lstdc++ works.
30272    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
30273$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
30274    ac_ext=cpp
30275ac_cpp='$CXXCPP $CPPFLAGS'
30276ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30277ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30278ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30279
30280    OLD_CXXFLAGS="$CXXFLAGS"
30281    CXXFLAGS="$CXXFLAGS -lstdc++"
30282    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30283/* end confdefs.h.  */
30284
30285int
30286main ()
30287{
30288return 0;
30289  ;
30290  return 0;
30291}
30292_ACEOF
30293if ac_fn_cxx_try_link "$LINENO"; then :
30294  has_dynamic_libstdcxx=yes
30295else
30296  has_dynamic_libstdcxx=no
30297fi
30298rm -f core conftest.err conftest.$ac_objext \
30299    conftest$ac_exeext conftest.$ac_ext
30300    CXXFLAGS="$OLD_CXXFLAGS"
30301    ac_ext=cpp
30302ac_cpp='$CXXCPP $CPPFLAGS'
30303ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30304ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30305ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30306
30307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
30308$as_echo "$has_dynamic_libstdcxx" >&6; }
30309
30310    # Test if stdc++ can be linked statically.
30311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
30312$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
30313    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
30314    ac_ext=cpp
30315ac_cpp='$CXXCPP $CPPFLAGS'
30316ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30317ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30318ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30319
30320    OLD_LIBS="$LIBS"
30321    OLD_CXX="$CXX"
30322    LIBS="$STATIC_STDCXX_FLAGS"
30323    CXX="$CC"
30324    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30325/* end confdefs.h.  */
30326
30327int
30328main ()
30329{
30330return 0;
30331  ;
30332  return 0;
30333}
30334_ACEOF
30335if ac_fn_cxx_try_link "$LINENO"; then :
30336  has_static_libstdcxx=yes
30337else
30338  has_static_libstdcxx=no
30339fi
30340rm -f core conftest.err conftest.$ac_objext \
30341    conftest$ac_exeext conftest.$ac_ext
30342    LIBS="$OLD_LIBS"
30343    CXX="$OLD_CXX"
30344    ac_ext=cpp
30345ac_cpp='$CXXCPP $CPPFLAGS'
30346ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30347ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30348ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30349
30350    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
30351$as_echo "$has_static_libstdcxx" >&6; }
30352
30353    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
30354        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
30355    fi
30356
30357    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
30358        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
30359    fi
30360
30361    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
30362        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
30363    fi
30364
30365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
30366$as_echo_n "checking how to link with libstdc++... " >&6; }
30367    # If dynamic was requested, it's available since it would fail above otherwise.
30368    # If dynamic wasn't requested, go with static unless it isn't available.
30369    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
30370        LIBCXX="$LIBCXX -lstdc++"
30371        LDCXX="$CXX"
30372        STATIC_CXX_SETTING="STATIC_CXX=false"
30373        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
30374$as_echo "dynamic" >&6; }
30375    else
30376        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
30377        LDCXX="$CC"
30378        STATIC_CXX_SETTING="STATIC_CXX=true"
30379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
30380$as_echo "static" >&6; }
30381    fi
30382fi
30383
30384
30385# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
30386if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
30387    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
30388fi
30389
30390# TODO better (platform agnostic) test
30391if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
30392    LIBCXX="-lstdc++"
30393fi
30394
30395
30396
30397
30398
30399# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
30400
30401# When using cygwin or msys, we need a wrapper binary that renames
30402# /cygdrive/c/ arguments into c:/ arguments and peeks into
30403# @files and rewrites these too! This wrapper binary is
30404# called fixpath.
30405FIXPATH=
30406if test "x$OPENJDK_BUILD_OS" = xwindows; then
30407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30408$as_echo_n "checking if fixpath can be created... " >&6; }
30409    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30410    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30411    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30412      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30413      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30414      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30415      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30416    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30417      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30418      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30419
30420      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30421      # @ was chosen as separator to minimize risk of other tools messing around with it
30422      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30423      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30424
30425      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30426    fi
30427    rm -f $OUTPUT_ROOT/fixpath*
30428    cd $OUTPUT_ROOT
30429    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30430    cd $CURDIR
30431
30432    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30433        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30434$as_echo "no" >&6; }
30435        cat $OUTPUT_ROOT/fixpath1.log
30436        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30437    fi
30438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30439$as_echo "yes" >&6; }
30440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30441$as_echo_n "checking if fixpath.exe works... " >&6; }
30442    cd $OUTPUT_ROOT
30443    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30444    cd $CURDIR
30445    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30447$as_echo "no" >&6; }
30448        cat $OUTPUT_ROOT/fixpath2.log
30449        as_fn_error $? "fixpath did not work!" "$LINENO" 5
30450    fi
30451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30452$as_echo "yes" >&6; }
30453    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30454fi
30455
30456
30457
30458
30459###############################################################################
30460#
30461# We need to do some final tweaking, when everything else is done.
30462#
30463###############################################################################
30464
30465
30466HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
30467
30468
30469# The name of the Service Agent jar.
30470SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
30471if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
30472    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
30473fi
30474
30475
30476
30477
30478###############################################################################
30479#
30480# Configure parts of the build that only affect the build performance,
30481# not the result.
30482#
30483###############################################################################
30484
30485
30486# How many cores do we have on this build system?
30487
30488# Check whether --with-num-cores was given.
30489if test "${with_num_cores+set}" = set; then :
30490  withval=$with_num_cores;
30491fi
30492
30493if test "x$with_num_cores" = x; then
30494    # The number of cores were not specified, try to probe them.
30495
30496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
30497$as_echo_n "checking for number of cores... " >&6; }
30498    NUM_CORES=1
30499    FOUND_CORES=no
30500
30501    if test -f /proc/cpuinfo; then
30502        # Looks like a Linux (or cygwin) system
30503        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
30504        FOUND_CORES=yes
30505    elif test -x /usr/sbin/psrinfo; then
30506        # Looks like a Solaris system
30507        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
30508        FOUND_CORES=yes
30509    elif test -x /usr/sbin/system_profiler; then
30510        # Looks like a MacOSX system
30511        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
30512        FOUND_CORES=yes
30513    elif test -n "$NUMBER_OF_PROCESSORS"; then
30514        # On windows, look in the env
30515        NUM_CORES=$NUMBER_OF_PROCESSORS
30516        FOUND_CORES=yes
30517    fi
30518
30519    # For c/c++ code we run twice as many concurrent build
30520    # jobs than we have cores, otherwise we will stall on io.
30521    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
30522
30523    if test "x$FOUND_CORES" = xyes; then
30524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
30525$as_echo "$NUM_CORES" >&6; }
30526    else
30527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
30528$as_echo "could not detect number of cores, defaulting to 1" >&6; }
30529        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
30530$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
30531    fi
30532
30533
30534else
30535    NUM_CORES=$with_num_cores
30536    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
30537fi
30538
30539
30540
30541
30542# How much memory do we have on this build system?
30543
30544# Check whether --with-memory-size was given.
30545if test "${with_memory_size+set}" = set; then :
30546  withval=$with_memory_size;
30547fi
30548
30549if test "x$with_memory_size" = x; then
30550    # The memory size was not specified, try to probe it.
30551
30552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
30553$as_echo_n "checking for memory size... " >&6; }
30554    # Default to 1024 MB
30555    MEMORY_SIZE=1024
30556    FOUND_MEM=no
30557
30558    if test -f /proc/meminfo; then
30559        # Looks like a Linux (or cygwin) system
30560        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
30561        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
30562        FOUND_MEM=yes
30563    elif test -x /usr/sbin/prtconf; then
30564        # Looks like a Solaris system
30565        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
30566        FOUND_MEM=yes
30567    elif test -x /usr/sbin/system_profiler; then
30568        # Looks like a MacOSX system
30569        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
30570        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
30571        FOUND_MEM=yes
30572    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
30573        # Windows, but without cygwin
30574        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
30575        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
30576        FOUND_MEM=yes
30577    fi
30578
30579    if test "x$FOUND_MEM" = xyes; then
30580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
30581$as_echo "$MEMORY_SIZE MB" >&6; }
30582    else
30583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
30584$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
30585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
30586$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
30587    fi
30588
30589else
30590    MEMORY_SIZE=$with_memory_size
30591fi
30592
30593
30594
30595# Setup smart javac (after cores and memory have been setup)
30596
30597
30598# Check whether --with-sjavac-server-java was given.
30599if test "${with_sjavac_server_java+set}" = set; then :
30600  withval=$with_sjavac_server_java;
30601fi
30602
30603
30604if test "x$with_sjavac_server_java" != x; then
30605    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
30606    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
30607    if test "x$FOUND_VERSION" = x; then
30608        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
30609    fi
30610else
30611    SJAVAC_SERVER_JAVA=""
30612    # Hotspot specific options.
30613
30614    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
30615    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
30616    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
30617    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
30618    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30619        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
30620    fi
30621
30622    # JRockit specific options.
30623
30624    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
30625    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
30626    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
30627    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
30628    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30629        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
30630    fi
30631
30632    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
30633fi
30634
30635
30636
30637# Check whether --with-sjavac-server-cores was given.
30638if test "${with_sjavac_server_cores+set}" = set; then :
30639  withval=$with_sjavac_server_cores;
30640fi
30641
30642if test "x$with_sjavac_server_cores" != x; then
30643    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
30644else
30645    if test "$NUM_CORES" -gt 16; then
30646        # We set this arbitrary limit because we want to limit the heap
30647        # size of the javac server.
30648        # In the future we will make the javac compilers in the server
30649        # share more and more state, thus enabling us to use more and
30650        # more concurrent threads in the server.
30651        SJAVAC_SERVER_CORES="16"
30652    else
30653        SJAVAC_SERVER_CORES="$NUM_CORES"
30654    fi
30655
30656    if test "$MEMORY_SIZE" -gt "17000"; then
30657        MAX_HEAP_MEM=10000
30658
30659    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30660    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30661    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30662    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30663    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30664        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30665    fi
30666
30667
30668    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30669    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
30670    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
30671    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
30672    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30673        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
30674    fi
30675
30676    elif test "$MEMORY_SIZE" -gt "10000"; then
30677        MAX_HEAP_MEM=6000
30678
30679    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30680    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30681    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30682    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30683    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30684        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30685    fi
30686
30687
30688    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30689    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
30690    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
30691    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
30692    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30693        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
30694    fi
30695
30696    elif test "$MEMORY_SIZE" -gt "5000"; then
30697        MAX_HEAP_MEM=3000
30698
30699    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30700    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30701    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30702    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30703    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30704        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30705    fi
30706
30707
30708    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30709    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
30710    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
30711    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
30712    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30713        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
30714    fi
30715
30716    elif test "$MEMORY_SIZE" -gt "3800"; then
30717        MAX_HEAP_MEM=2500
30718
30719    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30720    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
30721    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
30722    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
30723    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30724        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
30725    fi
30726
30727    elif test "$MEMORY_SIZE" -gt "1900"; then
30728        MAX_HEAP_MEM=1200
30729
30730    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30731    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
30732    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
30733    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
30734    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30735        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
30736    fi
30737
30738    elif test "$MEMORY_SIZE" -gt "1000"; then
30739        MAX_HEAP_MEM=900
30740
30741    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30742    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
30743    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
30744    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
30745    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30746        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
30747    fi
30748
30749    else
30750        MAX_HEAP_MEM=512
30751
30752    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30753    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
30754    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
30755    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
30756    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30757        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
30758    fi
30759
30760    fi
30761
30762
30763    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30764    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
30765    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
30766    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
30767    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30768        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
30769    fi
30770
30771
30772    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30773    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
30774    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
30775    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
30776    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30777        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
30778    fi
30779
30780
30781    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30782    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
30783    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
30784    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
30785    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30786        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
30787    fi
30788
30789
30790    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
30791    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
30792        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
30793$as_echo_n "checking if number of server cores must be reduced... " >&6; }
30794        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
30795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
30796$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
30797    fi
30798fi
30799
30800
30801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
30802$as_echo_n "checking whether to use sjavac... " >&6; }
30803# Check whether --enable-sjavac was given.
30804if test "${enable_sjavac+set}" = set; then :
30805  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
30806else
30807  ENABLE_SJAVAC='no'
30808fi
30809
30810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
30811$as_echo "$ENABLE_SJAVAC" >&6; }
30812
30813
30814if test "x$ENABLE_SJAVAC" = xyes; then
30815    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
30816else
30817    SJAVAC_SERVER_DIR=
30818fi
30819
30820
30821
30822
30823# Can the C/C++ compiler use precompiled headers?
30824
30825
30826###############################################################################
30827#
30828# Can the C/C++ compiler use precompiled headers?
30829#
30830# Check whether --enable-precompiled-headers was given.
30831if test "${enable_precompiled_headers+set}" = set; then :
30832  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
30833else
30834  ENABLE_PRECOMPH=yes
30835fi
30836
30837
30838USE_PRECOMPILED_HEADER=1
30839if test "x$ENABLE_PRECOMPH" = xno; then
30840    USE_PRECOMPILED_HEADER=0
30841fi
30842
30843if test "x$ENABLE_PRECOMPH" = xyes; then
30844    # Check that the compiler actually supports precomp headers.
30845    if test "x$GCC" = xyes; then
30846         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
30847$as_echo_n "checking that precompiled headers work... " >&6; }
30848         echo "int alfa();" > conftest.h
30849         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
30850         if test ! -f conftest.hpp.gch; then
30851             USE_PRECOMPILED_HEADER=0
30852             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30853$as_echo "no" >&6; }
30854         else
30855             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30856$as_echo "yes" >&6; }
30857         fi
30858         rm -f conftest.h conftest.hpp.gch
30859    fi
30860fi
30861
30862
30863
30864
30865# Setup use of ccache, if available
30866
30867    # Check whether --enable-ccache was given.
30868if test "${enable_ccache+set}" = set; then :
30869  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
30870else
30871  ENABLE_CCACHE=yes
30872fi
30873
30874    if test "x$ENABLE_CCACHE" = xyes; then
30875        # Extract the first word of "ccache", so it can be a program name with args.
30876set dummy ccache; ac_word=$2
30877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30878$as_echo_n "checking for $ac_word... " >&6; }
30879if test "${ac_cv_path_CCACHE+set}" = set; then :
30880  $as_echo_n "(cached) " >&6
30881else
30882  case $CCACHE in
30883  [\\/]* | ?:[\\/]*)
30884  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
30885  ;;
30886  *)
30887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30888for as_dir in $PATH
30889do
30890  IFS=$as_save_IFS
30891  test -z "$as_dir" && as_dir=.
30892    for ac_exec_ext in '' $ac_executable_extensions; do
30893  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
30894    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
30895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30896    break 2
30897  fi
30898done
30899  done
30900IFS=$as_save_IFS
30901
30902  ;;
30903esac
30904fi
30905CCACHE=$ac_cv_path_CCACHE
30906if test -n "$CCACHE"; then
30907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
30908$as_echo "$CCACHE" >&6; }
30909else
30910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30911$as_echo "no" >&6; }
30912fi
30913
30914
30915    else
30916        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
30917$as_echo_n "checking for ccache... " >&6; }
30918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
30919$as_echo "explicitly disabled" >&6; }
30920        CCACHE=
30921    fi
30922
30923
30924
30925# Check whether --with-ccache-dir was given.
30926if test "${with_ccache_dir+set}" = set; then :
30927  withval=$with_ccache_dir;
30928fi
30929
30930
30931    if test "x$with_ccache_dir" != x; then
30932        # When using a non home ccache directory, assume the use is to share ccache files
30933        # with other users. Thus change the umask.
30934        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
30935    fi
30936    CCACHE_FOUND=""
30937    if test "x$CCACHE" != x; then
30938
30939    if test "x$CCACHE" != x; then
30940        CCACHE_FOUND="true"
30941        # Only use ccache if it is 3.1.4 or later, which supports
30942        # precompiled headers.
30943        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
30944$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
30945        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
30946        if test "x$HAS_GOOD_CCACHE" = x; then
30947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
30948$as_echo "no, disabling ccache" >&6; }
30949            CCACHE=
30950        else
30951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30952$as_echo "yes" >&6; }
30953            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
30954$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
30955            PUSHED_FLAGS="$CXXFLAGS"
30956            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
30957            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30958/* end confdefs.h.  */
30959
30960int
30961main ()
30962{
30963
30964  ;
30965  return 0;
30966}
30967_ACEOF
30968if ac_fn_cxx_try_compile "$LINENO"; then :
30969  CC_KNOWS_CCACHE_TRICK=yes
30970else
30971  CC_KNOWS_CCACHE_TRICK=no
30972fi
30973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30974            CXXFLAGS="$PUSHED_FLAGS"
30975            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
30976                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30977$as_echo "yes" >&6; }
30978            else
30979                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
30980$as_echo "no, disabling ccaching of precompiled headers" >&6; }
30981                CCACHE=
30982            fi
30983        fi
30984    fi
30985
30986    if test "x$CCACHE" != x; then
30987        CCACHE_SLOPPINESS=time_macros
30988        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
30989        CCACHE_FLAGS=-fpch-preprocess
30990
30991        if test "x$SET_CCACHE_DIR" != x; then
30992            mkdir -p $CCACHE_DIR > /dev/null 2>&1
30993	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
30994        fi
30995    fi
30996
30997    fi
30998
30999
31000###############################################################################
31001#
31002# And now the finish...
31003#
31004###############################################################################
31005
31006# Check for some common pitfalls
31007
31008
31009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31010$as_echo_n "checking if build directory is on local disk... " >&6; }
31011
31012	# df -l lists only local disks; if the given directory is not found then
31013	# a non-zero exit code is given
31014  if test "x$DF" = x; then
31015    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31016      # msys does not have df; use Windows "net use" instead.
31017      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31018      if test "x$IS_NETWORK_DISK" = x; then
31019        OUTPUT_DIR_IS_LOCAL="yes"
31020      else
31021        OUTPUT_DIR_IS_LOCAL="no"
31022      fi
31023    else
31024      # No df here, say it's local
31025      OUTPUT_DIR_IS_LOCAL="yes"
31026    fi
31027  else
31028    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31029      OUTPUT_DIR_IS_LOCAL="yes"
31030    else
31031      OUTPUT_DIR_IS_LOCAL="no"
31032    fi
31033  fi
31034
31035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31036$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31037
31038# Check if the user has any old-style ALT_ variables set.
31039FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31040
31041# Before generating output files, test if they exist. If they do, this is a reconfigure.
31042# Since we can't properly handle the dependencies for this, warn the user about the situation
31043if test -e $OUTPUT_ROOT/spec.gmk; then
31044  IS_RECONFIGURE=yes
31045else
31046  IS_RECONFIGURE=no
31047fi
31048
31049if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31050  HIDE_PERFORMANCE_HINTS=yes
31051else
31052  HIDE_PERFORMANCE_HINTS=no
31053  # Hide it the next time around...
31054  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31055fi
31056
31057
31058
31059# At the end, call the custom hook. (Dummy macro if no custom sources available)
31060
31061
31062# We're messing a bit with internal autoconf variables to put the config.status
31063# in the output directory instead of the current directory.
31064CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31065# Create the actual output files. Now the main work of configure is done.
31066cat >confcache <<\_ACEOF
31067# This file is a shell script that caches the results of configure
31068# tests run on this system so they can be shared between configure
31069# scripts and configure runs, see configure's option --config-cache.
31070# It is not useful on other systems.  If it contains results you don't
31071# want to keep, you may remove or edit it.
31072#
31073# config.status only pays attention to the cache file if you give it
31074# the --recheck option to rerun configure.
31075#
31076# `ac_cv_env_foo' variables (set or unset) will be overridden when
31077# loading this file, other *unset* `ac_cv_foo' will be assigned the
31078# following values.
31079
31080_ACEOF
31081
31082# The following way of writing the cache mishandles newlines in values,
31083# but we know of no workaround that is simple, portable, and efficient.
31084# So, we kill variables containing newlines.
31085# Ultrix sh set writes to stderr and can't be redirected directly,
31086# and sets the high bit in the cache file unless we assign to the vars.
31087(
31088  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31089    eval ac_val=\$$ac_var
31090    case $ac_val in #(
31091    *${as_nl}*)
31092      case $ac_var in #(
31093      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31094$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31095      esac
31096      case $ac_var in #(
31097      _ | IFS | as_nl) ;; #(
31098      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31099      *) { eval $ac_var=; unset $ac_var;} ;;
31100      esac ;;
31101    esac
31102  done
31103
31104  (set) 2>&1 |
31105    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31106    *${as_nl}ac_space=\ *)
31107      # `set' does not quote correctly, so add quotes: double-quote
31108      # substitution turns \\\\ into \\, and sed turns \\ into \.
31109      sed -n \
31110	"s/'/'\\\\''/g;
31111	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31112      ;; #(
31113    *)
31114      # `set' quotes correctly as required by POSIX, so do not add quotes.
31115      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31116      ;;
31117    esac |
31118    sort
31119) |
31120  sed '
31121     /^ac_cv_env_/b end
31122     t clear
31123     :clear
31124     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31125     t end
31126     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31127     :end' >>confcache
31128if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31129  if test -w "$cache_file"; then
31130    test "x$cache_file" != "x/dev/null" &&
31131      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31132$as_echo "$as_me: updating cache $cache_file" >&6;}
31133    cat confcache >$cache_file
31134  else
31135    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31136$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31137  fi
31138fi
31139rm -f confcache
31140
31141test "x$prefix" = xNONE && prefix=$ac_default_prefix
31142# Let make expand exec_prefix.
31143test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31144
31145DEFS=-DHAVE_CONFIG_H
31146
31147ac_libobjs=
31148ac_ltlibobjs=
31149U=
31150for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31151  # 1. Remove the extension, and $U if already installed.
31152  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31153  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31154  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31155  #    will be set to the directory where LIBOBJS objects are built.
31156  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31157  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31158done
31159LIBOBJS=$ac_libobjs
31160
31161LTLIBOBJS=$ac_ltlibobjs
31162
31163
31164
31165: ${CONFIG_STATUS=./config.status}
31166ac_write_fail=0
31167ac_clean_files_save=$ac_clean_files
31168ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31169{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31170$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31171as_write_fail=0
31172cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31173#! $SHELL
31174# Generated by $as_me.
31175# Run this file to recreate the current configuration.
31176# Compiler output produced by configure, useful for debugging
31177# configure, is in config.log if it exists.
31178
31179debug=false
31180ac_cs_recheck=false
31181ac_cs_silent=false
31182
31183SHELL=\${CONFIG_SHELL-$SHELL}
31184export SHELL
31185_ASEOF
31186cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31187## -------------------- ##
31188## M4sh Initialization. ##
31189## -------------------- ##
31190
31191# Be more Bourne compatible
31192DUALCASE=1; export DUALCASE # for MKS sh
31193if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31194  emulate sh
31195  NULLCMD=:
31196  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31197  # is contrary to our usage.  Disable this feature.
31198  alias -g '${1+"$@"}'='"$@"'
31199  setopt NO_GLOB_SUBST
31200else
31201  case `(set -o) 2>/dev/null` in #(
31202  *posix*) :
31203    set -o posix ;; #(
31204  *) :
31205     ;;
31206esac
31207fi
31208
31209
31210as_nl='
31211'
31212export as_nl
31213# Printing a long string crashes Solaris 7 /usr/bin/printf.
31214as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31215as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31216as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31217# Prefer a ksh shell builtin over an external printf program on Solaris,
31218# but without wasting forks for bash or zsh.
31219if test -z "$BASH_VERSION$ZSH_VERSION" \
31220    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31221  as_echo='print -r --'
31222  as_echo_n='print -rn --'
31223elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31224  as_echo='printf %s\n'
31225  as_echo_n='printf %s'
31226else
31227  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31228    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31229    as_echo_n='/usr/ucb/echo -n'
31230  else
31231    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31232    as_echo_n_body='eval
31233      arg=$1;
31234      case $arg in #(
31235      *"$as_nl"*)
31236	expr "X$arg" : "X\\(.*\\)$as_nl";
31237	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31238      esac;
31239      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31240    '
31241    export as_echo_n_body
31242    as_echo_n='sh -c $as_echo_n_body as_echo'
31243  fi
31244  export as_echo_body
31245  as_echo='sh -c $as_echo_body as_echo'
31246fi
31247
31248# The user is always right.
31249if test "${PATH_SEPARATOR+set}" != set; then
31250  PATH_SEPARATOR=:
31251  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31252    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31253      PATH_SEPARATOR=';'
31254  }
31255fi
31256
31257
31258# IFS
31259# We need space, tab and new line, in precisely that order.  Quoting is
31260# there to prevent editors from complaining about space-tab.
31261# (If _AS_PATH_WALK were called with IFS unset, it would disable word
31262# splitting by setting IFS to empty value.)
31263IFS=" ""	$as_nl"
31264
31265# Find who we are.  Look in the path if we contain no directory separator.
31266case $0 in #((
31267  *[\\/]* ) as_myself=$0 ;;
31268  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31269for as_dir in $PATH
31270do
31271  IFS=$as_save_IFS
31272  test -z "$as_dir" && as_dir=.
31273    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
31274  done
31275IFS=$as_save_IFS
31276
31277     ;;
31278esac
31279# We did not find ourselves, most probably we were run as `sh COMMAND'
31280# in which case we are not to be found in the path.
31281if test "x$as_myself" = x; then
31282  as_myself=$0
31283fi
31284if test ! -f "$as_myself"; then
31285  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
31286  exit 1
31287fi
31288
31289# Unset variables that we do not need and which cause bugs (e.g. in
31290# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
31291# suppresses any "Segmentation fault" message there.  '((' could
31292# trigger a bug in pdksh 5.2.14.
31293for as_var in BASH_ENV ENV MAIL MAILPATH
31294do eval test x\${$as_var+set} = xset \
31295  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
31296done
31297PS1='$ '
31298PS2='> '
31299PS4='+ '
31300
31301# NLS nuisances.
31302LC_ALL=C
31303export LC_ALL
31304LANGUAGE=C
31305export LANGUAGE
31306
31307# CDPATH.
31308(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31309
31310
31311# as_fn_error STATUS ERROR [LINENO LOG_FD]
31312# ----------------------------------------
31313# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
31314# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
31315# script with STATUS, using 1 if that was 0.
31316as_fn_error ()
31317{
31318  as_status=$1; test $as_status -eq 0 && as_status=1
31319  if test "$4"; then
31320    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
31321    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
31322  fi
31323  $as_echo "$as_me: error: $2" >&2
31324  as_fn_exit $as_status
31325} # as_fn_error
31326
31327
31328# as_fn_set_status STATUS
31329# -----------------------
31330# Set $? to STATUS, without forking.
31331as_fn_set_status ()
31332{
31333  return $1
31334} # as_fn_set_status
31335
31336# as_fn_exit STATUS
31337# -----------------
31338# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
31339as_fn_exit ()
31340{
31341  set +e
31342  as_fn_set_status $1
31343  exit $1
31344} # as_fn_exit
31345
31346# as_fn_unset VAR
31347# ---------------
31348# Portably unset VAR.
31349as_fn_unset ()
31350{
31351  { eval $1=; unset $1;}
31352}
31353as_unset=as_fn_unset
31354# as_fn_append VAR VALUE
31355# ----------------------
31356# Append the text in VALUE to the end of the definition contained in VAR. Take
31357# advantage of any shell optimizations that allow amortized linear growth over
31358# repeated appends, instead of the typical quadratic growth present in naive
31359# implementations.
31360if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
31361  eval 'as_fn_append ()
31362  {
31363    eval $1+=\$2
31364  }'
31365else
31366  as_fn_append ()
31367  {
31368    eval $1=\$$1\$2
31369  }
31370fi # as_fn_append
31371
31372# as_fn_arith ARG...
31373# ------------------
31374# Perform arithmetic evaluation on the ARGs, and store the result in the
31375# global $as_val. Take advantage of shells that can avoid forks. The arguments
31376# must be portable across $(()) and expr.
31377if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
31378  eval 'as_fn_arith ()
31379  {
31380    as_val=$(( $* ))
31381  }'
31382else
31383  as_fn_arith ()
31384  {
31385    as_val=`expr "$@" || test $? -eq 1`
31386  }
31387fi # as_fn_arith
31388
31389
31390if expr a : '\(a\)' >/dev/null 2>&1 &&
31391   test "X`expr 00001 : '.*\(...\)'`" = X001; then
31392  as_expr=expr
31393else
31394  as_expr=false
31395fi
31396
31397if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
31398  as_basename=basename
31399else
31400  as_basename=false
31401fi
31402
31403if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
31404  as_dirname=dirname
31405else
31406  as_dirname=false
31407fi
31408
31409as_me=`$as_basename -- "$0" ||
31410$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31411	 X"$0" : 'X\(//\)$' \| \
31412	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31413$as_echo X/"$0" |
31414    sed '/^.*\/\([^/][^/]*\)\/*$/{
31415	    s//\1/
31416	    q
31417	  }
31418	  /^X\/\(\/\/\)$/{
31419	    s//\1/
31420	    q
31421	  }
31422	  /^X\/\(\/\).*/{
31423	    s//\1/
31424	    q
31425	  }
31426	  s/.*/./; q'`
31427
31428# Avoid depending upon Character Ranges.
31429as_cr_letters='abcdefghijklmnopqrstuvwxyz'
31430as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
31431as_cr_Letters=$as_cr_letters$as_cr_LETTERS
31432as_cr_digits='0123456789'
31433as_cr_alnum=$as_cr_Letters$as_cr_digits
31434
31435ECHO_C= ECHO_N= ECHO_T=
31436case `echo -n x` in #(((((
31437-n*)
31438  case `echo 'xy\c'` in
31439  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
31440  xy)  ECHO_C='\c';;
31441  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
31442       ECHO_T='	';;
31443  esac;;
31444*)
31445  ECHO_N='-n';;
31446esac
31447
31448rm -f conf$$ conf$$.exe conf$$.file
31449if test -d conf$$.dir; then
31450  rm -f conf$$.dir/conf$$.file
31451else
31452  rm -f conf$$.dir
31453  mkdir conf$$.dir 2>/dev/null
31454fi
31455if (echo >conf$$.file) 2>/dev/null; then
31456  if ln -s conf$$.file conf$$ 2>/dev/null; then
31457    as_ln_s='ln -s'
31458    # ... but there are two gotchas:
31459    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
31460    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
31461    # In both cases, we have to default to `cp -p'.
31462    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
31463      as_ln_s='cp -p'
31464  elif ln conf$$.file conf$$ 2>/dev/null; then
31465    as_ln_s=ln
31466  else
31467    as_ln_s='cp -p'
31468  fi
31469else
31470  as_ln_s='cp -p'
31471fi
31472rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
31473rmdir conf$$.dir 2>/dev/null
31474
31475
31476# as_fn_mkdir_p
31477# -------------
31478# Create "$as_dir" as a directory, including parents if necessary.
31479as_fn_mkdir_p ()
31480{
31481
31482  case $as_dir in #(
31483  -*) as_dir=./$as_dir;;
31484  esac
31485  test -d "$as_dir" || eval $as_mkdir_p || {
31486    as_dirs=
31487    while :; do
31488      case $as_dir in #(
31489      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
31490      *) as_qdir=$as_dir;;
31491      esac
31492      as_dirs="'$as_qdir' $as_dirs"
31493      as_dir=`$as_dirname -- "$as_dir" ||
31494$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31495	 X"$as_dir" : 'X\(//\)[^/]' \| \
31496	 X"$as_dir" : 'X\(//\)$' \| \
31497	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31498$as_echo X"$as_dir" |
31499    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31500	    s//\1/
31501	    q
31502	  }
31503	  /^X\(\/\/\)[^/].*/{
31504	    s//\1/
31505	    q
31506	  }
31507	  /^X\(\/\/\)$/{
31508	    s//\1/
31509	    q
31510	  }
31511	  /^X\(\/\).*/{
31512	    s//\1/
31513	    q
31514	  }
31515	  s/.*/./; q'`
31516      test -d "$as_dir" && break
31517    done
31518    test -z "$as_dirs" || eval "mkdir $as_dirs"
31519  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
31520
31521
31522} # as_fn_mkdir_p
31523if mkdir -p . 2>/dev/null; then
31524  as_mkdir_p='mkdir -p "$as_dir"'
31525else
31526  test -d ./-p && rmdir ./-p
31527  as_mkdir_p=false
31528fi
31529
31530if test -x / >/dev/null 2>&1; then
31531  as_test_x='test -x'
31532else
31533  if ls -dL / >/dev/null 2>&1; then
31534    as_ls_L_option=L
31535  else
31536    as_ls_L_option=
31537  fi
31538  as_test_x='
31539    eval sh -c '\''
31540      if test -d "$1"; then
31541	test -d "$1/.";
31542      else
31543	case $1 in #(
31544	-*)set "./$1";;
31545	esac;
31546	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
31547	???[sx]*):;;*)false;;esac;fi
31548    '\'' sh
31549  '
31550fi
31551as_executable_p=$as_test_x
31552
31553# Sed expression to map a string onto a valid CPP name.
31554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
31555
31556# Sed expression to map a string onto a valid variable name.
31557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
31558
31559
31560exec 6>&1
31561## ----------------------------------- ##
31562## Main body of $CONFIG_STATUS script. ##
31563## ----------------------------------- ##
31564_ASEOF
31565test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
31566
31567cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31568# Save the log message, to keep $0 and so on meaningful, and to
31569# report actual input values of CONFIG_FILES etc. instead of their
31570# values after options handling.
31571ac_log="
31572This file was extended by OpenJDK $as_me jdk8, which was
31573generated by GNU Autoconf 2.67.  Invocation command line was
31574
31575  CONFIG_FILES    = $CONFIG_FILES
31576  CONFIG_HEADERS  = $CONFIG_HEADERS
31577  CONFIG_LINKS    = $CONFIG_LINKS
31578  CONFIG_COMMANDS = $CONFIG_COMMANDS
31579  $ $0 $@
31580
31581on `(hostname || uname -n) 2>/dev/null | sed 1q`
31582"
31583
31584_ACEOF
31585
31586case $ac_config_files in *"
31587"*) set x $ac_config_files; shift; ac_config_files=$*;;
31588esac
31589
31590case $ac_config_headers in *"
31591"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
31592esac
31593
31594
31595cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31596# Files that config.status was made for.
31597config_files="$ac_config_files"
31598config_headers="$ac_config_headers"
31599
31600_ACEOF
31601
31602cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31603ac_cs_usage="\
31604\`$as_me' instantiates files and other configuration actions
31605from templates according to the current configuration.  Unless the files
31606and actions are specified as TAGs, all are instantiated by default.
31607
31608Usage: $0 [OPTION]... [TAG]...
31609
31610  -h, --help       print this help, then exit
31611  -V, --version    print version number and configuration settings, then exit
31612      --config     print configuration, then exit
31613  -q, --quiet, --silent
31614                   do not print progress messages
31615  -d, --debug      don't remove temporary files
31616      --recheck    update $as_me by reconfiguring in the same conditions
31617      --file=FILE[:TEMPLATE]
31618                   instantiate the configuration file FILE
31619      --header=FILE[:TEMPLATE]
31620                   instantiate the configuration header FILE
31621
31622Configuration files:
31623$config_files
31624
31625Configuration headers:
31626$config_headers
31627
31628Report bugs to <build-dev@openjdk.java.net>.
31629OpenJDK home page: <http://openjdk.java.net>."
31630
31631_ACEOF
31632cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31633ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31634ac_cs_version="\\
31635OpenJDK config.status jdk8
31636configured by $0, generated by GNU Autoconf 2.67,
31637  with options \\"\$ac_cs_config\\"
31638
31639Copyright (C) 2010 Free Software Foundation, Inc.
31640This config.status script is free software; the Free Software Foundation
31641gives unlimited permission to copy, distribute and modify it."
31642
31643ac_pwd='$ac_pwd'
31644srcdir='$srcdir'
31645AWK='$AWK'
31646test -n "\$AWK" || AWK=awk
31647_ACEOF
31648
31649cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31650# The default lists apply if the user does not specify any file.
31651ac_need_defaults=:
31652while test $# != 0
31653do
31654  case $1 in
31655  --*=?*)
31656    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31657    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31658    ac_shift=:
31659    ;;
31660  --*=)
31661    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31662    ac_optarg=
31663    ac_shift=:
31664    ;;
31665  *)
31666    ac_option=$1
31667    ac_optarg=$2
31668    ac_shift=shift
31669    ;;
31670  esac
31671
31672  case $ac_option in
31673  # Handling of the options.
31674  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31675    ac_cs_recheck=: ;;
31676  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31677    $as_echo "$ac_cs_version"; exit ;;
31678  --config | --confi | --conf | --con | --co | --c )
31679    $as_echo "$ac_cs_config"; exit ;;
31680  --debug | --debu | --deb | --de | --d | -d )
31681    debug=: ;;
31682  --file | --fil | --fi | --f )
31683    $ac_shift
31684    case $ac_optarg in
31685    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31686    '') as_fn_error $? "missing file argument" ;;
31687    esac
31688    as_fn_append CONFIG_FILES " '$ac_optarg'"
31689    ac_need_defaults=false;;
31690  --header | --heade | --head | --hea )
31691    $ac_shift
31692    case $ac_optarg in
31693    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31694    esac
31695    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31696    ac_need_defaults=false;;
31697  --he | --h)
31698    # Conflict between --help and --header
31699    as_fn_error $? "ambiguous option: \`$1'
31700Try \`$0 --help' for more information.";;
31701  --help | --hel | -h )
31702    $as_echo "$ac_cs_usage"; exit ;;
31703  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31704  | -silent | --silent | --silen | --sile | --sil | --si | --s)
31705    ac_cs_silent=: ;;
31706
31707  # This is an error.
31708  -*) as_fn_error $? "unrecognized option: \`$1'
31709Try \`$0 --help' for more information." ;;
31710
31711  *) as_fn_append ac_config_targets " $1"
31712     ac_need_defaults=false ;;
31713
31714  esac
31715  shift
31716done
31717
31718ac_configure_extra_args=
31719
31720if $ac_cs_silent; then
31721  exec 6>/dev/null
31722  ac_configure_extra_args="$ac_configure_extra_args --silent"
31723fi
31724
31725_ACEOF
31726cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31727if \$ac_cs_recheck; then
31728  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31729  shift
31730  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
31731  CONFIG_SHELL='$SHELL'
31732  export CONFIG_SHELL
31733  exec "\$@"
31734fi
31735
31736_ACEOF
31737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31738exec 5>>config.log
31739{
31740  echo
31741  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31742## Running $as_me. ##
31743_ASBOX
31744  $as_echo "$ac_log"
31745} >&5
31746
31747_ACEOF
31748cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31749_ACEOF
31750
31751cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31752
31753# Handling of arguments.
31754for ac_config_target in $ac_config_targets
31755do
31756  case $ac_config_target in
31757    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
31758    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
31759    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
31760    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
31761    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
31762    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
31763    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
31764
31765  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
31766  esac
31767done
31768
31769
31770# If the user did not use the arguments to specify the items to instantiate,
31771# then the envvar interface is used.  Set only those that are not.
31772# We use the long form for the default assignment because of an extremely
31773# bizarre bug on SunOS 4.1.3.
31774if $ac_need_defaults; then
31775  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
31776  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
31777fi
31778
31779# Have a temporary directory for convenience.  Make it in the build tree
31780# simply because there is no reason against having it here, and in addition,
31781# creating and moving files from /tmp can sometimes cause problems.
31782# Hook for its removal unless debugging.
31783# Note that there is a small window in which the directory will not be cleaned:
31784# after its creation but before its name has been assigned to `$tmp'.
31785$debug ||
31786{
31787  tmp=
31788  trap 'exit_status=$?
31789  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
31790' 0
31791  trap 'as_fn_exit 1' 1 2 13 15
31792}
31793# Create a (secure) tmp directory for tmp files.
31794
31795{
31796  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31797  test -n "$tmp" && test -d "$tmp"
31798}  ||
31799{
31800  tmp=./conf$$-$RANDOM
31801  (umask 077 && mkdir "$tmp")
31802} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31803
31804# Set up the scripts for CONFIG_FILES section.
31805# No need to generate them if there are no CONFIG_FILES.
31806# This happens for instance with `./config.status config.h'.
31807if test -n "$CONFIG_FILES"; then
31808
31809
31810ac_cr=`echo X | tr X '\015'`
31811# On cygwin, bash can eat \r inside `` if the user requested igncr.
31812# But we know of no other shell where ac_cr would be empty at this
31813# point, so we can use a bashism as a fallback.
31814if test "x$ac_cr" = x; then
31815  eval ac_cr=\$\'\\r\'
31816fi
31817ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31818if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31819  ac_cs_awk_cr='\\r'
31820else
31821  ac_cs_awk_cr=$ac_cr
31822fi
31823
31824echo 'BEGIN {' >"$tmp/subs1.awk" &&
31825_ACEOF
31826
31827
31828{
31829  echo "cat >conf$$subs.awk <<_ACEOF" &&
31830  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31831  echo "_ACEOF"
31832} >conf$$subs.sh ||
31833  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31834ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
31835ac_delim='%!_!# '
31836for ac_last_try in false false false false false :; do
31837  . ./conf$$subs.sh ||
31838    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31839
31840  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31841  if test $ac_delim_n = $ac_delim_num; then
31842    break
31843  elif $ac_last_try; then
31844    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31845  else
31846    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31847  fi
31848done
31849rm -f conf$$subs.sh
31850
31851cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31852cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
31853_ACEOF
31854sed -n '
31855h
31856s/^/S["/; s/!.*/"]=/
31857p
31858g
31859s/^[^!]*!//
31860:repl
31861t repl
31862s/'"$ac_delim"'$//
31863t delim
31864:nl
31865h
31866s/\(.\{148\}\)..*/\1/
31867t more1
31868s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31869p
31870n
31871b repl
31872:more1
31873s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31874p
31875g
31876s/.\{148\}//
31877t nl
31878:delim
31879h
31880s/\(.\{148\}\)..*/\1/
31881t more2
31882s/["\\]/\\&/g; s/^/"/; s/$/"/
31883p
31884b
31885:more2
31886s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31887p
31888g
31889s/.\{148\}//
31890t delim
31891' <conf$$subs.awk | sed '
31892/^[^""]/{
31893  N
31894  s/\n//
31895}
31896' >>$CONFIG_STATUS || ac_write_fail=1
31897rm -f conf$$subs.awk
31898cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31899_ACAWK
31900cat >>"\$tmp/subs1.awk" <<_ACAWK &&
31901  for (key in S) S_is_set[key] = 1
31902  FS = ""
31903
31904}
31905{
31906  line = $ 0
31907  nfields = split(line, field, "@")
31908  substed = 0
31909  len = length(field[1])
31910  for (i = 2; i < nfields; i++) {
31911    key = field[i]
31912    keylen = length(key)
31913    if (S_is_set[key]) {
31914      value = S[key]
31915      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31916      len += length(value) + length(field[++i])
31917      substed = 1
31918    } else
31919      len += 1 + keylen
31920  }
31921
31922  print line
31923}
31924
31925_ACAWK
31926_ACEOF
31927cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31928if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31929  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31930else
31931  cat
31932fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
31933  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
31934_ACEOF
31935
31936# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
31937# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
31938# trailing colons and then remove the whole line if VPATH becomes empty
31939# (actually we leave an empty line to preserve line numbers).
31940if test "x$srcdir" = x.; then
31941  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
31942h
31943s///
31944s/^/:/
31945s/[	 ]*$/:/
31946s/:\$(srcdir):/:/g
31947s/:\${srcdir}:/:/g
31948s/:@srcdir@:/:/g
31949s/^:*//
31950s/:*$//
31951x
31952s/\(=[	 ]*\).*/\1/
31953G
31954s/\n//
31955s/^[^=]*=[	 ]*$//
31956}'
31957fi
31958
31959cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31960fi # test -n "$CONFIG_FILES"
31961
31962# Set up the scripts for CONFIG_HEADERS section.
31963# No need to generate them if there are no CONFIG_HEADERS.
31964# This happens for instance with `./config.status Makefile'.
31965if test -n "$CONFIG_HEADERS"; then
31966cat >"$tmp/defines.awk" <<\_ACAWK ||
31967BEGIN {
31968_ACEOF
31969
31970# Transform confdefs.h into an awk script `defines.awk', embedded as
31971# here-document in config.status, that substitutes the proper values into
31972# config.h.in to produce config.h.
31973
31974# Create a delimiter string that does not exist in confdefs.h, to ease
31975# handling of long lines.
31976ac_delim='%!_!# '
31977for ac_last_try in false false :; do
31978  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
31979  if test -z "$ac_t"; then
31980    break
31981  elif $ac_last_try; then
31982    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
31983  else
31984    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31985  fi
31986done
31987
31988# For the awk script, D is an array of macro values keyed by name,
31989# likewise P contains macro parameters if any.  Preserve backslash
31990# newline sequences.
31991
31992ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31993sed -n '
31994s/.\{148\}/&'"$ac_delim"'/g
31995t rset
31996:rset
31997s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
31998t def
31999d
32000:def
32001s/\\$//
32002t bsnl
32003s/["\\]/\\&/g
32004s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32005D["\1"]=" \3"/p
32006s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32007d
32008:bsnl
32009s/["\\]/\\&/g
32010s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32011D["\1"]=" \3\\\\\\n"\\/p
32012t cont
32013s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32014t cont
32015d
32016:cont
32017n
32018s/.\{148\}/&'"$ac_delim"'/g
32019t clear
32020:clear
32021s/\\$//
32022t bsnlc
32023s/["\\]/\\&/g; s/^/"/; s/$/"/p
32024d
32025:bsnlc
32026s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32027b cont
32028' <confdefs.h | sed '
32029s/'"$ac_delim"'/"\\\
32030"/g' >>$CONFIG_STATUS || ac_write_fail=1
32031
32032cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32033  for (key in D) D_is_set[key] = 1
32034  FS = ""
32035}
32036/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32037  line = \$ 0
32038  split(line, arg, " ")
32039  if (arg[1] == "#") {
32040    defundef = arg[2]
32041    mac1 = arg[3]
32042  } else {
32043    defundef = substr(arg[1], 2)
32044    mac1 = arg[2]
32045  }
32046  split(mac1, mac2, "(") #)
32047  macro = mac2[1]
32048  prefix = substr(line, 1, index(line, defundef) - 1)
32049  if (D_is_set[macro]) {
32050    # Preserve the white space surrounding the "#".
32051    print prefix "define", macro P[macro] D[macro]
32052    next
32053  } else {
32054    # Replace #undef with comments.  This is necessary, for example,
32055    # in the case of _POSIX_SOURCE, which is predefined and required
32056    # on some systems where configure will not decide to define it.
32057    if (defundef == "undef") {
32058      print "/*", prefix defundef, macro, "*/"
32059      next
32060    }
32061  }
32062}
32063{ print }
32064_ACAWK
32065_ACEOF
32066cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32067  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32068fi # test -n "$CONFIG_HEADERS"
32069
32070
32071eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32072shift
32073for ac_tag
32074do
32075  case $ac_tag in
32076  :[FHLC]) ac_mode=$ac_tag; continue;;
32077  esac
32078  case $ac_mode$ac_tag in
32079  :[FHL]*:*);;
32080  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32081  :[FH]-) ac_tag=-:-;;
32082  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32083  esac
32084  ac_save_IFS=$IFS
32085  IFS=:
32086  set x $ac_tag
32087  IFS=$ac_save_IFS
32088  shift
32089  ac_file=$1
32090  shift
32091
32092  case $ac_mode in
32093  :L) ac_source=$1;;
32094  :[FH])
32095    ac_file_inputs=
32096    for ac_f
32097    do
32098      case $ac_f in
32099      -) ac_f="$tmp/stdin";;
32100      *) # Look for the file first in the build tree, then in the source tree
32101	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32102	 # because $ac_f cannot contain `:'.
32103	 test -f "$ac_f" ||
32104	   case $ac_f in
32105	   [\\/$]*) false;;
32106	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32107	   esac ||
32108	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32109      esac
32110      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32111      as_fn_append ac_file_inputs " '$ac_f'"
32112    done
32113
32114    # Let's still pretend it is `configure' which instantiates (i.e., don't
32115    # use $as_me), people would be surprised to read:
32116    #    /* config.h.  Generated by config.status.  */
32117    configure_input='Generated from '`
32118	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32119	`' by configure.'
32120    if test x"$ac_file" != x-; then
32121      configure_input="$ac_file.  $configure_input"
32122      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32123$as_echo "$as_me: creating $ac_file" >&6;}
32124    fi
32125    # Neutralize special characters interpreted by sed in replacement strings.
32126    case $configure_input in #(
32127    *\&* | *\|* | *\\* )
32128       ac_sed_conf_input=`$as_echo "$configure_input" |
32129       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32130    *) ac_sed_conf_input=$configure_input;;
32131    esac
32132
32133    case $ac_tag in
32134    *:-:* | *:-) cat >"$tmp/stdin" \
32135      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32136    esac
32137    ;;
32138  esac
32139
32140  ac_dir=`$as_dirname -- "$ac_file" ||
32141$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32142	 X"$ac_file" : 'X\(//\)[^/]' \| \
32143	 X"$ac_file" : 'X\(//\)$' \| \
32144	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32145$as_echo X"$ac_file" |
32146    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32147	    s//\1/
32148	    q
32149	  }
32150	  /^X\(\/\/\)[^/].*/{
32151	    s//\1/
32152	    q
32153	  }
32154	  /^X\(\/\/\)$/{
32155	    s//\1/
32156	    q
32157	  }
32158	  /^X\(\/\).*/{
32159	    s//\1/
32160	    q
32161	  }
32162	  s/.*/./; q'`
32163  as_dir="$ac_dir"; as_fn_mkdir_p
32164  ac_builddir=.
32165
32166case "$ac_dir" in
32167.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32168*)
32169  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32170  # A ".." for each directory in $ac_dir_suffix.
32171  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32172  case $ac_top_builddir_sub in
32173  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32174  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32175  esac ;;
32176esac
32177ac_abs_top_builddir=$ac_pwd
32178ac_abs_builddir=$ac_pwd$ac_dir_suffix
32179# for backward compatibility:
32180ac_top_builddir=$ac_top_build_prefix
32181
32182case $srcdir in
32183  .)  # We are building in place.
32184    ac_srcdir=.
32185    ac_top_srcdir=$ac_top_builddir_sub
32186    ac_abs_top_srcdir=$ac_pwd ;;
32187  [\\/]* | ?:[\\/]* )  # Absolute name.
32188    ac_srcdir=$srcdir$ac_dir_suffix;
32189    ac_top_srcdir=$srcdir
32190    ac_abs_top_srcdir=$srcdir ;;
32191  *) # Relative name.
32192    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32193    ac_top_srcdir=$ac_top_build_prefix$srcdir
32194    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32195esac
32196ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32197
32198
32199  case $ac_mode in
32200  :F)
32201  #
32202  # CONFIG_FILE
32203  #
32204
32205_ACEOF
32206
32207cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32208# If the template does not know about datarootdir, expand it.
32209# FIXME: This hack should be removed a few years after 2.60.
32210ac_datarootdir_hack=; ac_datarootdir_seen=
32211ac_sed_dataroot='
32212/datarootdir/ {
32213  p
32214  q
32215}
32216/@datadir@/p
32217/@docdir@/p
32218/@infodir@/p
32219/@localedir@/p
32220/@mandir@/p'
32221case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32222*datarootdir*) ac_datarootdir_seen=yes;;
32223*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32224  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32225$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32226_ACEOF
32227cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32228  ac_datarootdir_hack='
32229  s&@datadir@&$datadir&g
32230  s&@docdir@&$docdir&g
32231  s&@infodir@&$infodir&g
32232  s&@localedir@&$localedir&g
32233  s&@mandir@&$mandir&g
32234  s&\\\${datarootdir}&$datarootdir&g' ;;
32235esac
32236_ACEOF
32237
32238# Neutralize VPATH when `$srcdir' = `.'.
32239# Shell code in configure.ac might set extrasub.
32240# FIXME: do we really want to maintain this feature?
32241cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32242ac_sed_extra="$ac_vpsub
32243$extrasub
32244_ACEOF
32245cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32246:t
32247/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32248s|@configure_input@|$ac_sed_conf_input|;t t
32249s&@top_builddir@&$ac_top_builddir_sub&;t t
32250s&@top_build_prefix@&$ac_top_build_prefix&;t t
32251s&@srcdir@&$ac_srcdir&;t t
32252s&@abs_srcdir@&$ac_abs_srcdir&;t t
32253s&@top_srcdir@&$ac_top_srcdir&;t t
32254s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32255s&@builddir@&$ac_builddir&;t t
32256s&@abs_builddir@&$ac_abs_builddir&;t t
32257s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32258$ac_datarootdir_hack
32259"
32260eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
32261  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32262
32263test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32264  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
32265  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
32266  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32267which seems to be undefined.  Please make sure it is defined" >&5
32268$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32269which seems to be undefined.  Please make sure it is defined" >&2;}
32270
32271  rm -f "$tmp/stdin"
32272  case $ac_file in
32273  -) cat "$tmp/out" && rm -f "$tmp/out";;
32274  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
32275  esac \
32276  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32277 ;;
32278  :H)
32279  #
32280  # CONFIG_HEADER
32281  #
32282  if test x"$ac_file" != x-; then
32283    {
32284      $as_echo "/* $configure_input  */" \
32285      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
32286    } >"$tmp/config.h" \
32287      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32288    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
32289      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32290$as_echo "$as_me: $ac_file is unchanged" >&6;}
32291    else
32292      rm -f "$ac_file"
32293      mv "$tmp/config.h" "$ac_file" \
32294	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
32295    fi
32296  else
32297    $as_echo "/* $configure_input  */" \
32298      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
32299      || as_fn_error $? "could not create -" "$LINENO" 5
32300  fi
32301 ;;
32302
32303
32304  esac
32305
32306done # for ac_tag
32307
32308
32309as_fn_exit 0
32310_ACEOF
32311ac_clean_files=$ac_clean_files_save
32312
32313test $ac_write_fail = 0 ||
32314  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
32315
32316
32317# configure is writing to config.log, and then calls config.status.
32318# config.status does its own redirection, appending to config.log.
32319# Unfortunately, on DOS this fails, as config.log is still kept open
32320# by configure, so config.status won't be able to write to it; its
32321# output is simply discarded.  So we exec the FD to /dev/null,
32322# effectively closing config.log, so it can be properly (re)opened and
32323# appended to by config.status.  When coming back to configure, we
32324# need to make the FD available again.
32325if test "$no_create" != yes; then
32326  ac_cs_success=:
32327  ac_config_status_args=
32328  test "$silent" = yes &&
32329    ac_config_status_args="$ac_config_status_args --quiet"
32330  exec 5>/dev/null
32331  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
32332  exec 5>>config.log
32333  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
32334  # would make configure fail if this is the last instruction.
32335  $ac_cs_success || as_fn_exit 1
32336fi
32337if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
32338  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
32339$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
32340fi
32341
32342
32343# Make the compare script executable
32344$CHMOD +x $OUTPUT_ROOT/compare.sh
32345
32346# Finally output some useful information to the user
32347
32348# Finally output some useful information to the user
32349
32350if test "x$CCACHE_FOUND" != x; then
32351	if  test "x$HAS_GOOD_CCACHE" = x; then
32352		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
32353		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
32354	else
32355		CCACHE_STATUS="installed and in use"
32356	fi
32357else
32358	if test "x$GCC" = xyes; then
32359		CCACHE_STATUS="not installed (consider installing)"
32360		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
32361	else
32362		CCACHE_STATUS="not available for your system"
32363	fi
32364fi
32365
32366printf "\n"
32367printf "====================================================\n"
32368printf "A new configuration has been successfully created in\n"
32369printf "$OUTPUT_ROOT\n"
32370if test "x$CONFIGURE_COMMAND_LINE" != x; then
32371	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
32372else
32373	printf "using default settings.\n"
32374fi
32375
32376printf "\n"
32377printf "Configuration summary:\n"
32378printf "* Debug level:    $DEBUG_LEVEL\n"
32379printf "* JDK variant:    $JDK_VARIANT\n"
32380printf "* JVM variants:   $with_jvm_variants\n"
32381printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
32382
32383printf "\n"
32384printf "Tools summary:\n"
32385if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
32386  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
32387fi
32388printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
32389printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
32390printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
32391
32392printf "\n"
32393printf "Build performance summary:\n"
32394printf "* Cores to use:   $NUM_CORES\n"
32395printf "* Memory limit:   $MEMORY_SIZE MB\n"
32396printf "* ccache status:  $CCACHE_STATUS\n"
32397printf "\n"
32398
32399if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
32400	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
32401	printf "$CCACHE_HELP_MSG\n"
32402
32403    # Print a helpful message on how to acquire the necessary build dependency.
32404    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
32405    MISSING_DEPENDENCY=ccache
32406    PKGHANDLER_COMMAND=
32407
32408    case $PKGHANDLER in
32409	apt-get)
32410                apt_help     $MISSING_DEPENDENCY ;;
32411    yum)
32412                yum_help     $MISSING_DEPENDENCY ;;
32413	port)
32414                port_help    $MISSING_DEPENDENCY ;;
32415	pkgutil)
32416                pkgutil_help $MISSING_DEPENDENCY ;;
32417	pkgadd)
32418                pkgadd_help  $MISSING_DEPENDENCY ;;
32419    * )
32420      break ;;
32421    esac
32422
32423    if test "x$PKGHANDLER_COMMAND" != x; then
32424        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32425    fi
32426
32427	printf "$HELP_MSG\n"
32428	printf "\n"
32429fi
32430
32431if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
32432	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
32433	printf "will result in longer build times.\n"
32434	printf "\n"
32435fi
32436
32437if test "x$FOUND_ALT_VARIABLES" != "x"; then
32438	printf "WARNING: You have old-style ALT_ environment variables set.\n"
32439	printf "These are not respected, and will be ignored. It is recommended\n"
32440	printf "that you clean your environment. The following variables are set:\n"
32441	printf "$FOUND_ALT_VARIABLES\n"
32442	printf "\n"
32443fi
32444
32445if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
32446	printf "WARNING: Your build output directory is not on a local disk.\n"
32447	printf "This will severely degrade build performance!\n"
32448	printf "It is recommended that you create an output directory on a local disk,\n"
32449	printf "and run the configure script again from that directory.\n"
32450	printf "\n"
32451fi
32452
32453if test "x$IS_RECONFIGURE" = "xyes"; then
32454	printf "WARNING: The result of this configuration has overridden an older\n"
32455	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
32456	printf "proper build. Failure to do so might result in strange build problems.\n"
32457	printf "\n"
32458fi
32459
32460