generated-configure.sh revision 500:ed9e5635fc80
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_OUTPUT
734OVERRIDE_SRC_ROOT
735ADD_SRC_ROOT
736JDK_TOPDIR
737HOTSPOT_TOPDIR
738JAXWS_TOPDIR
739JAXP_TOPDIR
740CORBA_TOPDIR
741LANGTOOLS_TOPDIR
742BOOT_JDK_JVMARGS
743JAVAC_FLAGS
744BOOT_JDK_SOURCETARGET
745BOOT_JDK
746BOOT_TOOLSJAR
747BOOT_RTJAR
748JAVA_CHECK
749JAVAC_CHECK
750COOKED_BUILD_NUMBER
751FULL_VERSION
752RELEASE
753JDK_VERSION
754RUNTIME_NAME
755COPYRIGHT_YEAR
756MACOSX_BUNDLE_ID_BASE
757MACOSX_BUNDLE_NAME_BASE
758COMPANY_NAME
759JDK_RC_PLATFORM_NAME
760PRODUCT_SUFFIX
761PRODUCT_NAME
762LAUNCHER_NAME
763MILESTONE
764JDK_BUILD_NUMBER
765JDK_UPDATE_VERSION
766JDK_MICRO_VERSION
767JDK_MINOR_VERSION
768JDK_MAJOR_VERSION
769COMPRESS_JARS
770UNLIMITED_CRYPTO
771CACERTS_FILE
772TEST_IN_BUILD
773BUILD_HEADLESS
774SUPPORT_HEADFUL
775SUPPORT_HEADLESS
776SET_OPENJDK
777BDEPS_FTP
778BDEPS_UNZIP
779OS_VERSION_MICRO
780OS_VERSION_MINOR
781OS_VERSION_MAJOR
782PKG_CONFIG
783COMM
784TIME
785STAT
786HG
787READELF
788OTOOL
789LDD
790ZIP
791UNZIP
792FIND_DELETE
793MAKE
794CHECK_TOOLSDIR_MAKE
795CHECK_TOOLSDIR_GMAKE
796CHECK_MAKE
797CHECK_GMAKE
798PKGHANDLER
799OUTPUT_ROOT
800CONF_NAME
801SPEC
802BUILD_VARIANT_RELEASE
803DEBUG_CLASSFILES
804FASTDEBUG
805VARIANT
806DEBUG_LEVEL
807MACOSX_UNIVERSAL
808JVM_VARIANT_ZEROSHARK
809JVM_VARIANT_ZERO
810JVM_VARIANT_KERNEL
811JVM_VARIANT_CLIENT
812JVM_VARIANT_SERVER
813JVM_VARIANTS
814JDK_VARIANT
815BUILD_LOG_WRAPPER
816BUILD_LOG_PREVIOUS
817BUILD_LOG
818SYS_ROOT
819PATH_SEP
820SRC_ROOT
821DEFINE_CROSS_COMPILE_ARCH
822LP64
823OPENJDK_TARGET_OS_API_DIR
824OPENJDK_TARGET_CPU_JLI_CFLAGS
825OPENJDK_TARGET_CPU_OSARCH
826OPENJDK_TARGET_CPU_ISADIR
827OPENJDK_TARGET_CPU_LIBDIR
828OPENJDK_TARGET_CPU_LEGACY_LIB
829OPENJDK_TARGET_CPU_LEGACY
830REQUIRED_OS_VERSION
831REQUIRED_OS_NAME
832COMPILE_TYPE
833OPENJDK_TARGET_CPU_ENDIAN
834OPENJDK_TARGET_CPU_BITS
835OPENJDK_TARGET_CPU_ARCH
836OPENJDK_TARGET_CPU
837OPENJDK_TARGET_OS_API
838OPENJDK_TARGET_OS
839OPENJDK_BUILD_CPU_ENDIAN
840OPENJDK_BUILD_CPU_BITS
841OPENJDK_BUILD_CPU_ARCH
842OPENJDK_BUILD_CPU
843OPENJDK_BUILD_OS_API
844OPENJDK_BUILD_OS
845OPENJDK_BUILD_AUTOCONF_NAME
846OPENJDK_TARGET_AUTOCONF_NAME
847target_os
848target_vendor
849target_cpu
850target
851host_os
852host_vendor
853host_cpu
854host
855build_os
856build_vendor
857build_cpu
858build
859SETFILE
860DF
861READLINK
862CYGPATH
863NAWK
864SED
865FGREP
866EGREP
867GREP
868AWK
869XARGS
870WHICH
871WC
872UNIQ
873UNAME
874TR
875TOUCH
876TEE
877TAR
878TAIL
879SORT
880SH
881RM
882THEPWDCMD
883PRINTF
884MV
885MKTEMP
886MKDIR
887LS
888LN
889HEAD
890FIND
891FILE
892EXPR
893ECHO
894DIRNAME
895DIFF
896DATE
897CUT
898CP
899CMP
900CHMOD
901CAT
902BASH
903BASENAME
904DATE_WHEN_CONFIGURED
905CONFIGURE_COMMAND_LINE
906CUSTOM_MAKE_DIR
907target_alias
908host_alias
909build_alias
910LIBS
911ECHO_T
912ECHO_N
913ECHO_C
914DEFS
915mandir
916localedir
917libdir
918psdir
919pdfdir
920dvidir
921htmldir
922infodir
923docdir
924oldincludedir
925includedir
926localstatedir
927sharedstatedir
928sysconfdir
929datadir
930datarootdir
931libexecdir
932sbindir
933bindir
934program_transform_name
935prefix
936exec_prefix
937PACKAGE_URL
938PACKAGE_BUGREPORT
939PACKAGE_STRING
940PACKAGE_VERSION
941PACKAGE_TARNAME
942PACKAGE_NAME
943PATH_SEPARATOR
944SHELL'
945ac_subst_files=''
946ac_user_opts='
947enable_option_checking
948with_custom_make_dir
949with_target_bits
950with_sys_root
951with_tools_dir
952with_devkit
953with_jdk_variant
954with_jvm_variants
955enable_debug
956with_debug_level
957with_conf_name
958with_builddeps_conf
959with_builddeps_server
960with_builddeps_dir
961with_builddeps_group
962enable_openjdk_only
963enable_headful
964enable_hotspot_test_in_build
965with_cacerts_file
966enable_unlimited_crypto
967with_boot_jdk
968with_boot_jdk_jvmargs
969with_add_source_root
970with_override_source_root
971with_adds_and_overrides
972with_override_langtools
973with_override_corba
974with_override_jaxp
975with_override_jaxws
976with_override_hotspot
977with_override_jdk
978with_msvcr_dll
979with_extra_cflags
980with_extra_cxxflags
981with_extra_ldflags
982enable_debug_symbols
983enable_zip_debug_info
984enable_macosx_runtime_support
985with_x
986with_cups
987with_cups_include
988with_freetype
989with_alsa
990with_alsa_include
991with_alsa_lib
992with_zlib
993enable_static_link_stdc__
994with_num_cores
995with_memory_size
996with_sjavac_server_java
997with_sjavac_server_cores
998enable_sjavac
999enable_precompiled_headers
1000enable_ccache
1001with_ccache_dir
1002'
1003      ac_precious_vars='build_alias
1004host_alias
1005target_alias
1006PKG_CONFIG
1007CC
1008CFLAGS
1009LDFLAGS
1010LIBS
1011CPPFLAGS
1012CXX
1013CXXFLAGS
1014CCC
1015OBJC
1016OBJCFLAGS
1017CPP
1018CXXCPP
1019XMKMF
1020FREETYPE2_CFLAGS
1021FREETYPE2_LIBS
1022ALSA_CFLAGS
1023ALSA_LIBS'
1024
1025
1026# Initialize some variables set by options.
1027ac_init_help=
1028ac_init_version=false
1029ac_unrecognized_opts=
1030ac_unrecognized_sep=
1031# The variables have the same names as the options, with
1032# dashes changed to underlines.
1033cache_file=/dev/null
1034exec_prefix=NONE
1035no_create=
1036no_recursion=
1037prefix=NONE
1038program_prefix=NONE
1039program_suffix=NONE
1040program_transform_name=s,x,x,
1041silent=
1042site=
1043srcdir=
1044verbose=
1045x_includes=NONE
1046x_libraries=NONE
1047
1048# Installation directory options.
1049# These are left unexpanded so users can "make install exec_prefix=/foo"
1050# and all the variables that are supposed to be based on exec_prefix
1051# by default will actually change.
1052# Use braces instead of parens because sh, perl, etc. also accept them.
1053# (The list follows the same order as the GNU Coding Standards.)
1054bindir='${exec_prefix}/bin'
1055sbindir='${exec_prefix}/sbin'
1056libexecdir='${exec_prefix}/libexec'
1057datarootdir='${prefix}/share'
1058datadir='${datarootdir}'
1059sysconfdir='${prefix}/etc'
1060sharedstatedir='${prefix}/com'
1061localstatedir='${prefix}/var'
1062includedir='${prefix}/include'
1063oldincludedir='/usr/include'
1064docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1065infodir='${datarootdir}/info'
1066htmldir='${docdir}'
1067dvidir='${docdir}'
1068pdfdir='${docdir}'
1069psdir='${docdir}'
1070libdir='${exec_prefix}/lib'
1071localedir='${datarootdir}/locale'
1072mandir='${datarootdir}/man'
1073
1074ac_prev=
1075ac_dashdash=
1076for ac_option
1077do
1078  # If the previous option needs an argument, assign it.
1079  if test -n "$ac_prev"; then
1080    eval $ac_prev=\$ac_option
1081    ac_prev=
1082    continue
1083  fi
1084
1085  case $ac_option in
1086  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1087  *=)   ac_optarg= ;;
1088  *)    ac_optarg=yes ;;
1089  esac
1090
1091  # Accept the important Cygnus configure options, so we can diagnose typos.
1092
1093  case $ac_dashdash$ac_option in
1094  --)
1095    ac_dashdash=yes ;;
1096
1097  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1098    ac_prev=bindir ;;
1099  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1100    bindir=$ac_optarg ;;
1101
1102  -build | --build | --buil | --bui | --bu)
1103    ac_prev=build_alias ;;
1104  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1105    build_alias=$ac_optarg ;;
1106
1107  -cache-file | --cache-file | --cache-fil | --cache-fi \
1108  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1109    ac_prev=cache_file ;;
1110  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1111  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1112    cache_file=$ac_optarg ;;
1113
1114  --config-cache | -C)
1115    cache_file=config.cache ;;
1116
1117  -datadir | --datadir | --datadi | --datad)
1118    ac_prev=datadir ;;
1119  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1120    datadir=$ac_optarg ;;
1121
1122  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1123  | --dataroo | --dataro | --datar)
1124    ac_prev=datarootdir ;;
1125  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1126  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1127    datarootdir=$ac_optarg ;;
1128
1129  -disable-* | --disable-*)
1130    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1131    # Reject names that are not valid shell variable names.
1132    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1133      as_fn_error $? "invalid feature name: $ac_useropt"
1134    ac_useropt_orig=$ac_useropt
1135    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1136    case $ac_user_opts in
1137      *"
1138"enable_$ac_useropt"
1139"*) ;;
1140      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1141	 ac_unrecognized_sep=', ';;
1142    esac
1143    eval enable_$ac_useropt=no ;;
1144
1145  -docdir | --docdir | --docdi | --doc | --do)
1146    ac_prev=docdir ;;
1147  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1148    docdir=$ac_optarg ;;
1149
1150  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1151    ac_prev=dvidir ;;
1152  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1153    dvidir=$ac_optarg ;;
1154
1155  -enable-* | --enable-*)
1156    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1157    # Reject names that are not valid shell variable names.
1158    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1159      as_fn_error $? "invalid feature name: $ac_useropt"
1160    ac_useropt_orig=$ac_useropt
1161    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1162    case $ac_user_opts in
1163      *"
1164"enable_$ac_useropt"
1165"*) ;;
1166      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1167	 ac_unrecognized_sep=', ';;
1168    esac
1169    eval enable_$ac_useropt=\$ac_optarg ;;
1170
1171  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1172  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1173  | --exec | --exe | --ex)
1174    ac_prev=exec_prefix ;;
1175  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1176  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1177  | --exec=* | --exe=* | --ex=*)
1178    exec_prefix=$ac_optarg ;;
1179
1180  -gas | --gas | --ga | --g)
1181    # Obsolete; use --with-gas.
1182    with_gas=yes ;;
1183
1184  -help | --help | --hel | --he | -h)
1185    ac_init_help=long ;;
1186  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1187    ac_init_help=recursive ;;
1188  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1189    ac_init_help=short ;;
1190
1191  -host | --host | --hos | --ho)
1192    ac_prev=host_alias ;;
1193  -host=* | --host=* | --hos=* | --ho=*)
1194    host_alias=$ac_optarg ;;
1195
1196  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1197    ac_prev=htmldir ;;
1198  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1199  | --ht=*)
1200    htmldir=$ac_optarg ;;
1201
1202  -includedir | --includedir | --includedi | --included | --include \
1203  | --includ | --inclu | --incl | --inc)
1204    ac_prev=includedir ;;
1205  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1206  | --includ=* | --inclu=* | --incl=* | --inc=*)
1207    includedir=$ac_optarg ;;
1208
1209  -infodir | --infodir | --infodi | --infod | --info | --inf)
1210    ac_prev=infodir ;;
1211  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1212    infodir=$ac_optarg ;;
1213
1214  -libdir | --libdir | --libdi | --libd)
1215    ac_prev=libdir ;;
1216  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1217    libdir=$ac_optarg ;;
1218
1219  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1220  | --libexe | --libex | --libe)
1221    ac_prev=libexecdir ;;
1222  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1223  | --libexe=* | --libex=* | --libe=*)
1224    libexecdir=$ac_optarg ;;
1225
1226  -localedir | --localedir | --localedi | --localed | --locale)
1227    ac_prev=localedir ;;
1228  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1229    localedir=$ac_optarg ;;
1230
1231  -localstatedir | --localstatedir | --localstatedi | --localstated \
1232  | --localstate | --localstat | --localsta | --localst | --locals)
1233    ac_prev=localstatedir ;;
1234  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1235  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1236    localstatedir=$ac_optarg ;;
1237
1238  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1239    ac_prev=mandir ;;
1240  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1241    mandir=$ac_optarg ;;
1242
1243  -nfp | --nfp | --nf)
1244    # Obsolete; use --without-fp.
1245    with_fp=no ;;
1246
1247  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1248  | --no-cr | --no-c | -n)
1249    no_create=yes ;;
1250
1251  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1252  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1253    no_recursion=yes ;;
1254
1255  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1256  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1257  | --oldin | --oldi | --old | --ol | --o)
1258    ac_prev=oldincludedir ;;
1259  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1260  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1261  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1262    oldincludedir=$ac_optarg ;;
1263
1264  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1265    ac_prev=prefix ;;
1266  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1267    prefix=$ac_optarg ;;
1268
1269  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1270  | --program-pre | --program-pr | --program-p)
1271    ac_prev=program_prefix ;;
1272  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1273  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1274    program_prefix=$ac_optarg ;;
1275
1276  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1277  | --program-suf | --program-su | --program-s)
1278    ac_prev=program_suffix ;;
1279  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1280  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1281    program_suffix=$ac_optarg ;;
1282
1283  -program-transform-name | --program-transform-name \
1284  | --program-transform-nam | --program-transform-na \
1285  | --program-transform-n | --program-transform- \
1286  | --program-transform | --program-transfor \
1287  | --program-transfo | --program-transf \
1288  | --program-trans | --program-tran \
1289  | --progr-tra | --program-tr | --program-t)
1290    ac_prev=program_transform_name ;;
1291  -program-transform-name=* | --program-transform-name=* \
1292  | --program-transform-nam=* | --program-transform-na=* \
1293  | --program-transform-n=* | --program-transform-=* \
1294  | --program-transform=* | --program-transfor=* \
1295  | --program-transfo=* | --program-transf=* \
1296  | --program-trans=* | --program-tran=* \
1297  | --progr-tra=* | --program-tr=* | --program-t=*)
1298    program_transform_name=$ac_optarg ;;
1299
1300  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1301    ac_prev=pdfdir ;;
1302  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1303    pdfdir=$ac_optarg ;;
1304
1305  -psdir | --psdir | --psdi | --psd | --ps)
1306    ac_prev=psdir ;;
1307  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1308    psdir=$ac_optarg ;;
1309
1310  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1311  | -silent | --silent | --silen | --sile | --sil)
1312    silent=yes ;;
1313
1314  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1315    ac_prev=sbindir ;;
1316  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1317  | --sbi=* | --sb=*)
1318    sbindir=$ac_optarg ;;
1319
1320  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1321  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1322  | --sharedst | --shareds | --shared | --share | --shar \
1323  | --sha | --sh)
1324    ac_prev=sharedstatedir ;;
1325  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1326  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1327  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1328  | --sha=* | --sh=*)
1329    sharedstatedir=$ac_optarg ;;
1330
1331  -site | --site | --sit)
1332    ac_prev=site ;;
1333  -site=* | --site=* | --sit=*)
1334    site=$ac_optarg ;;
1335
1336  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1337    ac_prev=srcdir ;;
1338  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1339    srcdir=$ac_optarg ;;
1340
1341  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1342  | --syscon | --sysco | --sysc | --sys | --sy)
1343    ac_prev=sysconfdir ;;
1344  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1345  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1346    sysconfdir=$ac_optarg ;;
1347
1348  -target | --target | --targe | --targ | --tar | --ta | --t)
1349    ac_prev=target_alias ;;
1350  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1351    target_alias=$ac_optarg ;;
1352
1353  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1354    verbose=yes ;;
1355
1356  -version | --version | --versio | --versi | --vers | -V)
1357    ac_init_version=: ;;
1358
1359  -with-* | --with-*)
1360    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1361    # Reject names that are not valid shell variable names.
1362    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1363      as_fn_error $? "invalid package name: $ac_useropt"
1364    ac_useropt_orig=$ac_useropt
1365    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1366    case $ac_user_opts in
1367      *"
1368"with_$ac_useropt"
1369"*) ;;
1370      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1371	 ac_unrecognized_sep=', ';;
1372    esac
1373    eval with_$ac_useropt=\$ac_optarg ;;
1374
1375  -without-* | --without-*)
1376    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1377    # Reject names that are not valid shell variable names.
1378    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1379      as_fn_error $? "invalid package name: $ac_useropt"
1380    ac_useropt_orig=$ac_useropt
1381    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1382    case $ac_user_opts in
1383      *"
1384"with_$ac_useropt"
1385"*) ;;
1386      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1387	 ac_unrecognized_sep=', ';;
1388    esac
1389    eval with_$ac_useropt=no ;;
1390
1391  --x)
1392    # Obsolete; use --with-x.
1393    with_x=yes ;;
1394
1395  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1396  | --x-incl | --x-inc | --x-in | --x-i)
1397    ac_prev=x_includes ;;
1398  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1399  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1400    x_includes=$ac_optarg ;;
1401
1402  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1403  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1404    ac_prev=x_libraries ;;
1405  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1406  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1407    x_libraries=$ac_optarg ;;
1408
1409  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1410Try \`$0 --help' for more information"
1411    ;;
1412
1413  *=*)
1414    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1415    # Reject names that are not valid shell variable names.
1416    case $ac_envvar in #(
1417      '' | [0-9]* | *[!_$as_cr_alnum]* )
1418      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1419    esac
1420    eval $ac_envvar=\$ac_optarg
1421    export $ac_envvar ;;
1422
1423  *)
1424    # FIXME: should be removed in autoconf 3.0.
1425    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1426    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1427      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1428    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1429    ;;
1430
1431  esac
1432done
1433
1434if test -n "$ac_prev"; then
1435  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1436  as_fn_error $? "missing argument to $ac_option"
1437fi
1438
1439if test -n "$ac_unrecognized_opts"; then
1440  case $enable_option_checking in
1441    no) ;;
1442    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1443    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1444  esac
1445fi
1446
1447# Check all directory arguments for consistency.
1448for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1449		datadir sysconfdir sharedstatedir localstatedir includedir \
1450		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1451		libdir localedir mandir
1452do
1453  eval ac_val=\$$ac_var
1454  # Remove trailing slashes.
1455  case $ac_val in
1456    */ )
1457      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1458      eval $ac_var=\$ac_val;;
1459  esac
1460  # Be sure to have absolute directory names.
1461  case $ac_val in
1462    [\\/$]* | ?:[\\/]* )  continue;;
1463    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1464  esac
1465  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1466done
1467
1468# There might be people who depend on the old broken behavior: `$host'
1469# used to hold the argument of --host etc.
1470# FIXME: To remove some day.
1471build=$build_alias
1472host=$host_alias
1473target=$target_alias
1474
1475# FIXME: To remove some day.
1476if test "x$host_alias" != x; then
1477  if test "x$build_alias" = x; then
1478    cross_compiling=maybe
1479    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1480    If a cross compiler is detected then cross compile mode will be used" >&2
1481  elif test "x$build_alias" != "x$host_alias"; then
1482    cross_compiling=yes
1483  fi
1484fi
1485
1486ac_tool_prefix=
1487test -n "$host_alias" && ac_tool_prefix=$host_alias-
1488
1489test "$silent" = yes && exec 6>/dev/null
1490
1491
1492ac_pwd=`pwd` && test -n "$ac_pwd" &&
1493ac_ls_di=`ls -di .` &&
1494ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1495  as_fn_error $? "working directory cannot be determined"
1496test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1497  as_fn_error $? "pwd does not report name of working directory"
1498
1499
1500# Find the source files, if location was not specified.
1501if test -z "$srcdir"; then
1502  ac_srcdir_defaulted=yes
1503  # Try the directory containing this script, then the parent directory.
1504  ac_confdir=`$as_dirname -- "$as_myself" ||
1505$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1506	 X"$as_myself" : 'X\(//\)[^/]' \| \
1507	 X"$as_myself" : 'X\(//\)$' \| \
1508	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1509$as_echo X"$as_myself" |
1510    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1511	    s//\1/
1512	    q
1513	  }
1514	  /^X\(\/\/\)[^/].*/{
1515	    s//\1/
1516	    q
1517	  }
1518	  /^X\(\/\/\)$/{
1519	    s//\1/
1520	    q
1521	  }
1522	  /^X\(\/\).*/{
1523	    s//\1/
1524	    q
1525	  }
1526	  s/.*/./; q'`
1527  srcdir=$ac_confdir
1528  if test ! -r "$srcdir/$ac_unique_file"; then
1529    srcdir=..
1530  fi
1531else
1532  ac_srcdir_defaulted=no
1533fi
1534if test ! -r "$srcdir/$ac_unique_file"; then
1535  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1536  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1537fi
1538ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1539ac_abs_confdir=`(
1540	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1541	pwd)`
1542# When building in place, set srcdir=.
1543if test "$ac_abs_confdir" = "$ac_pwd"; then
1544  srcdir=.
1545fi
1546# Remove unnecessary trailing slashes from srcdir.
1547# Double slashes in file names in object file debugging info
1548# mess up M-x gdb in Emacs.
1549case $srcdir in
1550*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1551esac
1552for ac_var in $ac_precious_vars; do
1553  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1554  eval ac_env_${ac_var}_value=\$${ac_var}
1555  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1556  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1557done
1558
1559#
1560# Report the --help message.
1561#
1562if test "$ac_init_help" = "long"; then
1563  # Omit some internal or obsolete options to make the list less imposing.
1564  # This message is too long to be a string in the A/UX 3.1 sh.
1565  cat <<_ACEOF
1566\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1567
1568Usage: $0 [OPTION]... [VAR=VALUE]...
1569
1570To assign environment variables (e.g., CC, CFLAGS...), specify them as
1571VAR=VALUE.  See below for descriptions of some of the useful variables.
1572
1573Defaults for the options are specified in brackets.
1574
1575Configuration:
1576  -h, --help              display this help and exit
1577      --help=short        display options specific to this package
1578      --help=recursive    display the short help of all the included packages
1579  -V, --version           display version information and exit
1580  -q, --quiet, --silent   do not print \`checking ...' messages
1581      --cache-file=FILE   cache test results in FILE [disabled]
1582  -C, --config-cache      alias for \`--cache-file=config.cache'
1583  -n, --no-create         do not create output files
1584      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1585
1586Installation directories:
1587  --prefix=PREFIX         install architecture-independent files in PREFIX
1588                          [$ac_default_prefix]
1589  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1590                          [PREFIX]
1591
1592By default, \`make install' will install all the files in
1593\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1594an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1595for instance \`--prefix=\$HOME'.
1596
1597For better control, use the options below.
1598
1599Fine tuning of the installation directories:
1600  --bindir=DIR            user executables [EPREFIX/bin]
1601  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1602  --libexecdir=DIR        program executables [EPREFIX/libexec]
1603  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1604  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1605  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1606  --libdir=DIR            object code libraries [EPREFIX/lib]
1607  --includedir=DIR        C header files [PREFIX/include]
1608  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1609  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1610  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1611  --infodir=DIR           info documentation [DATAROOTDIR/info]
1612  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1613  --mandir=DIR            man documentation [DATAROOTDIR/man]
1614  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1615  --htmldir=DIR           html documentation [DOCDIR]
1616  --dvidir=DIR            dvi documentation [DOCDIR]
1617  --pdfdir=DIR            pdf documentation [DOCDIR]
1618  --psdir=DIR             ps documentation [DOCDIR]
1619_ACEOF
1620
1621  cat <<\_ACEOF
1622
1623X features:
1624  --x-includes=DIR    X include files are in DIR
1625  --x-libraries=DIR   X library files are in DIR
1626
1627System types:
1628  --build=BUILD     configure for building on BUILD [guessed]
1629  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1630  --target=TARGET   configure for building compilers for TARGET [HOST]
1631_ACEOF
1632fi
1633
1634if test -n "$ac_init_help"; then
1635  case $ac_init_help in
1636     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1637   esac
1638  cat <<\_ACEOF
1639
1640Optional Features:
1641  --disable-option-checking  ignore unrecognized --enable/--with options
1642  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1643  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1644  --enable-debug          set the debug level to fastdebug (shorthand for
1645                          --with-debug-level=fastdebug) [disabled]
1646  --enable-openjdk-only   supress building closed source even if present
1647                          [disabled]
1648  --disable-headful       disable building headful support (graphical UI
1649                          support) [enabled]
1650  --enable-hotspot-test-in-build
1651                          run the Queens test after Hotspot build [disabled]
1652  --enable-unlimited-crypto
1653                          Enable unlimited crypto policy [disabled]
1654  --disable-debug-symbols disable generation of debug symbols [enabled]
1655  --disable-zip-debug-info
1656                          disable zipping of debug-info files [enabled]
1657  --disable-macosx-runtime-support
1658                          disable the use of MacOSX Java runtime support
1659                          framework [enabled]
1660  --disable-static-link-stdc++
1661                          disable static linking of the C++ runtime on Linux
1662                          [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-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1723                          only) [probed]
1724  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1725  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1726  --with-extra-ldflags    extra flags to be used when linking jdk
1727  --with-x                use the X Window System
1728  --with-cups             specify prefix directory for the cups package
1729                          (expecting the headers under PATH/include)
1730  --with-cups-include     specify directory for the cups include files
1731  --with-freetype         specify prefix directory for the freetype2 package
1732                          (expecting the libraries under PATH/lib and the
1733                          headers under PATH/include)
1734  --with-alsa             specify prefix directory for the alsa package
1735                          (expecting the libraries under PATH/lib and the
1736                          headers under PATH/include)
1737  --with-alsa-include     specify directory for the alsa include files
1738  --with-alsa-lib         specify directory for the alsa library
1739  --with-zlib             use zlib from build system or OpenJDK source
1740                          (system, bundled) [bundled]
1741  --with-num-cores        number of cores in the build system, e.g.
1742                          --with-num-cores=8 [probed]
1743  --with-memory-size      memory (in MB) available in the build system, e.g.
1744                          --with-memory-size=1024 [probed]
1745  --with-sjavac-server-java
1746                          use this java binary for running the sjavac
1747                          background server [Boot JDK java]
1748  --with-sjavac-server-cores
1749                          use at most this number of concurrent threads on the
1750                          sjavac server [probed]
1751  --with-ccache-dir       where to store ccache files [~/.ccache]
1752
1753Some influential environment variables:
1754  PKG_CONFIG  path to pkg-config utility
1755  CC          C compiler command
1756  CFLAGS      C compiler flags
1757  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1758              nonstandard directory <lib dir>
1759  LIBS        libraries to pass to the linker, e.g. -l<library>
1760  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1761              you have headers in a nonstandard directory <include dir>
1762  CXX         C++ compiler command
1763  CXXFLAGS    C++ compiler flags
1764  OBJC        Objective C compiler command
1765  OBJCFLAGS   Objective C compiler flags
1766  CPP         C preprocessor
1767  CXXCPP      C++ preprocessor
1768  XMKMF       Path to xmkmf, Makefile generator for X Window System
1769  FREETYPE2_CFLAGS
1770              C compiler flags for FREETYPE2, overriding pkg-config
1771  FREETYPE2_LIBS
1772              linker flags for FREETYPE2, overriding pkg-config
1773  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1774  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1775
1776Use these variables to override the choices made by `configure' or to help
1777it to find libraries and programs with nonstandard names/locations.
1778
1779Report bugs to <build-dev@openjdk.java.net>.
1780OpenJDK home page: <http://openjdk.java.net>.
1781_ACEOF
1782ac_status=$?
1783fi
1784
1785if test "$ac_init_help" = "recursive"; then
1786  # If there are subdirs, report their specific --help.
1787  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1788    test -d "$ac_dir" ||
1789      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1790      continue
1791    ac_builddir=.
1792
1793case "$ac_dir" in
1794.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1795*)
1796  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1797  # A ".." for each directory in $ac_dir_suffix.
1798  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1799  case $ac_top_builddir_sub in
1800  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1801  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1802  esac ;;
1803esac
1804ac_abs_top_builddir=$ac_pwd
1805ac_abs_builddir=$ac_pwd$ac_dir_suffix
1806# for backward compatibility:
1807ac_top_builddir=$ac_top_build_prefix
1808
1809case $srcdir in
1810  .)  # We are building in place.
1811    ac_srcdir=.
1812    ac_top_srcdir=$ac_top_builddir_sub
1813    ac_abs_top_srcdir=$ac_pwd ;;
1814  [\\/]* | ?:[\\/]* )  # Absolute name.
1815    ac_srcdir=$srcdir$ac_dir_suffix;
1816    ac_top_srcdir=$srcdir
1817    ac_abs_top_srcdir=$srcdir ;;
1818  *) # Relative name.
1819    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1820    ac_top_srcdir=$ac_top_build_prefix$srcdir
1821    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1822esac
1823ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1824
1825    cd "$ac_dir" || { ac_status=$?; continue; }
1826    # Check for guested configure.
1827    if test -f "$ac_srcdir/configure.gnu"; then
1828      echo &&
1829      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1830    elif test -f "$ac_srcdir/configure"; then
1831      echo &&
1832      $SHELL "$ac_srcdir/configure" --help=recursive
1833    else
1834      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1835    fi || ac_status=$?
1836    cd "$ac_pwd" || { ac_status=$?; break; }
1837  done
1838fi
1839
1840test -n "$ac_init_help" && exit $ac_status
1841if $ac_init_version; then
1842  cat <<\_ACEOF
1843OpenJDK configure jdk8
1844generated by GNU Autoconf 2.67
1845
1846Copyright (C) 2010 Free Software Foundation, Inc.
1847This configure script is free software; the Free Software Foundation
1848gives unlimited permission to copy, distribute and modify it.
1849_ACEOF
1850  exit
1851fi
1852
1853## ------------------------ ##
1854## Autoconf initialization. ##
1855## ------------------------ ##
1856
1857# ac_fn_c_try_compile LINENO
1858# --------------------------
1859# Try to compile conftest.$ac_ext, and return whether this succeeded.
1860ac_fn_c_try_compile ()
1861{
1862  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1863  rm -f conftest.$ac_objext
1864  if { { ac_try="$ac_compile"
1865case "(($ac_try" in
1866  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1867  *) ac_try_echo=$ac_try;;
1868esac
1869eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1870$as_echo "$ac_try_echo"; } >&5
1871  (eval "$ac_compile") 2>conftest.err
1872  ac_status=$?
1873  if test -s conftest.err; then
1874    grep -v '^ *+' conftest.err >conftest.er1
1875    cat conftest.er1 >&5
1876    mv -f conftest.er1 conftest.err
1877  fi
1878  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1879  test $ac_status = 0; } && {
1880	 test -z "$ac_c_werror_flag" ||
1881	 test ! -s conftest.err
1882       } && test -s conftest.$ac_objext; then :
1883  ac_retval=0
1884else
1885  $as_echo "$as_me: failed program was:" >&5
1886sed 's/^/| /' conftest.$ac_ext >&5
1887
1888	ac_retval=1
1889fi
1890  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1891  as_fn_set_status $ac_retval
1892
1893} # ac_fn_c_try_compile
1894
1895# ac_fn_cxx_try_compile LINENO
1896# ----------------------------
1897# Try to compile conftest.$ac_ext, and return whether this succeeded.
1898ac_fn_cxx_try_compile ()
1899{
1900  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1901  rm -f conftest.$ac_objext
1902  if { { ac_try="$ac_compile"
1903case "(($ac_try" in
1904  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1905  *) ac_try_echo=$ac_try;;
1906esac
1907eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1908$as_echo "$ac_try_echo"; } >&5
1909  (eval "$ac_compile") 2>conftest.err
1910  ac_status=$?
1911  if test -s conftest.err; then
1912    grep -v '^ *+' conftest.err >conftest.er1
1913    cat conftest.er1 >&5
1914    mv -f conftest.er1 conftest.err
1915  fi
1916  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1917  test $ac_status = 0; } && {
1918	 test -z "$ac_cxx_werror_flag" ||
1919	 test ! -s conftest.err
1920       } && test -s conftest.$ac_objext; then :
1921  ac_retval=0
1922else
1923  $as_echo "$as_me: failed program was:" >&5
1924sed 's/^/| /' conftest.$ac_ext >&5
1925
1926	ac_retval=1
1927fi
1928  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1929  as_fn_set_status $ac_retval
1930
1931} # ac_fn_cxx_try_compile
1932
1933# ac_fn_objc_try_compile LINENO
1934# -----------------------------
1935# Try to compile conftest.$ac_ext, and return whether this succeeded.
1936ac_fn_objc_try_compile ()
1937{
1938  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1939  rm -f conftest.$ac_objext
1940  if { { ac_try="$ac_compile"
1941case "(($ac_try" in
1942  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1943  *) ac_try_echo=$ac_try;;
1944esac
1945eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1946$as_echo "$ac_try_echo"; } >&5
1947  (eval "$ac_compile") 2>conftest.err
1948  ac_status=$?
1949  if test -s conftest.err; then
1950    grep -v '^ *+' conftest.err >conftest.er1
1951    cat conftest.er1 >&5
1952    mv -f conftest.er1 conftest.err
1953  fi
1954  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1955  test $ac_status = 0; } && {
1956	 test -z "$ac_objc_werror_flag" ||
1957	 test ! -s conftest.err
1958       } && test -s conftest.$ac_objext; then :
1959  ac_retval=0
1960else
1961  $as_echo "$as_me: failed program was:" >&5
1962sed 's/^/| /' conftest.$ac_ext >&5
1963
1964	ac_retval=1
1965fi
1966  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1967  as_fn_set_status $ac_retval
1968
1969} # ac_fn_objc_try_compile
1970
1971# ac_fn_c_try_cpp LINENO
1972# ----------------------
1973# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1974ac_fn_c_try_cpp ()
1975{
1976  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1977  if { { ac_try="$ac_cpp conftest.$ac_ext"
1978case "(($ac_try" in
1979  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1980  *) ac_try_echo=$ac_try;;
1981esac
1982eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1983$as_echo "$ac_try_echo"; } >&5
1984  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1985  ac_status=$?
1986  if test -s conftest.err; then
1987    grep -v '^ *+' conftest.err >conftest.er1
1988    cat conftest.er1 >&5
1989    mv -f conftest.er1 conftest.err
1990  fi
1991  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1992  test $ac_status = 0; } > conftest.i && {
1993	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1994	 test ! -s conftest.err
1995       }; then :
1996  ac_retval=0
1997else
1998  $as_echo "$as_me: failed program was:" >&5
1999sed 's/^/| /' conftest.$ac_ext >&5
2000
2001    ac_retval=1
2002fi
2003  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2004  as_fn_set_status $ac_retval
2005
2006} # ac_fn_c_try_cpp
2007
2008# ac_fn_cxx_try_cpp LINENO
2009# ------------------------
2010# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2011ac_fn_cxx_try_cpp ()
2012{
2013  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014  if { { ac_try="$ac_cpp conftest.$ac_ext"
2015case "(($ac_try" in
2016  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2017  *) ac_try_echo=$ac_try;;
2018esac
2019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2020$as_echo "$ac_try_echo"; } >&5
2021  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2022  ac_status=$?
2023  if test -s conftest.err; then
2024    grep -v '^ *+' conftest.err >conftest.er1
2025    cat conftest.er1 >&5
2026    mv -f conftest.er1 conftest.err
2027  fi
2028  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2029  test $ac_status = 0; } > conftest.i && {
2030	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2031	 test ! -s conftest.err
2032       }; then :
2033  ac_retval=0
2034else
2035  $as_echo "$as_me: failed program was:" >&5
2036sed 's/^/| /' conftest.$ac_ext >&5
2037
2038    ac_retval=1
2039fi
2040  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2041  as_fn_set_status $ac_retval
2042
2043} # ac_fn_cxx_try_cpp
2044
2045# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2046# ---------------------------------------------------------
2047# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2048# the include files in INCLUDES and setting the cache variable VAR
2049# accordingly.
2050ac_fn_cxx_check_header_mongrel ()
2051{
2052  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2053  if eval "test \"\${$3+set}\"" = set; then :
2054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2055$as_echo_n "checking for $2... " >&6; }
2056if eval "test \"\${$3+set}\"" = set; then :
2057  $as_echo_n "(cached) " >&6
2058fi
2059eval ac_res=\$$3
2060	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2061$as_echo "$ac_res" >&6; }
2062else
2063  # Is the header compilable?
2064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2065$as_echo_n "checking $2 usability... " >&6; }
2066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h.  */
2068$4
2069#include <$2>
2070_ACEOF
2071if ac_fn_cxx_try_compile "$LINENO"; then :
2072  ac_header_compiler=yes
2073else
2074  ac_header_compiler=no
2075fi
2076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2078$as_echo "$ac_header_compiler" >&6; }
2079
2080# Is the header present?
2081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2082$as_echo_n "checking $2 presence... " >&6; }
2083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h.  */
2085#include <$2>
2086_ACEOF
2087if ac_fn_cxx_try_cpp "$LINENO"; then :
2088  ac_header_preproc=yes
2089else
2090  ac_header_preproc=no
2091fi
2092rm -f conftest.err conftest.i conftest.$ac_ext
2093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2094$as_echo "$ac_header_preproc" >&6; }
2095
2096# So?  What about this header?
2097case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2098  yes:no: )
2099    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2100$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2101    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2102$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2103    ;;
2104  no:yes:* )
2105    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2106$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2107    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2108$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2109    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2110$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2111    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2112$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2113    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2114$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2115( $as_echo "## ----------------------------------------- ##
2116## Report this to build-dev@openjdk.java.net ##
2117## ----------------------------------------- ##"
2118     ) | sed "s/^/$as_me: WARNING:     /" >&2
2119    ;;
2120esac
2121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2122$as_echo_n "checking for $2... " >&6; }
2123if eval "test \"\${$3+set}\"" = set; then :
2124  $as_echo_n "(cached) " >&6
2125else
2126  eval "$3=\$ac_header_compiler"
2127fi
2128eval ac_res=\$$3
2129	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2130$as_echo "$ac_res" >&6; }
2131fi
2132  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2133
2134} # ac_fn_cxx_check_header_mongrel
2135
2136# ac_fn_cxx_try_run LINENO
2137# ------------------------
2138# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2139# that executables *can* be run.
2140ac_fn_cxx_try_run ()
2141{
2142  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2143  if { { ac_try="$ac_link"
2144case "(($ac_try" in
2145  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2146  *) ac_try_echo=$ac_try;;
2147esac
2148eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2149$as_echo "$ac_try_echo"; } >&5
2150  (eval "$ac_link") 2>&5
2151  ac_status=$?
2152  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2153  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2154  { { case "(($ac_try" in
2155  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2156  *) ac_try_echo=$ac_try;;
2157esac
2158eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2159$as_echo "$ac_try_echo"; } >&5
2160  (eval "$ac_try") 2>&5
2161  ac_status=$?
2162  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2163  test $ac_status = 0; }; }; then :
2164  ac_retval=0
2165else
2166  $as_echo "$as_me: program exited with status $ac_status" >&5
2167       $as_echo "$as_me: failed program was:" >&5
2168sed 's/^/| /' conftest.$ac_ext >&5
2169
2170       ac_retval=$ac_status
2171fi
2172  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2173  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2174  as_fn_set_status $ac_retval
2175
2176} # ac_fn_cxx_try_run
2177
2178# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2179# ---------------------------------------------------------
2180# Tests whether HEADER exists and can be compiled using the include files in
2181# INCLUDES, setting the cache variable VAR accordingly.
2182ac_fn_cxx_check_header_compile ()
2183{
2184  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2185  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2186$as_echo_n "checking for $2... " >&6; }
2187if eval "test \"\${$3+set}\"" = set; then :
2188  $as_echo_n "(cached) " >&6
2189else
2190  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h.  */
2192$4
2193#include <$2>
2194_ACEOF
2195if ac_fn_cxx_try_compile "$LINENO"; then :
2196  eval "$3=yes"
2197else
2198  eval "$3=no"
2199fi
2200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2201fi
2202eval ac_res=\$$3
2203	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2204$as_echo "$ac_res" >&6; }
2205  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2206
2207} # ac_fn_cxx_check_header_compile
2208
2209# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2210# ----------------------------------------------
2211# Tries to find the compile-time value of EXPR in a program that includes
2212# INCLUDES, setting VAR accordingly. Returns whether the value could be
2213# computed
2214ac_fn_cxx_compute_int ()
2215{
2216  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2217  if test "$cross_compiling" = yes; then
2218    # Depending upon the size, compute the lo and hi bounds.
2219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2220/* end confdefs.h.  */
2221$4
2222int
2223main ()
2224{
2225static int test_array [1 - 2 * !(($2) >= 0)];
2226test_array [0] = 0
2227
2228  ;
2229  return 0;
2230}
2231_ACEOF
2232if ac_fn_cxx_try_compile "$LINENO"; then :
2233  ac_lo=0 ac_mid=0
2234  while :; do
2235    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2236/* end confdefs.h.  */
2237$4
2238int
2239main ()
2240{
2241static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2242test_array [0] = 0
2243
2244  ;
2245  return 0;
2246}
2247_ACEOF
2248if ac_fn_cxx_try_compile "$LINENO"; then :
2249  ac_hi=$ac_mid; break
2250else
2251  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2252			if test $ac_lo -le $ac_mid; then
2253			  ac_lo= ac_hi=
2254			  break
2255			fi
2256			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2257fi
2258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2259  done
2260else
2261  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h.  */
2263$4
2264int
2265main ()
2266{
2267static int test_array [1 - 2 * !(($2) < 0)];
2268test_array [0] = 0
2269
2270  ;
2271  return 0;
2272}
2273_ACEOF
2274if ac_fn_cxx_try_compile "$LINENO"; then :
2275  ac_hi=-1 ac_mid=-1
2276  while :; do
2277    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278/* end confdefs.h.  */
2279$4
2280int
2281main ()
2282{
2283static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2284test_array [0] = 0
2285
2286  ;
2287  return 0;
2288}
2289_ACEOF
2290if ac_fn_cxx_try_compile "$LINENO"; then :
2291  ac_lo=$ac_mid; break
2292else
2293  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2294			if test $ac_mid -le $ac_hi; then
2295			  ac_lo= ac_hi=
2296			  break
2297			fi
2298			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2299fi
2300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301  done
2302else
2303  ac_lo= ac_hi=
2304fi
2305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2306fi
2307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2308# Binary search between lo and hi bounds.
2309while test "x$ac_lo" != "x$ac_hi"; do
2310  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2311  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h.  */
2313$4
2314int
2315main ()
2316{
2317static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2318test_array [0] = 0
2319
2320  ;
2321  return 0;
2322}
2323_ACEOF
2324if ac_fn_cxx_try_compile "$LINENO"; then :
2325  ac_hi=$ac_mid
2326else
2327  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2328fi
2329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330done
2331case $ac_lo in #((
2332?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2333'') ac_retval=1 ;;
2334esac
2335  else
2336    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2337/* end confdefs.h.  */
2338$4
2339static long int longval () { return $2; }
2340static unsigned long int ulongval () { return $2; }
2341#include <stdio.h>
2342#include <stdlib.h>
2343int
2344main ()
2345{
2346
2347  FILE *f = fopen ("conftest.val", "w");
2348  if (! f)
2349    return 1;
2350  if (($2) < 0)
2351    {
2352      long int i = longval ();
2353      if (i != ($2))
2354	return 1;
2355      fprintf (f, "%ld", i);
2356    }
2357  else
2358    {
2359      unsigned long int i = ulongval ();
2360      if (i != ($2))
2361	return 1;
2362      fprintf (f, "%lu", i);
2363    }
2364  /* Do not output a trailing newline, as this causes \r\n confusion
2365     on some platforms.  */
2366  return ferror (f) || fclose (f) != 0;
2367
2368  ;
2369  return 0;
2370}
2371_ACEOF
2372if ac_fn_cxx_try_run "$LINENO"; then :
2373  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2374else
2375  ac_retval=1
2376fi
2377rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2378  conftest.$ac_objext conftest.beam conftest.$ac_ext
2379rm -f conftest.val
2380
2381  fi
2382  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2383  as_fn_set_status $ac_retval
2384
2385} # ac_fn_cxx_compute_int
2386
2387# ac_fn_cxx_try_link LINENO
2388# -------------------------
2389# Try to link conftest.$ac_ext, and return whether this succeeded.
2390ac_fn_cxx_try_link ()
2391{
2392  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2393  rm -f conftest.$ac_objext conftest$ac_exeext
2394  if { { ac_try="$ac_link"
2395case "(($ac_try" in
2396  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2397  *) ac_try_echo=$ac_try;;
2398esac
2399eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2400$as_echo "$ac_try_echo"; } >&5
2401  (eval "$ac_link") 2>conftest.err
2402  ac_status=$?
2403  if test -s conftest.err; then
2404    grep -v '^ *+' conftest.err >conftest.er1
2405    cat conftest.er1 >&5
2406    mv -f conftest.er1 conftest.err
2407  fi
2408  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2409  test $ac_status = 0; } && {
2410	 test -z "$ac_cxx_werror_flag" ||
2411	 test ! -s conftest.err
2412       } && test -s conftest$ac_exeext && {
2413	 test "$cross_compiling" = yes ||
2414	 $as_test_x conftest$ac_exeext
2415       }; then :
2416  ac_retval=0
2417else
2418  $as_echo "$as_me: failed program was:" >&5
2419sed 's/^/| /' conftest.$ac_ext >&5
2420
2421	ac_retval=1
2422fi
2423  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2424  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2425  # interfere with the next link command; also delete a directory that is
2426  # left behind by Apple's compiler.  We do this before executing the actions.
2427  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2428  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2429  as_fn_set_status $ac_retval
2430
2431} # ac_fn_cxx_try_link
2432
2433# ac_fn_cxx_check_func LINENO FUNC VAR
2434# ------------------------------------
2435# Tests whether FUNC exists, setting the cache variable VAR accordingly
2436ac_fn_cxx_check_func ()
2437{
2438  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2440$as_echo_n "checking for $2... " >&6; }
2441if eval "test \"\${$3+set}\"" = set; then :
2442  $as_echo_n "(cached) " >&6
2443else
2444  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2445/* end confdefs.h.  */
2446/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2447   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2448#define $2 innocuous_$2
2449
2450/* System header to define __stub macros and hopefully few prototypes,
2451    which can conflict with char $2 (); below.
2452    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2453    <limits.h> exists even on freestanding compilers.  */
2454
2455#ifdef __STDC__
2456# include <limits.h>
2457#else
2458# include <assert.h>
2459#endif
2460
2461#undef $2
2462
2463/* Override any GCC internal prototype to avoid an error.
2464   Use char because int might match the return type of a GCC
2465   builtin and then its argument prototype would still apply.  */
2466#ifdef __cplusplus
2467extern "C"
2468#endif
2469char $2 ();
2470/* The GNU C library defines this for functions which it implements
2471    to always fail with ENOSYS.  Some functions are actually named
2472    something starting with __ and the normal name is an alias.  */
2473#if defined __stub_$2 || defined __stub___$2
2474choke me
2475#endif
2476
2477int
2478main ()
2479{
2480return $2 ();
2481  ;
2482  return 0;
2483}
2484_ACEOF
2485if ac_fn_cxx_try_link "$LINENO"; then :
2486  eval "$3=yes"
2487else
2488  eval "$3=no"
2489fi
2490rm -f core conftest.err conftest.$ac_objext \
2491    conftest$ac_exeext conftest.$ac_ext
2492fi
2493eval ac_res=\$$3
2494	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2495$as_echo "$ac_res" >&6; }
2496  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2497
2498} # ac_fn_cxx_check_func
2499
2500# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2501# -------------------------------------------------------
2502# Tests whether HEADER exists and can be compiled using the include files in
2503# INCLUDES, setting the cache variable VAR accordingly.
2504ac_fn_c_check_header_compile ()
2505{
2506  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2507  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2508$as_echo_n "checking for $2... " >&6; }
2509if eval "test \"\${$3+set}\"" = set; then :
2510  $as_echo_n "(cached) " >&6
2511else
2512  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2513/* end confdefs.h.  */
2514$4
2515#include <$2>
2516_ACEOF
2517if ac_fn_c_try_compile "$LINENO"; then :
2518  eval "$3=yes"
2519else
2520  eval "$3=no"
2521fi
2522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2523fi
2524eval ac_res=\$$3
2525	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2526$as_echo "$ac_res" >&6; }
2527  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2528
2529} # ac_fn_c_check_header_compile
2530cat >config.log <<_ACEOF
2531This file contains any messages produced by compilers while
2532running configure, to aid debugging if configure makes a mistake.
2533
2534It was created by OpenJDK $as_me jdk8, which was
2535generated by GNU Autoconf 2.67.  Invocation command line was
2536
2537  $ $0 $@
2538
2539_ACEOF
2540exec 5>>config.log
2541{
2542cat <<_ASUNAME
2543## --------- ##
2544## Platform. ##
2545## --------- ##
2546
2547hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2548uname -m = `(uname -m) 2>/dev/null || echo unknown`
2549uname -r = `(uname -r) 2>/dev/null || echo unknown`
2550uname -s = `(uname -s) 2>/dev/null || echo unknown`
2551uname -v = `(uname -v) 2>/dev/null || echo unknown`
2552
2553/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2554/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2555
2556/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2557/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2558/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2559/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2560/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2561/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2562/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2563
2564_ASUNAME
2565
2566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2567for as_dir in $PATH
2568do
2569  IFS=$as_save_IFS
2570  test -z "$as_dir" && as_dir=.
2571    $as_echo "PATH: $as_dir"
2572  done
2573IFS=$as_save_IFS
2574
2575} >&5
2576
2577cat >&5 <<_ACEOF
2578
2579
2580## ----------- ##
2581## Core tests. ##
2582## ----------- ##
2583
2584_ACEOF
2585
2586
2587# Keep a trace of the command line.
2588# Strip out --no-create and --no-recursion so they do not pile up.
2589# Strip out --silent because we don't want to record it for future runs.
2590# Also quote any args containing shell meta-characters.
2591# Make two passes to allow for proper duplicate-argument suppression.
2592ac_configure_args=
2593ac_configure_args0=
2594ac_configure_args1=
2595ac_must_keep_next=false
2596for ac_pass in 1 2
2597do
2598  for ac_arg
2599  do
2600    case $ac_arg in
2601    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2602    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2603    | -silent | --silent | --silen | --sile | --sil)
2604      continue ;;
2605    *\'*)
2606      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2607    esac
2608    case $ac_pass in
2609    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2610    2)
2611      as_fn_append ac_configure_args1 " '$ac_arg'"
2612      if test $ac_must_keep_next = true; then
2613	ac_must_keep_next=false # Got value, back to normal.
2614      else
2615	case $ac_arg in
2616	  *=* | --config-cache | -C | -disable-* | --disable-* \
2617	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2618	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2619	  | -with-* | --with-* | -without-* | --without-* | --x)
2620	    case "$ac_configure_args0 " in
2621	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2622	    esac
2623	    ;;
2624	  -* ) ac_must_keep_next=true ;;
2625	esac
2626      fi
2627      as_fn_append ac_configure_args " '$ac_arg'"
2628      ;;
2629    esac
2630  done
2631done
2632{ ac_configure_args0=; unset ac_configure_args0;}
2633{ ac_configure_args1=; unset ac_configure_args1;}
2634
2635# When interrupted or exit'd, cleanup temporary files, and complete
2636# config.log.  We remove comments because anyway the quotes in there
2637# would cause problems or look ugly.
2638# WARNING: Use '\'' to represent an apostrophe within the trap.
2639# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2640trap 'exit_status=$?
2641  # Save into config.log some information that might help in debugging.
2642  {
2643    echo
2644
2645    $as_echo "## ---------------- ##
2646## Cache variables. ##
2647## ---------------- ##"
2648    echo
2649    # The following way of writing the cache mishandles newlines in values,
2650(
2651  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2652    eval ac_val=\$$ac_var
2653    case $ac_val in #(
2654    *${as_nl}*)
2655      case $ac_var in #(
2656      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2657$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2658      esac
2659      case $ac_var in #(
2660      _ | IFS | as_nl) ;; #(
2661      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2662      *) { eval $ac_var=; unset $ac_var;} ;;
2663      esac ;;
2664    esac
2665  done
2666  (set) 2>&1 |
2667    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2668    *${as_nl}ac_space=\ *)
2669      sed -n \
2670	"s/'\''/'\''\\\\'\'''\''/g;
2671	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2672      ;; #(
2673    *)
2674      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2675      ;;
2676    esac |
2677    sort
2678)
2679    echo
2680
2681    $as_echo "## ----------------- ##
2682## Output variables. ##
2683## ----------------- ##"
2684    echo
2685    for ac_var in $ac_subst_vars
2686    do
2687      eval ac_val=\$$ac_var
2688      case $ac_val in
2689      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2690      esac
2691      $as_echo "$ac_var='\''$ac_val'\''"
2692    done | sort
2693    echo
2694
2695    if test -n "$ac_subst_files"; then
2696      $as_echo "## ------------------- ##
2697## File substitutions. ##
2698## ------------------- ##"
2699      echo
2700      for ac_var in $ac_subst_files
2701      do
2702	eval ac_val=\$$ac_var
2703	case $ac_val in
2704	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2705	esac
2706	$as_echo "$ac_var='\''$ac_val'\''"
2707      done | sort
2708      echo
2709    fi
2710
2711    if test -s confdefs.h; then
2712      $as_echo "## ----------- ##
2713## confdefs.h. ##
2714## ----------- ##"
2715      echo
2716      cat confdefs.h
2717      echo
2718    fi
2719    test "$ac_signal" != 0 &&
2720      $as_echo "$as_me: caught signal $ac_signal"
2721    $as_echo "$as_me: exit $exit_status"
2722  } >&5
2723  rm -f core *.core core.conftest.* &&
2724    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2725    exit $exit_status
2726' 0
2727for ac_signal in 1 2 13 15; do
2728  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2729done
2730ac_signal=0
2731
2732# confdefs.h avoids OS command line length limits that DEFS can exceed.
2733rm -f -r conftest* confdefs.h
2734
2735$as_echo "/* confdefs.h */" > confdefs.h
2736
2737# Predefined preprocessor variables.
2738
2739cat >>confdefs.h <<_ACEOF
2740#define PACKAGE_NAME "$PACKAGE_NAME"
2741_ACEOF
2742
2743cat >>confdefs.h <<_ACEOF
2744#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2745_ACEOF
2746
2747cat >>confdefs.h <<_ACEOF
2748#define PACKAGE_VERSION "$PACKAGE_VERSION"
2749_ACEOF
2750
2751cat >>confdefs.h <<_ACEOF
2752#define PACKAGE_STRING "$PACKAGE_STRING"
2753_ACEOF
2754
2755cat >>confdefs.h <<_ACEOF
2756#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2757_ACEOF
2758
2759cat >>confdefs.h <<_ACEOF
2760#define PACKAGE_URL "$PACKAGE_URL"
2761_ACEOF
2762
2763
2764# Let the site file select an alternate cache file if it wants to.
2765# Prefer an explicitly selected file to automatically selected ones.
2766ac_site_file1=NONE
2767ac_site_file2=NONE
2768if test -n "$CONFIG_SITE"; then
2769  # We do not want a PATH search for config.site.
2770  case $CONFIG_SITE in #((
2771    -*)  ac_site_file1=./$CONFIG_SITE;;
2772    */*) ac_site_file1=$CONFIG_SITE;;
2773    *)   ac_site_file1=./$CONFIG_SITE;;
2774  esac
2775elif test "x$prefix" != xNONE; then
2776  ac_site_file1=$prefix/share/config.site
2777  ac_site_file2=$prefix/etc/config.site
2778else
2779  ac_site_file1=$ac_default_prefix/share/config.site
2780  ac_site_file2=$ac_default_prefix/etc/config.site
2781fi
2782for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2783do
2784  test "x$ac_site_file" = xNONE && continue
2785  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2786    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2787$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2788    sed 's/^/| /' "$ac_site_file" >&5
2789    . "$ac_site_file" \
2790      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2791$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2792as_fn_error $? "failed to load site script $ac_site_file
2793See \`config.log' for more details" "$LINENO" 5 ; }
2794  fi
2795done
2796
2797if test -r "$cache_file"; then
2798  # Some versions of bash will fail to source /dev/null (special files
2799  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2800  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2801    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2802$as_echo "$as_me: loading cache $cache_file" >&6;}
2803    case $cache_file in
2804      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2805      *)                      . "./$cache_file";;
2806    esac
2807  fi
2808else
2809  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2810$as_echo "$as_me: creating cache $cache_file" >&6;}
2811  >$cache_file
2812fi
2813
2814# Check that the precious variables saved in the cache have kept the same
2815# value.
2816ac_cache_corrupted=false
2817for ac_var in $ac_precious_vars; do
2818  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2819  eval ac_new_set=\$ac_env_${ac_var}_set
2820  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2821  eval ac_new_val=\$ac_env_${ac_var}_value
2822  case $ac_old_set,$ac_new_set in
2823    set,)
2824      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2825$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2826      ac_cache_corrupted=: ;;
2827    ,set)
2828      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2829$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2830      ac_cache_corrupted=: ;;
2831    ,);;
2832    *)
2833      if test "x$ac_old_val" != "x$ac_new_val"; then
2834	# differences in whitespace do not lead to failure.
2835	ac_old_val_w=`echo x $ac_old_val`
2836	ac_new_val_w=`echo x $ac_new_val`
2837	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2838	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2839$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2840	  ac_cache_corrupted=:
2841	else
2842	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2843$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2844	  eval $ac_var=\$ac_old_val
2845	fi
2846	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2847$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2848	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2849$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2850      fi;;
2851  esac
2852  # Pass precious variables to config.status.
2853  if test "$ac_new_set" = set; then
2854    case $ac_new_val in
2855    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2856    *) ac_arg=$ac_var=$ac_new_val ;;
2857    esac
2858    case " $ac_configure_args " in
2859      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2860      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2861    esac
2862  fi
2863done
2864if $ac_cache_corrupted; then
2865  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2867  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2868$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2869  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2870fi
2871## -------------------- ##
2872## Main body of script. ##
2873## -------------------- ##
2874
2875ac_ext=c
2876ac_cpp='$CPP $CPPFLAGS'
2877ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2878ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2879ac_compiler_gnu=$ac_cv_c_compiler_gnu
2880
2881
2882
2883ac_aux_dir=
2884for ac_dir in build-aux "$srcdir"/build-aux; do
2885  if test -f "$ac_dir/install-sh"; then
2886    ac_aux_dir=$ac_dir
2887    ac_install_sh="$ac_aux_dir/install-sh -c"
2888    break
2889  elif test -f "$ac_dir/install.sh"; then
2890    ac_aux_dir=$ac_dir
2891    ac_install_sh="$ac_aux_dir/install.sh -c"
2892    break
2893  elif test -f "$ac_dir/shtool"; then
2894    ac_aux_dir=$ac_dir
2895    ac_install_sh="$ac_aux_dir/shtool install -c"
2896    break
2897  fi
2898done
2899if test -z "$ac_aux_dir"; then
2900  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2901fi
2902
2903# These three variables are undocumented and unsupported,
2904# and are intended to be withdrawn in a future Autoconf release.
2905# They can cause serious problems if a builder's source tree is in a directory
2906# whose full name contains unusual characters.
2907ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2908ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2909ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2910
2911
2912# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2913#
2914# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2915#
2916# This program is free software; you can redistribute it and/or modify
2917# it under the terms of the GNU General Public License as published by
2918# the Free Software Foundation; either version 2 of the License, or
2919# (at your option) any later version.
2920#
2921# This program is distributed in the hope that it will be useful, but
2922# WITHOUT ANY WARRANTY; without even the implied warranty of
2923# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2924# General Public License for more details.
2925#
2926# You should have received a copy of the GNU General Public License
2927# along with this program; if not, write to the Free Software
2928# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2929#
2930# As a special exception to the GNU General Public License, if you
2931# distribute this file as part of a program that contains a
2932# configuration script generated by Autoconf, you may include it under
2933# the same distribution terms that you use for the rest of that program.
2934
2935# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2936# ----------------------------------
2937# PKG_PROG_PKG_CONFIG
2938
2939# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2940#
2941# Check to see whether a particular set of modules exists.  Similar
2942# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2943#
2944#
2945# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2946# this or PKG_CHECK_MODULES is called, or make sure to call
2947# PKG_CHECK_EXISTS manually
2948# --------------------------------------------------------------
2949
2950
2951
2952# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2953# ---------------------------------------------
2954# _PKG_CONFIG
2955
2956# _PKG_SHORT_ERRORS_SUPPORTED
2957# -----------------------------
2958# _PKG_SHORT_ERRORS_SUPPORTED
2959
2960
2961# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2962# [ACTION-IF-NOT-FOUND])
2963#
2964#
2965# Note that if there is a possibility the first call to
2966# PKG_CHECK_MODULES might not happen, you should be sure to include an
2967# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2968#
2969#
2970# --------------------------------------------------------------
2971# PKG_CHECK_MODULES
2972
2973
2974# Include these first...
2975#
2976# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2977# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2978#
2979# This code is free software; you can redistribute it and/or modify it
2980# under the terms of the GNU General Public License version 2 only, as
2981# published by the Free Software Foundation.  Oracle designates this
2982# particular file as subject to the "Classpath" exception as provided
2983# by Oracle in the LICENSE file that accompanied this code.
2984#
2985# This code is distributed in the hope that it will be useful, but WITHOUT
2986# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2987# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2988# version 2 for more details (a copy is included in the LICENSE file that
2989# accompanied this code).
2990#
2991# You should have received a copy of the GNU General Public License version
2992# 2 along with this work; if not, write to the Free Software Foundation,
2993# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2994#
2995# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2996# or visit www.oracle.com if you need additional information or have any
2997# questions.
2998#
2999
3000
3001
3002# This will make sure the given variable points to a full and proper
3003# path. This means:
3004# 1) There will be no spaces in the path. On posix platforms,
3005#    spaces in the path will result in an error. On Windows,
3006#    the path will be rewritten using short-style to be space-free.
3007# 2) The path will be absolute, and it will be in unix-style (on
3008#     cygwin).
3009# $1: The name of the variable to fix
3010
3011
3012# This will make sure the given variable points to a executable
3013# with a full and proper path. This means:
3014# 1) There will be no spaces in the path. On posix platforms,
3015#    spaces in the path will result in an error. On Windows,
3016#    the path will be rewritten using short-style to be space-free.
3017# 2) The path will be absolute, and it will be in unix-style (on
3018#     cygwin).
3019# Any arguments given to the executable is preserved.
3020# If the input variable does not have a directory specification, then
3021# it need to be in the PATH.
3022# $1: The name of the variable to fix
3023
3024
3025
3026
3027
3028
3029# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3030# $1: variable to check
3031# $2: executable name to print in warning (optional)
3032
3033
3034# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3035# Arguments as AC_PATH_PROG:
3036# $1: variable to set
3037# $2: executable name to look for
3038
3039
3040# Setup the most fundamental tools that relies on not much else to set up,
3041# but is used by much of the early bootstrap code.
3042
3043
3044# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3045
3046
3047
3048
3049
3050
3051
3052#%%% Simple tools %%%
3053
3054# Check if we have found a usable version of make
3055# $1: the path to a potential make binary (or empty)
3056# $2: the description on how we found this
3057
3058
3059# Goes looking for a usable version of GNU make.
3060
3061
3062
3063
3064
3065
3066# Check if build directory is on local disk. If not possible to determine,
3067# we prefer to claim it's local.
3068# Argument 1: directory to test
3069# Argument 2: what to do if it is on local disk
3070# Argument 3: what to do otherwise (remote disk or failure)
3071
3072
3073
3074
3075#
3076# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3077# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3078#
3079# This code is free software; you can redistribute it and/or modify it
3080# under the terms of the GNU General Public License version 2 only, as
3081# published by the Free Software Foundation.  Oracle designates this
3082# particular file as subject to the "Classpath" exception as provided
3083# by Oracle in the LICENSE file that accompanied this code.
3084#
3085# This code is distributed in the hope that it will be useful, but WITHOUT
3086# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3087# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3088# version 2 for more details (a copy is included in the LICENSE file that
3089# accompanied this code).
3090#
3091# You should have received a copy of the GNU General Public License version
3092# 2 along with this work; if not, write to the Free Software Foundation,
3093# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3094#
3095# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3096# or visit www.oracle.com if you need additional information or have any
3097# questions.
3098#
3099
3100
3101
3102
3103
3104# Helper function which possibly converts a path using DOS-style short mode.
3105# If so, the updated path is stored in $new_path.
3106# $1: The path to check
3107
3108
3109# Helper function which possibly converts a path using DOS-style short mode.
3110# If so, the updated path is stored in $new_path.
3111# $1: The path to check
3112
3113
3114# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3115# and could probably be heavily simplified. However, all changes in this
3116# area tend to need lot of testing in different scenarios, and in lack of
3117# proper unit testing, cleaning this up has not been deemed worth the effort
3118# at the moment.
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3129
3130
3131
3132
3133#
3134# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3135# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3136#
3137# This code is free software; you can redistribute it and/or modify it
3138# under the terms of the GNU General Public License version 2 only, as
3139# published by the Free Software Foundation.  Oracle designates this
3140# particular file as subject to the "Classpath" exception as provided
3141# by Oracle in the LICENSE file that accompanied this code.
3142#
3143# This code is distributed in the hope that it will be useful, but WITHOUT
3144# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3145# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3146# version 2 for more details (a copy is included in the LICENSE file that
3147# accompanied this code).
3148#
3149# You should have received a copy of the GNU General Public License version
3150# 2 along with this work; if not, write to the Free Software Foundation,
3151# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3152#
3153# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3154# or visit www.oracle.com if you need additional information or have any
3155# questions.
3156#
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168# ... then the rest
3169#
3170# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3171# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3172#
3173# This code is free software; you can redistribute it and/or modify it
3174# under the terms of the GNU General Public License version 2 only, as
3175# published by the Free Software Foundation.  Oracle designates this
3176# particular file as subject to the "Classpath" exception as provided
3177# by Oracle in the LICENSE file that accompanied this code.
3178#
3179# This code is distributed in the hope that it will be useful, but WITHOUT
3180# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3181# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3182# version 2 for more details (a copy is included in the LICENSE file that
3183# accompanied this code).
3184#
3185# You should have received a copy of the GNU General Public License version
3186# 2 along with this work; if not, write to the Free Software Foundation,
3187# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3188#
3189# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3190# or visit www.oracle.com if you need additional information or have any
3191# questions.
3192#
3193
3194# Execute the check given as argument, and verify the result
3195# If the Boot JDK was previously found, do nothing
3196# $1 A command line (typically autoconf macro) to execute
3197
3198
3199# Test: Is bootjdk explicitely set by command line arguments?
3200
3201
3202# Test: Is bootjdk available from builddeps?
3203
3204
3205# Test: Is $JAVA_HOME set?
3206
3207
3208# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3209
3210
3211# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3212
3213
3214# Look for a jdk in the given path. If there are multiple, try to select the newest.
3215# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3216# $1 = Path to directory containing jdk installations.
3217# $2 = String to append to the found JDK directory to get the proper JDK home
3218
3219
3220# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3221# environmental variable as base for where to look.
3222# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3223
3224
3225# Test: Is there a JDK installed in default, well-known locations?
3226
3227
3228# Check that a command-line tool in the Boot JDK is correct
3229# $1 = name of variable to assign
3230# $2 = name of binary
3231
3232
3233###############################################################################
3234#
3235# We need a Boot JDK to bootstrap the build.
3236#
3237
3238
3239
3240
3241
3242#
3243# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3244# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3245#
3246# This code is free software; you can redistribute it and/or modify it
3247# under the terms of the GNU General Public License version 2 only, as
3248# published by the Free Software Foundation.  Oracle designates this
3249# particular file as subject to the "Classpath" exception as provided
3250# by Oracle in the LICENSE file that accompanied this code.
3251#
3252# This code is distributed in the hope that it will be useful, but WITHOUT
3253# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3254# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3255# version 2 for more details (a copy is included in the LICENSE file that
3256# accompanied this code).
3257#
3258# You should have received a copy of the GNU General Public License version
3259# 2 along with this work; if not, write to the Free Software Foundation,
3260# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3261#
3262# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3263# or visit www.oracle.com if you need additional information or have any
3264# questions.
3265#
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284#
3285# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3286# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3287#
3288# This code is free software; you can redistribute it and/or modify it
3289# under the terms of the GNU General Public License version 2 only, as
3290# published by the Free Software Foundation.  Oracle designates this
3291# particular file as subject to the "Classpath" exception as provided
3292# by Oracle in the LICENSE file that accompanied this code.
3293#
3294# This code is distributed in the hope that it will be useful, but WITHOUT
3295# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3296# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3297# version 2 for more details (a copy is included in the LICENSE file that
3298# accompanied this code).
3299#
3300# You should have received a copy of the GNU General Public License version
3301# 2 along with this work; if not, write to the Free Software Foundation,
3302# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3303#
3304# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3305# or visit www.oracle.com if you need additional information or have any
3306# questions.
3307#
3308
3309
3310
3311
3312
3313cygwin_help() {
3314    case $1 in
3315    unzip)
3316        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3317    zip)
3318        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3319    make)
3320        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3321    * )
3322       break ;;
3323    esac
3324}
3325
3326apt_help() {
3327    case $1 in
3328    devkit)
3329        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3330    openjdk)
3331        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3332    alsa)
3333        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3334    cups)
3335        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3336    freetype2)
3337        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3338    pulse)
3339        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3340    x11)
3341        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3342    ccache)
3343        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3344    * )
3345       break ;;
3346    esac
3347}
3348
3349yum_help() {
3350    case $1 in
3351    devkit)
3352        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3353    openjdk)
3354        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3355    alsa)
3356        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3357    cups)
3358        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3359    freetype2)
3360        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3361    pulse)
3362        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3363    x11)
3364        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3365    ccache)
3366        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3367    * )
3368       break ;;
3369    esac
3370}
3371
3372port_help() {
3373    PKGHANDLER_COMMAND=""
3374}
3375
3376pkgutil_help() {
3377    PKGHANDLER_COMMAND=""
3378}
3379
3380pkgadd_help() {
3381    PKGHANDLER_COMMAND=""
3382}
3383
3384
3385
3386#
3387# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3388# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3389#
3390# This code is free software; you can redistribute it and/or modify it
3391# under the terms of the GNU General Public License version 2 only, as
3392# published by the Free Software Foundation.  Oracle designates this
3393# particular file as subject to the "Classpath" exception as provided
3394# by Oracle in the LICENSE file that accompanied this code.
3395#
3396# This code is distributed in the hope that it will be useful, but WITHOUT
3397# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3398# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3399# version 2 for more details (a copy is included in the LICENSE file that
3400# accompanied this code).
3401#
3402# You should have received a copy of the GNU General Public License version
3403# 2 along with this work; if not, write to the Free Software Foundation,
3404# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3405#
3406# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3407# or visit www.oracle.com if you need additional information or have any
3408# questions.
3409#
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425# Support for customization of the build process. Some build files
3426# will include counterparts from this location, if they exist. This allows
3427# for a degree of customization of the build targets and the rules/recipes
3428# to create them
3429
3430# Check whether --with-custom-make-dir was given.
3431if test "${with_custom_make_dir+set}" = set; then :
3432  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3433fi
3434
3435
3436
3437#
3438# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3439# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3440#
3441# This code is free software; you can redistribute it and/or modify it
3442# under the terms of the GNU General Public License version 2 only, as
3443# published by the Free Software Foundation.  Oracle designates this
3444# particular file as subject to the "Classpath" exception as provided
3445# by Oracle in the LICENSE file that accompanied this code.
3446#
3447# This code is distributed in the hope that it will be useful, but WITHOUT
3448# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3449# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3450# version 2 for more details (a copy is included in the LICENSE file that
3451# accompanied this code).
3452#
3453# You should have received a copy of the GNU General Public License version
3454# 2 along with this work; if not, write to the Free Software Foundation,
3455# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3456#
3457# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3458# or visit www.oracle.com if you need additional information or have any
3459# questions.
3460#
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476#
3477# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3478# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3479#
3480# This code is free software; you can redistribute it and/or modify it
3481# under the terms of the GNU General Public License version 2 only, as
3482# published by the Free Software Foundation.  Oracle designates this
3483# particular file as subject to the "Classpath" exception as provided
3484# by Oracle in the LICENSE file that accompanied this code.
3485#
3486# This code is distributed in the hope that it will be useful, but WITHOUT
3487# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3488# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3489# version 2 for more details (a copy is included in the LICENSE file that
3490# accompanied this code).
3491#
3492# You should have received a copy of the GNU General Public License version
3493# 2 along with this work; if not, write to the Free Software Foundation,
3494# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3495#
3496# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3497# or visit www.oracle.com if you need additional information or have any
3498# questions.
3499#
3500
3501# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3502# Converts autoconf style CPU name to OpenJDK style, into
3503# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3504
3505
3506# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3507# Converts autoconf style OS name to OpenJDK style, into
3508# VAR_OS and VAR_OS_API.
3509
3510
3511# Expects $host_os $host_cpu $build_os and $build_cpu
3512# and $with_target_bits to have been setup!
3513#
3514# Translate the standard triplet(quadruplet) definition
3515# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3516# OPENJDK_BUILD_OS, etc.
3517
3518
3519# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3520# accordingly. Must be done after setting up build and target system, but before
3521# doing anything else with these values.
3522
3523
3524    # Setup the legacy variables, for controlling the old makefiles.
3525    #
3526
3527
3528
3529
3530#%%% Build and target systems %%%
3531
3532
3533
3534
3535# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3536# Add -mX to various FLAGS variables.
3537
3538
3539
3540
3541
3542
3543#
3544# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3545# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3546#
3547# This code is free software; you can redistribute it and/or modify it
3548# under the terms of the GNU General Public License version 2 only, as
3549# published by the Free Software Foundation.  Oracle designates this
3550# particular file as subject to the "Classpath" exception as provided
3551# by Oracle in the LICENSE file that accompanied this code.
3552#
3553# This code is distributed in the hope that it will be useful, but WITHOUT
3554# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3555# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3556# version 2 for more details (a copy is included in the LICENSE file that
3557# accompanied this code).
3558#
3559# You should have received a copy of the GNU General Public License version
3560# 2 along with this work; if not, write to the Free Software Foundation,
3561# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3562#
3563# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3564# or visit www.oracle.com if you need additional information or have any
3565# questions.
3566#
3567
3568
3569
3570
3571
3572
3573
3574
3575#
3576# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3577# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3578#
3579# This code is free software; you can redistribute it and/or modify it
3580# under the terms of the GNU General Public License version 2 only, as
3581# published by the Free Software Foundation.  Oracle designates this
3582# particular file as subject to the "Classpath" exception as provided
3583# by Oracle in the LICENSE file that accompanied this code.
3584#
3585# This code is distributed in the hope that it will be useful, but WITHOUT
3586# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3587# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3588# version 2 for more details (a copy is included in the LICENSE file that
3589# accompanied this code).
3590#
3591# You should have received a copy of the GNU General Public License version
3592# 2 along with this work; if not, write to the Free Software Foundation,
3593# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3594#
3595# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3596# or visit www.oracle.com if you need additional information or have any
3597# questions.
3598#
3599
3600# $1 = compiler to test (CC or CXX)
3601# $2 = human readable name of compiler (C or C++)
3602
3603
3604
3605
3606
3607# $1 = compiler to test (CC or CXX)
3608# $2 = human readable name of compiler (C or C++)
3609# $3 = list of compiler names to search for
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622#
3623# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3624# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3625#
3626# This code is free software; you can redistribute it and/or modify it
3627# under the terms of the GNU General Public License version 2 only, as
3628# published by the Free Software Foundation.  Oracle designates this
3629# particular file as subject to the "Classpath" exception as provided
3630# by Oracle in the LICENSE file that accompanied this code.
3631#
3632# This code is distributed in the hope that it will be useful, but WITHOUT
3633# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3634# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3635# version 2 for more details (a copy is included in the LICENSE file that
3636# accompanied this code).
3637#
3638# You should have received a copy of the GNU General Public License version
3639# 2 along with this work; if not, write to the Free Software Foundation,
3640# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3641#
3642# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3643# or visit www.oracle.com if you need additional information or have any
3644# questions.
3645#
3646
3647
3648
3649
3650
3651
3652
3653# Check if the VS env variables were setup prior to running configure.
3654# If not, then find vcvarsall.bat and run it automatically, and integrate
3655# the set env variables into the spec file.
3656
3657
3658
3659
3660
3661
3662# This line needs to be here, verbatim, after all includes and the dummy hook
3663# definitions. It is replaced with custom functionality when building
3664# custom sources.
3665#CUSTOM_AUTOCONF_INCLUDE
3666
3667# Do not change or remove the following line, it is needed for consistency checks:
3668DATE_WHEN_GENERATED=1351854415
3669
3670###############################################################################
3671#
3672# Initialization / Boot-strapping
3673#
3674# The bootstrapping process needs to solve the "chicken or the egg" problem,
3675# thus it jumps back and forth, each time gaining something needed later on.
3676#
3677###############################################################################
3678
3679# Basic initialization that must happen first of all
3680
3681# Save the original command line. This is passed to us by the wrapper configure script.
3682
3683DATE_WHEN_CONFIGURED=`LANG=C date`
3684
3685{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3686$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3687{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3688$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3689
3690
3691
3692# Start with tools that do not need have cross compilation support
3693# and can be expected to be found in the default PATH. These tools are
3694# used by configure. Nor are these tools expected to be found in the
3695# devkit from the builddeps server either, since they are
3696# needed to download the devkit.
3697
3698# First are all the simple required tools.
3699
3700    for ac_prog in basename
3701do
3702  # Extract the first word of "$ac_prog", so it can be a program name with args.
3703set dummy $ac_prog; ac_word=$2
3704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3705$as_echo_n "checking for $ac_word... " >&6; }
3706if test "${ac_cv_path_BASENAME+set}" = set; then :
3707  $as_echo_n "(cached) " >&6
3708else
3709  case $BASENAME in
3710  [\\/]* | ?:[\\/]*)
3711  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3712  ;;
3713  *)
3714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3715for as_dir in $PATH
3716do
3717  IFS=$as_save_IFS
3718  test -z "$as_dir" && as_dir=.
3719    for ac_exec_ext in '' $ac_executable_extensions; do
3720  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3721    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3723    break 2
3724  fi
3725done
3726  done
3727IFS=$as_save_IFS
3728
3729  ;;
3730esac
3731fi
3732BASENAME=$ac_cv_path_BASENAME
3733if test -n "$BASENAME"; then
3734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3735$as_echo "$BASENAME" >&6; }
3736else
3737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3738$as_echo "no" >&6; }
3739fi
3740
3741
3742  test -n "$BASENAME" && break
3743done
3744
3745
3746    if test "x$BASENAME" = x; then
3747        if test "xbasename" = x; then
3748          PROG_NAME=basename
3749        else
3750          PROG_NAME=basename
3751        fi
3752        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3753$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3754        as_fn_error $? "Cannot continue" "$LINENO" 5
3755    fi
3756
3757
3758
3759    for ac_prog in bash
3760do
3761  # Extract the first word of "$ac_prog", so it can be a program name with args.
3762set dummy $ac_prog; ac_word=$2
3763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3764$as_echo_n "checking for $ac_word... " >&6; }
3765if test "${ac_cv_path_BASH+set}" = set; then :
3766  $as_echo_n "(cached) " >&6
3767else
3768  case $BASH in
3769  [\\/]* | ?:[\\/]*)
3770  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3771  ;;
3772  *)
3773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3774for as_dir in $PATH
3775do
3776  IFS=$as_save_IFS
3777  test -z "$as_dir" && as_dir=.
3778    for ac_exec_ext in '' $ac_executable_extensions; do
3779  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3780    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3782    break 2
3783  fi
3784done
3785  done
3786IFS=$as_save_IFS
3787
3788  ;;
3789esac
3790fi
3791BASH=$ac_cv_path_BASH
3792if test -n "$BASH"; then
3793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3794$as_echo "$BASH" >&6; }
3795else
3796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3797$as_echo "no" >&6; }
3798fi
3799
3800
3801  test -n "$BASH" && break
3802done
3803
3804
3805    if test "x$BASH" = x; then
3806        if test "xbash" = x; then
3807          PROG_NAME=bash
3808        else
3809          PROG_NAME=bash
3810        fi
3811        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3812$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3813        as_fn_error $? "Cannot continue" "$LINENO" 5
3814    fi
3815
3816
3817
3818    for ac_prog in cat
3819do
3820  # Extract the first word of "$ac_prog", so it can be a program name with args.
3821set dummy $ac_prog; ac_word=$2
3822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3823$as_echo_n "checking for $ac_word... " >&6; }
3824if test "${ac_cv_path_CAT+set}" = set; then :
3825  $as_echo_n "(cached) " >&6
3826else
3827  case $CAT in
3828  [\\/]* | ?:[\\/]*)
3829  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3830  ;;
3831  *)
3832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3833for as_dir in $PATH
3834do
3835  IFS=$as_save_IFS
3836  test -z "$as_dir" && as_dir=.
3837    for ac_exec_ext in '' $ac_executable_extensions; do
3838  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3839    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3841    break 2
3842  fi
3843done
3844  done
3845IFS=$as_save_IFS
3846
3847  ;;
3848esac
3849fi
3850CAT=$ac_cv_path_CAT
3851if test -n "$CAT"; then
3852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3853$as_echo "$CAT" >&6; }
3854else
3855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3856$as_echo "no" >&6; }
3857fi
3858
3859
3860  test -n "$CAT" && break
3861done
3862
3863
3864    if test "x$CAT" = x; then
3865        if test "xcat" = x; then
3866          PROG_NAME=cat
3867        else
3868          PROG_NAME=cat
3869        fi
3870        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3871$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3872        as_fn_error $? "Cannot continue" "$LINENO" 5
3873    fi
3874
3875
3876
3877    for ac_prog in chmod
3878do
3879  # Extract the first word of "$ac_prog", so it can be a program name with args.
3880set dummy $ac_prog; ac_word=$2
3881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3882$as_echo_n "checking for $ac_word... " >&6; }
3883if test "${ac_cv_path_CHMOD+set}" = set; then :
3884  $as_echo_n "(cached) " >&6
3885else
3886  case $CHMOD in
3887  [\\/]* | ?:[\\/]*)
3888  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3889  ;;
3890  *)
3891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3892for as_dir in $PATH
3893do
3894  IFS=$as_save_IFS
3895  test -z "$as_dir" && as_dir=.
3896    for ac_exec_ext in '' $ac_executable_extensions; do
3897  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3898    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3900    break 2
3901  fi
3902done
3903  done
3904IFS=$as_save_IFS
3905
3906  ;;
3907esac
3908fi
3909CHMOD=$ac_cv_path_CHMOD
3910if test -n "$CHMOD"; then
3911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3912$as_echo "$CHMOD" >&6; }
3913else
3914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3915$as_echo "no" >&6; }
3916fi
3917
3918
3919  test -n "$CHMOD" && break
3920done
3921
3922
3923    if test "x$CHMOD" = x; then
3924        if test "xchmod" = x; then
3925          PROG_NAME=chmod
3926        else
3927          PROG_NAME=chmod
3928        fi
3929        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3930$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3931        as_fn_error $? "Cannot continue" "$LINENO" 5
3932    fi
3933
3934
3935
3936    for ac_prog in cmp
3937do
3938  # Extract the first word of "$ac_prog", so it can be a program name with args.
3939set dummy $ac_prog; ac_word=$2
3940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3941$as_echo_n "checking for $ac_word... " >&6; }
3942if test "${ac_cv_path_CMP+set}" = set; then :
3943  $as_echo_n "(cached) " >&6
3944else
3945  case $CMP in
3946  [\\/]* | ?:[\\/]*)
3947  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3948  ;;
3949  *)
3950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3951for as_dir in $PATH
3952do
3953  IFS=$as_save_IFS
3954  test -z "$as_dir" && as_dir=.
3955    for ac_exec_ext in '' $ac_executable_extensions; do
3956  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3957    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3959    break 2
3960  fi
3961done
3962  done
3963IFS=$as_save_IFS
3964
3965  ;;
3966esac
3967fi
3968CMP=$ac_cv_path_CMP
3969if test -n "$CMP"; then
3970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
3971$as_echo "$CMP" >&6; }
3972else
3973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3974$as_echo "no" >&6; }
3975fi
3976
3977
3978  test -n "$CMP" && break
3979done
3980
3981
3982    if test "x$CMP" = x; then
3983        if test "xcmp" = x; then
3984          PROG_NAME=cmp
3985        else
3986          PROG_NAME=cmp
3987        fi
3988        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3989$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3990        as_fn_error $? "Cannot continue" "$LINENO" 5
3991    fi
3992
3993
3994
3995    for ac_prog in cp
3996do
3997  # Extract the first word of "$ac_prog", so it can be a program name with args.
3998set dummy $ac_prog; ac_word=$2
3999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4000$as_echo_n "checking for $ac_word... " >&6; }
4001if test "${ac_cv_path_CP+set}" = set; then :
4002  $as_echo_n "(cached) " >&6
4003else
4004  case $CP in
4005  [\\/]* | ?:[\\/]*)
4006  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4007  ;;
4008  *)
4009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4010for as_dir in $PATH
4011do
4012  IFS=$as_save_IFS
4013  test -z "$as_dir" && as_dir=.
4014    for ac_exec_ext in '' $ac_executable_extensions; do
4015  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4016    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4018    break 2
4019  fi
4020done
4021  done
4022IFS=$as_save_IFS
4023
4024  ;;
4025esac
4026fi
4027CP=$ac_cv_path_CP
4028if test -n "$CP"; then
4029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4030$as_echo "$CP" >&6; }
4031else
4032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4033$as_echo "no" >&6; }
4034fi
4035
4036
4037  test -n "$CP" && break
4038done
4039
4040
4041    if test "x$CP" = x; then
4042        if test "xcp" = x; then
4043          PROG_NAME=cp
4044        else
4045          PROG_NAME=cp
4046        fi
4047        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4048$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4049        as_fn_error $? "Cannot continue" "$LINENO" 5
4050    fi
4051
4052
4053
4054    for ac_prog in cut
4055do
4056  # Extract the first word of "$ac_prog", so it can be a program name with args.
4057set dummy $ac_prog; ac_word=$2
4058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4059$as_echo_n "checking for $ac_word... " >&6; }
4060if test "${ac_cv_path_CUT+set}" = set; then :
4061  $as_echo_n "(cached) " >&6
4062else
4063  case $CUT in
4064  [\\/]* | ?:[\\/]*)
4065  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4066  ;;
4067  *)
4068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4069for as_dir in $PATH
4070do
4071  IFS=$as_save_IFS
4072  test -z "$as_dir" && as_dir=.
4073    for ac_exec_ext in '' $ac_executable_extensions; do
4074  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4075    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4077    break 2
4078  fi
4079done
4080  done
4081IFS=$as_save_IFS
4082
4083  ;;
4084esac
4085fi
4086CUT=$ac_cv_path_CUT
4087if test -n "$CUT"; then
4088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4089$as_echo "$CUT" >&6; }
4090else
4091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4092$as_echo "no" >&6; }
4093fi
4094
4095
4096  test -n "$CUT" && break
4097done
4098
4099
4100    if test "x$CUT" = x; then
4101        if test "xcut" = x; then
4102          PROG_NAME=cut
4103        else
4104          PROG_NAME=cut
4105        fi
4106        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4107$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4108        as_fn_error $? "Cannot continue" "$LINENO" 5
4109    fi
4110
4111
4112
4113    for ac_prog in date
4114do
4115  # Extract the first word of "$ac_prog", so it can be a program name with args.
4116set dummy $ac_prog; ac_word=$2
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4118$as_echo_n "checking for $ac_word... " >&6; }
4119if test "${ac_cv_path_DATE+set}" = set; then :
4120  $as_echo_n "(cached) " >&6
4121else
4122  case $DATE in
4123  [\\/]* | ?:[\\/]*)
4124  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4125  ;;
4126  *)
4127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4128for as_dir in $PATH
4129do
4130  IFS=$as_save_IFS
4131  test -z "$as_dir" && as_dir=.
4132    for ac_exec_ext in '' $ac_executable_extensions; do
4133  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4134    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4136    break 2
4137  fi
4138done
4139  done
4140IFS=$as_save_IFS
4141
4142  ;;
4143esac
4144fi
4145DATE=$ac_cv_path_DATE
4146if test -n "$DATE"; then
4147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4148$as_echo "$DATE" >&6; }
4149else
4150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4151$as_echo "no" >&6; }
4152fi
4153
4154
4155  test -n "$DATE" && break
4156done
4157
4158
4159    if test "x$DATE" = x; then
4160        if test "xdate" = x; then
4161          PROG_NAME=date
4162        else
4163          PROG_NAME=date
4164        fi
4165        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4166$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4167        as_fn_error $? "Cannot continue" "$LINENO" 5
4168    fi
4169
4170
4171
4172    for ac_prog in gdiff diff
4173do
4174  # Extract the first word of "$ac_prog", so it can be a program name with args.
4175set dummy $ac_prog; ac_word=$2
4176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4177$as_echo_n "checking for $ac_word... " >&6; }
4178if test "${ac_cv_path_DIFF+set}" = set; then :
4179  $as_echo_n "(cached) " >&6
4180else
4181  case $DIFF in
4182  [\\/]* | ?:[\\/]*)
4183  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4184  ;;
4185  *)
4186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4187for as_dir in $PATH
4188do
4189  IFS=$as_save_IFS
4190  test -z "$as_dir" && as_dir=.
4191    for ac_exec_ext in '' $ac_executable_extensions; do
4192  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4193    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4195    break 2
4196  fi
4197done
4198  done
4199IFS=$as_save_IFS
4200
4201  ;;
4202esac
4203fi
4204DIFF=$ac_cv_path_DIFF
4205if test -n "$DIFF"; then
4206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4207$as_echo "$DIFF" >&6; }
4208else
4209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4210$as_echo "no" >&6; }
4211fi
4212
4213
4214  test -n "$DIFF" && break
4215done
4216
4217
4218    if test "x$DIFF" = x; then
4219        if test "xgdiff diff" = x; then
4220          PROG_NAME=diff
4221        else
4222          PROG_NAME=gdiff diff
4223        fi
4224        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4225$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4226        as_fn_error $? "Cannot continue" "$LINENO" 5
4227    fi
4228
4229
4230
4231    for ac_prog in dirname
4232do
4233  # Extract the first word of "$ac_prog", so it can be a program name with args.
4234set dummy $ac_prog; ac_word=$2
4235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4236$as_echo_n "checking for $ac_word... " >&6; }
4237if test "${ac_cv_path_DIRNAME+set}" = set; then :
4238  $as_echo_n "(cached) " >&6
4239else
4240  case $DIRNAME in
4241  [\\/]* | ?:[\\/]*)
4242  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4243  ;;
4244  *)
4245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4246for as_dir in $PATH
4247do
4248  IFS=$as_save_IFS
4249  test -z "$as_dir" && as_dir=.
4250    for ac_exec_ext in '' $ac_executable_extensions; do
4251  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4252    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4254    break 2
4255  fi
4256done
4257  done
4258IFS=$as_save_IFS
4259
4260  ;;
4261esac
4262fi
4263DIRNAME=$ac_cv_path_DIRNAME
4264if test -n "$DIRNAME"; then
4265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4266$as_echo "$DIRNAME" >&6; }
4267else
4268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4269$as_echo "no" >&6; }
4270fi
4271
4272
4273  test -n "$DIRNAME" && break
4274done
4275
4276
4277    if test "x$DIRNAME" = x; then
4278        if test "xdirname" = x; then
4279          PROG_NAME=dirname
4280        else
4281          PROG_NAME=dirname
4282        fi
4283        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4284$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4285        as_fn_error $? "Cannot continue" "$LINENO" 5
4286    fi
4287
4288
4289
4290    for ac_prog in echo
4291do
4292  # Extract the first word of "$ac_prog", so it can be a program name with args.
4293set dummy $ac_prog; ac_word=$2
4294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4295$as_echo_n "checking for $ac_word... " >&6; }
4296if test "${ac_cv_path_ECHO+set}" = set; then :
4297  $as_echo_n "(cached) " >&6
4298else
4299  case $ECHO in
4300  [\\/]* | ?:[\\/]*)
4301  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4302  ;;
4303  *)
4304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4305for as_dir in $PATH
4306do
4307  IFS=$as_save_IFS
4308  test -z "$as_dir" && as_dir=.
4309    for ac_exec_ext in '' $ac_executable_extensions; do
4310  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4311    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4313    break 2
4314  fi
4315done
4316  done
4317IFS=$as_save_IFS
4318
4319  ;;
4320esac
4321fi
4322ECHO=$ac_cv_path_ECHO
4323if test -n "$ECHO"; then
4324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4325$as_echo "$ECHO" >&6; }
4326else
4327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4328$as_echo "no" >&6; }
4329fi
4330
4331
4332  test -n "$ECHO" && break
4333done
4334
4335
4336    if test "x$ECHO" = x; then
4337        if test "xecho" = x; then
4338          PROG_NAME=echo
4339        else
4340          PROG_NAME=echo
4341        fi
4342        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4343$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4344        as_fn_error $? "Cannot continue" "$LINENO" 5
4345    fi
4346
4347
4348
4349    for ac_prog in expr
4350do
4351  # Extract the first word of "$ac_prog", so it can be a program name with args.
4352set dummy $ac_prog; ac_word=$2
4353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4354$as_echo_n "checking for $ac_word... " >&6; }
4355if test "${ac_cv_path_EXPR+set}" = set; then :
4356  $as_echo_n "(cached) " >&6
4357else
4358  case $EXPR in
4359  [\\/]* | ?:[\\/]*)
4360  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4361  ;;
4362  *)
4363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4364for as_dir in $PATH
4365do
4366  IFS=$as_save_IFS
4367  test -z "$as_dir" && as_dir=.
4368    for ac_exec_ext in '' $ac_executable_extensions; do
4369  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4370    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4372    break 2
4373  fi
4374done
4375  done
4376IFS=$as_save_IFS
4377
4378  ;;
4379esac
4380fi
4381EXPR=$ac_cv_path_EXPR
4382if test -n "$EXPR"; then
4383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4384$as_echo "$EXPR" >&6; }
4385else
4386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4387$as_echo "no" >&6; }
4388fi
4389
4390
4391  test -n "$EXPR" && break
4392done
4393
4394
4395    if test "x$EXPR" = x; then
4396        if test "xexpr" = x; then
4397          PROG_NAME=expr
4398        else
4399          PROG_NAME=expr
4400        fi
4401        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4402$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4403        as_fn_error $? "Cannot continue" "$LINENO" 5
4404    fi
4405
4406
4407
4408    for ac_prog in file
4409do
4410  # Extract the first word of "$ac_prog", so it can be a program name with args.
4411set dummy $ac_prog; ac_word=$2
4412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4413$as_echo_n "checking for $ac_word... " >&6; }
4414if test "${ac_cv_path_FILE+set}" = set; then :
4415  $as_echo_n "(cached) " >&6
4416else
4417  case $FILE in
4418  [\\/]* | ?:[\\/]*)
4419  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4420  ;;
4421  *)
4422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4423for as_dir in $PATH
4424do
4425  IFS=$as_save_IFS
4426  test -z "$as_dir" && as_dir=.
4427    for ac_exec_ext in '' $ac_executable_extensions; do
4428  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4429    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4431    break 2
4432  fi
4433done
4434  done
4435IFS=$as_save_IFS
4436
4437  ;;
4438esac
4439fi
4440FILE=$ac_cv_path_FILE
4441if test -n "$FILE"; then
4442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4443$as_echo "$FILE" >&6; }
4444else
4445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4446$as_echo "no" >&6; }
4447fi
4448
4449
4450  test -n "$FILE" && break
4451done
4452
4453
4454    if test "x$FILE" = x; then
4455        if test "xfile" = x; then
4456          PROG_NAME=file
4457        else
4458          PROG_NAME=file
4459        fi
4460        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4461$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4462        as_fn_error $? "Cannot continue" "$LINENO" 5
4463    fi
4464
4465
4466
4467    for ac_prog in find
4468do
4469  # Extract the first word of "$ac_prog", so it can be a program name with args.
4470set dummy $ac_prog; ac_word=$2
4471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4472$as_echo_n "checking for $ac_word... " >&6; }
4473if test "${ac_cv_path_FIND+set}" = set; then :
4474  $as_echo_n "(cached) " >&6
4475else
4476  case $FIND in
4477  [\\/]* | ?:[\\/]*)
4478  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4479  ;;
4480  *)
4481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4482for as_dir in $PATH
4483do
4484  IFS=$as_save_IFS
4485  test -z "$as_dir" && as_dir=.
4486    for ac_exec_ext in '' $ac_executable_extensions; do
4487  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4488    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4490    break 2
4491  fi
4492done
4493  done
4494IFS=$as_save_IFS
4495
4496  ;;
4497esac
4498fi
4499FIND=$ac_cv_path_FIND
4500if test -n "$FIND"; then
4501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4502$as_echo "$FIND" >&6; }
4503else
4504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4505$as_echo "no" >&6; }
4506fi
4507
4508
4509  test -n "$FIND" && break
4510done
4511
4512
4513    if test "x$FIND" = x; then
4514        if test "xfind" = x; then
4515          PROG_NAME=find
4516        else
4517          PROG_NAME=find
4518        fi
4519        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4520$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4521        as_fn_error $? "Cannot continue" "$LINENO" 5
4522    fi
4523
4524
4525
4526    for ac_prog in head
4527do
4528  # Extract the first word of "$ac_prog", so it can be a program name with args.
4529set dummy $ac_prog; ac_word=$2
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4531$as_echo_n "checking for $ac_word... " >&6; }
4532if test "${ac_cv_path_HEAD+set}" = set; then :
4533  $as_echo_n "(cached) " >&6
4534else
4535  case $HEAD in
4536  [\\/]* | ?:[\\/]*)
4537  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4538  ;;
4539  *)
4540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4541for as_dir in $PATH
4542do
4543  IFS=$as_save_IFS
4544  test -z "$as_dir" && as_dir=.
4545    for ac_exec_ext in '' $ac_executable_extensions; do
4546  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4547    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4549    break 2
4550  fi
4551done
4552  done
4553IFS=$as_save_IFS
4554
4555  ;;
4556esac
4557fi
4558HEAD=$ac_cv_path_HEAD
4559if test -n "$HEAD"; then
4560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4561$as_echo "$HEAD" >&6; }
4562else
4563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4564$as_echo "no" >&6; }
4565fi
4566
4567
4568  test -n "$HEAD" && break
4569done
4570
4571
4572    if test "x$HEAD" = x; then
4573        if test "xhead" = x; then
4574          PROG_NAME=head
4575        else
4576          PROG_NAME=head
4577        fi
4578        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4579$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4580        as_fn_error $? "Cannot continue" "$LINENO" 5
4581    fi
4582
4583
4584
4585    for ac_prog in ln
4586do
4587  # Extract the first word of "$ac_prog", so it can be a program name with args.
4588set dummy $ac_prog; ac_word=$2
4589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4590$as_echo_n "checking for $ac_word... " >&6; }
4591if test "${ac_cv_path_LN+set}" = set; then :
4592  $as_echo_n "(cached) " >&6
4593else
4594  case $LN in
4595  [\\/]* | ?:[\\/]*)
4596  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4597  ;;
4598  *)
4599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4600for as_dir in $PATH
4601do
4602  IFS=$as_save_IFS
4603  test -z "$as_dir" && as_dir=.
4604    for ac_exec_ext in '' $ac_executable_extensions; do
4605  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4606    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4608    break 2
4609  fi
4610done
4611  done
4612IFS=$as_save_IFS
4613
4614  ;;
4615esac
4616fi
4617LN=$ac_cv_path_LN
4618if test -n "$LN"; then
4619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4620$as_echo "$LN" >&6; }
4621else
4622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4623$as_echo "no" >&6; }
4624fi
4625
4626
4627  test -n "$LN" && break
4628done
4629
4630
4631    if test "x$LN" = x; then
4632        if test "xln" = x; then
4633          PROG_NAME=ln
4634        else
4635          PROG_NAME=ln
4636        fi
4637        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4638$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4639        as_fn_error $? "Cannot continue" "$LINENO" 5
4640    fi
4641
4642
4643
4644    for ac_prog in ls
4645do
4646  # Extract the first word of "$ac_prog", so it can be a program name with args.
4647set dummy $ac_prog; ac_word=$2
4648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4649$as_echo_n "checking for $ac_word... " >&6; }
4650if test "${ac_cv_path_LS+set}" = set; then :
4651  $as_echo_n "(cached) " >&6
4652else
4653  case $LS in
4654  [\\/]* | ?:[\\/]*)
4655  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4656  ;;
4657  *)
4658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4659for as_dir in $PATH
4660do
4661  IFS=$as_save_IFS
4662  test -z "$as_dir" && as_dir=.
4663    for ac_exec_ext in '' $ac_executable_extensions; do
4664  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4665    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4667    break 2
4668  fi
4669done
4670  done
4671IFS=$as_save_IFS
4672
4673  ;;
4674esac
4675fi
4676LS=$ac_cv_path_LS
4677if test -n "$LS"; then
4678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4679$as_echo "$LS" >&6; }
4680else
4681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4682$as_echo "no" >&6; }
4683fi
4684
4685
4686  test -n "$LS" && break
4687done
4688
4689
4690    if test "x$LS" = x; then
4691        if test "xls" = x; then
4692          PROG_NAME=ls
4693        else
4694          PROG_NAME=ls
4695        fi
4696        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4697$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4698        as_fn_error $? "Cannot continue" "$LINENO" 5
4699    fi
4700
4701
4702
4703    for ac_prog in mkdir
4704do
4705  # Extract the first word of "$ac_prog", so it can be a program name with args.
4706set dummy $ac_prog; ac_word=$2
4707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4708$as_echo_n "checking for $ac_word... " >&6; }
4709if test "${ac_cv_path_MKDIR+set}" = set; then :
4710  $as_echo_n "(cached) " >&6
4711else
4712  case $MKDIR in
4713  [\\/]* | ?:[\\/]*)
4714  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4715  ;;
4716  *)
4717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4718for as_dir in $PATH
4719do
4720  IFS=$as_save_IFS
4721  test -z "$as_dir" && as_dir=.
4722    for ac_exec_ext in '' $ac_executable_extensions; do
4723  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4724    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4726    break 2
4727  fi
4728done
4729  done
4730IFS=$as_save_IFS
4731
4732  ;;
4733esac
4734fi
4735MKDIR=$ac_cv_path_MKDIR
4736if test -n "$MKDIR"; then
4737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4738$as_echo "$MKDIR" >&6; }
4739else
4740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4741$as_echo "no" >&6; }
4742fi
4743
4744
4745  test -n "$MKDIR" && break
4746done
4747
4748
4749    if test "x$MKDIR" = x; then
4750        if test "xmkdir" = x; then
4751          PROG_NAME=mkdir
4752        else
4753          PROG_NAME=mkdir
4754        fi
4755        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4756$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4757        as_fn_error $? "Cannot continue" "$LINENO" 5
4758    fi
4759
4760
4761
4762    for ac_prog in mktemp
4763do
4764  # Extract the first word of "$ac_prog", so it can be a program name with args.
4765set dummy $ac_prog; ac_word=$2
4766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4767$as_echo_n "checking for $ac_word... " >&6; }
4768if test "${ac_cv_path_MKTEMP+set}" = set; then :
4769  $as_echo_n "(cached) " >&6
4770else
4771  case $MKTEMP in
4772  [\\/]* | ?:[\\/]*)
4773  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4774  ;;
4775  *)
4776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4777for as_dir in $PATH
4778do
4779  IFS=$as_save_IFS
4780  test -z "$as_dir" && as_dir=.
4781    for ac_exec_ext in '' $ac_executable_extensions; do
4782  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4783    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4785    break 2
4786  fi
4787done
4788  done
4789IFS=$as_save_IFS
4790
4791  ;;
4792esac
4793fi
4794MKTEMP=$ac_cv_path_MKTEMP
4795if test -n "$MKTEMP"; then
4796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4797$as_echo "$MKTEMP" >&6; }
4798else
4799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4800$as_echo "no" >&6; }
4801fi
4802
4803
4804  test -n "$MKTEMP" && break
4805done
4806
4807
4808    if test "x$MKTEMP" = x; then
4809        if test "xmktemp" = x; then
4810          PROG_NAME=mktemp
4811        else
4812          PROG_NAME=mktemp
4813        fi
4814        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4815$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4816        as_fn_error $? "Cannot continue" "$LINENO" 5
4817    fi
4818
4819
4820
4821    for ac_prog in mv
4822do
4823  # Extract the first word of "$ac_prog", so it can be a program name with args.
4824set dummy $ac_prog; ac_word=$2
4825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4826$as_echo_n "checking for $ac_word... " >&6; }
4827if test "${ac_cv_path_MV+set}" = set; then :
4828  $as_echo_n "(cached) " >&6
4829else
4830  case $MV in
4831  [\\/]* | ?:[\\/]*)
4832  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4833  ;;
4834  *)
4835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4836for as_dir in $PATH
4837do
4838  IFS=$as_save_IFS
4839  test -z "$as_dir" && as_dir=.
4840    for ac_exec_ext in '' $ac_executable_extensions; do
4841  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4842    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4844    break 2
4845  fi
4846done
4847  done
4848IFS=$as_save_IFS
4849
4850  ;;
4851esac
4852fi
4853MV=$ac_cv_path_MV
4854if test -n "$MV"; then
4855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
4856$as_echo "$MV" >&6; }
4857else
4858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4859$as_echo "no" >&6; }
4860fi
4861
4862
4863  test -n "$MV" && break
4864done
4865
4866
4867    if test "x$MV" = x; then
4868        if test "xmv" = x; then
4869          PROG_NAME=mv
4870        else
4871          PROG_NAME=mv
4872        fi
4873        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4874$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4875        as_fn_error $? "Cannot continue" "$LINENO" 5
4876    fi
4877
4878
4879
4880    for ac_prog in printf
4881do
4882  # Extract the first word of "$ac_prog", so it can be a program name with args.
4883set dummy $ac_prog; ac_word=$2
4884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4885$as_echo_n "checking for $ac_word... " >&6; }
4886if test "${ac_cv_path_PRINTF+set}" = set; then :
4887  $as_echo_n "(cached) " >&6
4888else
4889  case $PRINTF in
4890  [\\/]* | ?:[\\/]*)
4891  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
4892  ;;
4893  *)
4894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4895for as_dir in $PATH
4896do
4897  IFS=$as_save_IFS
4898  test -z "$as_dir" && as_dir=.
4899    for ac_exec_ext in '' $ac_executable_extensions; do
4900  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4901    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
4902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4903    break 2
4904  fi
4905done
4906  done
4907IFS=$as_save_IFS
4908
4909  ;;
4910esac
4911fi
4912PRINTF=$ac_cv_path_PRINTF
4913if test -n "$PRINTF"; then
4914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
4915$as_echo "$PRINTF" >&6; }
4916else
4917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4918$as_echo "no" >&6; }
4919fi
4920
4921
4922  test -n "$PRINTF" && break
4923done
4924
4925
4926    if test "x$PRINTF" = x; then
4927        if test "xprintf" = x; then
4928          PROG_NAME=printf
4929        else
4930          PROG_NAME=printf
4931        fi
4932        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4933$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4934        as_fn_error $? "Cannot continue" "$LINENO" 5
4935    fi
4936
4937
4938
4939    for ac_prog in pwd
4940do
4941  # Extract the first word of "$ac_prog", so it can be a program name with args.
4942set dummy $ac_prog; ac_word=$2
4943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4944$as_echo_n "checking for $ac_word... " >&6; }
4945if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
4946  $as_echo_n "(cached) " >&6
4947else
4948  case $THEPWDCMD in
4949  [\\/]* | ?:[\\/]*)
4950  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
4951  ;;
4952  *)
4953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4954for as_dir in $PATH
4955do
4956  IFS=$as_save_IFS
4957  test -z "$as_dir" && as_dir=.
4958    for ac_exec_ext in '' $ac_executable_extensions; do
4959  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4960    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
4961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4962    break 2
4963  fi
4964done
4965  done
4966IFS=$as_save_IFS
4967
4968  ;;
4969esac
4970fi
4971THEPWDCMD=$ac_cv_path_THEPWDCMD
4972if test -n "$THEPWDCMD"; then
4973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
4974$as_echo "$THEPWDCMD" >&6; }
4975else
4976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977$as_echo "no" >&6; }
4978fi
4979
4980
4981  test -n "$THEPWDCMD" && break
4982done
4983
4984
4985    if test "x$THEPWDCMD" = x; then
4986        if test "xpwd" = x; then
4987          PROG_NAME=thepwdcmd
4988        else
4989          PROG_NAME=pwd
4990        fi
4991        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4992$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4993        as_fn_error $? "Cannot continue" "$LINENO" 5
4994    fi
4995
4996
4997
4998    for ac_prog in rm
4999do
5000  # Extract the first word of "$ac_prog", so it can be a program name with args.
5001set dummy $ac_prog; ac_word=$2
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5003$as_echo_n "checking for $ac_word... " >&6; }
5004if test "${ac_cv_path_RM+set}" = set; then :
5005  $as_echo_n "(cached) " >&6
5006else
5007  case $RM in
5008  [\\/]* | ?:[\\/]*)
5009  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5010  ;;
5011  *)
5012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013for as_dir in $PATH
5014do
5015  IFS=$as_save_IFS
5016  test -z "$as_dir" && as_dir=.
5017    for ac_exec_ext in '' $ac_executable_extensions; do
5018  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5019    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021    break 2
5022  fi
5023done
5024  done
5025IFS=$as_save_IFS
5026
5027  ;;
5028esac
5029fi
5030RM=$ac_cv_path_RM
5031if test -n "$RM"; then
5032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5033$as_echo "$RM" >&6; }
5034else
5035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5036$as_echo "no" >&6; }
5037fi
5038
5039
5040  test -n "$RM" && break
5041done
5042
5043
5044    if test "x$RM" = x; then
5045        if test "xrm" = x; then
5046          PROG_NAME=rm
5047        else
5048          PROG_NAME=rm
5049        fi
5050        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5051$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5052        as_fn_error $? "Cannot continue" "$LINENO" 5
5053    fi
5054
5055
5056
5057    for ac_prog in sh
5058do
5059  # Extract the first word of "$ac_prog", so it can be a program name with args.
5060set dummy $ac_prog; ac_word=$2
5061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5062$as_echo_n "checking for $ac_word... " >&6; }
5063if test "${ac_cv_path_SH+set}" = set; then :
5064  $as_echo_n "(cached) " >&6
5065else
5066  case $SH in
5067  [\\/]* | ?:[\\/]*)
5068  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5069  ;;
5070  *)
5071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5072for as_dir in $PATH
5073do
5074  IFS=$as_save_IFS
5075  test -z "$as_dir" && as_dir=.
5076    for ac_exec_ext in '' $ac_executable_extensions; do
5077  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5078    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5080    break 2
5081  fi
5082done
5083  done
5084IFS=$as_save_IFS
5085
5086  ;;
5087esac
5088fi
5089SH=$ac_cv_path_SH
5090if test -n "$SH"; then
5091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5092$as_echo "$SH" >&6; }
5093else
5094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5095$as_echo "no" >&6; }
5096fi
5097
5098
5099  test -n "$SH" && break
5100done
5101
5102
5103    if test "x$SH" = x; then
5104        if test "xsh" = x; then
5105          PROG_NAME=sh
5106        else
5107          PROG_NAME=sh
5108        fi
5109        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5110$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5111        as_fn_error $? "Cannot continue" "$LINENO" 5
5112    fi
5113
5114
5115
5116    for ac_prog in sort
5117do
5118  # Extract the first word of "$ac_prog", so it can be a program name with args.
5119set dummy $ac_prog; ac_word=$2
5120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5121$as_echo_n "checking for $ac_word... " >&6; }
5122if test "${ac_cv_path_SORT+set}" = set; then :
5123  $as_echo_n "(cached) " >&6
5124else
5125  case $SORT in
5126  [\\/]* | ?:[\\/]*)
5127  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5128  ;;
5129  *)
5130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5131for as_dir in $PATH
5132do
5133  IFS=$as_save_IFS
5134  test -z "$as_dir" && as_dir=.
5135    for ac_exec_ext in '' $ac_executable_extensions; do
5136  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5137    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5139    break 2
5140  fi
5141done
5142  done
5143IFS=$as_save_IFS
5144
5145  ;;
5146esac
5147fi
5148SORT=$ac_cv_path_SORT
5149if test -n "$SORT"; then
5150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5151$as_echo "$SORT" >&6; }
5152else
5153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5154$as_echo "no" >&6; }
5155fi
5156
5157
5158  test -n "$SORT" && break
5159done
5160
5161
5162    if test "x$SORT" = x; then
5163        if test "xsort" = x; then
5164          PROG_NAME=sort
5165        else
5166          PROG_NAME=sort
5167        fi
5168        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5169$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5170        as_fn_error $? "Cannot continue" "$LINENO" 5
5171    fi
5172
5173
5174
5175    for ac_prog in tail
5176do
5177  # Extract the first word of "$ac_prog", so it can be a program name with args.
5178set dummy $ac_prog; ac_word=$2
5179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5180$as_echo_n "checking for $ac_word... " >&6; }
5181if test "${ac_cv_path_TAIL+set}" = set; then :
5182  $as_echo_n "(cached) " >&6
5183else
5184  case $TAIL in
5185  [\\/]* | ?:[\\/]*)
5186  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5187  ;;
5188  *)
5189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5190for as_dir in $PATH
5191do
5192  IFS=$as_save_IFS
5193  test -z "$as_dir" && as_dir=.
5194    for ac_exec_ext in '' $ac_executable_extensions; do
5195  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5196    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5198    break 2
5199  fi
5200done
5201  done
5202IFS=$as_save_IFS
5203
5204  ;;
5205esac
5206fi
5207TAIL=$ac_cv_path_TAIL
5208if test -n "$TAIL"; then
5209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5210$as_echo "$TAIL" >&6; }
5211else
5212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5213$as_echo "no" >&6; }
5214fi
5215
5216
5217  test -n "$TAIL" && break
5218done
5219
5220
5221    if test "x$TAIL" = x; then
5222        if test "xtail" = x; then
5223          PROG_NAME=tail
5224        else
5225          PROG_NAME=tail
5226        fi
5227        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5228$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5229        as_fn_error $? "Cannot continue" "$LINENO" 5
5230    fi
5231
5232
5233
5234    for ac_prog in tar
5235do
5236  # Extract the first word of "$ac_prog", so it can be a program name with args.
5237set dummy $ac_prog; ac_word=$2
5238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5239$as_echo_n "checking for $ac_word... " >&6; }
5240if test "${ac_cv_path_TAR+set}" = set; then :
5241  $as_echo_n "(cached) " >&6
5242else
5243  case $TAR in
5244  [\\/]* | ?:[\\/]*)
5245  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5246  ;;
5247  *)
5248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5249for as_dir in $PATH
5250do
5251  IFS=$as_save_IFS
5252  test -z "$as_dir" && as_dir=.
5253    for ac_exec_ext in '' $ac_executable_extensions; do
5254  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5255    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5257    break 2
5258  fi
5259done
5260  done
5261IFS=$as_save_IFS
5262
5263  ;;
5264esac
5265fi
5266TAR=$ac_cv_path_TAR
5267if test -n "$TAR"; then
5268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5269$as_echo "$TAR" >&6; }
5270else
5271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5272$as_echo "no" >&6; }
5273fi
5274
5275
5276  test -n "$TAR" && break
5277done
5278
5279
5280    if test "x$TAR" = x; then
5281        if test "xtar" = x; then
5282          PROG_NAME=tar
5283        else
5284          PROG_NAME=tar
5285        fi
5286        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5287$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5288        as_fn_error $? "Cannot continue" "$LINENO" 5
5289    fi
5290
5291
5292
5293    for ac_prog in tee
5294do
5295  # Extract the first word of "$ac_prog", so it can be a program name with args.
5296set dummy $ac_prog; ac_word=$2
5297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5298$as_echo_n "checking for $ac_word... " >&6; }
5299if test "${ac_cv_path_TEE+set}" = set; then :
5300  $as_echo_n "(cached) " >&6
5301else
5302  case $TEE in
5303  [\\/]* | ?:[\\/]*)
5304  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5305  ;;
5306  *)
5307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5308for as_dir in $PATH
5309do
5310  IFS=$as_save_IFS
5311  test -z "$as_dir" && as_dir=.
5312    for ac_exec_ext in '' $ac_executable_extensions; do
5313  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5314    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5316    break 2
5317  fi
5318done
5319  done
5320IFS=$as_save_IFS
5321
5322  ;;
5323esac
5324fi
5325TEE=$ac_cv_path_TEE
5326if test -n "$TEE"; then
5327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5328$as_echo "$TEE" >&6; }
5329else
5330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5331$as_echo "no" >&6; }
5332fi
5333
5334
5335  test -n "$TEE" && break
5336done
5337
5338
5339    if test "x$TEE" = x; then
5340        if test "xtee" = x; then
5341          PROG_NAME=tee
5342        else
5343          PROG_NAME=tee
5344        fi
5345        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5346$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5347        as_fn_error $? "Cannot continue" "$LINENO" 5
5348    fi
5349
5350
5351
5352    for ac_prog in touch
5353do
5354  # Extract the first word of "$ac_prog", so it can be a program name with args.
5355set dummy $ac_prog; ac_word=$2
5356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5357$as_echo_n "checking for $ac_word... " >&6; }
5358if test "${ac_cv_path_TOUCH+set}" = set; then :
5359  $as_echo_n "(cached) " >&6
5360else
5361  case $TOUCH in
5362  [\\/]* | ?:[\\/]*)
5363  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5364  ;;
5365  *)
5366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5367for as_dir in $PATH
5368do
5369  IFS=$as_save_IFS
5370  test -z "$as_dir" && as_dir=.
5371    for ac_exec_ext in '' $ac_executable_extensions; do
5372  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5373    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5375    break 2
5376  fi
5377done
5378  done
5379IFS=$as_save_IFS
5380
5381  ;;
5382esac
5383fi
5384TOUCH=$ac_cv_path_TOUCH
5385if test -n "$TOUCH"; then
5386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5387$as_echo "$TOUCH" >&6; }
5388else
5389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5390$as_echo "no" >&6; }
5391fi
5392
5393
5394  test -n "$TOUCH" && break
5395done
5396
5397
5398    if test "x$TOUCH" = x; then
5399        if test "xtouch" = x; then
5400          PROG_NAME=touch
5401        else
5402          PROG_NAME=touch
5403        fi
5404        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5405$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5406        as_fn_error $? "Cannot continue" "$LINENO" 5
5407    fi
5408
5409
5410
5411    for ac_prog in tr
5412do
5413  # Extract the first word of "$ac_prog", so it can be a program name with args.
5414set dummy $ac_prog; ac_word=$2
5415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5416$as_echo_n "checking for $ac_word... " >&6; }
5417if test "${ac_cv_path_TR+set}" = set; then :
5418  $as_echo_n "(cached) " >&6
5419else
5420  case $TR in
5421  [\\/]* | ?:[\\/]*)
5422  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5423  ;;
5424  *)
5425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5426for as_dir in $PATH
5427do
5428  IFS=$as_save_IFS
5429  test -z "$as_dir" && as_dir=.
5430    for ac_exec_ext in '' $ac_executable_extensions; do
5431  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5432    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5434    break 2
5435  fi
5436done
5437  done
5438IFS=$as_save_IFS
5439
5440  ;;
5441esac
5442fi
5443TR=$ac_cv_path_TR
5444if test -n "$TR"; then
5445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5446$as_echo "$TR" >&6; }
5447else
5448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5449$as_echo "no" >&6; }
5450fi
5451
5452
5453  test -n "$TR" && break
5454done
5455
5456
5457    if test "x$TR" = x; then
5458        if test "xtr" = x; then
5459          PROG_NAME=tr
5460        else
5461          PROG_NAME=tr
5462        fi
5463        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5464$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5465        as_fn_error $? "Cannot continue" "$LINENO" 5
5466    fi
5467
5468
5469
5470    for ac_prog in uname
5471do
5472  # Extract the first word of "$ac_prog", so it can be a program name with args.
5473set dummy $ac_prog; ac_word=$2
5474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475$as_echo_n "checking for $ac_word... " >&6; }
5476if test "${ac_cv_path_UNAME+set}" = set; then :
5477  $as_echo_n "(cached) " >&6
5478else
5479  case $UNAME in
5480  [\\/]* | ?:[\\/]*)
5481  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5482  ;;
5483  *)
5484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5485for as_dir in $PATH
5486do
5487  IFS=$as_save_IFS
5488  test -z "$as_dir" && as_dir=.
5489    for ac_exec_ext in '' $ac_executable_extensions; do
5490  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5491    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5493    break 2
5494  fi
5495done
5496  done
5497IFS=$as_save_IFS
5498
5499  ;;
5500esac
5501fi
5502UNAME=$ac_cv_path_UNAME
5503if test -n "$UNAME"; then
5504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5505$as_echo "$UNAME" >&6; }
5506else
5507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5508$as_echo "no" >&6; }
5509fi
5510
5511
5512  test -n "$UNAME" && break
5513done
5514
5515
5516    if test "x$UNAME" = x; then
5517        if test "xuname" = x; then
5518          PROG_NAME=uname
5519        else
5520          PROG_NAME=uname
5521        fi
5522        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5523$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5524        as_fn_error $? "Cannot continue" "$LINENO" 5
5525    fi
5526
5527
5528
5529    for ac_prog in uniq
5530do
5531  # Extract the first word of "$ac_prog", so it can be a program name with args.
5532set dummy $ac_prog; ac_word=$2
5533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5534$as_echo_n "checking for $ac_word... " >&6; }
5535if test "${ac_cv_path_UNIQ+set}" = set; then :
5536  $as_echo_n "(cached) " >&6
5537else
5538  case $UNIQ in
5539  [\\/]* | ?:[\\/]*)
5540  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5541  ;;
5542  *)
5543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5544for as_dir in $PATH
5545do
5546  IFS=$as_save_IFS
5547  test -z "$as_dir" && as_dir=.
5548    for ac_exec_ext in '' $ac_executable_extensions; do
5549  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5550    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5552    break 2
5553  fi
5554done
5555  done
5556IFS=$as_save_IFS
5557
5558  ;;
5559esac
5560fi
5561UNIQ=$ac_cv_path_UNIQ
5562if test -n "$UNIQ"; then
5563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5564$as_echo "$UNIQ" >&6; }
5565else
5566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5567$as_echo "no" >&6; }
5568fi
5569
5570
5571  test -n "$UNIQ" && break
5572done
5573
5574
5575    if test "x$UNIQ" = x; then
5576        if test "xuniq" = x; then
5577          PROG_NAME=uniq
5578        else
5579          PROG_NAME=uniq
5580        fi
5581        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5582$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5583        as_fn_error $? "Cannot continue" "$LINENO" 5
5584    fi
5585
5586
5587
5588    for ac_prog in wc
5589do
5590  # Extract the first word of "$ac_prog", so it can be a program name with args.
5591set dummy $ac_prog; ac_word=$2
5592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5593$as_echo_n "checking for $ac_word... " >&6; }
5594if test "${ac_cv_path_WC+set}" = set; then :
5595  $as_echo_n "(cached) " >&6
5596else
5597  case $WC in
5598  [\\/]* | ?:[\\/]*)
5599  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5600  ;;
5601  *)
5602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5603for as_dir in $PATH
5604do
5605  IFS=$as_save_IFS
5606  test -z "$as_dir" && as_dir=.
5607    for ac_exec_ext in '' $ac_executable_extensions; do
5608  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5609    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5611    break 2
5612  fi
5613done
5614  done
5615IFS=$as_save_IFS
5616
5617  ;;
5618esac
5619fi
5620WC=$ac_cv_path_WC
5621if test -n "$WC"; then
5622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5623$as_echo "$WC" >&6; }
5624else
5625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5626$as_echo "no" >&6; }
5627fi
5628
5629
5630  test -n "$WC" && break
5631done
5632
5633
5634    if test "x$WC" = x; then
5635        if test "xwc" = x; then
5636          PROG_NAME=wc
5637        else
5638          PROG_NAME=wc
5639        fi
5640        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5641$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5642        as_fn_error $? "Cannot continue" "$LINENO" 5
5643    fi
5644
5645
5646
5647    for ac_prog in which
5648do
5649  # Extract the first word of "$ac_prog", so it can be a program name with args.
5650set dummy $ac_prog; ac_word=$2
5651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5652$as_echo_n "checking for $ac_word... " >&6; }
5653if test "${ac_cv_path_WHICH+set}" = set; then :
5654  $as_echo_n "(cached) " >&6
5655else
5656  case $WHICH in
5657  [\\/]* | ?:[\\/]*)
5658  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5659  ;;
5660  *)
5661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5662for as_dir in $PATH
5663do
5664  IFS=$as_save_IFS
5665  test -z "$as_dir" && as_dir=.
5666    for ac_exec_ext in '' $ac_executable_extensions; do
5667  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5668    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5670    break 2
5671  fi
5672done
5673  done
5674IFS=$as_save_IFS
5675
5676  ;;
5677esac
5678fi
5679WHICH=$ac_cv_path_WHICH
5680if test -n "$WHICH"; then
5681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5682$as_echo "$WHICH" >&6; }
5683else
5684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5685$as_echo "no" >&6; }
5686fi
5687
5688
5689  test -n "$WHICH" && break
5690done
5691
5692
5693    if test "x$WHICH" = x; then
5694        if test "xwhich" = x; then
5695          PROG_NAME=which
5696        else
5697          PROG_NAME=which
5698        fi
5699        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5700$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5701        as_fn_error $? "Cannot continue" "$LINENO" 5
5702    fi
5703
5704
5705
5706    for ac_prog in xargs
5707do
5708  # Extract the first word of "$ac_prog", so it can be a program name with args.
5709set dummy $ac_prog; ac_word=$2
5710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5711$as_echo_n "checking for $ac_word... " >&6; }
5712if test "${ac_cv_path_XARGS+set}" = set; then :
5713  $as_echo_n "(cached) " >&6
5714else
5715  case $XARGS in
5716  [\\/]* | ?:[\\/]*)
5717  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5718  ;;
5719  *)
5720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5721for as_dir in $PATH
5722do
5723  IFS=$as_save_IFS
5724  test -z "$as_dir" && as_dir=.
5725    for ac_exec_ext in '' $ac_executable_extensions; do
5726  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5727    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5729    break 2
5730  fi
5731done
5732  done
5733IFS=$as_save_IFS
5734
5735  ;;
5736esac
5737fi
5738XARGS=$ac_cv_path_XARGS
5739if test -n "$XARGS"; then
5740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5741$as_echo "$XARGS" >&6; }
5742else
5743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5744$as_echo "no" >&6; }
5745fi
5746
5747
5748  test -n "$XARGS" && break
5749done
5750
5751
5752    if test "x$XARGS" = x; then
5753        if test "xxargs" = x; then
5754          PROG_NAME=xargs
5755        else
5756          PROG_NAME=xargs
5757        fi
5758        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5759$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5760        as_fn_error $? "Cannot continue" "$LINENO" 5
5761    fi
5762
5763
5764
5765# Then required tools that require some special treatment.
5766for ac_prog in gawk mawk nawk awk
5767do
5768  # Extract the first word of "$ac_prog", so it can be a program name with args.
5769set dummy $ac_prog; ac_word=$2
5770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5771$as_echo_n "checking for $ac_word... " >&6; }
5772if test "${ac_cv_prog_AWK+set}" = set; then :
5773  $as_echo_n "(cached) " >&6
5774else
5775  if test -n "$AWK"; then
5776  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5777else
5778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5779for as_dir in $PATH
5780do
5781  IFS=$as_save_IFS
5782  test -z "$as_dir" && as_dir=.
5783    for ac_exec_ext in '' $ac_executable_extensions; do
5784  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5785    ac_cv_prog_AWK="$ac_prog"
5786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5787    break 2
5788  fi
5789done
5790  done
5791IFS=$as_save_IFS
5792
5793fi
5794fi
5795AWK=$ac_cv_prog_AWK
5796if test -n "$AWK"; then
5797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5798$as_echo "$AWK" >&6; }
5799else
5800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5801$as_echo "no" >&6; }
5802fi
5803
5804
5805  test -n "$AWK" && break
5806done
5807
5808
5809    if test "x$AWK" = x; then
5810        if test "x" = x; then
5811          PROG_NAME=awk
5812        else
5813          PROG_NAME=
5814        fi
5815        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5816$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5817        as_fn_error $? "Cannot continue" "$LINENO" 5
5818    fi
5819
5820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5821$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5822if test "${ac_cv_path_GREP+set}" = set; then :
5823  $as_echo_n "(cached) " >&6
5824else
5825  if test -z "$GREP"; then
5826  ac_path_GREP_found=false
5827  # Loop through the user's path and test for each of PROGNAME-LIST
5828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5829for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5830do
5831  IFS=$as_save_IFS
5832  test -z "$as_dir" && as_dir=.
5833    for ac_prog in grep ggrep; do
5834    for ac_exec_ext in '' $ac_executable_extensions; do
5835      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5836      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5837# Check for GNU ac_path_GREP and select it if it is found.
5838  # Check for GNU $ac_path_GREP
5839case `"$ac_path_GREP" --version 2>&1` in
5840*GNU*)
5841  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5842*)
5843  ac_count=0
5844  $as_echo_n 0123456789 >"conftest.in"
5845  while :
5846  do
5847    cat "conftest.in" "conftest.in" >"conftest.tmp"
5848    mv "conftest.tmp" "conftest.in"
5849    cp "conftest.in" "conftest.nl"
5850    $as_echo 'GREP' >> "conftest.nl"
5851    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5852    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5853    as_fn_arith $ac_count + 1 && ac_count=$as_val
5854    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5855      # Best one so far, save it but keep looking for a better one
5856      ac_cv_path_GREP="$ac_path_GREP"
5857      ac_path_GREP_max=$ac_count
5858    fi
5859    # 10*(2^10) chars as input seems more than enough
5860    test $ac_count -gt 10 && break
5861  done
5862  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5863esac
5864
5865      $ac_path_GREP_found && break 3
5866    done
5867  done
5868  done
5869IFS=$as_save_IFS
5870  if test -z "$ac_cv_path_GREP"; then
5871    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5872  fi
5873else
5874  ac_cv_path_GREP=$GREP
5875fi
5876
5877fi
5878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5879$as_echo "$ac_cv_path_GREP" >&6; }
5880 GREP="$ac_cv_path_GREP"
5881
5882
5883
5884    if test "x$GREP" = x; then
5885        if test "x" = x; then
5886          PROG_NAME=grep
5887        else
5888          PROG_NAME=
5889        fi
5890        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5891$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5892        as_fn_error $? "Cannot continue" "$LINENO" 5
5893    fi
5894
5895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5896$as_echo_n "checking for egrep... " >&6; }
5897if test "${ac_cv_path_EGREP+set}" = set; then :
5898  $as_echo_n "(cached) " >&6
5899else
5900  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5901   then ac_cv_path_EGREP="$GREP -E"
5902   else
5903     if test -z "$EGREP"; then
5904  ac_path_EGREP_found=false
5905  # Loop through the user's path and test for each of PROGNAME-LIST
5906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5907for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5908do
5909  IFS=$as_save_IFS
5910  test -z "$as_dir" && as_dir=.
5911    for ac_prog in egrep; do
5912    for ac_exec_ext in '' $ac_executable_extensions; do
5913      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5914      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5915# Check for GNU ac_path_EGREP and select it if it is found.
5916  # Check for GNU $ac_path_EGREP
5917case `"$ac_path_EGREP" --version 2>&1` in
5918*GNU*)
5919  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5920*)
5921  ac_count=0
5922  $as_echo_n 0123456789 >"conftest.in"
5923  while :
5924  do
5925    cat "conftest.in" "conftest.in" >"conftest.tmp"
5926    mv "conftest.tmp" "conftest.in"
5927    cp "conftest.in" "conftest.nl"
5928    $as_echo 'EGREP' >> "conftest.nl"
5929    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5930    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5931    as_fn_arith $ac_count + 1 && ac_count=$as_val
5932    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5933      # Best one so far, save it but keep looking for a better one
5934      ac_cv_path_EGREP="$ac_path_EGREP"
5935      ac_path_EGREP_max=$ac_count
5936    fi
5937    # 10*(2^10) chars as input seems more than enough
5938    test $ac_count -gt 10 && break
5939  done
5940  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5941esac
5942
5943      $ac_path_EGREP_found && break 3
5944    done
5945  done
5946  done
5947IFS=$as_save_IFS
5948  if test -z "$ac_cv_path_EGREP"; then
5949    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5950  fi
5951else
5952  ac_cv_path_EGREP=$EGREP
5953fi
5954
5955   fi
5956fi
5957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5958$as_echo "$ac_cv_path_EGREP" >&6; }
5959 EGREP="$ac_cv_path_EGREP"
5960
5961
5962
5963    if test "x$EGREP" = x; then
5964        if test "x" = x; then
5965          PROG_NAME=egrep
5966        else
5967          PROG_NAME=
5968        fi
5969        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5970$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5971        as_fn_error $? "Cannot continue" "$LINENO" 5
5972    fi
5973
5974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5975$as_echo_n "checking for fgrep... " >&6; }
5976if test "${ac_cv_path_FGREP+set}" = set; then :
5977  $as_echo_n "(cached) " >&6
5978else
5979  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5980   then ac_cv_path_FGREP="$GREP -F"
5981   else
5982     if test -z "$FGREP"; then
5983  ac_path_FGREP_found=false
5984  # Loop through the user's path and test for each of PROGNAME-LIST
5985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5986for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5987do
5988  IFS=$as_save_IFS
5989  test -z "$as_dir" && as_dir=.
5990    for ac_prog in fgrep; do
5991    for ac_exec_ext in '' $ac_executable_extensions; do
5992      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
5993      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
5994# Check for GNU ac_path_FGREP and select it if it is found.
5995  # Check for GNU $ac_path_FGREP
5996case `"$ac_path_FGREP" --version 2>&1` in
5997*GNU*)
5998  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
5999*)
6000  ac_count=0
6001  $as_echo_n 0123456789 >"conftest.in"
6002  while :
6003  do
6004    cat "conftest.in" "conftest.in" >"conftest.tmp"
6005    mv "conftest.tmp" "conftest.in"
6006    cp "conftest.in" "conftest.nl"
6007    $as_echo 'FGREP' >> "conftest.nl"
6008    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6009    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6010    as_fn_arith $ac_count + 1 && ac_count=$as_val
6011    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6012      # Best one so far, save it but keep looking for a better one
6013      ac_cv_path_FGREP="$ac_path_FGREP"
6014      ac_path_FGREP_max=$ac_count
6015    fi
6016    # 10*(2^10) chars as input seems more than enough
6017    test $ac_count -gt 10 && break
6018  done
6019  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6020esac
6021
6022      $ac_path_FGREP_found && break 3
6023    done
6024  done
6025  done
6026IFS=$as_save_IFS
6027  if test -z "$ac_cv_path_FGREP"; then
6028    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6029  fi
6030else
6031  ac_cv_path_FGREP=$FGREP
6032fi
6033
6034   fi
6035fi
6036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6037$as_echo "$ac_cv_path_FGREP" >&6; }
6038 FGREP="$ac_cv_path_FGREP"
6039
6040
6041
6042    if test "x$FGREP" = x; then
6043        if test "x" = x; then
6044          PROG_NAME=fgrep
6045        else
6046          PROG_NAME=
6047        fi
6048        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6049$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6050        as_fn_error $? "Cannot continue" "$LINENO" 5
6051    fi
6052
6053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6054$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6055if test "${ac_cv_path_SED+set}" = set; then :
6056  $as_echo_n "(cached) " >&6
6057else
6058            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6059     for ac_i in 1 2 3 4 5 6 7; do
6060       ac_script="$ac_script$as_nl$ac_script"
6061     done
6062     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6063     { ac_script=; unset ac_script;}
6064     if test -z "$SED"; then
6065  ac_path_SED_found=false
6066  # Loop through the user's path and test for each of PROGNAME-LIST
6067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6068for as_dir in $PATH
6069do
6070  IFS=$as_save_IFS
6071  test -z "$as_dir" && as_dir=.
6072    for ac_prog in sed gsed; do
6073    for ac_exec_ext in '' $ac_executable_extensions; do
6074      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6075      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6076# Check for GNU ac_path_SED and select it if it is found.
6077  # Check for GNU $ac_path_SED
6078case `"$ac_path_SED" --version 2>&1` in
6079*GNU*)
6080  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6081*)
6082  ac_count=0
6083  $as_echo_n 0123456789 >"conftest.in"
6084  while :
6085  do
6086    cat "conftest.in" "conftest.in" >"conftest.tmp"
6087    mv "conftest.tmp" "conftest.in"
6088    cp "conftest.in" "conftest.nl"
6089    $as_echo '' >> "conftest.nl"
6090    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6091    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6092    as_fn_arith $ac_count + 1 && ac_count=$as_val
6093    if test $ac_count -gt ${ac_path_SED_max-0}; then
6094      # Best one so far, save it but keep looking for a better one
6095      ac_cv_path_SED="$ac_path_SED"
6096      ac_path_SED_max=$ac_count
6097    fi
6098    # 10*(2^10) chars as input seems more than enough
6099    test $ac_count -gt 10 && break
6100  done
6101  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6102esac
6103
6104      $ac_path_SED_found && break 3
6105    done
6106  done
6107  done
6108IFS=$as_save_IFS
6109  if test -z "$ac_cv_path_SED"; then
6110    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6111  fi
6112else
6113  ac_cv_path_SED=$SED
6114fi
6115
6116fi
6117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6118$as_echo "$ac_cv_path_SED" >&6; }
6119 SED="$ac_cv_path_SED"
6120  rm -f conftest.sed
6121
6122
6123    if test "x$SED" = x; then
6124        if test "x" = x; then
6125          PROG_NAME=sed
6126        else
6127          PROG_NAME=
6128        fi
6129        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6130$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6131        as_fn_error $? "Cannot continue" "$LINENO" 5
6132    fi
6133
6134
6135for ac_prog in nawk gawk awk
6136do
6137  # Extract the first word of "$ac_prog", so it can be a program name with args.
6138set dummy $ac_prog; ac_word=$2
6139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6140$as_echo_n "checking for $ac_word... " >&6; }
6141if test "${ac_cv_path_NAWK+set}" = set; then :
6142  $as_echo_n "(cached) " >&6
6143else
6144  case $NAWK in
6145  [\\/]* | ?:[\\/]*)
6146  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6147  ;;
6148  *)
6149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6150for as_dir in $PATH
6151do
6152  IFS=$as_save_IFS
6153  test -z "$as_dir" && as_dir=.
6154    for ac_exec_ext in '' $ac_executable_extensions; do
6155  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6156    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6158    break 2
6159  fi
6160done
6161  done
6162IFS=$as_save_IFS
6163
6164  ;;
6165esac
6166fi
6167NAWK=$ac_cv_path_NAWK
6168if test -n "$NAWK"; then
6169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6170$as_echo "$NAWK" >&6; }
6171else
6172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6173$as_echo "no" >&6; }
6174fi
6175
6176
6177  test -n "$NAWK" && break
6178done
6179
6180
6181    if test "x$NAWK" = x; then
6182        if test "x" = x; then
6183          PROG_NAME=nawk
6184        else
6185          PROG_NAME=
6186        fi
6187        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6188$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6189        as_fn_error $? "Cannot continue" "$LINENO" 5
6190    fi
6191
6192
6193# Always force rm.
6194RM="$RM -f"
6195
6196# These are not required on all platforms
6197# Extract the first word of "cygpath", so it can be a program name with args.
6198set dummy cygpath; ac_word=$2
6199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6200$as_echo_n "checking for $ac_word... " >&6; }
6201if test "${ac_cv_path_CYGPATH+set}" = set; then :
6202  $as_echo_n "(cached) " >&6
6203else
6204  case $CYGPATH in
6205  [\\/]* | ?:[\\/]*)
6206  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6207  ;;
6208  *)
6209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6210for as_dir in $PATH
6211do
6212  IFS=$as_save_IFS
6213  test -z "$as_dir" && as_dir=.
6214    for ac_exec_ext in '' $ac_executable_extensions; do
6215  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6216    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6218    break 2
6219  fi
6220done
6221  done
6222IFS=$as_save_IFS
6223
6224  ;;
6225esac
6226fi
6227CYGPATH=$ac_cv_path_CYGPATH
6228if test -n "$CYGPATH"; then
6229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6230$as_echo "$CYGPATH" >&6; }
6231else
6232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6233$as_echo "no" >&6; }
6234fi
6235
6236
6237# Extract the first word of "readlink", so it can be a program name with args.
6238set dummy readlink; ac_word=$2
6239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6240$as_echo_n "checking for $ac_word... " >&6; }
6241if test "${ac_cv_path_READLINK+set}" = set; then :
6242  $as_echo_n "(cached) " >&6
6243else
6244  case $READLINK in
6245  [\\/]* | ?:[\\/]*)
6246  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6247  ;;
6248  *)
6249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6250for as_dir in $PATH
6251do
6252  IFS=$as_save_IFS
6253  test -z "$as_dir" && as_dir=.
6254    for ac_exec_ext in '' $ac_executable_extensions; do
6255  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6256    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6258    break 2
6259  fi
6260done
6261  done
6262IFS=$as_save_IFS
6263
6264  ;;
6265esac
6266fi
6267READLINK=$ac_cv_path_READLINK
6268if test -n "$READLINK"; then
6269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6270$as_echo "$READLINK" >&6; }
6271else
6272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6273$as_echo "no" >&6; }
6274fi
6275
6276
6277# Extract the first word of "df", so it can be a program name with args.
6278set dummy df; ac_word=$2
6279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6280$as_echo_n "checking for $ac_word... " >&6; }
6281if test "${ac_cv_path_DF+set}" = set; then :
6282  $as_echo_n "(cached) " >&6
6283else
6284  case $DF in
6285  [\\/]* | ?:[\\/]*)
6286  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6287  ;;
6288  *)
6289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6290for as_dir in $PATH
6291do
6292  IFS=$as_save_IFS
6293  test -z "$as_dir" && as_dir=.
6294    for ac_exec_ext in '' $ac_executable_extensions; do
6295  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6296    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6298    break 2
6299  fi
6300done
6301  done
6302IFS=$as_save_IFS
6303
6304  ;;
6305esac
6306fi
6307DF=$ac_cv_path_DF
6308if test -n "$DF"; then
6309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6310$as_echo "$DF" >&6; }
6311else
6312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6313$as_echo "no" >&6; }
6314fi
6315
6316
6317# Extract the first word of "SetFile", so it can be a program name with args.
6318set dummy SetFile; ac_word=$2
6319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6320$as_echo_n "checking for $ac_word... " >&6; }
6321if test "${ac_cv_path_SETFILE+set}" = set; then :
6322  $as_echo_n "(cached) " >&6
6323else
6324  case $SETFILE in
6325  [\\/]* | ?:[\\/]*)
6326  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6327  ;;
6328  *)
6329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6330for as_dir in $PATH
6331do
6332  IFS=$as_save_IFS
6333  test -z "$as_dir" && as_dir=.
6334    for ac_exec_ext in '' $ac_executable_extensions; do
6335  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6336    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6338    break 2
6339  fi
6340done
6341  done
6342IFS=$as_save_IFS
6343
6344  ;;
6345esac
6346fi
6347SETFILE=$ac_cv_path_SETFILE
6348if test -n "$SETFILE"; then
6349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6350$as_echo "$SETFILE" >&6; }
6351else
6352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6353$as_echo "no" >&6; }
6354fi
6355
6356
6357
6358
6359# Now we can determine OpenJDK build and target platforms. This is required to
6360# have early on.
6361# Make sure we can run config.sub.
6362$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6363  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6364
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6366$as_echo_n "checking build system type... " >&6; }
6367if test "${ac_cv_build+set}" = set; then :
6368  $as_echo_n "(cached) " >&6
6369else
6370  ac_build_alias=$build_alias
6371test "x$ac_build_alias" = x &&
6372  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6373test "x$ac_build_alias" = x &&
6374  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6375ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6376  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6377
6378fi
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6380$as_echo "$ac_cv_build" >&6; }
6381case $ac_cv_build in
6382*-*-*) ;;
6383*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6384esac
6385build=$ac_cv_build
6386ac_save_IFS=$IFS; IFS='-'
6387set x $ac_cv_build
6388shift
6389build_cpu=$1
6390build_vendor=$2
6391shift; shift
6392# Remember, the first character of IFS is used to create $*,
6393# except with old shells:
6394build_os=$*
6395IFS=$ac_save_IFS
6396case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6397
6398
6399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6400$as_echo_n "checking host system type... " >&6; }
6401if test "${ac_cv_host+set}" = set; then :
6402  $as_echo_n "(cached) " >&6
6403else
6404  if test "x$host_alias" = x; then
6405  ac_cv_host=$ac_cv_build
6406else
6407  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6408    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6409fi
6410
6411fi
6412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6413$as_echo "$ac_cv_host" >&6; }
6414case $ac_cv_host in
6415*-*-*) ;;
6416*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6417esac
6418host=$ac_cv_host
6419ac_save_IFS=$IFS; IFS='-'
6420set x $ac_cv_host
6421shift
6422host_cpu=$1
6423host_vendor=$2
6424shift; shift
6425# Remember, the first character of IFS is used to create $*,
6426# except with old shells:
6427host_os=$*
6428IFS=$ac_save_IFS
6429case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6430
6431
6432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6433$as_echo_n "checking target system type... " >&6; }
6434if test "${ac_cv_target+set}" = set; then :
6435  $as_echo_n "(cached) " >&6
6436else
6437  if test "x$target_alias" = x; then
6438  ac_cv_target=$ac_cv_host
6439else
6440  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6441    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6442fi
6443
6444fi
6445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6446$as_echo "$ac_cv_target" >&6; }
6447case $ac_cv_target in
6448*-*-*) ;;
6449*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6450esac
6451target=$ac_cv_target
6452ac_save_IFS=$IFS; IFS='-'
6453set x $ac_cv_target
6454shift
6455target_cpu=$1
6456target_vendor=$2
6457shift; shift
6458# Remember, the first character of IFS is used to create $*,
6459# except with old shells:
6460target_os=$*
6461IFS=$ac_save_IFS
6462case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6463
6464
6465# The aliases save the names the user supplied, while $host etc.
6466# will get canonicalized.
6467test -n "$target_alias" &&
6468  test "$program_prefix$program_suffix$program_transform_name" = \
6469    NONENONEs,x,x, &&
6470  program_prefix=${target_alias}-
6471
6472# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6473# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6474# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6475# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6476# to use the configure naming style.
6477
6478
6479
6480
6481
6482    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6483    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6484    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6485    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6486    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6487    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6488
6489
6490
6491    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6492
6493  case "$build_os" in
6494    *linux*)
6495      VAR_OS=linux
6496      VAR_OS_API=posix
6497      VAR_OS_ENV=linux
6498      ;;
6499    *solaris*)
6500      VAR_OS=solaris
6501      VAR_OS_API=posix
6502      VAR_OS_ENV=solaris
6503      ;;
6504    *darwin*)
6505      VAR_OS=macosx
6506      VAR_OS_API=posix
6507      VAR_OS_ENV=macosx
6508      ;;
6509    *bsd*)
6510      VAR_OS=bsd
6511      VAR_OS_API=posix
6512      VAR_OS_ENV=bsd
6513      ;;
6514    *cygwin*)
6515      VAR_OS=windows
6516      VAR_OS_API=winapi
6517      VAR_OS_ENV=windows.cygwin
6518      ;;
6519    *mingw*)
6520      VAR_OS=windows
6521      VAR_OS_API=winapi
6522      VAR_OS_ENV=windows.msys
6523      ;;
6524    *)
6525      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6526      ;;
6527  esac
6528
6529
6530  # First argument is the cpu name from the trip/quad
6531  case "$build_cpu" in
6532    x86_64)
6533      VAR_CPU=x86_64
6534      VAR_CPU_ARCH=x86
6535      VAR_CPU_BITS=64
6536      VAR_CPU_ENDIAN=little
6537      ;;
6538    i?86)
6539      VAR_CPU=x86
6540      VAR_CPU_ARCH=x86
6541      VAR_CPU_BITS=32
6542      VAR_CPU_ENDIAN=little
6543      ;;
6544    arm*)
6545      VAR_CPU=arm
6546      VAR_CPU_ARCH=arm
6547      VAR_CPU_BITS=32
6548      VAR_CPU_ENDIAN=little
6549      ;;
6550    powerpc)
6551      VAR_CPU=ppc
6552      VAR_CPU_ARCH=ppc
6553      VAR_CPU_BITS=32
6554      VAR_CPU_ENDIAN=big
6555       ;;
6556    powerpc64)
6557      VAR_CPU=ppc64
6558      VAR_CPU_ARCH=ppc
6559      VAR_CPU_BITS=64
6560      VAR_CPU_ENDIAN=big
6561       ;;
6562    sparc)
6563      VAR_CPU=sparc
6564      VAR_CPU_ARCH=sparc
6565      VAR_CPU_BITS=32
6566      VAR_CPU_ENDIAN=big
6567       ;;
6568    sparcv9)
6569      VAR_CPU=sparcv9
6570      VAR_CPU_ARCH=sparc
6571      VAR_CPU_BITS=64
6572      VAR_CPU_ENDIAN=big
6573       ;;
6574    *)
6575      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6576      ;;
6577  esac
6578
6579    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6580    OPENJDK_BUILD_OS="$VAR_OS"
6581    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6582    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6583    OPENJDK_BUILD_CPU="$VAR_CPU"
6584    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6585    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6586    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6587
6588
6589
6590
6591
6592
6593
6594    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6595$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6596    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6597$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6598
6599    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6600
6601  case "$host_os" in
6602    *linux*)
6603      VAR_OS=linux
6604      VAR_OS_API=posix
6605      VAR_OS_ENV=linux
6606      ;;
6607    *solaris*)
6608      VAR_OS=solaris
6609      VAR_OS_API=posix
6610      VAR_OS_ENV=solaris
6611      ;;
6612    *darwin*)
6613      VAR_OS=macosx
6614      VAR_OS_API=posix
6615      VAR_OS_ENV=macosx
6616      ;;
6617    *bsd*)
6618      VAR_OS=bsd
6619      VAR_OS_API=posix
6620      VAR_OS_ENV=bsd
6621      ;;
6622    *cygwin*)
6623      VAR_OS=windows
6624      VAR_OS_API=winapi
6625      VAR_OS_ENV=windows.cygwin
6626      ;;
6627    *mingw*)
6628      VAR_OS=windows
6629      VAR_OS_API=winapi
6630      VAR_OS_ENV=windows.msys
6631      ;;
6632    *)
6633      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6634      ;;
6635  esac
6636
6637
6638  # First argument is the cpu name from the trip/quad
6639  case "$host_cpu" in
6640    x86_64)
6641      VAR_CPU=x86_64
6642      VAR_CPU_ARCH=x86
6643      VAR_CPU_BITS=64
6644      VAR_CPU_ENDIAN=little
6645      ;;
6646    i?86)
6647      VAR_CPU=x86
6648      VAR_CPU_ARCH=x86
6649      VAR_CPU_BITS=32
6650      VAR_CPU_ENDIAN=little
6651      ;;
6652    arm*)
6653      VAR_CPU=arm
6654      VAR_CPU_ARCH=arm
6655      VAR_CPU_BITS=32
6656      VAR_CPU_ENDIAN=little
6657      ;;
6658    powerpc)
6659      VAR_CPU=ppc
6660      VAR_CPU_ARCH=ppc
6661      VAR_CPU_BITS=32
6662      VAR_CPU_ENDIAN=big
6663       ;;
6664    powerpc64)
6665      VAR_CPU=ppc64
6666      VAR_CPU_ARCH=ppc
6667      VAR_CPU_BITS=64
6668      VAR_CPU_ENDIAN=big
6669       ;;
6670    sparc)
6671      VAR_CPU=sparc
6672      VAR_CPU_ARCH=sparc
6673      VAR_CPU_BITS=32
6674      VAR_CPU_ENDIAN=big
6675       ;;
6676    sparcv9)
6677      VAR_CPU=sparcv9
6678      VAR_CPU_ARCH=sparc
6679      VAR_CPU_BITS=64
6680      VAR_CPU_ENDIAN=big
6681       ;;
6682    *)
6683      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6684      ;;
6685  esac
6686
6687    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6688    OPENJDK_TARGET_OS="$VAR_OS"
6689    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6690    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6691    OPENJDK_TARGET_CPU="$VAR_CPU"
6692    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6693    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6694    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6695
6696
6697
6698
6699
6700
6701
6702    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6703$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6704    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6705$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6706
6707
6708
6709# Check whether --with-target-bits was given.
6710if test "${with_target_bits+set}" = set; then :
6711  withval=$with_target_bits;
6712fi
6713
6714
6715  # We have three types of compiles:
6716  # native  == normal compilation, target system == build system
6717  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6718  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6719  #
6720  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6721    # We're doing a proper cross-compilation
6722    COMPILE_TYPE="cross"
6723  else
6724    COMPILE_TYPE="native"
6725  fi
6726
6727  if test "x$with_target_bits" != x; then
6728    if test "x$COMPILE_TYPE" = "xcross"; then
6729      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6730    fi
6731
6732    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6733      # A reduced build is requested
6734      COMPILE_TYPE="reduced"
6735      OPENJDK_TARGET_CPU_BITS=32
6736      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6737        OPENJDK_TARGET_CPU=x86
6738      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6739        OPENJDK_TARGET_CPU=sparc
6740      else
6741        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6742      fi
6743    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6744      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
6745    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6746      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6747$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6748    else
6749      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6750    fi
6751  fi
6752
6753
6754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6755$as_echo_n "checking compilation type... " >&6; }
6756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6757$as_echo "$COMPILE_TYPE" >&6; }
6758
6759
6760    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6761       REQUIRED_OS_NAME=SunOS
6762       REQUIRED_OS_VERSION=5.10
6763    fi
6764    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6765       REQUIRED_OS_NAME=Linux
6766       REQUIRED_OS_VERSION=2.6
6767    fi
6768    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6769        REQUIRED_OS_NAME=Windows
6770        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6771            REQUIRED_OS_VERSION=5.2
6772        else
6773            REQUIRED_OS_VERSION=5.1
6774        fi
6775    fi
6776    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6777        REQUIRED_OS_NAME=Darwin
6778        REQUIRED_OS_VERSION=11.2
6779    fi
6780
6781
6782
6783
6784
6785    # Also store the legacy naming of the cpu.
6786    # Ie i586 and amd64 instead of x86 and x86_64
6787    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6788    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6789      OPENJDK_TARGET_CPU_LEGACY="i586"
6790    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6791      # On all platforms except MacOSX replace x86_64 with amd64.
6792      OPENJDK_TARGET_CPU_LEGACY="amd64"
6793    fi
6794
6795
6796    # And the second legacy naming of the cpu.
6797    # Ie i386 and amd64 instead of x86 and x86_64.
6798    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6799    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6800      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6801    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6802      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6803    fi
6804
6805
6806    # This is the name of the cpu (but using i386 and amd64 instead of
6807    # x86 and x86_64, respectively), preceeded by a /, to be used when
6808    # locating libraries. On macosx, it's empty, though.
6809    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6810    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6811        OPENJDK_TARGET_CPU_LIBDIR=""
6812    fi
6813
6814
6815    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6816    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6817    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6818    OPENJDK_TARGET_CPU_ISADIR=""
6819    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6820      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6821          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6822      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6823          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6824      fi
6825    fi
6826
6827
6828    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6829    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6830    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6831      # On linux only, we replace x86 with i386.
6832      OPENJDK_TARGET_CPU_OSARCH="i386"
6833    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6834      # On all platforms except macosx, we replace x86_64 with amd64.
6835      OPENJDK_TARGET_CPU_OSARCH="amd64"
6836    fi
6837
6838
6839    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6840    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6841      OPENJDK_TARGET_CPU_JLI="i386"
6842    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6843      # On all platforms except macosx, we replace x86_64 with amd64.
6844      OPENJDK_TARGET_CPU_JLI="amd64"
6845    fi
6846    # Now setup the -D flags for building libjli.
6847    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6848    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6849      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
6850        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
6851      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
6852        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
6853      fi
6854    fi
6855
6856
6857    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
6858    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
6859        OPENJDK_TARGET_OS_API_DIR="solaris"
6860    fi
6861    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
6862        OPENJDK_TARGET_OS_API_DIR="windows"
6863    fi
6864
6865
6866    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6867        A_LP64="LP64:="
6868        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
6869        # unpack200.exe
6870        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
6871            ADD_LP64="-D_LP64=1"
6872        fi
6873    fi
6874    LP64=$A_LP64
6875
6876
6877    if test "x$COMPILE_TYPE" = "xcross"; then
6878      # FIXME: ... or should this include reduced builds..?
6879      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
6880    else
6881      DEFINE_CROSS_COMPILE_ARCH=""
6882    fi
6883
6884
6885
6886
6887# Continue setting up basic stuff. Most remaining code require fundamental tools.
6888
6889# Locate the directory of this script.
6890SCRIPT="$0"
6891
6892    if test "x$OPENJDK_BUILD_OS" != xwindows; then
6893        # Follow a chain of symbolic links. Use readlink
6894        # where it exists, else fall back to horribly
6895        # complicated shell code.
6896        if test "x$READLINK_TESTED" != yes; then
6897            # On MacOSX there is a readlink tool with a different
6898            # purpose than the GNU readlink tool. Check the found readlink.
6899            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
6900            if test "x$ISGNU" = x; then
6901                 # A readlink that we do not know how to use.
6902                 # Are there other non-GNU readlinks out there?
6903                 READLINK_TESTED=yes
6904                 READLINK=
6905            fi
6906        fi
6907
6908        if test "x$READLINK" != x; then
6909            SCRIPT=`$READLINK -f $SCRIPT`
6910        else
6911            STARTDIR=$PWD
6912            COUNTER=0
6913            sym_link_dir=`$DIRNAME $SCRIPT`
6914            sym_link_file=`$BASENAME $SCRIPT`
6915            while test $COUNTER -lt 20; do
6916                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
6917                if test "x$ISLINK" == x; then
6918                    # This is not a symbolic link! We are done!
6919                    break
6920                fi
6921                # The link might be relative! We have to use cd to travel safely.
6922                cd $sym_link_dir
6923                # ... and we must get the to the absolute path, not one using symbolic links.
6924                cd `pwd -P`
6925                cd `$DIRNAME $ISLINK`
6926                sym_link_dir=`$THEPWDCMD`
6927                sym_link_file=`$BASENAME $ISLINK`
6928                let COUNTER=COUNTER+1
6929            done
6930            cd $STARTDIR
6931            SCRIPT=$sym_link_dir/$sym_link_file
6932        fi
6933    fi
6934
6935AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
6936
6937# Where is the source? It is located two levels above the configure script.
6938CURDIR="$PWD"
6939cd "$AUTOCONF_DIR/../.."
6940SRC_ROOT="`pwd`"
6941
6942if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6943  PATH_SEP=";"
6944
6945  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
6946  if test $SRC_ROOT_LENGTH -gt 100; then
6947      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
6948  fi
6949
6950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
6952$as_echo_n "checking cygwin release... " >&6; }
6953    CYGWIN_VERSION=`$UNAME -r`
6954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
6955$as_echo "$CYGWIN_VERSION" >&6; }
6956    WINDOWS_ENV_VENDOR='cygwin'
6957    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
6958
6959    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
6960    if test "x$CYGWIN_VERSION_OK" = x; then
6961      { $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
6962$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;}
6963      as_fn_error $? "Cannot continue" "$LINENO" 5
6964    fi
6965    if test "x$CYGPATH" = x; then
6966        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
6967    fi
6968    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
6969$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
6970    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6971    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
6972    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
6973    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
6974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
6975$as_echo "$CYGWIN_ROOT_PATH" >&6; }
6976    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
6977    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
6978    if test "x$test_cygdrive_prefix" = x; then
6979        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
6980    fi
6981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6982    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
6983$as_echo_n "checking msys release... " >&6; }
6984    MSYS_VERSION=`$UNAME -r`
6985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
6986$as_echo "$MSYS_VERSION" >&6; }
6987
6988    WINDOWS_ENV_VENDOR='msys'
6989    WINDOWS_ENV_VERSION="$MSYS_VERSION"
6990
6991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
6992$as_echo_n "checking msys root directory as unix-style path... " >&6; }
6993    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6994    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
6995
6996  windows_path="$MSYS_ROOT_PATH"
6997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6998    unix_path=`$CYGPATH -u "$windows_path"`
6999    MSYS_ROOT_PATH="$unix_path"
7000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7002    MSYS_ROOT_PATH="$unix_path"
7003  fi
7004
7005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7006$as_echo "$MSYS_ROOT_PATH" >&6; }
7007    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7008  else
7009    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7010  fi
7011
7012  # Test if windows or unix (cygwin/msys) find is first in path.
7013  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7014$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7015  FIND_BINARY_OUTPUT=`find --version 2>&1`
7016  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7018$as_echo "unix style" >&6; }
7019  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7021$as_echo "Windows" >&6; }
7022    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7023$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7024    { $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
7025$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7026    as_fn_error $? "Cannot continue" "$LINENO" 5
7027  else
7028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7029$as_echo "unknown" >&6; }
7030    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7031$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7032  fi
7033
7034else
7035  PATH_SEP=":"
7036fi
7037
7038
7039
7040cd "$CURDIR"
7041
7042
7043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7044
7045  # Input might be given as Windows format, start by converting to
7046  # unix format.
7047  path="$SRC_ROOT"
7048  new_path=`$CYGPATH -u "$path"`
7049
7050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7053  # "foo.exe" is OK but "foo" is an error.
7054  #
7055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7056  # It is also a way to make sure we got the proper file name for the real test later on.
7057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7058  if test "x$test_shortpath" = x; then
7059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7060$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7061    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7062  fi
7063
7064  # Call helper function which possibly converts this using DOS-style short mode.
7065  # If so, the updated path is stored in $new_path.
7066
7067  input_path="$new_path"
7068  # Check if we need to convert this using DOS-style short mode. If the path
7069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7070  # take no chances and rewrite it.
7071  # Note: m4 eats our [], so we need to use [ and ] instead.
7072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7073  if test "x$has_forbidden_chars" != x; then
7074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7078      # Going to short mode and back again did indeed matter. Since short mode is
7079      # case insensitive, let's make it lowercase to improve readability.
7080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7081      # Now convert it back to Unix-stile (cygpath)
7082      input_path=`$CYGPATH -u "$shortmode_path"`
7083      new_path="$input_path"
7084    fi
7085  fi
7086
7087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7088  if test "x$test_cygdrive_prefix" = x; then
7089    # As a simple fix, exclude /usr/bin since it's not a real path.
7090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7092      # a path prefixed by /cygdrive for fixpath to work.
7093      new_path="$CYGWIN_ROOT_PATH$input_path"
7094    fi
7095  fi
7096
7097
7098  if test "x$path" != "x$new_path"; then
7099    SRC_ROOT="$new_path"
7100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7101$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7102  fi
7103
7104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7105
7106  path="$SRC_ROOT"
7107  has_colon=`$ECHO $path | $GREP ^.:`
7108  new_path="$path"
7109  if test "x$has_colon" = x; then
7110    # Not in mixed or Windows style, start by that.
7111    new_path=`cmd //c echo $path`
7112  fi
7113
7114
7115  input_path="$new_path"
7116  # Check if we need to convert this using DOS-style short mode. If the path
7117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7118  # take no chances and rewrite it.
7119  # Note: m4 eats our [], so we need to use [ and ] instead.
7120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7121  if test "x$has_forbidden_chars" != x; then
7122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7124  fi
7125
7126
7127  windows_path="$new_path"
7128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7129    unix_path=`$CYGPATH -u "$windows_path"`
7130    new_path="$unix_path"
7131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7133    new_path="$unix_path"
7134  fi
7135
7136  if test "x$path" != "x$new_path"; then
7137    SRC_ROOT="$new_path"
7138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7139$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7140  fi
7141
7142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7144
7145  else
7146    # We're on a posix platform. Hooray! :)
7147    path="$SRC_ROOT"
7148
7149    if test ! -f "$path" && test ! -d "$path"; then
7150      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7151    fi
7152
7153    has_space=`$ECHO "$path" | $GREP " "`
7154    if test "x$has_space" != x; then
7155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7156$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7157      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7158    fi
7159  fi
7160
7161
7162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7163
7164  # Input might be given as Windows format, start by converting to
7165  # unix format.
7166  path="$CURDIR"
7167  new_path=`$CYGPATH -u "$path"`
7168
7169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7172  # "foo.exe" is OK but "foo" is an error.
7173  #
7174  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7175  # It is also a way to make sure we got the proper file name for the real test later on.
7176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7177  if test "x$test_shortpath" = x; then
7178    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7179$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7180    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7181  fi
7182
7183  # Call helper function which possibly converts this using DOS-style short mode.
7184  # If so, the updated path is stored in $new_path.
7185
7186  input_path="$new_path"
7187  # Check if we need to convert this using DOS-style short mode. If the path
7188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7189  # take no chances and rewrite it.
7190  # Note: m4 eats our [], so we need to use [ and ] instead.
7191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7192  if test "x$has_forbidden_chars" != x; then
7193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7197      # Going to short mode and back again did indeed matter. Since short mode is
7198      # case insensitive, let's make it lowercase to improve readability.
7199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7200      # Now convert it back to Unix-stile (cygpath)
7201      input_path=`$CYGPATH -u "$shortmode_path"`
7202      new_path="$input_path"
7203    fi
7204  fi
7205
7206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7207  if test "x$test_cygdrive_prefix" = x; then
7208    # As a simple fix, exclude /usr/bin since it's not a real path.
7209    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7211      # a path prefixed by /cygdrive for fixpath to work.
7212      new_path="$CYGWIN_ROOT_PATH$input_path"
7213    fi
7214  fi
7215
7216
7217  if test "x$path" != "x$new_path"; then
7218    CURDIR="$new_path"
7219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7220$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7221  fi
7222
7223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7224
7225  path="$CURDIR"
7226  has_colon=`$ECHO $path | $GREP ^.:`
7227  new_path="$path"
7228  if test "x$has_colon" = x; then
7229    # Not in mixed or Windows style, start by that.
7230    new_path=`cmd //c echo $path`
7231  fi
7232
7233
7234  input_path="$new_path"
7235  # Check if we need to convert this using DOS-style short mode. If the path
7236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7237  # take no chances and rewrite it.
7238  # Note: m4 eats our [], so we need to use [ and ] instead.
7239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7240  if test "x$has_forbidden_chars" != x; then
7241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7243  fi
7244
7245
7246  windows_path="$new_path"
7247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7248    unix_path=`$CYGPATH -u "$windows_path"`
7249    new_path="$unix_path"
7250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7252    new_path="$unix_path"
7253  fi
7254
7255  if test "x$path" != "x$new_path"; then
7256    CURDIR="$new_path"
7257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7258$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7259  fi
7260
7261  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7262  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7263
7264  else
7265    # We're on a posix platform. Hooray! :)
7266    path="$CURDIR"
7267
7268    if test ! -f "$path" && test ! -d "$path"; then
7269      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7270    fi
7271
7272    has_space=`$ECHO "$path" | $GREP " "`
7273    if test "x$has_space" != x; then
7274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7275$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7276      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7277    fi
7278  fi
7279
7280
7281if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7282    # Add extra search paths on solaris for utilities like ar and as etc...
7283    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7284fi
7285
7286# You can force the sys-root if the sys-root encoded into the cross compiler tools
7287# is not correct.
7288
7289# Check whether --with-sys-root was given.
7290if test "${with_sys_root+set}" = set; then :
7291  withval=$with_sys_root;
7292fi
7293
7294
7295if test "x$with_sys_root" != x; then
7296  SYS_ROOT=$with_sys_root
7297else
7298  SYS_ROOT=/
7299fi
7300
7301
7302
7303# Check whether --with-tools-dir was given.
7304if test "${with_tools_dir+set}" = set; then :
7305  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7306fi
7307
7308
7309
7310# Check whether --with-devkit was given.
7311if test "${with_devkit+set}" = set; then :
7312  withval=$with_devkit;
7313    if test "x$with_sys_root" != x; then
7314      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7315    fi
7316    if test "x$with_tools_dir" != x; then
7317      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7318    fi
7319    TOOLS_DIR=$with_devkit/bin
7320    SYS_ROOT=$with_devkit/$host_alias/libc
7321
7322fi
7323
7324
7325
7326
7327# Setup default logging of stdout and stderr to build.log in the output root.
7328BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7329BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7330BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7331
7332
7333
7334
7335
7336# These are needed to be able to create a configuration name (and thus the output directory)
7337
7338###############################################################################
7339#
7340# Check which variant of the JDK that we want to build.
7341# Currently we have:
7342#    normal:   standard edition
7343# but the custom make system may add other variants
7344#
7345# Effectively the JDK variant gives a name to a specific set of
7346# modules to compile into the JDK. In the future, these modules
7347# might even be Jigsaw modules.
7348#
7349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7350$as_echo_n "checking which variant of the JDK to build... " >&6; }
7351
7352# Check whether --with-jdk-variant was given.
7353if test "${with_jdk_variant+set}" = set; then :
7354  withval=$with_jdk_variant;
7355fi
7356
7357
7358if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7359    JDK_VARIANT="normal"
7360else
7361    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7362fi
7363
7364
7365
7366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7367$as_echo "$JDK_VARIANT" >&6; }
7368
7369
7370
7371###############################################################################
7372#
7373# Check which variants of the JVM that we want to build.
7374# Currently we have:
7375#    server: normal interpreter and a tiered C1/C2 compiler
7376#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7377#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7378#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7379#    zero: no machine code interpreter, no compiler
7380#    zeroshark: zero interpreter and shark/llvm compiler backend
7381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7382$as_echo_n "checking which variants of the JVM to build... " >&6; }
7383
7384# Check whether --with-jvm-variants was given.
7385if test "${with_jvm_variants+set}" = set; then :
7386  withval=$with_jvm_variants;
7387fi
7388
7389
7390if test "x$with_jvm_variants" = x; then
7391     with_jvm_variants="server"
7392fi
7393
7394JVM_VARIANTS=",$with_jvm_variants,"
7395TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7396
7397if test "x$TEST_VARIANTS" != "x,"; then
7398   as_fn_error $? "The available JVM variants are: server, client, kernel, zero, zeroshark" "$LINENO" 5
7399fi
7400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7401$as_echo "$with_jvm_variants" >&6; }
7402
7403JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7404JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7405JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7406JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7407JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7408
7409if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7410    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7411        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7412    fi
7413fi
7414if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7415    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7416        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7417    fi
7418fi
7419
7420# Replace the commas with AND for use in the build directory name.
7421ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7422COUNT_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/'`
7423if test "x$COUNT_VARIANTS" != "x,1"; then
7424    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7425else
7426    BUILDING_MULTIPLE_JVM_VARIANTS=no
7427fi
7428
7429
7430
7431
7432
7433
7434
7435
7436if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7437   MACOSX_UNIVERSAL="true"
7438fi
7439
7440
7441
7442
7443
7444###############################################################################
7445#
7446# Set the debug level
7447#    release: no debug information, all optimizations, no asserts.
7448#    fastdebug: debug information (-g), all optimizations, all asserts
7449#    slowdebug: debug information (-g), no optimizations, all asserts
7450#
7451DEBUG_LEVEL="release"
7452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7453$as_echo_n "checking which debug level to use... " >&6; }
7454# Check whether --enable-debug was given.
7455if test "${enable_debug+set}" = set; then :
7456  enableval=$enable_debug;
7457        ENABLE_DEBUG="${enableval}"
7458        DEBUG_LEVEL="fastdebug"
7459
7460else
7461  ENABLE_DEBUG="no"
7462fi
7463
7464
7465
7466# Check whether --with-debug-level was given.
7467if test "${with_debug_level+set}" = set; then :
7468  withval=$with_debug_level;
7469        DEBUG_LEVEL="${withval}"
7470        if test "x$ENABLE_DEBUG" = xyes; then
7471			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7472        fi
7473
7474fi
7475
7476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7477$as_echo "$DEBUG_LEVEL" >&6; }
7478
7479if test "x$DEBUG_LEVEL" != xrelease && \
7480   test "x$DEBUG_LEVEL" != xfastdebug && \
7481   test "x$DEBUG_LEVEL" != xslowdebug; then
7482   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7483fi
7484
7485
7486###############################################################################
7487#
7488# Setup legacy vars/targets and new vars to deal with different debug levels.
7489#
7490
7491case $DEBUG_LEVEL in
7492      release )
7493          VARIANT="OPT"
7494          FASTDEBUG="false"
7495          DEBUG_CLASSFILES="false"
7496          BUILD_VARIANT_RELEASE=""
7497          HOTSPOT_DEBUG_LEVEL="product"
7498          HOTSPOT_EXPORT="product"
7499           ;;
7500      fastdebug )
7501          VARIANT="DBG"
7502          FASTDEBUG="true"
7503          DEBUG_CLASSFILES="true"
7504          BUILD_VARIANT_RELEASE="-fastdebug"
7505          HOTSPOT_DEBUG_LEVEL="fastdebug"
7506          HOTSPOT_EXPORT="fastdebug"
7507           ;;
7508      slowdebug )
7509          VARIANT="DBG"
7510          FASTDEBUG="false"
7511          DEBUG_CLASSFILES="true"
7512          BUILD_VARIANT_RELEASE="-debug"
7513          HOTSPOT_DEBUG_LEVEL="jvmg"
7514          HOTSPOT_EXPORT="debug"
7515           ;;
7516esac
7517
7518#####
7519# Generate the legacy makefile targets for hotspot.
7520# The hotspot api for selecting the build artifacts, really, needs to be improved.
7521#
7522HOTSPOT_TARGET=""
7523
7524if test "x$JVM_VARIANT_SERVER" = xtrue; then
7525    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7526fi
7527
7528if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7529    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7530fi
7531
7532if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7533    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7534fi
7535
7536if test "x$JVM_VARIANT_ZERO" = xtrue; then
7537    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7538fi
7539
7540if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7541    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7542fi
7543
7544HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7545
7546# On Macosx universal binaries are produced, but they only contain
7547# 64 bit intel. This invalidates control of which jvms are built
7548# from configure, but only server is valid anyway. Fix this
7549# when hotspot makefiles are rewritten.
7550if test "x$MACOSX_UNIVERSAL" = xtrue; then
7551    HOTSPOT_TARGET=universal_product
7552fi
7553
7554#####
7555
7556
7557
7558
7559
7560
7561
7562
7563# With basic setup done, call the custom early hook.
7564
7565
7566# To properly create a configuration name, we need to have the OpenJDK target
7567# and options (variants and debug level) parsed.
7568
7569
7570
7571# Check whether --with-conf-name was given.
7572if test "${with_conf_name+set}" = set; then :
7573  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7574fi
7575
7576
7577# Test from where we are running configure, in or outside of src root.
7578if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7579    # We are running configure from the src root.
7580    # Create a default ./build/target-variant-debuglevel output root.
7581    if test "x${CONF_NAME}" = x; then
7582        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7583    fi
7584    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7585    $MKDIR -p "$OUTPUT_ROOT"
7586    if test ! -d "$OUTPUT_ROOT"; then
7587        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7588    fi
7589else
7590    # We are running configure from outside of the src dir.
7591    # Then use the current directory as output dir!
7592    # If configuration is situated in normal build directory, just use the build
7593    # directory name as configuration name, otherwise use the complete path.
7594    if test "x${CONF_NAME}" = x; then
7595        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7596    fi
7597    OUTPUT_ROOT="$CURDIR"
7598
7599    # WARNING: This might be a bad thing to do. You need to be sure you want to
7600    # have a configuration in this directory. Do some sanity checks!
7601
7602    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7603      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7604      # other files
7605      files_present=`$LS $OUTPUT_ROOT`
7606      # Configure has already touched config.log and confdefs.h in the current dir when this check
7607      # is performed.
7608      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7609                                             | $TR -d '\n'`
7610      if test "x$filtered_files" != x; then
7611        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7612$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7613        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7614$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7615        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7616$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7617        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7618$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7619        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7620$as_echo "$as_me: seriously mess up just about everything." >&6;}
7621        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7622$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7623        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7624$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7625        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7626      fi
7627    fi
7628fi
7629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7630$as_echo_n "checking what configuration name to use... " >&6; }
7631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7632$as_echo "$CONF_NAME" >&6; }
7633
7634
7635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7636
7637  # Input might be given as Windows format, start by converting to
7638  # unix format.
7639  path="$OUTPUT_ROOT"
7640  new_path=`$CYGPATH -u "$path"`
7641
7642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7645  # "foo.exe" is OK but "foo" is an error.
7646  #
7647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7648  # It is also a way to make sure we got the proper file name for the real test later on.
7649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7650  if test "x$test_shortpath" = x; then
7651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7652$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7653    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7654  fi
7655
7656  # Call helper function which possibly converts this using DOS-style short mode.
7657  # If so, the updated path is stored in $new_path.
7658
7659  input_path="$new_path"
7660  # Check if we need to convert this using DOS-style short mode. If the path
7661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7662  # take no chances and rewrite it.
7663  # Note: m4 eats our [], so we need to use [ and ] instead.
7664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7665  if test "x$has_forbidden_chars" != x; then
7666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7670      # Going to short mode and back again did indeed matter. Since short mode is
7671      # case insensitive, let's make it lowercase to improve readability.
7672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7673      # Now convert it back to Unix-stile (cygpath)
7674      input_path=`$CYGPATH -u "$shortmode_path"`
7675      new_path="$input_path"
7676    fi
7677  fi
7678
7679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7680  if test "x$test_cygdrive_prefix" = x; then
7681    # As a simple fix, exclude /usr/bin since it's not a real path.
7682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7684      # a path prefixed by /cygdrive for fixpath to work.
7685      new_path="$CYGWIN_ROOT_PATH$input_path"
7686    fi
7687  fi
7688
7689
7690  if test "x$path" != "x$new_path"; then
7691    OUTPUT_ROOT="$new_path"
7692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7693$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7694  fi
7695
7696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7697
7698  path="$OUTPUT_ROOT"
7699  has_colon=`$ECHO $path | $GREP ^.:`
7700  new_path="$path"
7701  if test "x$has_colon" = x; then
7702    # Not in mixed or Windows style, start by that.
7703    new_path=`cmd //c echo $path`
7704  fi
7705
7706
7707  input_path="$new_path"
7708  # Check if we need to convert this using DOS-style short mode. If the path
7709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7710  # take no chances and rewrite it.
7711  # Note: m4 eats our [], so we need to use [ and ] instead.
7712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7713  if test "x$has_forbidden_chars" != x; then
7714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7716  fi
7717
7718
7719  windows_path="$new_path"
7720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7721    unix_path=`$CYGPATH -u "$windows_path"`
7722    new_path="$unix_path"
7723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7725    new_path="$unix_path"
7726  fi
7727
7728  if test "x$path" != "x$new_path"; then
7729    OUTPUT_ROOT="$new_path"
7730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7731$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7732  fi
7733
7734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7736
7737  else
7738    # We're on a posix platform. Hooray! :)
7739    path="$OUTPUT_ROOT"
7740
7741    if test ! -f "$path" && test ! -d "$path"; then
7742      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7743    fi
7744
7745    has_space=`$ECHO "$path" | $GREP " "`
7746    if test "x$has_space" != x; then
7747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7748$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7749      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7750    fi
7751  fi
7752
7753
7754SPEC=$OUTPUT_ROOT/spec.gmk
7755
7756CONF_NAME=$CONF_NAME
7757
7758OUTPUT_ROOT=$OUTPUT_ROOT
7759
7760
7761# Most of the probed defines are put into config.h
7762ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7763
7764# The spec.gmk file contains all variables for the make system.
7765ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7766
7767# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7768ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7769
7770# The bootcycle-spec.gmk file contains support for boot cycle builds.
7771ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7772
7773# The compare.sh is used to compare the build output to other builds.
7774ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7775
7776# Spec.sh is currently used by compare-objects.sh
7777ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
7778
7779# The generated Makefile knows where the spec.gmk is and where the source is.
7780# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
7781# which will look for generated configurations
7782ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
7783
7784
7785# Save the arguments given to us
7786echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
7787
7788
7789# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
7790
7791    for ac_prog in apt-get yum port pkgutil pkgadd
7792do
7793  # Extract the first word of "$ac_prog", so it can be a program name with args.
7794set dummy $ac_prog; ac_word=$2
7795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7796$as_echo_n "checking for $ac_word... " >&6; }
7797if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
7798  $as_echo_n "(cached) " >&6
7799else
7800  if test -n "$PKGHANDLER"; then
7801  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
7802else
7803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7804for as_dir in $PATH
7805do
7806  IFS=$as_save_IFS
7807  test -z "$as_dir" && as_dir=.
7808    for ac_exec_ext in '' $ac_executable_extensions; do
7809  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7810    ac_cv_prog_PKGHANDLER="$ac_prog"
7811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7812    break 2
7813  fi
7814done
7815  done
7816IFS=$as_save_IFS
7817
7818fi
7819fi
7820PKGHANDLER=$ac_cv_prog_PKGHANDLER
7821if test -n "$PKGHANDLER"; then
7822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
7823$as_echo "$PKGHANDLER" >&6; }
7824else
7825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7826$as_echo "no" >&6; }
7827fi
7828
7829
7830  test -n "$PKGHANDLER" && break
7831done
7832
7833
7834
7835# Setup tools that requires more complex handling, or that is not needed by the configure script.
7836
7837
7838  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
7839  if test "x$MAKE" != x; then
7840    # User has supplied a make, test it.
7841    if test ! -f "$MAKE"; then
7842      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
7843    fi
7844
7845  MAKE_CANDIDATE=""$MAKE""
7846  DESCRIPTION="user supplied MAKE=$MAKE"
7847  if test "x$MAKE_CANDIDATE" != x; then
7848    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7849$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7850    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7851    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7852    if test "x$IS_GNU_MAKE" = x; then
7853      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7854$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7855    else
7856      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7857      if test "x$IS_MODERN_MAKE" = x; then
7858        { $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
7859$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;}
7860      else
7861        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7862          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7863            MAKE_EXPECTED_ENV='cygwin'
7864          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7865            MAKE_EXPECTED_ENV='msys'
7866          else
7867            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
7868          fi
7869          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7870          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7871        else
7872          # Not relevant for non-Windows
7873          IS_MAKE_CORRECT_ENV=true
7874        fi
7875        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7876          { $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
7877$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;}
7878        else
7879          FOUND_MAKE=$MAKE_CANDIDATE
7880
7881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7882
7883  # First separate the path from the arguments. This will split at the first
7884  # space.
7885  complete="$FOUND_MAKE"
7886  path="${complete%% *}"
7887  tmp="$complete EOL"
7888  arguments="${tmp#* }"
7889
7890  # Input might be given as Windows format, start by converting to
7891  # unix format.
7892  new_path=`$CYGPATH -u "$path"`
7893
7894  # Now try to locate executable using which
7895  new_path=`$WHICH "$new_path" 2> /dev/null`
7896  # bat and cmd files are not always considered executable in cygwin causing which
7897  # to not find them
7898  if test "x$new_path" = x \
7899           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7900           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7901    new_path=`$CYGPATH -u "$path"`
7902  fi
7903  if test "x$new_path" = x; then
7904    # Oops. Which didn't find the executable.
7905    # The splitting of arguments from the executable at a space might have been incorrect,
7906    # since paths with space are more likely in Windows. Give it another try with the whole
7907    # argument.
7908    path="$complete"
7909    arguments="EOL"
7910    new_path=`$CYGPATH -u "$path"`
7911    new_path=`$WHICH "$new_path" 2> /dev/null`
7912    # bat and cmd files are not always considered executable in cygwin causing which
7913    # to not find them
7914    if test "x$new_path" = x \
7915             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7916             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7917      new_path=`$CYGPATH -u "$path"`
7918    fi
7919    if test "x$new_path" = x; then
7920      # It's still not found. Now this is an unrecoverable error.
7921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7922$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7923      has_space=`$ECHO "$complete" | $GREP " "`
7924      if test "x$has_space" != x; then
7925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7927      fi
7928      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
7929    fi
7930  fi
7931
7932  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7933  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7934  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7935  # "foo.exe" is OK but "foo" is an error.
7936  #
7937  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7938  # It is also a way to make sure we got the proper file name for the real test later on.
7939  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7940  if test "x$test_shortpath" = x; then
7941    # Short path failed, file does not exist as specified.
7942    # Try adding .exe or .cmd
7943    if test -f "${new_path}.exe"; then
7944       input_to_shortpath="${new_path}.exe"
7945    elif test -f "${new_path}.cmd"; then
7946       input_to_shortpath="${new_path}.cmd"
7947    else
7948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
7949$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
7950      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
7951$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
7952      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
7953    fi
7954  else
7955    input_to_shortpath="$new_path"
7956  fi
7957
7958  # Call helper function which possibly converts this using DOS-style short mode.
7959  # If so, the updated path is stored in $new_path.
7960  new_path="$input_to_shortpath"
7961
7962  input_path="$input_to_shortpath"
7963  # Check if we need to convert this using DOS-style short mode. If the path
7964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7965  # take no chances and rewrite it.
7966  # Note: m4 eats our [], so we need to use [ and ] instead.
7967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7968  if test "x$has_forbidden_chars" != x; then
7969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7973      # Going to short mode and back again did indeed matter. Since short mode is
7974      # case insensitive, let's make it lowercase to improve readability.
7975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7976      # Now convert it back to Unix-stile (cygpath)
7977      input_path=`$CYGPATH -u "$shortmode_path"`
7978      new_path="$input_path"
7979    fi
7980  fi
7981
7982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7983  if test "x$test_cygdrive_prefix" = x; then
7984    # As a simple fix, exclude /usr/bin since it's not a real path.
7985    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
7986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7987      # a path prefixed by /cygdrive for fixpath to work.
7988      new_path="$CYGWIN_ROOT_PATH$input_path"
7989    fi
7990  fi
7991
7992  # remove trailing .exe if any
7993  new_path="${new_path/%.exe/}"
7994
7995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7996
7997  # First separate the path from the arguments. This will split at the first
7998  # space.
7999  complete="$FOUND_MAKE"
8000  path="${complete%% *}"
8001  tmp="$complete EOL"
8002  arguments="${tmp#* }"
8003
8004  # Input might be given as Windows format, start by converting to
8005  # unix format.
8006  new_path="$path"
8007
8008  windows_path="$new_path"
8009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8010    unix_path=`$CYGPATH -u "$windows_path"`
8011    new_path="$unix_path"
8012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8014    new_path="$unix_path"
8015  fi
8016
8017
8018  # Now try to locate executable using which
8019  new_path=`$WHICH "$new_path" 2> /dev/null`
8020
8021  if test "x$new_path" = x; then
8022    # Oops. Which didn't find the executable.
8023    # The splitting of arguments from the executable at a space might have been incorrect,
8024    # since paths with space are more likely in Windows. Give it another try with the whole
8025    # argument.
8026    path="$complete"
8027    arguments="EOL"
8028    new_path="$path"
8029
8030  windows_path="$new_path"
8031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8032    unix_path=`$CYGPATH -u "$windows_path"`
8033    new_path="$unix_path"
8034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8036    new_path="$unix_path"
8037  fi
8038
8039
8040    new_path=`$WHICH "$new_path" 2> /dev/null`
8041
8042    if test "x$new_path" = x; then
8043      # It's still not found. Now this is an unrecoverable error.
8044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8045$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8046      has_space=`$ECHO "$complete" | $GREP " "`
8047      if test "x$has_space" != x; then
8048        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8049$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8050      fi
8051      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8052    fi
8053  fi
8054
8055  # Now new_path has a complete unix path to the binary
8056  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8057    # Keep paths in /bin as-is, but remove trailing .exe if any
8058    new_path="${new_path/%.exe/}"
8059    # Do not save /bin paths to all_fixpath_prefixes!
8060  else
8061    # Not in mixed or Windows style, start by that.
8062    new_path=`cmd //c echo $new_path`
8063
8064  input_path="$new_path"
8065  # Check if we need to convert this using DOS-style short mode. If the path
8066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8067  # take no chances and rewrite it.
8068  # Note: m4 eats our [], so we need to use [ and ] instead.
8069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8070  if test "x$has_forbidden_chars" != x; then
8071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8073  fi
8074
8075    # Output is in $new_path
8076
8077  windows_path="$new_path"
8078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8079    unix_path=`$CYGPATH -u "$windows_path"`
8080    new_path="$unix_path"
8081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8083    new_path="$unix_path"
8084  fi
8085
8086    # remove trailing .exe if any
8087    new_path="${new_path/%.exe/}"
8088
8089    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8090    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8091  fi
8092
8093  else
8094    # We're on a posix platform. Hooray! :)
8095    # First separate the path from the arguments. This will split at the first
8096    # space.
8097    complete="$FOUND_MAKE"
8098    path="${complete%% *}"
8099    tmp="$complete EOL"
8100    arguments="${tmp#* }"
8101
8102    new_path=`$WHICH $path 2> /dev/null`
8103    if test "x$new_path" = x; then
8104      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8105      if test "x$is_absolute_path" != x; then
8106        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8107$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8108        new_path="$path"
8109      else
8110        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8111$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8112        has_space=`$ECHO "$complete" | $GREP " "`
8113        if test "x$has_space" != x; then
8114          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8115$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8116        fi
8117        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8118      fi
8119    fi
8120  fi
8121
8122  # Now join together the path and the arguments once again
8123  if test "x$arguments" != xEOL; then
8124      new_complete="$new_path ${arguments% *}"
8125  else
8126      new_complete="$new_path"
8127  fi
8128
8129  if test "x$complete" != "x$new_complete"; then
8130    FOUND_MAKE="$new_complete"
8131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8132$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8133  fi
8134
8135        fi
8136      fi
8137    fi
8138  fi
8139
8140    if test "x$FOUND_MAKE" = x; then
8141      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8142    fi
8143  else
8144    # Try our hardest to locate a correct version of GNU make
8145    for ac_prog in gmake
8146do
8147  # Extract the first word of "$ac_prog", so it can be a program name with args.
8148set dummy $ac_prog; ac_word=$2
8149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8150$as_echo_n "checking for $ac_word... " >&6; }
8151if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8152  $as_echo_n "(cached) " >&6
8153else
8154  case $CHECK_GMAKE in
8155  [\\/]* | ?:[\\/]*)
8156  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8157  ;;
8158  *)
8159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8160for as_dir in $PATH
8161do
8162  IFS=$as_save_IFS
8163  test -z "$as_dir" && as_dir=.
8164    for ac_exec_ext in '' $ac_executable_extensions; do
8165  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8166    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8168    break 2
8169  fi
8170done
8171  done
8172IFS=$as_save_IFS
8173
8174  ;;
8175esac
8176fi
8177CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8178if test -n "$CHECK_GMAKE"; then
8179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8180$as_echo "$CHECK_GMAKE" >&6; }
8181else
8182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8183$as_echo "no" >&6; }
8184fi
8185
8186
8187  test -n "$CHECK_GMAKE" && break
8188done
8189
8190
8191  MAKE_CANDIDATE=""$CHECK_GMAKE""
8192  DESCRIPTION="gmake in PATH"
8193  if test "x$MAKE_CANDIDATE" != x; then
8194    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8195$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8196    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8197    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8198    if test "x$IS_GNU_MAKE" = x; then
8199      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8200$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8201    else
8202      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8203      if test "x$IS_MODERN_MAKE" = x; then
8204        { $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
8205$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;}
8206      else
8207        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8208          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8209            MAKE_EXPECTED_ENV='cygwin'
8210          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8211            MAKE_EXPECTED_ENV='msys'
8212          else
8213            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8214          fi
8215          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8216          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8217        else
8218          # Not relevant for non-Windows
8219          IS_MAKE_CORRECT_ENV=true
8220        fi
8221        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8222          { $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
8223$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;}
8224        else
8225          FOUND_MAKE=$MAKE_CANDIDATE
8226
8227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8228
8229  # First separate the path from the arguments. This will split at the first
8230  # space.
8231  complete="$FOUND_MAKE"
8232  path="${complete%% *}"
8233  tmp="$complete EOL"
8234  arguments="${tmp#* }"
8235
8236  # Input might be given as Windows format, start by converting to
8237  # unix format.
8238  new_path=`$CYGPATH -u "$path"`
8239
8240  # Now try to locate executable using which
8241  new_path=`$WHICH "$new_path" 2> /dev/null`
8242  # bat and cmd files are not always considered executable in cygwin causing which
8243  # to not find them
8244  if test "x$new_path" = x \
8245           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8246           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8247    new_path=`$CYGPATH -u "$path"`
8248  fi
8249  if test "x$new_path" = x; then
8250    # Oops. Which didn't find the executable.
8251    # The splitting of arguments from the executable at a space might have been incorrect,
8252    # since paths with space are more likely in Windows. Give it another try with the whole
8253    # argument.
8254    path="$complete"
8255    arguments="EOL"
8256    new_path=`$CYGPATH -u "$path"`
8257    new_path=`$WHICH "$new_path" 2> /dev/null`
8258    # bat and cmd files are not always considered executable in cygwin causing which
8259    # to not find them
8260    if test "x$new_path" = x \
8261             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8262             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8263      new_path=`$CYGPATH -u "$path"`
8264    fi
8265    if test "x$new_path" = x; then
8266      # It's still not found. Now this is an unrecoverable error.
8267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8268$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8269      has_space=`$ECHO "$complete" | $GREP " "`
8270      if test "x$has_space" != x; then
8271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8273      fi
8274      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8275    fi
8276  fi
8277
8278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8281  # "foo.exe" is OK but "foo" is an error.
8282  #
8283  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8284  # It is also a way to make sure we got the proper file name for the real test later on.
8285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8286  if test "x$test_shortpath" = x; then
8287    # Short path failed, file does not exist as specified.
8288    # Try adding .exe or .cmd
8289    if test -f "${new_path}.exe"; then
8290       input_to_shortpath="${new_path}.exe"
8291    elif test -f "${new_path}.cmd"; then
8292       input_to_shortpath="${new_path}.cmd"
8293    else
8294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8295$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8296      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8297$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8298      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8299    fi
8300  else
8301    input_to_shortpath="$new_path"
8302  fi
8303
8304  # Call helper function which possibly converts this using DOS-style short mode.
8305  # If so, the updated path is stored in $new_path.
8306  new_path="$input_to_shortpath"
8307
8308  input_path="$input_to_shortpath"
8309  # Check if we need to convert this using DOS-style short mode. If the path
8310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8311  # take no chances and rewrite it.
8312  # Note: m4 eats our [], so we need to use [ and ] instead.
8313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8314  if test "x$has_forbidden_chars" != x; then
8315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8319      # Going to short mode and back again did indeed matter. Since short mode is
8320      # case insensitive, let's make it lowercase to improve readability.
8321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8322      # Now convert it back to Unix-stile (cygpath)
8323      input_path=`$CYGPATH -u "$shortmode_path"`
8324      new_path="$input_path"
8325    fi
8326  fi
8327
8328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8329  if test "x$test_cygdrive_prefix" = x; then
8330    # As a simple fix, exclude /usr/bin since it's not a real path.
8331    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8333      # a path prefixed by /cygdrive for fixpath to work.
8334      new_path="$CYGWIN_ROOT_PATH$input_path"
8335    fi
8336  fi
8337
8338  # remove trailing .exe if any
8339  new_path="${new_path/%.exe/}"
8340
8341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8342
8343  # First separate the path from the arguments. This will split at the first
8344  # space.
8345  complete="$FOUND_MAKE"
8346  path="${complete%% *}"
8347  tmp="$complete EOL"
8348  arguments="${tmp#* }"
8349
8350  # Input might be given as Windows format, start by converting to
8351  # unix format.
8352  new_path="$path"
8353
8354  windows_path="$new_path"
8355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8356    unix_path=`$CYGPATH -u "$windows_path"`
8357    new_path="$unix_path"
8358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8360    new_path="$unix_path"
8361  fi
8362
8363
8364  # Now try to locate executable using which
8365  new_path=`$WHICH "$new_path" 2> /dev/null`
8366
8367  if test "x$new_path" = x; then
8368    # Oops. Which didn't find the executable.
8369    # The splitting of arguments from the executable at a space might have been incorrect,
8370    # since paths with space are more likely in Windows. Give it another try with the whole
8371    # argument.
8372    path="$complete"
8373    arguments="EOL"
8374    new_path="$path"
8375
8376  windows_path="$new_path"
8377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8378    unix_path=`$CYGPATH -u "$windows_path"`
8379    new_path="$unix_path"
8380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8382    new_path="$unix_path"
8383  fi
8384
8385
8386    new_path=`$WHICH "$new_path" 2> /dev/null`
8387
8388    if test "x$new_path" = x; then
8389      # It's still not found. Now this is an unrecoverable error.
8390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8391$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8392      has_space=`$ECHO "$complete" | $GREP " "`
8393      if test "x$has_space" != x; then
8394        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8395$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8396      fi
8397      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8398    fi
8399  fi
8400
8401  # Now new_path has a complete unix path to the binary
8402  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8403    # Keep paths in /bin as-is, but remove trailing .exe if any
8404    new_path="${new_path/%.exe/}"
8405    # Do not save /bin paths to all_fixpath_prefixes!
8406  else
8407    # Not in mixed or Windows style, start by that.
8408    new_path=`cmd //c echo $new_path`
8409
8410  input_path="$new_path"
8411  # Check if we need to convert this using DOS-style short mode. If the path
8412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8413  # take no chances and rewrite it.
8414  # Note: m4 eats our [], so we need to use [ and ] instead.
8415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8416  if test "x$has_forbidden_chars" != x; then
8417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8419  fi
8420
8421    # Output is in $new_path
8422
8423  windows_path="$new_path"
8424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8425    unix_path=`$CYGPATH -u "$windows_path"`
8426    new_path="$unix_path"
8427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8429    new_path="$unix_path"
8430  fi
8431
8432    # remove trailing .exe if any
8433    new_path="${new_path/%.exe/}"
8434
8435    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8436    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8437  fi
8438
8439  else
8440    # We're on a posix platform. Hooray! :)
8441    # First separate the path from the arguments. This will split at the first
8442    # space.
8443    complete="$FOUND_MAKE"
8444    path="${complete%% *}"
8445    tmp="$complete EOL"
8446    arguments="${tmp#* }"
8447
8448    new_path=`$WHICH $path 2> /dev/null`
8449    if test "x$new_path" = x; then
8450      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8451      if test "x$is_absolute_path" != x; then
8452        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8453$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8454        new_path="$path"
8455      else
8456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8457$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8458        has_space=`$ECHO "$complete" | $GREP " "`
8459        if test "x$has_space" != x; then
8460          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8461$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8462        fi
8463        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8464      fi
8465    fi
8466  fi
8467
8468  # Now join together the path and the arguments once again
8469  if test "x$arguments" != xEOL; then
8470      new_complete="$new_path ${arguments% *}"
8471  else
8472      new_complete="$new_path"
8473  fi
8474
8475  if test "x$complete" != "x$new_complete"; then
8476    FOUND_MAKE="$new_complete"
8477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8478$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8479  fi
8480
8481        fi
8482      fi
8483    fi
8484  fi
8485
8486
8487    if test "x$FOUND_MAKE" = x; then
8488      for ac_prog in make
8489do
8490  # Extract the first word of "$ac_prog", so it can be a program name with args.
8491set dummy $ac_prog; ac_word=$2
8492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8493$as_echo_n "checking for $ac_word... " >&6; }
8494if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8495  $as_echo_n "(cached) " >&6
8496else
8497  case $CHECK_MAKE in
8498  [\\/]* | ?:[\\/]*)
8499  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8500  ;;
8501  *)
8502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8503for as_dir in $PATH
8504do
8505  IFS=$as_save_IFS
8506  test -z "$as_dir" && as_dir=.
8507    for ac_exec_ext in '' $ac_executable_extensions; do
8508  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8509    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8511    break 2
8512  fi
8513done
8514  done
8515IFS=$as_save_IFS
8516
8517  ;;
8518esac
8519fi
8520CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8521if test -n "$CHECK_MAKE"; then
8522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8523$as_echo "$CHECK_MAKE" >&6; }
8524else
8525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8526$as_echo "no" >&6; }
8527fi
8528
8529
8530  test -n "$CHECK_MAKE" && break
8531done
8532
8533
8534  MAKE_CANDIDATE=""$CHECK_MAKE""
8535  DESCRIPTION="make in PATH"
8536  if test "x$MAKE_CANDIDATE" != x; then
8537    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8538$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8539    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8540    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8541    if test "x$IS_GNU_MAKE" = x; then
8542      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8543$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8544    else
8545      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8546      if test "x$IS_MODERN_MAKE" = x; then
8547        { $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
8548$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;}
8549      else
8550        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8551          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8552            MAKE_EXPECTED_ENV='cygwin'
8553          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8554            MAKE_EXPECTED_ENV='msys'
8555          else
8556            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8557          fi
8558          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8559          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8560        else
8561          # Not relevant for non-Windows
8562          IS_MAKE_CORRECT_ENV=true
8563        fi
8564        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8565          { $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
8566$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;}
8567        else
8568          FOUND_MAKE=$MAKE_CANDIDATE
8569
8570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8571
8572  # First separate the path from the arguments. This will split at the first
8573  # space.
8574  complete="$FOUND_MAKE"
8575  path="${complete%% *}"
8576  tmp="$complete EOL"
8577  arguments="${tmp#* }"
8578
8579  # Input might be given as Windows format, start by converting to
8580  # unix format.
8581  new_path=`$CYGPATH -u "$path"`
8582
8583  # Now try to locate executable using which
8584  new_path=`$WHICH "$new_path" 2> /dev/null`
8585  # bat and cmd files are not always considered executable in cygwin causing which
8586  # to not find them
8587  if test "x$new_path" = x \
8588           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8589           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8590    new_path=`$CYGPATH -u "$path"`
8591  fi
8592  if test "x$new_path" = x; then
8593    # Oops. Which didn't find the executable.
8594    # The splitting of arguments from the executable at a space might have been incorrect,
8595    # since paths with space are more likely in Windows. Give it another try with the whole
8596    # argument.
8597    path="$complete"
8598    arguments="EOL"
8599    new_path=`$CYGPATH -u "$path"`
8600    new_path=`$WHICH "$new_path" 2> /dev/null`
8601    # bat and cmd files are not always considered executable in cygwin causing which
8602    # to not find them
8603    if test "x$new_path" = x \
8604             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8605             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8606      new_path=`$CYGPATH -u "$path"`
8607    fi
8608    if test "x$new_path" = x; then
8609      # It's still not found. Now this is an unrecoverable error.
8610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8611$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8612      has_space=`$ECHO "$complete" | $GREP " "`
8613      if test "x$has_space" != x; then
8614        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8615$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8616      fi
8617      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8618    fi
8619  fi
8620
8621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8624  # "foo.exe" is OK but "foo" is an error.
8625  #
8626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8627  # It is also a way to make sure we got the proper file name for the real test later on.
8628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8629  if test "x$test_shortpath" = x; then
8630    # Short path failed, file does not exist as specified.
8631    # Try adding .exe or .cmd
8632    if test -f "${new_path}.exe"; then
8633       input_to_shortpath="${new_path}.exe"
8634    elif test -f "${new_path}.cmd"; then
8635       input_to_shortpath="${new_path}.cmd"
8636    else
8637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8638$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8639      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8640$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8641      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8642    fi
8643  else
8644    input_to_shortpath="$new_path"
8645  fi
8646
8647  # Call helper function which possibly converts this using DOS-style short mode.
8648  # If so, the updated path is stored in $new_path.
8649  new_path="$input_to_shortpath"
8650
8651  input_path="$input_to_shortpath"
8652  # Check if we need to convert this using DOS-style short mode. If the path
8653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8654  # take no chances and rewrite it.
8655  # Note: m4 eats our [], so we need to use [ and ] instead.
8656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8657  if test "x$has_forbidden_chars" != x; then
8658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8662      # Going to short mode and back again did indeed matter. Since short mode is
8663      # case insensitive, let's make it lowercase to improve readability.
8664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8665      # Now convert it back to Unix-stile (cygpath)
8666      input_path=`$CYGPATH -u "$shortmode_path"`
8667      new_path="$input_path"
8668    fi
8669  fi
8670
8671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8672  if test "x$test_cygdrive_prefix" = x; then
8673    # As a simple fix, exclude /usr/bin since it's not a real path.
8674    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8676      # a path prefixed by /cygdrive for fixpath to work.
8677      new_path="$CYGWIN_ROOT_PATH$input_path"
8678    fi
8679  fi
8680
8681  # remove trailing .exe if any
8682  new_path="${new_path/%.exe/}"
8683
8684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8685
8686  # First separate the path from the arguments. This will split at the first
8687  # space.
8688  complete="$FOUND_MAKE"
8689  path="${complete%% *}"
8690  tmp="$complete EOL"
8691  arguments="${tmp#* }"
8692
8693  # Input might be given as Windows format, start by converting to
8694  # unix format.
8695  new_path="$path"
8696
8697  windows_path="$new_path"
8698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8699    unix_path=`$CYGPATH -u "$windows_path"`
8700    new_path="$unix_path"
8701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8703    new_path="$unix_path"
8704  fi
8705
8706
8707  # Now try to locate executable using which
8708  new_path=`$WHICH "$new_path" 2> /dev/null`
8709
8710  if test "x$new_path" = x; then
8711    # Oops. Which didn't find the executable.
8712    # The splitting of arguments from the executable at a space might have been incorrect,
8713    # since paths with space are more likely in Windows. Give it another try with the whole
8714    # argument.
8715    path="$complete"
8716    arguments="EOL"
8717    new_path="$path"
8718
8719  windows_path="$new_path"
8720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8721    unix_path=`$CYGPATH -u "$windows_path"`
8722    new_path="$unix_path"
8723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8725    new_path="$unix_path"
8726  fi
8727
8728
8729    new_path=`$WHICH "$new_path" 2> /dev/null`
8730
8731    if test "x$new_path" = x; then
8732      # It's still not found. Now this is an unrecoverable error.
8733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8734$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8735      has_space=`$ECHO "$complete" | $GREP " "`
8736      if test "x$has_space" != x; then
8737        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8738$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8739      fi
8740      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8741    fi
8742  fi
8743
8744  # Now new_path has a complete unix path to the binary
8745  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8746    # Keep paths in /bin as-is, but remove trailing .exe if any
8747    new_path="${new_path/%.exe/}"
8748    # Do not save /bin paths to all_fixpath_prefixes!
8749  else
8750    # Not in mixed or Windows style, start by that.
8751    new_path=`cmd //c echo $new_path`
8752
8753  input_path="$new_path"
8754  # Check if we need to convert this using DOS-style short mode. If the path
8755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8756  # take no chances and rewrite it.
8757  # Note: m4 eats our [], so we need to use [ and ] instead.
8758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8759  if test "x$has_forbidden_chars" != x; then
8760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8762  fi
8763
8764    # Output is in $new_path
8765
8766  windows_path="$new_path"
8767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8768    unix_path=`$CYGPATH -u "$windows_path"`
8769    new_path="$unix_path"
8770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8772    new_path="$unix_path"
8773  fi
8774
8775    # remove trailing .exe if any
8776    new_path="${new_path/%.exe/}"
8777
8778    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8779    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8780  fi
8781
8782  else
8783    # We're on a posix platform. Hooray! :)
8784    # First separate the path from the arguments. This will split at the first
8785    # space.
8786    complete="$FOUND_MAKE"
8787    path="${complete%% *}"
8788    tmp="$complete EOL"
8789    arguments="${tmp#* }"
8790
8791    new_path=`$WHICH $path 2> /dev/null`
8792    if test "x$new_path" = x; then
8793      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8794      if test "x$is_absolute_path" != x; then
8795        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8796$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8797        new_path="$path"
8798      else
8799        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8800$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8801        has_space=`$ECHO "$complete" | $GREP " "`
8802        if test "x$has_space" != x; then
8803          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8804$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8805        fi
8806        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8807      fi
8808    fi
8809  fi
8810
8811  # Now join together the path and the arguments once again
8812  if test "x$arguments" != xEOL; then
8813      new_complete="$new_path ${arguments% *}"
8814  else
8815      new_complete="$new_path"
8816  fi
8817
8818  if test "x$complete" != "x$new_complete"; then
8819    FOUND_MAKE="$new_complete"
8820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8821$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8822  fi
8823
8824        fi
8825      fi
8826    fi
8827  fi
8828
8829    fi
8830
8831    if test "x$FOUND_MAKE" = x; then
8832      if test "x$TOOLS_DIR" != x; then
8833        # We have a tools-dir, check that as well before giving up.
8834        OLD_PATH=$PATH
8835        PATH=$TOOLS_DIR:$PATH
8836        for ac_prog in gmake
8837do
8838  # Extract the first word of "$ac_prog", so it can be a program name with args.
8839set dummy $ac_prog; ac_word=$2
8840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8841$as_echo_n "checking for $ac_word... " >&6; }
8842if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
8843  $as_echo_n "(cached) " >&6
8844else
8845  case $CHECK_TOOLSDIR_GMAKE in
8846  [\\/]* | ?:[\\/]*)
8847  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
8848  ;;
8849  *)
8850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8851for as_dir in $PATH
8852do
8853  IFS=$as_save_IFS
8854  test -z "$as_dir" && as_dir=.
8855    for ac_exec_ext in '' $ac_executable_extensions; do
8856  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8857    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8859    break 2
8860  fi
8861done
8862  done
8863IFS=$as_save_IFS
8864
8865  ;;
8866esac
8867fi
8868CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
8869if test -n "$CHECK_TOOLSDIR_GMAKE"; then
8870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
8871$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
8872else
8873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8874$as_echo "no" >&6; }
8875fi
8876
8877
8878  test -n "$CHECK_TOOLSDIR_GMAKE" && break
8879done
8880
8881
8882  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
8883  DESCRIPTION="gmake in tools-dir"
8884  if test "x$MAKE_CANDIDATE" != x; then
8885    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8886$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8887    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8888    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8889    if test "x$IS_GNU_MAKE" = x; then
8890      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8891$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8892    else
8893      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8894      if test "x$IS_MODERN_MAKE" = x; then
8895        { $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
8896$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;}
8897      else
8898        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8899          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8900            MAKE_EXPECTED_ENV='cygwin'
8901          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8902            MAKE_EXPECTED_ENV='msys'
8903          else
8904            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8905          fi
8906          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8907          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8908        else
8909          # Not relevant for non-Windows
8910          IS_MAKE_CORRECT_ENV=true
8911        fi
8912        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8913          { $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
8914$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;}
8915        else
8916          FOUND_MAKE=$MAKE_CANDIDATE
8917
8918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8919
8920  # First separate the path from the arguments. This will split at the first
8921  # space.
8922  complete="$FOUND_MAKE"
8923  path="${complete%% *}"
8924  tmp="$complete EOL"
8925  arguments="${tmp#* }"
8926
8927  # Input might be given as Windows format, start by converting to
8928  # unix format.
8929  new_path=`$CYGPATH -u "$path"`
8930
8931  # Now try to locate executable using which
8932  new_path=`$WHICH "$new_path" 2> /dev/null`
8933  # bat and cmd files are not always considered executable in cygwin causing which
8934  # to not find them
8935  if test "x$new_path" = x \
8936           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8937           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8938    new_path=`$CYGPATH -u "$path"`
8939  fi
8940  if test "x$new_path" = x; then
8941    # Oops. Which didn't find the executable.
8942    # The splitting of arguments from the executable at a space might have been incorrect,
8943    # since paths with space are more likely in Windows. Give it another try with the whole
8944    # argument.
8945    path="$complete"
8946    arguments="EOL"
8947    new_path=`$CYGPATH -u "$path"`
8948    new_path=`$WHICH "$new_path" 2> /dev/null`
8949    # bat and cmd files are not always considered executable in cygwin causing which
8950    # to not find them
8951    if test "x$new_path" = x \
8952             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8953             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8954      new_path=`$CYGPATH -u "$path"`
8955    fi
8956    if test "x$new_path" = x; then
8957      # It's still not found. Now this is an unrecoverable error.
8958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8959$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8960      has_space=`$ECHO "$complete" | $GREP " "`
8961      if test "x$has_space" != x; then
8962        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8963$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8964      fi
8965      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8966    fi
8967  fi
8968
8969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8972  # "foo.exe" is OK but "foo" is an error.
8973  #
8974  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8975  # It is also a way to make sure we got the proper file name for the real test later on.
8976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8977  if test "x$test_shortpath" = x; then
8978    # Short path failed, file does not exist as specified.
8979    # Try adding .exe or .cmd
8980    if test -f "${new_path}.exe"; then
8981       input_to_shortpath="${new_path}.exe"
8982    elif test -f "${new_path}.cmd"; then
8983       input_to_shortpath="${new_path}.cmd"
8984    else
8985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8986$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8987      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8988$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8989      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8990    fi
8991  else
8992    input_to_shortpath="$new_path"
8993  fi
8994
8995  # Call helper function which possibly converts this using DOS-style short mode.
8996  # If so, the updated path is stored in $new_path.
8997  new_path="$input_to_shortpath"
8998
8999  input_path="$input_to_shortpath"
9000  # Check if we need to convert this using DOS-style short mode. If the path
9001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9002  # take no chances and rewrite it.
9003  # Note: m4 eats our [], so we need to use [ and ] instead.
9004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9005  if test "x$has_forbidden_chars" != x; then
9006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9007    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9008    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9009    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9010      # Going to short mode and back again did indeed matter. Since short mode is
9011      # case insensitive, let's make it lowercase to improve readability.
9012      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9013      # Now convert it back to Unix-stile (cygpath)
9014      input_path=`$CYGPATH -u "$shortmode_path"`
9015      new_path="$input_path"
9016    fi
9017  fi
9018
9019  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9020  if test "x$test_cygdrive_prefix" = x; then
9021    # As a simple fix, exclude /usr/bin since it's not a real path.
9022    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9023      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9024      # a path prefixed by /cygdrive for fixpath to work.
9025      new_path="$CYGWIN_ROOT_PATH$input_path"
9026    fi
9027  fi
9028
9029  # remove trailing .exe if any
9030  new_path="${new_path/%.exe/}"
9031
9032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9033
9034  # First separate the path from the arguments. This will split at the first
9035  # space.
9036  complete="$FOUND_MAKE"
9037  path="${complete%% *}"
9038  tmp="$complete EOL"
9039  arguments="${tmp#* }"
9040
9041  # Input might be given as Windows format, start by converting to
9042  # unix format.
9043  new_path="$path"
9044
9045  windows_path="$new_path"
9046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9047    unix_path=`$CYGPATH -u "$windows_path"`
9048    new_path="$unix_path"
9049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9051    new_path="$unix_path"
9052  fi
9053
9054
9055  # Now try to locate executable using which
9056  new_path=`$WHICH "$new_path" 2> /dev/null`
9057
9058  if test "x$new_path" = x; then
9059    # Oops. Which didn't find the executable.
9060    # The splitting of arguments from the executable at a space might have been incorrect,
9061    # since paths with space are more likely in Windows. Give it another try with the whole
9062    # argument.
9063    path="$complete"
9064    arguments="EOL"
9065    new_path="$path"
9066
9067  windows_path="$new_path"
9068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9069    unix_path=`$CYGPATH -u "$windows_path"`
9070    new_path="$unix_path"
9071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9073    new_path="$unix_path"
9074  fi
9075
9076
9077    new_path=`$WHICH "$new_path" 2> /dev/null`
9078
9079    if test "x$new_path" = x; then
9080      # It's still not found. Now this is an unrecoverable error.
9081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9082$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9083      has_space=`$ECHO "$complete" | $GREP " "`
9084      if test "x$has_space" != x; then
9085        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9086$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9087      fi
9088      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9089    fi
9090  fi
9091
9092  # Now new_path has a complete unix path to the binary
9093  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9094    # Keep paths in /bin as-is, but remove trailing .exe if any
9095    new_path="${new_path/%.exe/}"
9096    # Do not save /bin paths to all_fixpath_prefixes!
9097  else
9098    # Not in mixed or Windows style, start by that.
9099    new_path=`cmd //c echo $new_path`
9100
9101  input_path="$new_path"
9102  # Check if we need to convert this using DOS-style short mode. If the path
9103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9104  # take no chances and rewrite it.
9105  # Note: m4 eats our [], so we need to use [ and ] instead.
9106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9107  if test "x$has_forbidden_chars" != x; then
9108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9110  fi
9111
9112    # Output is in $new_path
9113
9114  windows_path="$new_path"
9115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9116    unix_path=`$CYGPATH -u "$windows_path"`
9117    new_path="$unix_path"
9118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9120    new_path="$unix_path"
9121  fi
9122
9123    # remove trailing .exe if any
9124    new_path="${new_path/%.exe/}"
9125
9126    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9127    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9128  fi
9129
9130  else
9131    # We're on a posix platform. Hooray! :)
9132    # First separate the path from the arguments. This will split at the first
9133    # space.
9134    complete="$FOUND_MAKE"
9135    path="${complete%% *}"
9136    tmp="$complete EOL"
9137    arguments="${tmp#* }"
9138
9139    new_path=`$WHICH $path 2> /dev/null`
9140    if test "x$new_path" = x; then
9141      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9142      if test "x$is_absolute_path" != x; then
9143        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9144$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9145        new_path="$path"
9146      else
9147        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9148$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9149        has_space=`$ECHO "$complete" | $GREP " "`
9150        if test "x$has_space" != x; then
9151          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9152$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9153        fi
9154        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9155      fi
9156    fi
9157  fi
9158
9159  # Now join together the path and the arguments once again
9160  if test "x$arguments" != xEOL; then
9161      new_complete="$new_path ${arguments% *}"
9162  else
9163      new_complete="$new_path"
9164  fi
9165
9166  if test "x$complete" != "x$new_complete"; then
9167    FOUND_MAKE="$new_complete"
9168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9169$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9170  fi
9171
9172        fi
9173      fi
9174    fi
9175  fi
9176
9177        if test "x$FOUND_MAKE" = x; then
9178          for ac_prog in make
9179do
9180  # Extract the first word of "$ac_prog", so it can be a program name with args.
9181set dummy $ac_prog; ac_word=$2
9182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9183$as_echo_n "checking for $ac_word... " >&6; }
9184if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9185  $as_echo_n "(cached) " >&6
9186else
9187  case $CHECK_TOOLSDIR_MAKE in
9188  [\\/]* | ?:[\\/]*)
9189  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9190  ;;
9191  *)
9192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9193for as_dir in $PATH
9194do
9195  IFS=$as_save_IFS
9196  test -z "$as_dir" && as_dir=.
9197    for ac_exec_ext in '' $ac_executable_extensions; do
9198  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9199    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9201    break 2
9202  fi
9203done
9204  done
9205IFS=$as_save_IFS
9206
9207  ;;
9208esac
9209fi
9210CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9211if test -n "$CHECK_TOOLSDIR_MAKE"; then
9212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9213$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9214else
9215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9216$as_echo "no" >&6; }
9217fi
9218
9219
9220  test -n "$CHECK_TOOLSDIR_MAKE" && break
9221done
9222
9223
9224  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9225  DESCRIPTION="make in tools-dir"
9226  if test "x$MAKE_CANDIDATE" != x; then
9227    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9228$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9229    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9230    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9231    if test "x$IS_GNU_MAKE" = x; then
9232      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9233$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9234    else
9235      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9236      if test "x$IS_MODERN_MAKE" = x; then
9237        { $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
9238$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;}
9239      else
9240        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9241          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9242            MAKE_EXPECTED_ENV='cygwin'
9243          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9244            MAKE_EXPECTED_ENV='msys'
9245          else
9246            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9247          fi
9248          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9249          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9250        else
9251          # Not relevant for non-Windows
9252          IS_MAKE_CORRECT_ENV=true
9253        fi
9254        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9255          { $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
9256$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;}
9257        else
9258          FOUND_MAKE=$MAKE_CANDIDATE
9259
9260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9261
9262  # First separate the path from the arguments. This will split at the first
9263  # space.
9264  complete="$FOUND_MAKE"
9265  path="${complete%% *}"
9266  tmp="$complete EOL"
9267  arguments="${tmp#* }"
9268
9269  # Input might be given as Windows format, start by converting to
9270  # unix format.
9271  new_path=`$CYGPATH -u "$path"`
9272
9273  # Now try to locate executable using which
9274  new_path=`$WHICH "$new_path" 2> /dev/null`
9275  # bat and cmd files are not always considered executable in cygwin causing which
9276  # to not find them
9277  if test "x$new_path" = x \
9278           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9279           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9280    new_path=`$CYGPATH -u "$path"`
9281  fi
9282  if test "x$new_path" = x; then
9283    # Oops. Which didn't find the executable.
9284    # The splitting of arguments from the executable at a space might have been incorrect,
9285    # since paths with space are more likely in Windows. Give it another try with the whole
9286    # argument.
9287    path="$complete"
9288    arguments="EOL"
9289    new_path=`$CYGPATH -u "$path"`
9290    new_path=`$WHICH "$new_path" 2> /dev/null`
9291    # bat and cmd files are not always considered executable in cygwin causing which
9292    # to not find them
9293    if test "x$new_path" = x \
9294             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9295             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9296      new_path=`$CYGPATH -u "$path"`
9297    fi
9298    if test "x$new_path" = x; then
9299      # It's still not found. Now this is an unrecoverable error.
9300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9301$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9302      has_space=`$ECHO "$complete" | $GREP " "`
9303      if test "x$has_space" != x; then
9304        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9305$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9306      fi
9307      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9308    fi
9309  fi
9310
9311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9314  # "foo.exe" is OK but "foo" is an error.
9315  #
9316  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9317  # It is also a way to make sure we got the proper file name for the real test later on.
9318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9319  if test "x$test_shortpath" = x; then
9320    # Short path failed, file does not exist as specified.
9321    # Try adding .exe or .cmd
9322    if test -f "${new_path}.exe"; then
9323       input_to_shortpath="${new_path}.exe"
9324    elif test -f "${new_path}.cmd"; then
9325       input_to_shortpath="${new_path}.cmd"
9326    else
9327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9328$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9329      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9330$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9331      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9332    fi
9333  else
9334    input_to_shortpath="$new_path"
9335  fi
9336
9337  # Call helper function which possibly converts this using DOS-style short mode.
9338  # If so, the updated path is stored in $new_path.
9339  new_path="$input_to_shortpath"
9340
9341  input_path="$input_to_shortpath"
9342  # Check if we need to convert this using DOS-style short mode. If the path
9343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9344  # take no chances and rewrite it.
9345  # Note: m4 eats our [], so we need to use [ and ] instead.
9346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9347  if test "x$has_forbidden_chars" != x; then
9348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9352      # Going to short mode and back again did indeed matter. Since short mode is
9353      # case insensitive, let's make it lowercase to improve readability.
9354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9355      # Now convert it back to Unix-stile (cygpath)
9356      input_path=`$CYGPATH -u "$shortmode_path"`
9357      new_path="$input_path"
9358    fi
9359  fi
9360
9361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9362  if test "x$test_cygdrive_prefix" = x; then
9363    # As a simple fix, exclude /usr/bin since it's not a real path.
9364    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9366      # a path prefixed by /cygdrive for fixpath to work.
9367      new_path="$CYGWIN_ROOT_PATH$input_path"
9368    fi
9369  fi
9370
9371  # remove trailing .exe if any
9372  new_path="${new_path/%.exe/}"
9373
9374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9375
9376  # First separate the path from the arguments. This will split at the first
9377  # space.
9378  complete="$FOUND_MAKE"
9379  path="${complete%% *}"
9380  tmp="$complete EOL"
9381  arguments="${tmp#* }"
9382
9383  # Input might be given as Windows format, start by converting to
9384  # unix format.
9385  new_path="$path"
9386
9387  windows_path="$new_path"
9388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9389    unix_path=`$CYGPATH -u "$windows_path"`
9390    new_path="$unix_path"
9391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9393    new_path="$unix_path"
9394  fi
9395
9396
9397  # Now try to locate executable using which
9398  new_path=`$WHICH "$new_path" 2> /dev/null`
9399
9400  if test "x$new_path" = x; then
9401    # Oops. Which didn't find the executable.
9402    # The splitting of arguments from the executable at a space might have been incorrect,
9403    # since paths with space are more likely in Windows. Give it another try with the whole
9404    # argument.
9405    path="$complete"
9406    arguments="EOL"
9407    new_path="$path"
9408
9409  windows_path="$new_path"
9410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9411    unix_path=`$CYGPATH -u "$windows_path"`
9412    new_path="$unix_path"
9413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9415    new_path="$unix_path"
9416  fi
9417
9418
9419    new_path=`$WHICH "$new_path" 2> /dev/null`
9420
9421    if test "x$new_path" = x; then
9422      # It's still not found. Now this is an unrecoverable error.
9423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9424$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9425      has_space=`$ECHO "$complete" | $GREP " "`
9426      if test "x$has_space" != x; then
9427        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9428$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9429      fi
9430      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9431    fi
9432  fi
9433
9434  # Now new_path has a complete unix path to the binary
9435  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9436    # Keep paths in /bin as-is, but remove trailing .exe if any
9437    new_path="${new_path/%.exe/}"
9438    # Do not save /bin paths to all_fixpath_prefixes!
9439  else
9440    # Not in mixed or Windows style, start by that.
9441    new_path=`cmd //c echo $new_path`
9442
9443  input_path="$new_path"
9444  # Check if we need to convert this using DOS-style short mode. If the path
9445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9446  # take no chances and rewrite it.
9447  # Note: m4 eats our [], so we need to use [ and ] instead.
9448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9449  if test "x$has_forbidden_chars" != x; then
9450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9452  fi
9453
9454    # Output is in $new_path
9455
9456  windows_path="$new_path"
9457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9458    unix_path=`$CYGPATH -u "$windows_path"`
9459    new_path="$unix_path"
9460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9462    new_path="$unix_path"
9463  fi
9464
9465    # remove trailing .exe if any
9466    new_path="${new_path/%.exe/}"
9467
9468    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9469    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9470  fi
9471
9472  else
9473    # We're on a posix platform. Hooray! :)
9474    # First separate the path from the arguments. This will split at the first
9475    # space.
9476    complete="$FOUND_MAKE"
9477    path="${complete%% *}"
9478    tmp="$complete EOL"
9479    arguments="${tmp#* }"
9480
9481    new_path=`$WHICH $path 2> /dev/null`
9482    if test "x$new_path" = x; then
9483      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9484      if test "x$is_absolute_path" != x; then
9485        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9486$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9487        new_path="$path"
9488      else
9489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9490$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9491        has_space=`$ECHO "$complete" | $GREP " "`
9492        if test "x$has_space" != x; then
9493          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9494$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9495        fi
9496        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9497      fi
9498    fi
9499  fi
9500
9501  # Now join together the path and the arguments once again
9502  if test "x$arguments" != xEOL; then
9503      new_complete="$new_path ${arguments% *}"
9504  else
9505      new_complete="$new_path"
9506  fi
9507
9508  if test "x$complete" != "x$new_complete"; then
9509    FOUND_MAKE="$new_complete"
9510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9511$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9512  fi
9513
9514        fi
9515      fi
9516    fi
9517  fi
9518
9519        fi
9520        PATH=$OLD_PATH
9521      fi
9522    fi
9523
9524    if test "x$FOUND_MAKE" = x; then
9525      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
9526    fi
9527  fi
9528
9529  MAKE=$FOUND_MAKE
9530
9531  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9532$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9533
9534
9535
9536    # Test if find supports -delete
9537    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9538$as_echo_n "checking if find supports -delete... " >&6; }
9539    FIND_DELETE="-delete"
9540
9541    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9542
9543    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9544
9545    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9546    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9547        # No, it does not.
9548        rm $DELETEDIR/TestIfFindSupportsDelete
9549        FIND_DELETE="-exec rm \{\} \+"
9550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9551$as_echo "no" >&6; }
9552    else
9553        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9554$as_echo "yes" >&6; }
9555    fi
9556    rmdir $DELETEDIR
9557
9558
9559
9560# These tools might not be installed by default,
9561# need hint on how to install them.
9562
9563    for ac_prog in unzip
9564do
9565  # Extract the first word of "$ac_prog", so it can be a program name with args.
9566set dummy $ac_prog; ac_word=$2
9567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9568$as_echo_n "checking for $ac_word... " >&6; }
9569if test "${ac_cv_path_UNZIP+set}" = set; then :
9570  $as_echo_n "(cached) " >&6
9571else
9572  case $UNZIP in
9573  [\\/]* | ?:[\\/]*)
9574  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9575  ;;
9576  *)
9577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9578for as_dir in $PATH
9579do
9580  IFS=$as_save_IFS
9581  test -z "$as_dir" && as_dir=.
9582    for ac_exec_ext in '' $ac_executable_extensions; do
9583  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9584    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9586    break 2
9587  fi
9588done
9589  done
9590IFS=$as_save_IFS
9591
9592  ;;
9593esac
9594fi
9595UNZIP=$ac_cv_path_UNZIP
9596if test -n "$UNZIP"; then
9597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9598$as_echo "$UNZIP" >&6; }
9599else
9600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9601$as_echo "no" >&6; }
9602fi
9603
9604
9605  test -n "$UNZIP" && break
9606done
9607
9608
9609    if test "x$UNZIP" = x; then
9610        if test "xunzip" = x; then
9611          PROG_NAME=unzip
9612        else
9613          PROG_NAME=unzip
9614        fi
9615        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9616$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9617        as_fn_error $? "Cannot continue" "$LINENO" 5
9618    fi
9619
9620
9621
9622    for ac_prog in zip
9623do
9624  # Extract the first word of "$ac_prog", so it can be a program name with args.
9625set dummy $ac_prog; ac_word=$2
9626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9627$as_echo_n "checking for $ac_word... " >&6; }
9628if test "${ac_cv_path_ZIP+set}" = set; then :
9629  $as_echo_n "(cached) " >&6
9630else
9631  case $ZIP in
9632  [\\/]* | ?:[\\/]*)
9633  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9634  ;;
9635  *)
9636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9637for as_dir in $PATH
9638do
9639  IFS=$as_save_IFS
9640  test -z "$as_dir" && as_dir=.
9641    for ac_exec_ext in '' $ac_executable_extensions; do
9642  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9643    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9645    break 2
9646  fi
9647done
9648  done
9649IFS=$as_save_IFS
9650
9651  ;;
9652esac
9653fi
9654ZIP=$ac_cv_path_ZIP
9655if test -n "$ZIP"; then
9656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9657$as_echo "$ZIP" >&6; }
9658else
9659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9660$as_echo "no" >&6; }
9661fi
9662
9663
9664  test -n "$ZIP" && break
9665done
9666
9667
9668    if test "x$ZIP" = x; then
9669        if test "xzip" = x; then
9670          PROG_NAME=zip
9671        else
9672          PROG_NAME=zip
9673        fi
9674        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9675$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9676        as_fn_error $? "Cannot continue" "$LINENO" 5
9677    fi
9678
9679
9680
9681# Non-required basic tools
9682
9683# Extract the first word of "ldd", so it can be a program name with args.
9684set dummy ldd; ac_word=$2
9685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9686$as_echo_n "checking for $ac_word... " >&6; }
9687if test "${ac_cv_path_LDD+set}" = set; then :
9688  $as_echo_n "(cached) " >&6
9689else
9690  case $LDD in
9691  [\\/]* | ?:[\\/]*)
9692  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9693  ;;
9694  *)
9695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9696for as_dir in $PATH
9697do
9698  IFS=$as_save_IFS
9699  test -z "$as_dir" && as_dir=.
9700    for ac_exec_ext in '' $ac_executable_extensions; do
9701  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9702    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9704    break 2
9705  fi
9706done
9707  done
9708IFS=$as_save_IFS
9709
9710  ;;
9711esac
9712fi
9713LDD=$ac_cv_path_LDD
9714if test -n "$LDD"; then
9715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
9716$as_echo "$LDD" >&6; }
9717else
9718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9719$as_echo "no" >&6; }
9720fi
9721
9722
9723if test "x$LDD" = "x"; then
9724    # List shared lib dependencies is used for
9725    # debug output and checking for forbidden dependencies.
9726    # We can build without it.
9727    LDD="true"
9728fi
9729# Extract the first word of "otool", so it can be a program name with args.
9730set dummy otool; ac_word=$2
9731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9732$as_echo_n "checking for $ac_word... " >&6; }
9733if test "${ac_cv_path_OTOOL+set}" = set; then :
9734  $as_echo_n "(cached) " >&6
9735else
9736  case $OTOOL in
9737  [\\/]* | ?:[\\/]*)
9738  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
9739  ;;
9740  *)
9741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9742for as_dir in $PATH
9743do
9744  IFS=$as_save_IFS
9745  test -z "$as_dir" && as_dir=.
9746    for ac_exec_ext in '' $ac_executable_extensions; do
9747  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9748    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
9749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9750    break 2
9751  fi
9752done
9753  done
9754IFS=$as_save_IFS
9755
9756  ;;
9757esac
9758fi
9759OTOOL=$ac_cv_path_OTOOL
9760if test -n "$OTOOL"; then
9761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9762$as_echo "$OTOOL" >&6; }
9763else
9764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9765$as_echo "no" >&6; }
9766fi
9767
9768
9769if test "x$OTOOL" = "x"; then
9770   OTOOL="true"
9771fi
9772for ac_prog in readelf greadelf
9773do
9774  # Extract the first word of "$ac_prog", so it can be a program name with args.
9775set dummy $ac_prog; ac_word=$2
9776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9777$as_echo_n "checking for $ac_word... " >&6; }
9778if test "${ac_cv_path_READELF+set}" = set; then :
9779  $as_echo_n "(cached) " >&6
9780else
9781  case $READELF in
9782  [\\/]* | ?:[\\/]*)
9783  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
9784  ;;
9785  *)
9786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9787for as_dir in $PATH
9788do
9789  IFS=$as_save_IFS
9790  test -z "$as_dir" && as_dir=.
9791    for ac_exec_ext in '' $ac_executable_extensions; do
9792  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9793    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
9794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9795    break 2
9796  fi
9797done
9798  done
9799IFS=$as_save_IFS
9800
9801  ;;
9802esac
9803fi
9804READELF=$ac_cv_path_READELF
9805if test -n "$READELF"; then
9806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
9807$as_echo "$READELF" >&6; }
9808else
9809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9810$as_echo "no" >&6; }
9811fi
9812
9813
9814  test -n "$READELF" && break
9815done
9816
9817# Extract the first word of "hg", so it can be a program name with args.
9818set dummy hg; ac_word=$2
9819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9820$as_echo_n "checking for $ac_word... " >&6; }
9821if test "${ac_cv_path_HG+set}" = set; then :
9822  $as_echo_n "(cached) " >&6
9823else
9824  case $HG in
9825  [\\/]* | ?:[\\/]*)
9826  ac_cv_path_HG="$HG" # Let the user override the test with a path.
9827  ;;
9828  *)
9829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9830for as_dir in $PATH
9831do
9832  IFS=$as_save_IFS
9833  test -z "$as_dir" && as_dir=.
9834    for ac_exec_ext in '' $ac_executable_extensions; do
9835  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9836    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
9837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9838    break 2
9839  fi
9840done
9841  done
9842IFS=$as_save_IFS
9843
9844  ;;
9845esac
9846fi
9847HG=$ac_cv_path_HG
9848if test -n "$HG"; then
9849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
9850$as_echo "$HG" >&6; }
9851else
9852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9853$as_echo "no" >&6; }
9854fi
9855
9856
9857# Extract the first word of "stat", so it can be a program name with args.
9858set dummy stat; ac_word=$2
9859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9860$as_echo_n "checking for $ac_word... " >&6; }
9861if test "${ac_cv_path_STAT+set}" = set; then :
9862  $as_echo_n "(cached) " >&6
9863else
9864  case $STAT in
9865  [\\/]* | ?:[\\/]*)
9866  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
9867  ;;
9868  *)
9869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9870for as_dir in $PATH
9871do
9872  IFS=$as_save_IFS
9873  test -z "$as_dir" && as_dir=.
9874    for ac_exec_ext in '' $ac_executable_extensions; do
9875  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9876    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
9877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9878    break 2
9879  fi
9880done
9881  done
9882IFS=$as_save_IFS
9883
9884  ;;
9885esac
9886fi
9887STAT=$ac_cv_path_STAT
9888if test -n "$STAT"; then
9889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
9890$as_echo "$STAT" >&6; }
9891else
9892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9893$as_echo "no" >&6; }
9894fi
9895
9896
9897# Extract the first word of "time", so it can be a program name with args.
9898set dummy time; ac_word=$2
9899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9900$as_echo_n "checking for $ac_word... " >&6; }
9901if test "${ac_cv_path_TIME+set}" = set; then :
9902  $as_echo_n "(cached) " >&6
9903else
9904  case $TIME in
9905  [\\/]* | ?:[\\/]*)
9906  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
9907  ;;
9908  *)
9909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9910for as_dir in $PATH
9911do
9912  IFS=$as_save_IFS
9913  test -z "$as_dir" && as_dir=.
9914    for ac_exec_ext in '' $ac_executable_extensions; do
9915  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9916    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
9917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9918    break 2
9919  fi
9920done
9921  done
9922IFS=$as_save_IFS
9923
9924  ;;
9925esac
9926fi
9927TIME=$ac_cv_path_TIME
9928if test -n "$TIME"; then
9929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
9930$as_echo "$TIME" >&6; }
9931else
9932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9933$as_echo "no" >&6; }
9934fi
9935
9936
9937
9938if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
9939
9940    for ac_prog in comm
9941do
9942  # Extract the first word of "$ac_prog", so it can be a program name with args.
9943set dummy $ac_prog; ac_word=$2
9944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9945$as_echo_n "checking for $ac_word... " >&6; }
9946if test "${ac_cv_path_COMM+set}" = set; then :
9947  $as_echo_n "(cached) " >&6
9948else
9949  case $COMM in
9950  [\\/]* | ?:[\\/]*)
9951  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
9952  ;;
9953  *)
9954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9955for as_dir in $PATH
9956do
9957  IFS=$as_save_IFS
9958  test -z "$as_dir" && as_dir=.
9959    for ac_exec_ext in '' $ac_executable_extensions; do
9960  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9961    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
9962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9963    break 2
9964  fi
9965done
9966  done
9967IFS=$as_save_IFS
9968
9969  ;;
9970esac
9971fi
9972COMM=$ac_cv_path_COMM
9973if test -n "$COMM"; then
9974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
9975$as_echo "$COMM" >&6; }
9976else
9977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9978$as_echo "no" >&6; }
9979fi
9980
9981
9982  test -n "$COMM" && break
9983done
9984
9985
9986    if test "x$COMM" = x; then
9987        if test "xcomm" = x; then
9988          PROG_NAME=comm
9989        else
9990          PROG_NAME=comm
9991        fi
9992        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9993$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9994        as_fn_error $? "Cannot continue" "$LINENO" 5
9995    fi
9996
9997
9998fi
9999
10000
10001# Check if pkg-config is available.
10002
10003
10004if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10005	if test -n "$ac_tool_prefix"; then
10006  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10007set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10009$as_echo_n "checking for $ac_word... " >&6; }
10010if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10011  $as_echo_n "(cached) " >&6
10012else
10013  case $PKG_CONFIG in
10014  [\\/]* | ?:[\\/]*)
10015  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10016  ;;
10017  *)
10018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10019for as_dir in $PATH
10020do
10021  IFS=$as_save_IFS
10022  test -z "$as_dir" && as_dir=.
10023    for ac_exec_ext in '' $ac_executable_extensions; do
10024  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10025    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10027    break 2
10028  fi
10029done
10030  done
10031IFS=$as_save_IFS
10032
10033  ;;
10034esac
10035fi
10036PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10037if test -n "$PKG_CONFIG"; then
10038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10039$as_echo "$PKG_CONFIG" >&6; }
10040else
10041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10042$as_echo "no" >&6; }
10043fi
10044
10045
10046fi
10047if test -z "$ac_cv_path_PKG_CONFIG"; then
10048  ac_pt_PKG_CONFIG=$PKG_CONFIG
10049  # Extract the first word of "pkg-config", so it can be a program name with args.
10050set dummy pkg-config; ac_word=$2
10051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10052$as_echo_n "checking for $ac_word... " >&6; }
10053if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10054  $as_echo_n "(cached) " >&6
10055else
10056  case $ac_pt_PKG_CONFIG in
10057  [\\/]* | ?:[\\/]*)
10058  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10059  ;;
10060  *)
10061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10062for as_dir in $PATH
10063do
10064  IFS=$as_save_IFS
10065  test -z "$as_dir" && as_dir=.
10066    for ac_exec_ext in '' $ac_executable_extensions; do
10067  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10068    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10070    break 2
10071  fi
10072done
10073  done
10074IFS=$as_save_IFS
10075
10076  ;;
10077esac
10078fi
10079ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10080if test -n "$ac_pt_PKG_CONFIG"; then
10081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10082$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10083else
10084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10085$as_echo "no" >&6; }
10086fi
10087
10088  if test "x$ac_pt_PKG_CONFIG" = x; then
10089    PKG_CONFIG=""
10090  else
10091    case $cross_compiling:$ac_tool_warned in
10092yes:)
10093{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10094$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10095ac_tool_warned=yes ;;
10096esac
10097    PKG_CONFIG=$ac_pt_PKG_CONFIG
10098  fi
10099else
10100  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10101fi
10102
10103fi
10104if test -n "$PKG_CONFIG"; then
10105	_pkg_min_version=0.9.0
10106	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10107$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10108	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10109		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10110$as_echo "yes" >&6; }
10111	else
10112		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10113$as_echo "no" >&6; }
10114		PKG_CONFIG=""
10115	fi
10116
10117fi
10118
10119# After basic tools have been setup, we can check build os specific details.
10120
10121###############################################################################
10122
10123# Note that this is the build platform OS version!
10124
10125OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10126OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10127OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10128OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10129
10130
10131
10132
10133
10134# Setup builddeps, for automatic downloading of tools we need.
10135# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10136# boot-jdk setup, but we need to have basic tools setup first.
10137
10138
10139# Check whether --with-builddeps-conf was given.
10140if test "${with_builddeps_conf+set}" = set; then :
10141  withval=$with_builddeps_conf;
10142fi
10143
10144
10145
10146# Check whether --with-builddeps-server was given.
10147if test "${with_builddeps_server+set}" = set; then :
10148  withval=$with_builddeps_server;
10149fi
10150
10151
10152
10153# Check whether --with-builddeps-dir was given.
10154if test "${with_builddeps_dir+set}" = set; then :
10155  withval=$with_builddeps_dir;
10156else
10157  with_builddeps_dir=/localhome/builddeps
10158fi
10159
10160
10161
10162# Check whether --with-builddeps-group was given.
10163if test "${with_builddeps_group+set}" = set; then :
10164  withval=$with_builddeps_group;
10165fi
10166
10167
10168
10169
10170    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10171        if test "x$with_builddeps_conf" != x; then
10172            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10173$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10174            builddepsfile=$with_builddeps_conf
10175            if test -s $builddepsfile; then
10176                . $builddepsfile
10177                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10178$as_echo "loaded!" >&6; }
10179            else
10180               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10181           fi
10182        else
10183            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10184$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10185            builddepsfile=`mktemp`
10186            touch $builddepsfile
10187            # Put all found confs into a single file.
10188            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10189            # Source the file to acquire the variables
10190            if test -s $builddepsfile; then
10191                . $builddepsfile
10192                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10193$as_echo "found at least one!" >&6; }
10194            else
10195               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10196           fi
10197        fi
10198        # Create build and target names that use _ instead of "-" and ".".
10199        # This is necessary to use them in variable names.
10200        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10201        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10202        # Extract rewrite information for build and target
10203        eval rewritten_build=\${REWRITE_${build_var}}
10204        if test "x$rewritten_build" = x; then
10205            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10206            echo Build stays the same $rewritten_build
10207        else
10208            echo Rewriting build for builddeps into $rewritten_build
10209        fi
10210        eval rewritten_target=\${REWRITE_${target_var}}
10211        if test "x$rewritten_target" = x; then
10212            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10213            echo Target stays the same $rewritten_target
10214        else
10215            echo Rewriting target for builddeps into $rewritten_target
10216        fi
10217        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10218        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10219    fi
10220    for ac_prog in 7z unzip
10221do
10222  # Extract the first word of "$ac_prog", so it can be a program name with args.
10223set dummy $ac_prog; ac_word=$2
10224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10225$as_echo_n "checking for $ac_word... " >&6; }
10226if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10227  $as_echo_n "(cached) " >&6
10228else
10229  if test -n "$BDEPS_UNZIP"; then
10230  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10231else
10232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10233for as_dir in $PATH
10234do
10235  IFS=$as_save_IFS
10236  test -z "$as_dir" && as_dir=.
10237    for ac_exec_ext in '' $ac_executable_extensions; do
10238  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10239    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10241    break 2
10242  fi
10243done
10244  done
10245IFS=$as_save_IFS
10246
10247fi
10248fi
10249BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10250if test -n "$BDEPS_UNZIP"; then
10251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10252$as_echo "$BDEPS_UNZIP" >&6; }
10253else
10254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10255$as_echo "no" >&6; }
10256fi
10257
10258
10259  test -n "$BDEPS_UNZIP" && break
10260done
10261
10262    if test "x$BDEPS_UNZIP" = x7z; then
10263        BDEPS_UNZIP="7z x"
10264    fi
10265
10266    for ac_prog in wget lftp ftp
10267do
10268  # Extract the first word of "$ac_prog", so it can be a program name with args.
10269set dummy $ac_prog; ac_word=$2
10270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10271$as_echo_n "checking for $ac_word... " >&6; }
10272if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10273  $as_echo_n "(cached) " >&6
10274else
10275  if test -n "$BDEPS_FTP"; then
10276  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10277else
10278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10279for as_dir in $PATH
10280do
10281  IFS=$as_save_IFS
10282  test -z "$as_dir" && as_dir=.
10283    for ac_exec_ext in '' $ac_executable_extensions; do
10284  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10285    ac_cv_prog_BDEPS_FTP="$ac_prog"
10286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10287    break 2
10288  fi
10289done
10290  done
10291IFS=$as_save_IFS
10292
10293fi
10294fi
10295BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10296if test -n "$BDEPS_FTP"; then
10297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10298$as_echo "$BDEPS_FTP" >&6; }
10299else
10300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10301$as_echo "no" >&6; }
10302fi
10303
10304
10305  test -n "$BDEPS_FTP" && break
10306done
10307
10308
10309
10310###############################################################################
10311#
10312# Determine OpenJDK variants, options and version numbers.
10313#
10314###############################################################################
10315
10316# We need build & target for this.
10317
10318
10319###############################################################################
10320#
10321# Should we build only OpenJDK even if closed sources are present?
10322#
10323# Check whether --enable-openjdk-only was given.
10324if test "${enable_openjdk_only+set}" = set; then :
10325  enableval=$enable_openjdk_only;
10326else
10327  enable_openjdk_only="no"
10328fi
10329
10330
10331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
10332$as_echo_n "checking for presence of closed sources... " >&6; }
10333if test -d "$SRC_ROOT/jdk/src/closed"; then
10334    CLOSED_SOURCE_PRESENT=yes
10335else
10336    CLOSED_SOURCE_PRESENT=no
10337fi
10338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
10339$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
10340
10341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is supressed (openjdk-only)" >&5
10342$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
10343SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
10344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPRESS_CLOSED_SOURCE" >&5
10345$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
10346
10347if test "x$CLOSED_SOURCE_PRESENT" = xno; then
10348  OPENJDK=true
10349  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10350    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
10351$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
10352  fi
10353else
10354  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10355    OPENJDK=true
10356  else
10357    OPENJDK=false
10358  fi
10359fi
10360
10361if test "x$OPENJDK" = "xtrue"; then
10362    SET_OPENJDK="OPENJDK=true"
10363fi
10364
10365
10366
10367###############################################################################
10368#
10369# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10370# We always build headless support.
10371#
10372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10373$as_echo_n "checking headful support... " >&6; }
10374# Check whether --enable-headful was given.
10375if test "${enable_headful+set}" = set; then :
10376  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10377else
10378  SUPPORT_HEADFUL=yes
10379fi
10380
10381
10382SUPPORT_HEADLESS=yes
10383BUILD_HEADLESS="BUILD_HEADLESS:=true"
10384
10385if test "x$SUPPORT_HEADFUL" = xyes; then
10386    # We are building both headful and headless.
10387    headful_msg="inlude support for both headful and headless"
10388fi
10389
10390if test "x$SUPPORT_HEADFUL" = xno; then
10391    # Thus we are building headless only.
10392    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10393    headful_msg="headless only"
10394fi
10395
10396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10397$as_echo "$headful_msg" >&6; }
10398
10399
10400
10401
10402
10403# Control wether Hotspot runs Queens test after build.
10404# Check whether --enable-hotspot-test-in-build was given.
10405if test "${enable_hotspot_test_in_build+set}" = set; then :
10406  enableval=$enable_hotspot_test_in_build;
10407else
10408  enable_hotspot_test_in_build=no
10409fi
10410
10411if test "x$enable_hotspot_test_in_build" = "xyes"; then
10412    TEST_IN_BUILD=true
10413else
10414    TEST_IN_BUILD=false
10415fi
10416
10417
10418###############################################################################
10419#
10420# Choose cacerts source file
10421#
10422
10423# Check whether --with-cacerts-file was given.
10424if test "${with_cacerts_file+set}" = set; then :
10425  withval=$with_cacerts_file;
10426fi
10427
10428if test "x$with_cacerts_file" != x; then
10429    CACERTS_FILE=$with_cacerts_file
10430else
10431    if test "x$OPENJDK" = "xtrue"; then
10432        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10433    else
10434        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10435    fi
10436fi
10437
10438
10439###############################################################################
10440#
10441# Enable or disable unlimited crypto
10442#
10443# Check whether --enable-unlimited-crypto was given.
10444if test "${enable_unlimited_crypto+set}" = set; then :
10445  enableval=$enable_unlimited_crypto;
10446else
10447  enable_unlimited_crypto=no
10448fi
10449
10450if test "x$enable_unlimited_crypto" = "xyes"; then
10451    UNLIMITED_CRYPTO=true
10452else
10453    UNLIMITED_CRYPTO=false
10454fi
10455
10456
10457###############################################################################
10458#
10459# Compress jars
10460#
10461COMPRESS_JARS=false
10462
10463
10464
10465
10466# Source the version numbers
10467. $AUTOCONF_DIR/version.numbers
10468if test "x$OPENJDK" = "xfalse"; then
10469    . $AUTOCONF_DIR/closed.version.numbers
10470fi
10471# Now set the JDK version, milestone, build number etc.
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486COPYRIGHT_YEAR=`date +'%Y'`
10487
10488
10489RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
10490
10491
10492if test "x$JDK_UPDATE_VERSION" != x; then
10493    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10494else
10495    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10496fi
10497
10498
10499if test "x$MILESTONE" != x; then
10500    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
10501else
10502    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
10503fi
10504
10505
10506if test "x$JDK_BUILD_NUMBER" != x; then
10507    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
10508else
10509    JDK_BUILD_NUMBER=b00
10510    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10511    # Avoid [:alnum:] since it depends on the locale.
10512    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10513    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10514    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
10515fi
10516
10517COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10518
10519
10520
10521###############################################################################
10522#
10523# Setup BootJDK, used to bootstrap the build.
10524#
10525###############################################################################
10526
10527
10528BOOT_JDK_FOUND=no
10529
10530# Check whether --with-boot-jdk was given.
10531if test "${with_boot_jdk+set}" = set; then :
10532  withval=$with_boot_jdk;
10533fi
10534
10535
10536# We look for the Boot JDK through various means, going from more certain to
10537# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10538# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10539# must check if this is indeed valid; otherwise we'll continue looking.
10540
10541# Test: Is bootjdk explicitely set by command line arguments?
10542
10543  if test "x$BOOT_JDK_FOUND" = xno; then
10544    # Now execute the test
10545
10546if test "x$with_boot_jdk" != x; then
10547    BOOT_JDK=$with_boot_jdk
10548    BOOT_JDK_FOUND=maybe
10549    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10550$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10551fi
10552
10553
10554    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10555    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10556      # Do we have a bin/java?
10557      if test ! -x "$BOOT_JDK/bin/java"; then
10558        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10560        BOOT_JDK_FOUND=no
10561      else
10562        # Do we have a bin/javac?
10563        if test ! -x "$BOOT_JDK/bin/javac"; then
10564          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10565$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10566          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10567$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10568          BOOT_JDK_FOUND=no
10569        else
10570          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10571          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10572            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10574            BOOT_JDK_FOUND=no
10575          else
10576            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10577            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10578
10579            # Extra M4 quote needed to protect [] in grep expression.
10580            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10581            if test "x$FOUND_VERSION_78" = x; then
10582              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10583$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10584              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10585$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10586              BOOT_JDK_FOUND=no
10587            else
10588              # We're done! :-)
10589              BOOT_JDK_FOUND=yes
10590
10591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10592
10593  # Input might be given as Windows format, start by converting to
10594  # unix format.
10595  path="$BOOT_JDK"
10596  new_path=`$CYGPATH -u "$path"`
10597
10598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10601  # "foo.exe" is OK but "foo" is an error.
10602  #
10603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10604  # It is also a way to make sure we got the proper file name for the real test later on.
10605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10606  if test "x$test_shortpath" = x; then
10607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10608$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10609    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10610  fi
10611
10612  # Call helper function which possibly converts this using DOS-style short mode.
10613  # If so, the updated path is stored in $new_path.
10614
10615  input_path="$new_path"
10616  # Check if we need to convert this using DOS-style short mode. If the path
10617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10618  # take no chances and rewrite it.
10619  # Note: m4 eats our [], so we need to use [ and ] instead.
10620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10621  if test "x$has_forbidden_chars" != x; then
10622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10626      # Going to short mode and back again did indeed matter. Since short mode is
10627      # case insensitive, let's make it lowercase to improve readability.
10628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10629      # Now convert it back to Unix-stile (cygpath)
10630      input_path=`$CYGPATH -u "$shortmode_path"`
10631      new_path="$input_path"
10632    fi
10633  fi
10634
10635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10636  if test "x$test_cygdrive_prefix" = x; then
10637    # As a simple fix, exclude /usr/bin since it's not a real path.
10638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10640      # a path prefixed by /cygdrive for fixpath to work.
10641      new_path="$CYGWIN_ROOT_PATH$input_path"
10642    fi
10643  fi
10644
10645
10646  if test "x$path" != "x$new_path"; then
10647    BOOT_JDK="$new_path"
10648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10649$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10650  fi
10651
10652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10653
10654  path="$BOOT_JDK"
10655  has_colon=`$ECHO $path | $GREP ^.:`
10656  new_path="$path"
10657  if test "x$has_colon" = x; then
10658    # Not in mixed or Windows style, start by that.
10659    new_path=`cmd //c echo $path`
10660  fi
10661
10662
10663  input_path="$new_path"
10664  # Check if we need to convert this using DOS-style short mode. If the path
10665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10666  # take no chances and rewrite it.
10667  # Note: m4 eats our [], so we need to use [ and ] instead.
10668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10669  if test "x$has_forbidden_chars" != x; then
10670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10672  fi
10673
10674
10675  windows_path="$new_path"
10676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10677    unix_path=`$CYGPATH -u "$windows_path"`
10678    new_path="$unix_path"
10679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10681    new_path="$unix_path"
10682  fi
10683
10684  if test "x$path" != "x$new_path"; then
10685    BOOT_JDK="$new_path"
10686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10687$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10688  fi
10689
10690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10692
10693  else
10694    # We're on a posix platform. Hooray! :)
10695    path="$BOOT_JDK"
10696
10697    if test ! -f "$path" && test ! -d "$path"; then
10698      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
10699    fi
10700
10701    has_space=`$ECHO "$path" | $GREP " "`
10702    if test "x$has_space" != x; then
10703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10704$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10705      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
10706    fi
10707  fi
10708
10709              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
10710$as_echo_n "checking for Boot JDK... " >&6; }
10711              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
10712$as_echo "$BOOT_JDK" >&6; }
10713              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
10714$as_echo_n "checking Boot JDK version... " >&6; }
10715              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10716              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
10717$as_echo "$BOOT_JDK_VERSION" >&6; }
10718            fi # end check jdk version
10719          fi # end check rt.jar
10720        fi # end check javac
10721      fi # end check java
10722    fi # end check boot jdk found
10723  fi
10724
10725if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
10726  # Having specified an argument which is incorrect will produce an instant failure;
10727  # we should not go on looking
10728  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
10729fi
10730
10731# Test: Is bootjdk available from builddeps?
10732
10733  if test "x$BOOT_JDK_FOUND" = xno; then
10734    # Now execute the test
10735
10736
10737
10738    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10739        # Source the builddeps file again, to make sure it uses the latest variables!
10740        . $builddepsfile
10741        # Look for a target and build machine specific resource!
10742        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
10743        if test "x$resource" = x; then
10744            # Ok, lets instead look for a target specific resource
10745            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
10746        fi
10747        if test "x$resource" = x; then
10748            # Ok, lets instead look for a build specific resource
10749            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
10750        fi
10751        if test "x$resource" = x; then
10752            # Ok, lets instead look for a generic resource
10753            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
10754            resource=${builddep_bootjdk}
10755        fi
10756        if test "x$resource" != x; then
10757            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
10758$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
10759	    # If the resource in the builddeps.conf file is an existing directory,
10760	    # for example /java/linux/cups
10761	    if test -d ${resource}; then
10762	       depdir=${resource}
10763	    else
10764
10765# bootjdk is for example mymodule
10766# $resource is for example libs/general/libmymod_1_2_3.zip
10767# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
10768# $with_builddeps_dir is for example /localhome/builddeps
10769# depdir is the name of the variable into which we store the depdir, eg MYMOD
10770# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
10771# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
10772    filename=`basename $resource`
10773    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
10774    filebase=${filename%%.*}
10775    extension=${filename#*.}
10776    installdir=$with_builddeps_dir/$filebase
10777    if test ! -f $installdir/$filename.unpacked; then
10778        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
10779$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
10780        if test ! -d $installdir; then
10781            mkdir -p $installdir
10782        fi
10783        if test ! -d $installdir; then
10784            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
10785        fi
10786        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
10787        touch $tmpfile
10788        if test ! -f $tmpfile; then
10789            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
10790        fi
10791
10792    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
10793    # $tmpfile is the local file name for the downloaded file.
10794    VALID_TOOL=no
10795    if test "x$BDEPS_FTP" = xwget; then
10796       VALID_TOOL=yes
10797       wget -O $tmpfile $with_builddeps_server/$resource
10798    fi
10799    if test "x$BDEPS_FTP" = xlftp; then
10800       VALID_TOOL=yes
10801       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
10802    fi
10803    if test "x$BDEPS_FTP" = xftp; then
10804        VALID_TOOL=yes
10805        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
10806        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
10807        FTPUSERPWD=${FTPSERVER%%@*}
10808        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
10809            FTPUSER=${userpwd%%:*}
10810            FTPPWD=${userpwd#*@}
10811            FTPSERVER=${FTPSERVER#*@}
10812        else
10813            FTPUSER=ftp
10814            FTPPWD=ftp
10815        fi
10816        # the "pass" command does not work on some
10817        # ftp clients (read ftp.exe) but if it works,
10818        # passive mode is better!
10819        (\
10820            echo "user $FTPUSER $FTPPWD"        ;\
10821            echo "pass"                         ;\
10822            echo "bin"                          ;\
10823            echo "get $FTPPATH $tmpfile"              ;\
10824        ) | ftp -in $FTPSERVER
10825    fi
10826    if test "x$VALID_TOOL" != xyes; then
10827       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
10828    fi
10829
10830        mv $tmpfile $installdir/$filename
10831        if test ! -s $installdir/$filename; then
10832            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
10833        fi
10834        case "$extension" in
10835            zip)  echo "Unzipping $installdir/$filename..."
10836               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
10837            ;;
10838            tar.gz) echo "Untaring $installdir/$filename..."
10839               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10840            ;;
10841            tgz) echo "Untaring $installdir/$filename..."
10842               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10843            ;;
10844            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
10845            ;;
10846        esac
10847    fi
10848    if test -f $installdir/$filename.unpacked; then
10849        depdir=$installdir
10850    fi
10851
10852	    fi
10853            # Source the builddeps file again, because in the previous command, the depdir
10854            # was updated to point at the current build dependency install directory.
10855            . $builddepsfile
10856            # Now extract variables from the builddeps.conf files.
10857            theroot=${builddep_bootjdk_ROOT}
10858            thecflags=${builddep_bootjdk_CFLAGS}
10859            thelibs=${builddep_bootjdk_LIBS}
10860            if test "x$depdir" = x; then
10861                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
10862            fi
10863            BOOT_JDK=$depdir
10864            if test "x$theroot" != x; then
10865               BOOT_JDK="$theroot"
10866            fi
10867            if test "x$thecflags" != x; then
10868               BOOT_JDK_CFLAGS="$thecflags"
10869            fi
10870            if test "x$thelibs" != x; then
10871               BOOT_JDK_LIBS="$thelibs"
10872            fi
10873            BOOT_JDK_FOUND=maybe
10874            else BOOT_JDK_FOUND=no
10875
10876        fi
10877        else BOOT_JDK_FOUND=no
10878
10879    fi
10880
10881
10882
10883    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10884    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10885      # Do we have a bin/java?
10886      if test ! -x "$BOOT_JDK/bin/java"; then
10887        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10888$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10889        BOOT_JDK_FOUND=no
10890      else
10891        # Do we have a bin/javac?
10892        if test ! -x "$BOOT_JDK/bin/javac"; then
10893          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10894$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10895          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10896$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10897          BOOT_JDK_FOUND=no
10898        else
10899          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10900          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10901            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10903            BOOT_JDK_FOUND=no
10904          else
10905            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10906            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10907
10908            # Extra M4 quote needed to protect [] in grep expression.
10909            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10910            if test "x$FOUND_VERSION_78" = x; then
10911              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10913              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10914$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10915              BOOT_JDK_FOUND=no
10916            else
10917              # We're done! :-)
10918              BOOT_JDK_FOUND=yes
10919
10920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10921
10922  # Input might be given as Windows format, start by converting to
10923  # unix format.
10924  path="$BOOT_JDK"
10925  new_path=`$CYGPATH -u "$path"`
10926
10927  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10928  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10929  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10930  # "foo.exe" is OK but "foo" is an error.
10931  #
10932  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10933  # It is also a way to make sure we got the proper file name for the real test later on.
10934  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10935  if test "x$test_shortpath" = x; then
10936    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10937$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10938    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10939  fi
10940
10941  # Call helper function which possibly converts this using DOS-style short mode.
10942  # If so, the updated path is stored in $new_path.
10943
10944  input_path="$new_path"
10945  # Check if we need to convert this using DOS-style short mode. If the path
10946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10947  # take no chances and rewrite it.
10948  # Note: m4 eats our [], so we need to use [ and ] instead.
10949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10950  if test "x$has_forbidden_chars" != x; then
10951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10955      # Going to short mode and back again did indeed matter. Since short mode is
10956      # case insensitive, let's make it lowercase to improve readability.
10957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10958      # Now convert it back to Unix-stile (cygpath)
10959      input_path=`$CYGPATH -u "$shortmode_path"`
10960      new_path="$input_path"
10961    fi
10962  fi
10963
10964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10965  if test "x$test_cygdrive_prefix" = x; then
10966    # As a simple fix, exclude /usr/bin since it's not a real path.
10967    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10969      # a path prefixed by /cygdrive for fixpath to work.
10970      new_path="$CYGWIN_ROOT_PATH$input_path"
10971    fi
10972  fi
10973
10974
10975  if test "x$path" != "x$new_path"; then
10976    BOOT_JDK="$new_path"
10977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10978$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10979  fi
10980
10981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10982
10983  path="$BOOT_JDK"
10984  has_colon=`$ECHO $path | $GREP ^.:`
10985  new_path="$path"
10986  if test "x$has_colon" = x; then
10987    # Not in mixed or Windows style, start by that.
10988    new_path=`cmd //c echo $path`
10989  fi
10990
10991
10992  input_path="$new_path"
10993  # Check if we need to convert this using DOS-style short mode. If the path
10994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10995  # take no chances and rewrite it.
10996  # Note: m4 eats our [], so we need to use [ and ] instead.
10997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10998  if test "x$has_forbidden_chars" != x; then
10999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11001  fi
11002
11003
11004  windows_path="$new_path"
11005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11006    unix_path=`$CYGPATH -u "$windows_path"`
11007    new_path="$unix_path"
11008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11010    new_path="$unix_path"
11011  fi
11012
11013  if test "x$path" != "x$new_path"; then
11014    BOOT_JDK="$new_path"
11015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11016$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11017  fi
11018
11019  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11020  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11021
11022  else
11023    # We're on a posix platform. Hooray! :)
11024    path="$BOOT_JDK"
11025
11026    if test ! -f "$path" && test ! -d "$path"; then
11027      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11028    fi
11029
11030    has_space=`$ECHO "$path" | $GREP " "`
11031    if test "x$has_space" != x; then
11032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11033$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11034      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11035    fi
11036  fi
11037
11038              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11039$as_echo_n "checking for Boot JDK... " >&6; }
11040              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11041$as_echo "$BOOT_JDK" >&6; }
11042              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11043$as_echo_n "checking Boot JDK version... " >&6; }
11044              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11045              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11046$as_echo "$BOOT_JDK_VERSION" >&6; }
11047            fi # end check jdk version
11048          fi # end check rt.jar
11049        fi # end check javac
11050      fi # end check java
11051    fi # end check boot jdk found
11052  fi
11053
11054
11055# Test: Is $JAVA_HOME set?
11056
11057  if test "x$BOOT_JDK_FOUND" = xno; then
11058    # Now execute the test
11059
11060    if test "x$JAVA_HOME" != x; then
11061        JAVA_HOME_PROCESSED="$JAVA_HOME"
11062
11063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11064
11065  # Input might be given as Windows format, start by converting to
11066  # unix format.
11067  path="$JAVA_HOME_PROCESSED"
11068  new_path=`$CYGPATH -u "$path"`
11069
11070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11073  # "foo.exe" is OK but "foo" is an error.
11074  #
11075  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11076  # It is also a way to make sure we got the proper file name for the real test later on.
11077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11078  if test "x$test_shortpath" = x; then
11079    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11080$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11081    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11082  fi
11083
11084  # Call helper function which possibly converts this using DOS-style short mode.
11085  # If so, the updated path is stored in $new_path.
11086
11087  input_path="$new_path"
11088  # Check if we need to convert this using DOS-style short mode. If the path
11089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11090  # take no chances and rewrite it.
11091  # Note: m4 eats our [], so we need to use [ and ] instead.
11092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11093  if test "x$has_forbidden_chars" != x; then
11094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11095    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11096    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11097    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11098      # Going to short mode and back again did indeed matter. Since short mode is
11099      # case insensitive, let's make it lowercase to improve readability.
11100      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11101      # Now convert it back to Unix-stile (cygpath)
11102      input_path=`$CYGPATH -u "$shortmode_path"`
11103      new_path="$input_path"
11104    fi
11105  fi
11106
11107  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11108  if test "x$test_cygdrive_prefix" = x; then
11109    # As a simple fix, exclude /usr/bin since it's not a real path.
11110    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11111      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11112      # a path prefixed by /cygdrive for fixpath to work.
11113      new_path="$CYGWIN_ROOT_PATH$input_path"
11114    fi
11115  fi
11116
11117
11118  if test "x$path" != "x$new_path"; then
11119    JAVA_HOME_PROCESSED="$new_path"
11120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11121$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11122  fi
11123
11124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11125
11126  path="$JAVA_HOME_PROCESSED"
11127  has_colon=`$ECHO $path | $GREP ^.:`
11128  new_path="$path"
11129  if test "x$has_colon" = x; then
11130    # Not in mixed or Windows style, start by that.
11131    new_path=`cmd //c echo $path`
11132  fi
11133
11134
11135  input_path="$new_path"
11136  # Check if we need to convert this using DOS-style short mode. If the path
11137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11138  # take no chances and rewrite it.
11139  # Note: m4 eats our [], so we need to use [ and ] instead.
11140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11141  if test "x$has_forbidden_chars" != x; then
11142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11143    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11144  fi
11145
11146
11147  windows_path="$new_path"
11148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11149    unix_path=`$CYGPATH -u "$windows_path"`
11150    new_path="$unix_path"
11151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11153    new_path="$unix_path"
11154  fi
11155
11156  if test "x$path" != "x$new_path"; then
11157    JAVA_HOME_PROCESSED="$new_path"
11158    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11159$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11160  fi
11161
11162  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11163  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11164
11165  else
11166    # We're on a posix platform. Hooray! :)
11167    path="$JAVA_HOME_PROCESSED"
11168
11169    if test ! -f "$path" && test ! -d "$path"; then
11170      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11171    fi
11172
11173    has_space=`$ECHO "$path" | $GREP " "`
11174    if test "x$has_space" != x; then
11175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11176$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11177      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11178    fi
11179  fi
11180
11181        if test ! -d "$JAVA_HOME_PROCESSED"; then
11182            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11183$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11184        else
11185          # Aha, the user has set a JAVA_HOME
11186          # let us use that as the Boot JDK.
11187          BOOT_JDK="$JAVA_HOME_PROCESSED"
11188          BOOT_JDK_FOUND=maybe
11189          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11190$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11191        fi
11192    fi
11193
11194
11195    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11196    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11197      # Do we have a bin/java?
11198      if test ! -x "$BOOT_JDK/bin/java"; then
11199        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11201        BOOT_JDK_FOUND=no
11202      else
11203        # Do we have a bin/javac?
11204        if test ! -x "$BOOT_JDK/bin/javac"; then
11205          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11207          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11208$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11209          BOOT_JDK_FOUND=no
11210        else
11211          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11212          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11213            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11215            BOOT_JDK_FOUND=no
11216          else
11217            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11218            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11219
11220            # Extra M4 quote needed to protect [] in grep expression.
11221            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11222            if test "x$FOUND_VERSION_78" = x; then
11223              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11225              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11226$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11227              BOOT_JDK_FOUND=no
11228            else
11229              # We're done! :-)
11230              BOOT_JDK_FOUND=yes
11231
11232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11233
11234  # Input might be given as Windows format, start by converting to
11235  # unix format.
11236  path="$BOOT_JDK"
11237  new_path=`$CYGPATH -u "$path"`
11238
11239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11242  # "foo.exe" is OK but "foo" is an error.
11243  #
11244  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11245  # It is also a way to make sure we got the proper file name for the real test later on.
11246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11247  if test "x$test_shortpath" = x; then
11248    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11249$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11250    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11251  fi
11252
11253  # Call helper function which possibly converts this using DOS-style short mode.
11254  # If so, the updated path is stored in $new_path.
11255
11256  input_path="$new_path"
11257  # Check if we need to convert this using DOS-style short mode. If the path
11258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11259  # take no chances and rewrite it.
11260  # Note: m4 eats our [], so we need to use [ and ] instead.
11261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11262  if test "x$has_forbidden_chars" != x; then
11263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11267      # Going to short mode and back again did indeed matter. Since short mode is
11268      # case insensitive, let's make it lowercase to improve readability.
11269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11270      # Now convert it back to Unix-stile (cygpath)
11271      input_path=`$CYGPATH -u "$shortmode_path"`
11272      new_path="$input_path"
11273    fi
11274  fi
11275
11276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11277  if test "x$test_cygdrive_prefix" = x; then
11278    # As a simple fix, exclude /usr/bin since it's not a real path.
11279    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11281      # a path prefixed by /cygdrive for fixpath to work.
11282      new_path="$CYGWIN_ROOT_PATH$input_path"
11283    fi
11284  fi
11285
11286
11287  if test "x$path" != "x$new_path"; then
11288    BOOT_JDK="$new_path"
11289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11290$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11291  fi
11292
11293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11294
11295  path="$BOOT_JDK"
11296  has_colon=`$ECHO $path | $GREP ^.:`
11297  new_path="$path"
11298  if test "x$has_colon" = x; then
11299    # Not in mixed or Windows style, start by that.
11300    new_path=`cmd //c echo $path`
11301  fi
11302
11303
11304  input_path="$new_path"
11305  # Check if we need to convert this using DOS-style short mode. If the path
11306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11307  # take no chances and rewrite it.
11308  # Note: m4 eats our [], so we need to use [ and ] instead.
11309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11310  if test "x$has_forbidden_chars" != x; then
11311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11313  fi
11314
11315
11316  windows_path="$new_path"
11317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11318    unix_path=`$CYGPATH -u "$windows_path"`
11319    new_path="$unix_path"
11320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11322    new_path="$unix_path"
11323  fi
11324
11325  if test "x$path" != "x$new_path"; then
11326    BOOT_JDK="$new_path"
11327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11328$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11329  fi
11330
11331  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11332  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11333
11334  else
11335    # We're on a posix platform. Hooray! :)
11336    path="$BOOT_JDK"
11337
11338    if test ! -f "$path" && test ! -d "$path"; then
11339      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11340    fi
11341
11342    has_space=`$ECHO "$path" | $GREP " "`
11343    if test "x$has_space" != x; then
11344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11345$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11346      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11347    fi
11348  fi
11349
11350              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11351$as_echo_n "checking for Boot JDK... " >&6; }
11352              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11353$as_echo "$BOOT_JDK" >&6; }
11354              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11355$as_echo_n "checking Boot JDK version... " >&6; }
11356              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11357              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11358$as_echo "$BOOT_JDK_VERSION" >&6; }
11359            fi # end check jdk version
11360          fi # end check rt.jar
11361        fi # end check javac
11362      fi # end check java
11363    fi # end check boot jdk found
11364  fi
11365
11366
11367# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11368
11369  if test "x$BOOT_JDK_FOUND" = xno; then
11370    # Now execute the test
11371
11372    if test -x /usr/libexec/java_home; then
11373        BOOT_JDK=`/usr/libexec/java_home`
11374        BOOT_JDK_FOUND=maybe
11375        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11376$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11377    fi
11378
11379
11380    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11381    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11382      # Do we have a bin/java?
11383      if test ! -x "$BOOT_JDK/bin/java"; then
11384        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11385$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11386        BOOT_JDK_FOUND=no
11387      else
11388        # Do we have a bin/javac?
11389        if test ! -x "$BOOT_JDK/bin/javac"; then
11390          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11392          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11393$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11394          BOOT_JDK_FOUND=no
11395        else
11396          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11397          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11398            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11400            BOOT_JDK_FOUND=no
11401          else
11402            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11403            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11404
11405            # Extra M4 quote needed to protect [] in grep expression.
11406            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11407            if test "x$FOUND_VERSION_78" = x; then
11408              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11410              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11411$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11412              BOOT_JDK_FOUND=no
11413            else
11414              # We're done! :-)
11415              BOOT_JDK_FOUND=yes
11416
11417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11418
11419  # Input might be given as Windows format, start by converting to
11420  # unix format.
11421  path="$BOOT_JDK"
11422  new_path=`$CYGPATH -u "$path"`
11423
11424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11427  # "foo.exe" is OK but "foo" is an error.
11428  #
11429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11430  # It is also a way to make sure we got the proper file name for the real test later on.
11431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11432  if test "x$test_shortpath" = x; then
11433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11434$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11435    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11436  fi
11437
11438  # Call helper function which possibly converts this using DOS-style short mode.
11439  # If so, the updated path is stored in $new_path.
11440
11441  input_path="$new_path"
11442  # Check if we need to convert this using DOS-style short mode. If the path
11443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11444  # take no chances and rewrite it.
11445  # Note: m4 eats our [], so we need to use [ and ] instead.
11446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11447  if test "x$has_forbidden_chars" != x; then
11448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11452      # Going to short mode and back again did indeed matter. Since short mode is
11453      # case insensitive, let's make it lowercase to improve readability.
11454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11455      # Now convert it back to Unix-stile (cygpath)
11456      input_path=`$CYGPATH -u "$shortmode_path"`
11457      new_path="$input_path"
11458    fi
11459  fi
11460
11461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11462  if test "x$test_cygdrive_prefix" = x; then
11463    # As a simple fix, exclude /usr/bin since it's not a real path.
11464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11466      # a path prefixed by /cygdrive for fixpath to work.
11467      new_path="$CYGWIN_ROOT_PATH$input_path"
11468    fi
11469  fi
11470
11471
11472  if test "x$path" != "x$new_path"; then
11473    BOOT_JDK="$new_path"
11474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11475$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11476  fi
11477
11478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11479
11480  path="$BOOT_JDK"
11481  has_colon=`$ECHO $path | $GREP ^.:`
11482  new_path="$path"
11483  if test "x$has_colon" = x; then
11484    # Not in mixed or Windows style, start by that.
11485    new_path=`cmd //c echo $path`
11486  fi
11487
11488
11489  input_path="$new_path"
11490  # Check if we need to convert this using DOS-style short mode. If the path
11491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11492  # take no chances and rewrite it.
11493  # Note: m4 eats our [], so we need to use [ and ] instead.
11494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11495  if test "x$has_forbidden_chars" != x; then
11496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11498  fi
11499
11500
11501  windows_path="$new_path"
11502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11503    unix_path=`$CYGPATH -u "$windows_path"`
11504    new_path="$unix_path"
11505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11507    new_path="$unix_path"
11508  fi
11509
11510  if test "x$path" != "x$new_path"; then
11511    BOOT_JDK="$new_path"
11512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11513$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11514  fi
11515
11516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11518
11519  else
11520    # We're on a posix platform. Hooray! :)
11521    path="$BOOT_JDK"
11522
11523    if test ! -f "$path" && test ! -d "$path"; then
11524      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11525    fi
11526
11527    has_space=`$ECHO "$path" | $GREP " "`
11528    if test "x$has_space" != x; then
11529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11530$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11531      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11532    fi
11533  fi
11534
11535              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11536$as_echo_n "checking for Boot JDK... " >&6; }
11537              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11538$as_echo "$BOOT_JDK" >&6; }
11539              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11540$as_echo_n "checking Boot JDK version... " >&6; }
11541              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11542              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11543$as_echo "$BOOT_JDK_VERSION" >&6; }
11544            fi # end check jdk version
11545          fi # end check rt.jar
11546        fi # end check javac
11547      fi # end check java
11548    fi # end check boot jdk found
11549  fi
11550
11551
11552# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11553
11554  if test "x$BOOT_JDK_FOUND" = xno; then
11555    # Now execute the test
11556
11557    # Extract the first word of "javac", so it can be a program name with args.
11558set dummy javac; ac_word=$2
11559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11560$as_echo_n "checking for $ac_word... " >&6; }
11561if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11562  $as_echo_n "(cached) " >&6
11563else
11564  case $JAVAC_CHECK in
11565  [\\/]* | ?:[\\/]*)
11566  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11567  ;;
11568  *)
11569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11570for as_dir in $PATH
11571do
11572  IFS=$as_save_IFS
11573  test -z "$as_dir" && as_dir=.
11574    for ac_exec_ext in '' $ac_executable_extensions; do
11575  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11576    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11578    break 2
11579  fi
11580done
11581  done
11582IFS=$as_save_IFS
11583
11584  ;;
11585esac
11586fi
11587JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11588if test -n "$JAVAC_CHECK"; then
11589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11590$as_echo "$JAVAC_CHECK" >&6; }
11591else
11592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11593$as_echo "no" >&6; }
11594fi
11595
11596
11597    # Extract the first word of "java", so it can be a program name with args.
11598set dummy java; ac_word=$2
11599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11600$as_echo_n "checking for $ac_word... " >&6; }
11601if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11602  $as_echo_n "(cached) " >&6
11603else
11604  case $JAVA_CHECK in
11605  [\\/]* | ?:[\\/]*)
11606  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11607  ;;
11608  *)
11609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11610for as_dir in $PATH
11611do
11612  IFS=$as_save_IFS
11613  test -z "$as_dir" && as_dir=.
11614    for ac_exec_ext in '' $ac_executable_extensions; do
11615  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11616    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11618    break 2
11619  fi
11620done
11621  done
11622IFS=$as_save_IFS
11623
11624  ;;
11625esac
11626fi
11627JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11628if test -n "$JAVA_CHECK"; then
11629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11630$as_echo "$JAVA_CHECK" >&6; }
11631else
11632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11633$as_echo "no" >&6; }
11634fi
11635
11636
11637    BINARY="$JAVAC_CHECK"
11638    if test "x$JAVAC_CHECK" = x; then
11639        BINARY="$JAVA_CHECK"
11640    fi
11641    if test "x$BINARY" != x; then
11642        # So there is a java(c) binary, it might be part of a JDK.
11643        # Lets find the JDK/JRE directory by following symbolic links.
11644        # Linux/GNU systems often have links from /usr/bin/java to
11645        # /etc/alternatives/java to the real JDK binary.
11646
11647    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11648        # Follow a chain of symbolic links. Use readlink
11649        # where it exists, else fall back to horribly
11650        # complicated shell code.
11651        if test "x$READLINK_TESTED" != yes; then
11652            # On MacOSX there is a readlink tool with a different
11653            # purpose than the GNU readlink tool. Check the found readlink.
11654            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
11655            if test "x$ISGNU" = x; then
11656                 # A readlink that we do not know how to use.
11657                 # Are there other non-GNU readlinks out there?
11658                 READLINK_TESTED=yes
11659                 READLINK=
11660            fi
11661        fi
11662
11663        if test "x$READLINK" != x; then
11664            BINARY=`$READLINK -f $BINARY`
11665        else
11666            STARTDIR=$PWD
11667            COUNTER=0
11668            sym_link_dir=`$DIRNAME $BINARY`
11669            sym_link_file=`$BASENAME $BINARY`
11670            while test $COUNTER -lt 20; do
11671                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11672                if test "x$ISLINK" == x; then
11673                    # This is not a symbolic link! We are done!
11674                    break
11675                fi
11676                # The link might be relative! We have to use cd to travel safely.
11677                cd $sym_link_dir
11678                # ... and we must get the to the absolute path, not one using symbolic links.
11679                cd `pwd -P`
11680                cd `$DIRNAME $ISLINK`
11681                sym_link_dir=`$THEPWDCMD`
11682                sym_link_file=`$BASENAME $ISLINK`
11683                let COUNTER=COUNTER+1
11684            done
11685            cd $STARTDIR
11686            BINARY=$sym_link_dir/$sym_link_file
11687        fi
11688    fi
11689
11690        BOOT_JDK=`dirname "$BINARY"`
11691        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11692        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11693            # Looks like we found ourselves an JDK
11694            BOOT_JDK_FOUND=maybe
11695            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
11696$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
11697        fi
11698    fi
11699
11700
11701    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11702    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11703      # Do we have a bin/java?
11704      if test ! -x "$BOOT_JDK/bin/java"; then
11705        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11706$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11707        BOOT_JDK_FOUND=no
11708      else
11709        # Do we have a bin/javac?
11710        if test ! -x "$BOOT_JDK/bin/javac"; then
11711          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11713          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11714$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11715          BOOT_JDK_FOUND=no
11716        else
11717          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11718          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11719            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11721            BOOT_JDK_FOUND=no
11722          else
11723            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11724            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11725
11726            # Extra M4 quote needed to protect [] in grep expression.
11727            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11728            if test "x$FOUND_VERSION_78" = x; then
11729              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11731              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11732$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11733              BOOT_JDK_FOUND=no
11734            else
11735              # We're done! :-)
11736              BOOT_JDK_FOUND=yes
11737
11738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11739
11740  # Input might be given as Windows format, start by converting to
11741  # unix format.
11742  path="$BOOT_JDK"
11743  new_path=`$CYGPATH -u "$path"`
11744
11745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11748  # "foo.exe" is OK but "foo" is an error.
11749  #
11750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11751  # It is also a way to make sure we got the proper file name for the real test later on.
11752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11753  if test "x$test_shortpath" = x; then
11754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11756    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11757  fi
11758
11759  # Call helper function which possibly converts this using DOS-style short mode.
11760  # If so, the updated path is stored in $new_path.
11761
11762  input_path="$new_path"
11763  # Check if we need to convert this using DOS-style short mode. If the path
11764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11765  # take no chances and rewrite it.
11766  # Note: m4 eats our [], so we need to use [ and ] instead.
11767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11768  if test "x$has_forbidden_chars" != x; then
11769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11773      # Going to short mode and back again did indeed matter. Since short mode is
11774      # case insensitive, let's make it lowercase to improve readability.
11775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11776      # Now convert it back to Unix-stile (cygpath)
11777      input_path=`$CYGPATH -u "$shortmode_path"`
11778      new_path="$input_path"
11779    fi
11780  fi
11781
11782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11783  if test "x$test_cygdrive_prefix" = x; then
11784    # As a simple fix, exclude /usr/bin since it's not a real path.
11785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11787      # a path prefixed by /cygdrive for fixpath to work.
11788      new_path="$CYGWIN_ROOT_PATH$input_path"
11789    fi
11790  fi
11791
11792
11793  if test "x$path" != "x$new_path"; then
11794    BOOT_JDK="$new_path"
11795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11797  fi
11798
11799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11800
11801  path="$BOOT_JDK"
11802  has_colon=`$ECHO $path | $GREP ^.:`
11803  new_path="$path"
11804  if test "x$has_colon" = x; then
11805    # Not in mixed or Windows style, start by that.
11806    new_path=`cmd //c echo $path`
11807  fi
11808
11809
11810  input_path="$new_path"
11811  # Check if we need to convert this using DOS-style short mode. If the path
11812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11813  # take no chances and rewrite it.
11814  # Note: m4 eats our [], so we need to use [ and ] instead.
11815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11816  if test "x$has_forbidden_chars" != x; then
11817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11819  fi
11820
11821
11822  windows_path="$new_path"
11823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11824    unix_path=`$CYGPATH -u "$windows_path"`
11825    new_path="$unix_path"
11826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11828    new_path="$unix_path"
11829  fi
11830
11831  if test "x$path" != "x$new_path"; then
11832    BOOT_JDK="$new_path"
11833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11835  fi
11836
11837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11839
11840  else
11841    # We're on a posix platform. Hooray! :)
11842    path="$BOOT_JDK"
11843
11844    if test ! -f "$path" && test ! -d "$path"; then
11845      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11846    fi
11847
11848    has_space=`$ECHO "$path" | $GREP " "`
11849    if test "x$has_space" != x; then
11850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11852      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11853    fi
11854  fi
11855
11856              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11857$as_echo_n "checking for Boot JDK... " >&6; }
11858              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11859$as_echo "$BOOT_JDK" >&6; }
11860              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11861$as_echo_n "checking Boot JDK version... " >&6; }
11862              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11863              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11864$as_echo "$BOOT_JDK_VERSION" >&6; }
11865            fi # end check jdk version
11866          fi # end check rt.jar
11867        fi # end check javac
11868      fi # end check java
11869    fi # end check boot jdk found
11870  fi
11871
11872
11873# Test: Is there a JDK installed in default, well-known locations?
11874
11875  if test "x$BOOT_JDK_FOUND" = xno; then
11876    # Now execute the test
11877
11878  if test "x$OPENJDK_TARGET_OS" = xwindows; then
11879
11880  if test "x$BOOT_JDK_FOUND" = xno; then
11881    # Now execute the test
11882
11883  if test "x$ProgramW6432" != x; then
11884    VIRTUAL_DIR="$ProgramW6432/Java"
11885
11886  windows_path="$VIRTUAL_DIR"
11887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11888    unix_path=`$CYGPATH -u "$windows_path"`
11889    VIRTUAL_DIR="$unix_path"
11890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11892    VIRTUAL_DIR="$unix_path"
11893  fi
11894
11895
11896  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
11897  BOOT_JDK_SUFFIX=""
11898  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
11899  if test "x$ALL_JDKS_FOUND" != x; then
11900    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
11901
11902  if test "x$BOOT_JDK_FOUND" = xno; then
11903    # Now execute the test
11904
11905        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
11906        if test -d "$BOOT_JDK"; then
11907          BOOT_JDK_FOUND=maybe
11908          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
11909$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
11910        fi
11911
11912
11913    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11914    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11915      # Do we have a bin/java?
11916      if test ! -x "$BOOT_JDK/bin/java"; then
11917        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11919        BOOT_JDK_FOUND=no
11920      else
11921        # Do we have a bin/javac?
11922        if test ! -x "$BOOT_JDK/bin/javac"; then
11923          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11924$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11925          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11926$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11927          BOOT_JDK_FOUND=no
11928        else
11929          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11930          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11931            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11932$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11933            BOOT_JDK_FOUND=no
11934          else
11935            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11936            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11937
11938            # Extra M4 quote needed to protect [] in grep expression.
11939            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11940            if test "x$FOUND_VERSION_78" = x; then
11941              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11942$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11943              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11944$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11945              BOOT_JDK_FOUND=no
11946            else
11947              # We're done! :-)
11948              BOOT_JDK_FOUND=yes
11949
11950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11951
11952  # Input might be given as Windows format, start by converting to
11953  # unix format.
11954  path="$BOOT_JDK"
11955  new_path=`$CYGPATH -u "$path"`
11956
11957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11960  # "foo.exe" is OK but "foo" is an error.
11961  #
11962  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11963  # It is also a way to make sure we got the proper file name for the real test later on.
11964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11965  if test "x$test_shortpath" = x; then
11966    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11967$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11968    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11969  fi
11970
11971  # Call helper function which possibly converts this using DOS-style short mode.
11972  # If so, the updated path is stored in $new_path.
11973
11974  input_path="$new_path"
11975  # Check if we need to convert this using DOS-style short mode. If the path
11976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11977  # take no chances and rewrite it.
11978  # Note: m4 eats our [], so we need to use [ and ] instead.
11979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11980  if test "x$has_forbidden_chars" != x; then
11981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11982    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11983    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11984    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11985      # Going to short mode and back again did indeed matter. Since short mode is
11986      # case insensitive, let's make it lowercase to improve readability.
11987      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11988      # Now convert it back to Unix-stile (cygpath)
11989      input_path=`$CYGPATH -u "$shortmode_path"`
11990      new_path="$input_path"
11991    fi
11992  fi
11993
11994  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11995  if test "x$test_cygdrive_prefix" = x; then
11996    # As a simple fix, exclude /usr/bin since it's not a real path.
11997    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11998      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11999      # a path prefixed by /cygdrive for fixpath to work.
12000      new_path="$CYGWIN_ROOT_PATH$input_path"
12001    fi
12002  fi
12003
12004
12005  if test "x$path" != "x$new_path"; then
12006    BOOT_JDK="$new_path"
12007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12008$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12009  fi
12010
12011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12012
12013  path="$BOOT_JDK"
12014  has_colon=`$ECHO $path | $GREP ^.:`
12015  new_path="$path"
12016  if test "x$has_colon" = x; then
12017    # Not in mixed or Windows style, start by that.
12018    new_path=`cmd //c echo $path`
12019  fi
12020
12021
12022  input_path="$new_path"
12023  # Check if we need to convert this using DOS-style short mode. If the path
12024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12025  # take no chances and rewrite it.
12026  # Note: m4 eats our [], so we need to use [ and ] instead.
12027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12028  if test "x$has_forbidden_chars" != x; then
12029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12030    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12031  fi
12032
12033
12034  windows_path="$new_path"
12035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12036    unix_path=`$CYGPATH -u "$windows_path"`
12037    new_path="$unix_path"
12038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12040    new_path="$unix_path"
12041  fi
12042
12043  if test "x$path" != "x$new_path"; then
12044    BOOT_JDK="$new_path"
12045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12046$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12047  fi
12048
12049  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12050  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12051
12052  else
12053    # We're on a posix platform. Hooray! :)
12054    path="$BOOT_JDK"
12055
12056    if test ! -f "$path" && test ! -d "$path"; then
12057      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12058    fi
12059
12060    has_space=`$ECHO "$path" | $GREP " "`
12061    if test "x$has_space" != x; then
12062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12063$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12064      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12065    fi
12066  fi
12067
12068              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12069$as_echo_n "checking for Boot JDK... " >&6; }
12070              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12071$as_echo "$BOOT_JDK" >&6; }
12072              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12073$as_echo_n "checking Boot JDK version... " >&6; }
12074              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12075              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12076$as_echo "$BOOT_JDK_VERSION" >&6; }
12077            fi # end check jdk version
12078          fi # end check rt.jar
12079        fi # end check javac
12080      fi # end check java
12081    fi # end check boot jdk found
12082  fi
12083
12084    done
12085  fi
12086
12087  fi
12088
12089
12090    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12091    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12092      # Do we have a bin/java?
12093      if test ! -x "$BOOT_JDK/bin/java"; then
12094        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12095$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12096        BOOT_JDK_FOUND=no
12097      else
12098        # Do we have a bin/javac?
12099        if test ! -x "$BOOT_JDK/bin/javac"; then
12100          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12102          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12103$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12104          BOOT_JDK_FOUND=no
12105        else
12106          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12107          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12108            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12110            BOOT_JDK_FOUND=no
12111          else
12112            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12113            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12114
12115            # Extra M4 quote needed to protect [] in grep expression.
12116            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12117            if test "x$FOUND_VERSION_78" = x; then
12118              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12120              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12121$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12122              BOOT_JDK_FOUND=no
12123            else
12124              # We're done! :-)
12125              BOOT_JDK_FOUND=yes
12126
12127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12128
12129  # Input might be given as Windows format, start by converting to
12130  # unix format.
12131  path="$BOOT_JDK"
12132  new_path=`$CYGPATH -u "$path"`
12133
12134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12137  # "foo.exe" is OK but "foo" is an error.
12138  #
12139  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12140  # It is also a way to make sure we got the proper file name for the real test later on.
12141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12142  if test "x$test_shortpath" = x; then
12143    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12144$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12145    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12146  fi
12147
12148  # Call helper function which possibly converts this using DOS-style short mode.
12149  # If so, the updated path is stored in $new_path.
12150
12151  input_path="$new_path"
12152  # Check if we need to convert this using DOS-style short mode. If the path
12153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12154  # take no chances and rewrite it.
12155  # Note: m4 eats our [], so we need to use [ and ] instead.
12156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12157  if test "x$has_forbidden_chars" != x; then
12158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12162      # Going to short mode and back again did indeed matter. Since short mode is
12163      # case insensitive, let's make it lowercase to improve readability.
12164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12165      # Now convert it back to Unix-stile (cygpath)
12166      input_path=`$CYGPATH -u "$shortmode_path"`
12167      new_path="$input_path"
12168    fi
12169  fi
12170
12171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12172  if test "x$test_cygdrive_prefix" = x; then
12173    # As a simple fix, exclude /usr/bin since it's not a real path.
12174    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12176      # a path prefixed by /cygdrive for fixpath to work.
12177      new_path="$CYGWIN_ROOT_PATH$input_path"
12178    fi
12179  fi
12180
12181
12182  if test "x$path" != "x$new_path"; then
12183    BOOT_JDK="$new_path"
12184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12185$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12186  fi
12187
12188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12189
12190  path="$BOOT_JDK"
12191  has_colon=`$ECHO $path | $GREP ^.:`
12192  new_path="$path"
12193  if test "x$has_colon" = x; then
12194    # Not in mixed or Windows style, start by that.
12195    new_path=`cmd //c echo $path`
12196  fi
12197
12198
12199  input_path="$new_path"
12200  # Check if we need to convert this using DOS-style short mode. If the path
12201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12202  # take no chances and rewrite it.
12203  # Note: m4 eats our [], so we need to use [ and ] instead.
12204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12205  if test "x$has_forbidden_chars" != x; then
12206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12208  fi
12209
12210
12211  windows_path="$new_path"
12212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12213    unix_path=`$CYGPATH -u "$windows_path"`
12214    new_path="$unix_path"
12215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12217    new_path="$unix_path"
12218  fi
12219
12220  if test "x$path" != "x$new_path"; then
12221    BOOT_JDK="$new_path"
12222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12223$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12224  fi
12225
12226  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12227  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12228
12229  else
12230    # We're on a posix platform. Hooray! :)
12231    path="$BOOT_JDK"
12232
12233    if test ! -f "$path" && test ! -d "$path"; then
12234      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12235    fi
12236
12237    has_space=`$ECHO "$path" | $GREP " "`
12238    if test "x$has_space" != x; then
12239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12240$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12241      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12242    fi
12243  fi
12244
12245              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12246$as_echo_n "checking for Boot JDK... " >&6; }
12247              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12248$as_echo "$BOOT_JDK" >&6; }
12249              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12250$as_echo_n "checking Boot JDK version... " >&6; }
12251              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12252              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12253$as_echo "$BOOT_JDK_VERSION" >&6; }
12254            fi # end check jdk version
12255          fi # end check rt.jar
12256        fi # end check javac
12257      fi # end check java
12258    fi # end check boot jdk found
12259  fi
12260
12261
12262  if test "x$BOOT_JDK_FOUND" = xno; then
12263    # Now execute the test
12264
12265  if test "x$PROGRAMW6432" != x; then
12266    VIRTUAL_DIR="$PROGRAMW6432/Java"
12267
12268  windows_path="$VIRTUAL_DIR"
12269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12270    unix_path=`$CYGPATH -u "$windows_path"`
12271    VIRTUAL_DIR="$unix_path"
12272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12274    VIRTUAL_DIR="$unix_path"
12275  fi
12276
12277
12278  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12279  BOOT_JDK_SUFFIX=""
12280  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12281  if test "x$ALL_JDKS_FOUND" != x; then
12282    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12283
12284  if test "x$BOOT_JDK_FOUND" = xno; then
12285    # Now execute the test
12286
12287        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12288        if test -d "$BOOT_JDK"; then
12289          BOOT_JDK_FOUND=maybe
12290          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12291$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12292        fi
12293
12294
12295    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12296    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12297      # Do we have a bin/java?
12298      if test ! -x "$BOOT_JDK/bin/java"; then
12299        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12300$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12301        BOOT_JDK_FOUND=no
12302      else
12303        # Do we have a bin/javac?
12304        if test ! -x "$BOOT_JDK/bin/javac"; then
12305          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12306$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12307          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12308$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12309          BOOT_JDK_FOUND=no
12310        else
12311          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12312          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12313            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12315            BOOT_JDK_FOUND=no
12316          else
12317            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12318            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12319
12320            # Extra M4 quote needed to protect [] in grep expression.
12321            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12322            if test "x$FOUND_VERSION_78" = x; then
12323              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12325              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12326$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12327              BOOT_JDK_FOUND=no
12328            else
12329              # We're done! :-)
12330              BOOT_JDK_FOUND=yes
12331
12332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12333
12334  # Input might be given as Windows format, start by converting to
12335  # unix format.
12336  path="$BOOT_JDK"
12337  new_path=`$CYGPATH -u "$path"`
12338
12339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12342  # "foo.exe" is OK but "foo" is an error.
12343  #
12344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12345  # It is also a way to make sure we got the proper file name for the real test later on.
12346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12347  if test "x$test_shortpath" = x; then
12348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12349$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12350    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12351  fi
12352
12353  # Call helper function which possibly converts this using DOS-style short mode.
12354  # If so, the updated path is stored in $new_path.
12355
12356  input_path="$new_path"
12357  # Check if we need to convert this using DOS-style short mode. If the path
12358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12359  # take no chances and rewrite it.
12360  # Note: m4 eats our [], so we need to use [ and ] instead.
12361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12362  if test "x$has_forbidden_chars" != x; then
12363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12367      # Going to short mode and back again did indeed matter. Since short mode is
12368      # case insensitive, let's make it lowercase to improve readability.
12369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12370      # Now convert it back to Unix-stile (cygpath)
12371      input_path=`$CYGPATH -u "$shortmode_path"`
12372      new_path="$input_path"
12373    fi
12374  fi
12375
12376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12377  if test "x$test_cygdrive_prefix" = x; then
12378    # As a simple fix, exclude /usr/bin since it's not a real path.
12379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12381      # a path prefixed by /cygdrive for fixpath to work.
12382      new_path="$CYGWIN_ROOT_PATH$input_path"
12383    fi
12384  fi
12385
12386
12387  if test "x$path" != "x$new_path"; then
12388    BOOT_JDK="$new_path"
12389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12390$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12391  fi
12392
12393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12394
12395  path="$BOOT_JDK"
12396  has_colon=`$ECHO $path | $GREP ^.:`
12397  new_path="$path"
12398  if test "x$has_colon" = x; then
12399    # Not in mixed or Windows style, start by that.
12400    new_path=`cmd //c echo $path`
12401  fi
12402
12403
12404  input_path="$new_path"
12405  # Check if we need to convert this using DOS-style short mode. If the path
12406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12407  # take no chances and rewrite it.
12408  # Note: m4 eats our [], so we need to use [ and ] instead.
12409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12410  if test "x$has_forbidden_chars" != x; then
12411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12413  fi
12414
12415
12416  windows_path="$new_path"
12417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12418    unix_path=`$CYGPATH -u "$windows_path"`
12419    new_path="$unix_path"
12420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12422    new_path="$unix_path"
12423  fi
12424
12425  if test "x$path" != "x$new_path"; then
12426    BOOT_JDK="$new_path"
12427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12428$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12429  fi
12430
12431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12433
12434  else
12435    # We're on a posix platform. Hooray! :)
12436    path="$BOOT_JDK"
12437
12438    if test ! -f "$path" && test ! -d "$path"; then
12439      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12440    fi
12441
12442    has_space=`$ECHO "$path" | $GREP " "`
12443    if test "x$has_space" != x; then
12444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12445$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12446      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12447    fi
12448  fi
12449
12450              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12451$as_echo_n "checking for Boot JDK... " >&6; }
12452              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12453$as_echo "$BOOT_JDK" >&6; }
12454              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12455$as_echo_n "checking Boot JDK version... " >&6; }
12456              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12457              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12458$as_echo "$BOOT_JDK_VERSION" >&6; }
12459            fi # end check jdk version
12460          fi # end check rt.jar
12461        fi # end check javac
12462      fi # end check java
12463    fi # end check boot jdk found
12464  fi
12465
12466    done
12467  fi
12468
12469  fi
12470
12471
12472    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12473    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12474      # Do we have a bin/java?
12475      if test ! -x "$BOOT_JDK/bin/java"; then
12476        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12477$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12478        BOOT_JDK_FOUND=no
12479      else
12480        # Do we have a bin/javac?
12481        if test ! -x "$BOOT_JDK/bin/javac"; then
12482          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12483$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12484          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12485$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12486          BOOT_JDK_FOUND=no
12487        else
12488          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12489          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12490            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12492            BOOT_JDK_FOUND=no
12493          else
12494            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12495            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12496
12497            # Extra M4 quote needed to protect [] in grep expression.
12498            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12499            if test "x$FOUND_VERSION_78" = x; then
12500              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12502              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12503$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12504              BOOT_JDK_FOUND=no
12505            else
12506              # We're done! :-)
12507              BOOT_JDK_FOUND=yes
12508
12509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12510
12511  # Input might be given as Windows format, start by converting to
12512  # unix format.
12513  path="$BOOT_JDK"
12514  new_path=`$CYGPATH -u "$path"`
12515
12516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12519  # "foo.exe" is OK but "foo" is an error.
12520  #
12521  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12522  # It is also a way to make sure we got the proper file name for the real test later on.
12523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12524  if test "x$test_shortpath" = x; then
12525    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12526$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12527    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12528  fi
12529
12530  # Call helper function which possibly converts this using DOS-style short mode.
12531  # If so, the updated path is stored in $new_path.
12532
12533  input_path="$new_path"
12534  # Check if we need to convert this using DOS-style short mode. If the path
12535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12536  # take no chances and rewrite it.
12537  # Note: m4 eats our [], so we need to use [ and ] instead.
12538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12539  if test "x$has_forbidden_chars" != x; then
12540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12544      # Going to short mode and back again did indeed matter. Since short mode is
12545      # case insensitive, let's make it lowercase to improve readability.
12546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12547      # Now convert it back to Unix-stile (cygpath)
12548      input_path=`$CYGPATH -u "$shortmode_path"`
12549      new_path="$input_path"
12550    fi
12551  fi
12552
12553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12554  if test "x$test_cygdrive_prefix" = x; then
12555    # As a simple fix, exclude /usr/bin since it's not a real path.
12556    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12558      # a path prefixed by /cygdrive for fixpath to work.
12559      new_path="$CYGWIN_ROOT_PATH$input_path"
12560    fi
12561  fi
12562
12563
12564  if test "x$path" != "x$new_path"; then
12565    BOOT_JDK="$new_path"
12566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12567$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12568  fi
12569
12570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12571
12572  path="$BOOT_JDK"
12573  has_colon=`$ECHO $path | $GREP ^.:`
12574  new_path="$path"
12575  if test "x$has_colon" = x; then
12576    # Not in mixed or Windows style, start by that.
12577    new_path=`cmd //c echo $path`
12578  fi
12579
12580
12581  input_path="$new_path"
12582  # Check if we need to convert this using DOS-style short mode. If the path
12583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12584  # take no chances and rewrite it.
12585  # Note: m4 eats our [], so we need to use [ and ] instead.
12586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12587  if test "x$has_forbidden_chars" != x; then
12588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12590  fi
12591
12592
12593  windows_path="$new_path"
12594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12595    unix_path=`$CYGPATH -u "$windows_path"`
12596    new_path="$unix_path"
12597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12599    new_path="$unix_path"
12600  fi
12601
12602  if test "x$path" != "x$new_path"; then
12603    BOOT_JDK="$new_path"
12604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12605$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12606  fi
12607
12608  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12609  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12610
12611  else
12612    # We're on a posix platform. Hooray! :)
12613    path="$BOOT_JDK"
12614
12615    if test ! -f "$path" && test ! -d "$path"; then
12616      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12617    fi
12618
12619    has_space=`$ECHO "$path" | $GREP " "`
12620    if test "x$has_space" != x; then
12621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12622$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12623      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12624    fi
12625  fi
12626
12627              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12628$as_echo_n "checking for Boot JDK... " >&6; }
12629              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12630$as_echo "$BOOT_JDK" >&6; }
12631              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12632$as_echo_n "checking Boot JDK version... " >&6; }
12633              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12634              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12635$as_echo "$BOOT_JDK_VERSION" >&6; }
12636            fi # end check jdk version
12637          fi # end check rt.jar
12638        fi # end check javac
12639      fi # end check java
12640    fi # end check boot jdk found
12641  fi
12642
12643
12644  if test "x$BOOT_JDK_FOUND" = xno; then
12645    # Now execute the test
12646
12647  if test "x$PROGRAMFILES" != x; then
12648    VIRTUAL_DIR="$PROGRAMFILES/Java"
12649
12650  windows_path="$VIRTUAL_DIR"
12651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12652    unix_path=`$CYGPATH -u "$windows_path"`
12653    VIRTUAL_DIR="$unix_path"
12654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12656    VIRTUAL_DIR="$unix_path"
12657  fi
12658
12659
12660  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12661  BOOT_JDK_SUFFIX=""
12662  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12663  if test "x$ALL_JDKS_FOUND" != x; then
12664    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12665
12666  if test "x$BOOT_JDK_FOUND" = xno; then
12667    # Now execute the test
12668
12669        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12670        if test -d "$BOOT_JDK"; then
12671          BOOT_JDK_FOUND=maybe
12672          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12673$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12674        fi
12675
12676
12677    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12678    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12679      # Do we have a bin/java?
12680      if test ! -x "$BOOT_JDK/bin/java"; then
12681        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12683        BOOT_JDK_FOUND=no
12684      else
12685        # Do we have a bin/javac?
12686        if test ! -x "$BOOT_JDK/bin/javac"; then
12687          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12689          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12690$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12691          BOOT_JDK_FOUND=no
12692        else
12693          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12694          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12695            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12696$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12697            BOOT_JDK_FOUND=no
12698          else
12699            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12700            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12701
12702            # Extra M4 quote needed to protect [] in grep expression.
12703            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12704            if test "x$FOUND_VERSION_78" = x; then
12705              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12706$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12707              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12708$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12709              BOOT_JDK_FOUND=no
12710            else
12711              # We're done! :-)
12712              BOOT_JDK_FOUND=yes
12713
12714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12715
12716  # Input might be given as Windows format, start by converting to
12717  # unix format.
12718  path="$BOOT_JDK"
12719  new_path=`$CYGPATH -u "$path"`
12720
12721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12724  # "foo.exe" is OK but "foo" is an error.
12725  #
12726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12727  # It is also a way to make sure we got the proper file name for the real test later on.
12728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12729  if test "x$test_shortpath" = x; then
12730    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12731$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12732    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12733  fi
12734
12735  # Call helper function which possibly converts this using DOS-style short mode.
12736  # If so, the updated path is stored in $new_path.
12737
12738  input_path="$new_path"
12739  # Check if we need to convert this using DOS-style short mode. If the path
12740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12741  # take no chances and rewrite it.
12742  # Note: m4 eats our [], so we need to use [ and ] instead.
12743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12744  if test "x$has_forbidden_chars" != x; then
12745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12749      # Going to short mode and back again did indeed matter. Since short mode is
12750      # case insensitive, let's make it lowercase to improve readability.
12751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12752      # Now convert it back to Unix-stile (cygpath)
12753      input_path=`$CYGPATH -u "$shortmode_path"`
12754      new_path="$input_path"
12755    fi
12756  fi
12757
12758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12759  if test "x$test_cygdrive_prefix" = x; then
12760    # As a simple fix, exclude /usr/bin since it's not a real path.
12761    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12763      # a path prefixed by /cygdrive for fixpath to work.
12764      new_path="$CYGWIN_ROOT_PATH$input_path"
12765    fi
12766  fi
12767
12768
12769  if test "x$path" != "x$new_path"; then
12770    BOOT_JDK="$new_path"
12771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12772$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12773  fi
12774
12775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12776
12777  path="$BOOT_JDK"
12778  has_colon=`$ECHO $path | $GREP ^.:`
12779  new_path="$path"
12780  if test "x$has_colon" = x; then
12781    # Not in mixed or Windows style, start by that.
12782    new_path=`cmd //c echo $path`
12783  fi
12784
12785
12786  input_path="$new_path"
12787  # Check if we need to convert this using DOS-style short mode. If the path
12788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12789  # take no chances and rewrite it.
12790  # Note: m4 eats our [], so we need to use [ and ] instead.
12791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12792  if test "x$has_forbidden_chars" != x; then
12793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12795  fi
12796
12797
12798  windows_path="$new_path"
12799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12800    unix_path=`$CYGPATH -u "$windows_path"`
12801    new_path="$unix_path"
12802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12804    new_path="$unix_path"
12805  fi
12806
12807  if test "x$path" != "x$new_path"; then
12808    BOOT_JDK="$new_path"
12809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12811  fi
12812
12813  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12814  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12815
12816  else
12817    # We're on a posix platform. Hooray! :)
12818    path="$BOOT_JDK"
12819
12820    if test ! -f "$path" && test ! -d "$path"; then
12821      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12822    fi
12823
12824    has_space=`$ECHO "$path" | $GREP " "`
12825    if test "x$has_space" != x; then
12826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12827$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12828      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12829    fi
12830  fi
12831
12832              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12833$as_echo_n "checking for Boot JDK... " >&6; }
12834              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12835$as_echo "$BOOT_JDK" >&6; }
12836              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12837$as_echo_n "checking Boot JDK version... " >&6; }
12838              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12839              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12840$as_echo "$BOOT_JDK_VERSION" >&6; }
12841            fi # end check jdk version
12842          fi # end check rt.jar
12843        fi # end check javac
12844      fi # end check java
12845    fi # end check boot jdk found
12846  fi
12847
12848    done
12849  fi
12850
12851  fi
12852
12853
12854    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12855    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12856      # Do we have a bin/java?
12857      if test ! -x "$BOOT_JDK/bin/java"; then
12858        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12859$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12860        BOOT_JDK_FOUND=no
12861      else
12862        # Do we have a bin/javac?
12863        if test ! -x "$BOOT_JDK/bin/javac"; then
12864          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12865$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12866          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12867$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12868          BOOT_JDK_FOUND=no
12869        else
12870          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12871          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12872            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12874            BOOT_JDK_FOUND=no
12875          else
12876            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12877            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12878
12879            # Extra M4 quote needed to protect [] in grep expression.
12880            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12881            if test "x$FOUND_VERSION_78" = x; then
12882              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12884              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12885$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12886              BOOT_JDK_FOUND=no
12887            else
12888              # We're done! :-)
12889              BOOT_JDK_FOUND=yes
12890
12891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12892
12893  # Input might be given as Windows format, start by converting to
12894  # unix format.
12895  path="$BOOT_JDK"
12896  new_path=`$CYGPATH -u "$path"`
12897
12898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12901  # "foo.exe" is OK but "foo" is an error.
12902  #
12903  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12904  # It is also a way to make sure we got the proper file name for the real test later on.
12905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12906  if test "x$test_shortpath" = x; then
12907    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12908$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12909    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12910  fi
12911
12912  # Call helper function which possibly converts this using DOS-style short mode.
12913  # If so, the updated path is stored in $new_path.
12914
12915  input_path="$new_path"
12916  # Check if we need to convert this using DOS-style short mode. If the path
12917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12918  # take no chances and rewrite it.
12919  # Note: m4 eats our [], so we need to use [ and ] instead.
12920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12921  if test "x$has_forbidden_chars" != x; then
12922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12926      # Going to short mode and back again did indeed matter. Since short mode is
12927      # case insensitive, let's make it lowercase to improve readability.
12928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12929      # Now convert it back to Unix-stile (cygpath)
12930      input_path=`$CYGPATH -u "$shortmode_path"`
12931      new_path="$input_path"
12932    fi
12933  fi
12934
12935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12936  if test "x$test_cygdrive_prefix" = x; then
12937    # As a simple fix, exclude /usr/bin since it's not a real path.
12938    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12940      # a path prefixed by /cygdrive for fixpath to work.
12941      new_path="$CYGWIN_ROOT_PATH$input_path"
12942    fi
12943  fi
12944
12945
12946  if test "x$path" != "x$new_path"; then
12947    BOOT_JDK="$new_path"
12948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12949$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12950  fi
12951
12952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12953
12954  path="$BOOT_JDK"
12955  has_colon=`$ECHO $path | $GREP ^.:`
12956  new_path="$path"
12957  if test "x$has_colon" = x; then
12958    # Not in mixed or Windows style, start by that.
12959    new_path=`cmd //c echo $path`
12960  fi
12961
12962
12963  input_path="$new_path"
12964  # Check if we need to convert this using DOS-style short mode. If the path
12965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12966  # take no chances and rewrite it.
12967  # Note: m4 eats our [], so we need to use [ and ] instead.
12968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12969  if test "x$has_forbidden_chars" != x; then
12970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12971    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12972  fi
12973
12974
12975  windows_path="$new_path"
12976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12977    unix_path=`$CYGPATH -u "$windows_path"`
12978    new_path="$unix_path"
12979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12981    new_path="$unix_path"
12982  fi
12983
12984  if test "x$path" != "x$new_path"; then
12985    BOOT_JDK="$new_path"
12986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12987$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12988  fi
12989
12990  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12991  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12992
12993  else
12994    # We're on a posix platform. Hooray! :)
12995    path="$BOOT_JDK"
12996
12997    if test ! -f "$path" && test ! -d "$path"; then
12998      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12999    fi
13000
13001    has_space=`$ECHO "$path" | $GREP " "`
13002    if test "x$has_space" != x; then
13003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13004$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13005      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13006    fi
13007  fi
13008
13009              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13010$as_echo_n "checking for Boot JDK... " >&6; }
13011              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13012$as_echo "$BOOT_JDK" >&6; }
13013              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13014$as_echo_n "checking Boot JDK version... " >&6; }
13015              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13016              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13017$as_echo "$BOOT_JDK_VERSION" >&6; }
13018            fi # end check jdk version
13019          fi # end check rt.jar
13020        fi # end check javac
13021      fi # end check java
13022    fi # end check boot jdk found
13023  fi
13024
13025
13026  if test "x$BOOT_JDK_FOUND" = xno; then
13027    # Now execute the test
13028
13029  if test "x$ProgramFiles" != x; then
13030    VIRTUAL_DIR="$ProgramFiles/Java"
13031
13032  windows_path="$VIRTUAL_DIR"
13033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13034    unix_path=`$CYGPATH -u "$windows_path"`
13035    VIRTUAL_DIR="$unix_path"
13036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13038    VIRTUAL_DIR="$unix_path"
13039  fi
13040
13041
13042  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13043  BOOT_JDK_SUFFIX=""
13044  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13045  if test "x$ALL_JDKS_FOUND" != x; then
13046    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13047
13048  if test "x$BOOT_JDK_FOUND" = xno; then
13049    # Now execute the test
13050
13051        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13052        if test -d "$BOOT_JDK"; then
13053          BOOT_JDK_FOUND=maybe
13054          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13055$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13056        fi
13057
13058
13059    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13060    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13061      # Do we have a bin/java?
13062      if test ! -x "$BOOT_JDK/bin/java"; then
13063        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13064$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13065        BOOT_JDK_FOUND=no
13066      else
13067        # Do we have a bin/javac?
13068        if test ! -x "$BOOT_JDK/bin/javac"; then
13069          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13071          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13072$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13073          BOOT_JDK_FOUND=no
13074        else
13075          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13076          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13077            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13079            BOOT_JDK_FOUND=no
13080          else
13081            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13082            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13083
13084            # Extra M4 quote needed to protect [] in grep expression.
13085            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13086            if test "x$FOUND_VERSION_78" = x; then
13087              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13088$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13089              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13090$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13091              BOOT_JDK_FOUND=no
13092            else
13093              # We're done! :-)
13094              BOOT_JDK_FOUND=yes
13095
13096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13097
13098  # Input might be given as Windows format, start by converting to
13099  # unix format.
13100  path="$BOOT_JDK"
13101  new_path=`$CYGPATH -u "$path"`
13102
13103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13106  # "foo.exe" is OK but "foo" is an error.
13107  #
13108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13109  # It is also a way to make sure we got the proper file name for the real test later on.
13110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13111  if test "x$test_shortpath" = x; then
13112    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13113$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13114    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13115  fi
13116
13117  # Call helper function which possibly converts this using DOS-style short mode.
13118  # If so, the updated path is stored in $new_path.
13119
13120  input_path="$new_path"
13121  # Check if we need to convert this using DOS-style short mode. If the path
13122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13123  # take no chances and rewrite it.
13124  # Note: m4 eats our [], so we need to use [ and ] instead.
13125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13126  if test "x$has_forbidden_chars" != x; then
13127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13131      # Going to short mode and back again did indeed matter. Since short mode is
13132      # case insensitive, let's make it lowercase to improve readability.
13133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13134      # Now convert it back to Unix-stile (cygpath)
13135      input_path=`$CYGPATH -u "$shortmode_path"`
13136      new_path="$input_path"
13137    fi
13138  fi
13139
13140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13141  if test "x$test_cygdrive_prefix" = x; then
13142    # As a simple fix, exclude /usr/bin since it's not a real path.
13143    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13145      # a path prefixed by /cygdrive for fixpath to work.
13146      new_path="$CYGWIN_ROOT_PATH$input_path"
13147    fi
13148  fi
13149
13150
13151  if test "x$path" != "x$new_path"; then
13152    BOOT_JDK="$new_path"
13153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13154$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13155  fi
13156
13157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13158
13159  path="$BOOT_JDK"
13160  has_colon=`$ECHO $path | $GREP ^.:`
13161  new_path="$path"
13162  if test "x$has_colon" = x; then
13163    # Not in mixed or Windows style, start by that.
13164    new_path=`cmd //c echo $path`
13165  fi
13166
13167
13168  input_path="$new_path"
13169  # Check if we need to convert this using DOS-style short mode. If the path
13170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13171  # take no chances and rewrite it.
13172  # Note: m4 eats our [], so we need to use [ and ] instead.
13173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13174  if test "x$has_forbidden_chars" != x; then
13175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13177  fi
13178
13179
13180  windows_path="$new_path"
13181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13182    unix_path=`$CYGPATH -u "$windows_path"`
13183    new_path="$unix_path"
13184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13186    new_path="$unix_path"
13187  fi
13188
13189  if test "x$path" != "x$new_path"; then
13190    BOOT_JDK="$new_path"
13191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13192$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13193  fi
13194
13195  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13196  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13197
13198  else
13199    # We're on a posix platform. Hooray! :)
13200    path="$BOOT_JDK"
13201
13202    if test ! -f "$path" && test ! -d "$path"; then
13203      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13204    fi
13205
13206    has_space=`$ECHO "$path" | $GREP " "`
13207    if test "x$has_space" != x; then
13208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13209$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13210      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13211    fi
13212  fi
13213
13214              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13215$as_echo_n "checking for Boot JDK... " >&6; }
13216              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13217$as_echo "$BOOT_JDK" >&6; }
13218              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13219$as_echo_n "checking Boot JDK version... " >&6; }
13220              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13221              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13222$as_echo "$BOOT_JDK_VERSION" >&6; }
13223            fi # end check jdk version
13224          fi # end check rt.jar
13225        fi # end check javac
13226      fi # end check java
13227    fi # end check boot jdk found
13228  fi
13229
13230    done
13231  fi
13232
13233  fi
13234
13235
13236    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13237    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13238      # Do we have a bin/java?
13239      if test ! -x "$BOOT_JDK/bin/java"; then
13240        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13241$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13242        BOOT_JDK_FOUND=no
13243      else
13244        # Do we have a bin/javac?
13245        if test ! -x "$BOOT_JDK/bin/javac"; then
13246          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13248          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13249$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13250          BOOT_JDK_FOUND=no
13251        else
13252          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13253          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13254            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13256            BOOT_JDK_FOUND=no
13257          else
13258            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13259            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13260
13261            # Extra M4 quote needed to protect [] in grep expression.
13262            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13263            if test "x$FOUND_VERSION_78" = x; then
13264              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13266              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13267$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13268              BOOT_JDK_FOUND=no
13269            else
13270              # We're done! :-)
13271              BOOT_JDK_FOUND=yes
13272
13273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13274
13275  # Input might be given as Windows format, start by converting to
13276  # unix format.
13277  path="$BOOT_JDK"
13278  new_path=`$CYGPATH -u "$path"`
13279
13280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13283  # "foo.exe" is OK but "foo" is an error.
13284  #
13285  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13286  # It is also a way to make sure we got the proper file name for the real test later on.
13287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13288  if test "x$test_shortpath" = x; then
13289    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13290$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13291    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13292  fi
13293
13294  # Call helper function which possibly converts this using DOS-style short mode.
13295  # If so, the updated path is stored in $new_path.
13296
13297  input_path="$new_path"
13298  # Check if we need to convert this using DOS-style short mode. If the path
13299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13300  # take no chances and rewrite it.
13301  # Note: m4 eats our [], so we need to use [ and ] instead.
13302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13303  if test "x$has_forbidden_chars" != x; then
13304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13308      # Going to short mode and back again did indeed matter. Since short mode is
13309      # case insensitive, let's make it lowercase to improve readability.
13310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13311      # Now convert it back to Unix-stile (cygpath)
13312      input_path=`$CYGPATH -u "$shortmode_path"`
13313      new_path="$input_path"
13314    fi
13315  fi
13316
13317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13318  if test "x$test_cygdrive_prefix" = x; then
13319    # As a simple fix, exclude /usr/bin since it's not a real path.
13320    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13322      # a path prefixed by /cygdrive for fixpath to work.
13323      new_path="$CYGWIN_ROOT_PATH$input_path"
13324    fi
13325  fi
13326
13327
13328  if test "x$path" != "x$new_path"; then
13329    BOOT_JDK="$new_path"
13330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13331$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13332  fi
13333
13334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13335
13336  path="$BOOT_JDK"
13337  has_colon=`$ECHO $path | $GREP ^.:`
13338  new_path="$path"
13339  if test "x$has_colon" = x; then
13340    # Not in mixed or Windows style, start by that.
13341    new_path=`cmd //c echo $path`
13342  fi
13343
13344
13345  input_path="$new_path"
13346  # Check if we need to convert this using DOS-style short mode. If the path
13347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13348  # take no chances and rewrite it.
13349  # Note: m4 eats our [], so we need to use [ and ] instead.
13350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13351  if test "x$has_forbidden_chars" != x; then
13352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13354  fi
13355
13356
13357  windows_path="$new_path"
13358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13359    unix_path=`$CYGPATH -u "$windows_path"`
13360    new_path="$unix_path"
13361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13363    new_path="$unix_path"
13364  fi
13365
13366  if test "x$path" != "x$new_path"; then
13367    BOOT_JDK="$new_path"
13368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13369$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13370  fi
13371
13372  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13373  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13374
13375  else
13376    # We're on a posix platform. Hooray! :)
13377    path="$BOOT_JDK"
13378
13379    if test ! -f "$path" && test ! -d "$path"; then
13380      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13381    fi
13382
13383    has_space=`$ECHO "$path" | $GREP " "`
13384    if test "x$has_space" != x; then
13385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13386$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13387      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13388    fi
13389  fi
13390
13391              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13392$as_echo_n "checking for Boot JDK... " >&6; }
13393              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13394$as_echo "$BOOT_JDK" >&6; }
13395              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13396$as_echo_n "checking Boot JDK version... " >&6; }
13397              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13398              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13399$as_echo "$BOOT_JDK_VERSION" >&6; }
13400            fi # end check jdk version
13401          fi # end check rt.jar
13402        fi # end check javac
13403      fi # end check java
13404    fi # end check boot jdk found
13405  fi
13406
13407
13408  if test "x$BOOT_JDK_FOUND" = xno; then
13409    # Now execute the test
13410
13411  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13412  BOOT_JDK_SUFFIX=""
13413  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13414  if test "x$ALL_JDKS_FOUND" != x; then
13415    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13416
13417  if test "x$BOOT_JDK_FOUND" = xno; then
13418    # Now execute the test
13419
13420        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13421        if test -d "$BOOT_JDK"; then
13422          BOOT_JDK_FOUND=maybe
13423          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13424$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13425        fi
13426
13427
13428    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13429    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13430      # Do we have a bin/java?
13431      if test ! -x "$BOOT_JDK/bin/java"; then
13432        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13434        BOOT_JDK_FOUND=no
13435      else
13436        # Do we have a bin/javac?
13437        if test ! -x "$BOOT_JDK/bin/javac"; then
13438          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13439$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13440          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13441$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13442          BOOT_JDK_FOUND=no
13443        else
13444          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13445          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13446            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13448            BOOT_JDK_FOUND=no
13449          else
13450            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13451            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13452
13453            # Extra M4 quote needed to protect [] in grep expression.
13454            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13455            if test "x$FOUND_VERSION_78" = x; then
13456              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13458              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13459$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13460              BOOT_JDK_FOUND=no
13461            else
13462              # We're done! :-)
13463              BOOT_JDK_FOUND=yes
13464
13465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13466
13467  # Input might be given as Windows format, start by converting to
13468  # unix format.
13469  path="$BOOT_JDK"
13470  new_path=`$CYGPATH -u "$path"`
13471
13472  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13473  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13474  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13475  # "foo.exe" is OK but "foo" is an error.
13476  #
13477  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13478  # It is also a way to make sure we got the proper file name for the real test later on.
13479  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13480  if test "x$test_shortpath" = x; then
13481    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13482$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13483    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13484  fi
13485
13486  # Call helper function which possibly converts this using DOS-style short mode.
13487  # If so, the updated path is stored in $new_path.
13488
13489  input_path="$new_path"
13490  # Check if we need to convert this using DOS-style short mode. If the path
13491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13492  # take no chances and rewrite it.
13493  # Note: m4 eats our [], so we need to use [ and ] instead.
13494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13495  if test "x$has_forbidden_chars" != x; then
13496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13497    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13498    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13499    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13500      # Going to short mode and back again did indeed matter. Since short mode is
13501      # case insensitive, let's make it lowercase to improve readability.
13502      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13503      # Now convert it back to Unix-stile (cygpath)
13504      input_path=`$CYGPATH -u "$shortmode_path"`
13505      new_path="$input_path"
13506    fi
13507  fi
13508
13509  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13510  if test "x$test_cygdrive_prefix" = x; then
13511    # As a simple fix, exclude /usr/bin since it's not a real path.
13512    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13513      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13514      # a path prefixed by /cygdrive for fixpath to work.
13515      new_path="$CYGWIN_ROOT_PATH$input_path"
13516    fi
13517  fi
13518
13519
13520  if test "x$path" != "x$new_path"; then
13521    BOOT_JDK="$new_path"
13522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13523$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13524  fi
13525
13526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13527
13528  path="$BOOT_JDK"
13529  has_colon=`$ECHO $path | $GREP ^.:`
13530  new_path="$path"
13531  if test "x$has_colon" = x; then
13532    # Not in mixed or Windows style, start by that.
13533    new_path=`cmd //c echo $path`
13534  fi
13535
13536
13537  input_path="$new_path"
13538  # Check if we need to convert this using DOS-style short mode. If the path
13539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13540  # take no chances and rewrite it.
13541  # Note: m4 eats our [], so we need to use [ and ] instead.
13542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13543  if test "x$has_forbidden_chars" != x; then
13544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13546  fi
13547
13548
13549  windows_path="$new_path"
13550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13551    unix_path=`$CYGPATH -u "$windows_path"`
13552    new_path="$unix_path"
13553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13555    new_path="$unix_path"
13556  fi
13557
13558  if test "x$path" != "x$new_path"; then
13559    BOOT_JDK="$new_path"
13560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13561$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13562  fi
13563
13564  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13565  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13566
13567  else
13568    # We're on a posix platform. Hooray! :)
13569    path="$BOOT_JDK"
13570
13571    if test ! -f "$path" && test ! -d "$path"; then
13572      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13573    fi
13574
13575    has_space=`$ECHO "$path" | $GREP " "`
13576    if test "x$has_space" != x; then
13577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13579      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13580    fi
13581  fi
13582
13583              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13584$as_echo_n "checking for Boot JDK... " >&6; }
13585              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13586$as_echo "$BOOT_JDK" >&6; }
13587              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13588$as_echo_n "checking Boot JDK version... " >&6; }
13589              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13590              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13591$as_echo "$BOOT_JDK_VERSION" >&6; }
13592            fi # end check jdk version
13593          fi # end check rt.jar
13594        fi # end check javac
13595      fi # end check java
13596    fi # end check boot jdk found
13597  fi
13598
13599    done
13600  fi
13601
13602
13603    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13604    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13605      # Do we have a bin/java?
13606      if test ! -x "$BOOT_JDK/bin/java"; then
13607        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13608$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13609        BOOT_JDK_FOUND=no
13610      else
13611        # Do we have a bin/javac?
13612        if test ! -x "$BOOT_JDK/bin/javac"; then
13613          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13615          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13616$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13617          BOOT_JDK_FOUND=no
13618        else
13619          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13620          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13621            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13623            BOOT_JDK_FOUND=no
13624          else
13625            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13626            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13627
13628            # Extra M4 quote needed to protect [] in grep expression.
13629            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13630            if test "x$FOUND_VERSION_78" = x; then
13631              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13633              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13634$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13635              BOOT_JDK_FOUND=no
13636            else
13637              # We're done! :-)
13638              BOOT_JDK_FOUND=yes
13639
13640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13641
13642  # Input might be given as Windows format, start by converting to
13643  # unix format.
13644  path="$BOOT_JDK"
13645  new_path=`$CYGPATH -u "$path"`
13646
13647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13650  # "foo.exe" is OK but "foo" is an error.
13651  #
13652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13653  # It is also a way to make sure we got the proper file name for the real test later on.
13654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13655  if test "x$test_shortpath" = x; then
13656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13658    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13659  fi
13660
13661  # Call helper function which possibly converts this using DOS-style short mode.
13662  # If so, the updated path is stored in $new_path.
13663
13664  input_path="$new_path"
13665  # Check if we need to convert this using DOS-style short mode. If the path
13666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13667  # take no chances and rewrite it.
13668  # Note: m4 eats our [], so we need to use [ and ] instead.
13669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13670  if test "x$has_forbidden_chars" != x; then
13671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13675      # Going to short mode and back again did indeed matter. Since short mode is
13676      # case insensitive, let's make it lowercase to improve readability.
13677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13678      # Now convert it back to Unix-stile (cygpath)
13679      input_path=`$CYGPATH -u "$shortmode_path"`
13680      new_path="$input_path"
13681    fi
13682  fi
13683
13684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13685  if test "x$test_cygdrive_prefix" = x; then
13686    # As a simple fix, exclude /usr/bin since it's not a real path.
13687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13689      # a path prefixed by /cygdrive for fixpath to work.
13690      new_path="$CYGWIN_ROOT_PATH$input_path"
13691    fi
13692  fi
13693
13694
13695  if test "x$path" != "x$new_path"; then
13696    BOOT_JDK="$new_path"
13697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13699  fi
13700
13701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13702
13703  path="$BOOT_JDK"
13704  has_colon=`$ECHO $path | $GREP ^.:`
13705  new_path="$path"
13706  if test "x$has_colon" = x; then
13707    # Not in mixed or Windows style, start by that.
13708    new_path=`cmd //c echo $path`
13709  fi
13710
13711
13712  input_path="$new_path"
13713  # Check if we need to convert this using DOS-style short mode. If the path
13714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13715  # take no chances and rewrite it.
13716  # Note: m4 eats our [], so we need to use [ and ] instead.
13717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13718  if test "x$has_forbidden_chars" != x; then
13719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13721  fi
13722
13723
13724  windows_path="$new_path"
13725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13726    unix_path=`$CYGPATH -u "$windows_path"`
13727    new_path="$unix_path"
13728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13730    new_path="$unix_path"
13731  fi
13732
13733  if test "x$path" != "x$new_path"; then
13734    BOOT_JDK="$new_path"
13735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13737  fi
13738
13739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13741
13742  else
13743    # We're on a posix platform. Hooray! :)
13744    path="$BOOT_JDK"
13745
13746    if test ! -f "$path" && test ! -d "$path"; then
13747      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13748    fi
13749
13750    has_space=`$ECHO "$path" | $GREP " "`
13751    if test "x$has_space" != x; then
13752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13753$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13754      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13755    fi
13756  fi
13757
13758              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13759$as_echo_n "checking for Boot JDK... " >&6; }
13760              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13761$as_echo "$BOOT_JDK" >&6; }
13762              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13763$as_echo_n "checking Boot JDK version... " >&6; }
13764              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13765              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13766$as_echo "$BOOT_JDK_VERSION" >&6; }
13767            fi # end check jdk version
13768          fi # end check rt.jar
13769        fi # end check javac
13770      fi # end check java
13771    fi # end check boot jdk found
13772  fi
13773
13774  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
13775
13776  if test "x$BOOT_JDK_FOUND" = xno; then
13777    # Now execute the test
13778
13779  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
13780  BOOT_JDK_SUFFIX="/Contents/Home"
13781  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13782  if test "x$ALL_JDKS_FOUND" != x; then
13783    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13784
13785  if test "x$BOOT_JDK_FOUND" = xno; then
13786    # Now execute the test
13787
13788        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13789        if test -d "$BOOT_JDK"; then
13790          BOOT_JDK_FOUND=maybe
13791          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13792$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13793        fi
13794
13795
13796    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13797    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13798      # Do we have a bin/java?
13799      if test ! -x "$BOOT_JDK/bin/java"; then
13800        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13802        BOOT_JDK_FOUND=no
13803      else
13804        # Do we have a bin/javac?
13805        if test ! -x "$BOOT_JDK/bin/javac"; then
13806          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13808          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13809$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13810          BOOT_JDK_FOUND=no
13811        else
13812          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13813          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13814            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13816            BOOT_JDK_FOUND=no
13817          else
13818            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13819            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13820
13821            # Extra M4 quote needed to protect [] in grep expression.
13822            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13823            if test "x$FOUND_VERSION_78" = x; then
13824              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13826              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13827$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13828              BOOT_JDK_FOUND=no
13829            else
13830              # We're done! :-)
13831              BOOT_JDK_FOUND=yes
13832
13833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13834
13835  # Input might be given as Windows format, start by converting to
13836  # unix format.
13837  path="$BOOT_JDK"
13838  new_path=`$CYGPATH -u "$path"`
13839
13840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13843  # "foo.exe" is OK but "foo" is an error.
13844  #
13845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13846  # It is also a way to make sure we got the proper file name for the real test later on.
13847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13848  if test "x$test_shortpath" = x; then
13849    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13850$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13851    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13852  fi
13853
13854  # Call helper function which possibly converts this using DOS-style short mode.
13855  # If so, the updated path is stored in $new_path.
13856
13857  input_path="$new_path"
13858  # Check if we need to convert this using DOS-style short mode. If the path
13859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13860  # take no chances and rewrite it.
13861  # Note: m4 eats our [], so we need to use [ and ] instead.
13862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13863  if test "x$has_forbidden_chars" != x; then
13864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13868      # Going to short mode and back again did indeed matter. Since short mode is
13869      # case insensitive, let's make it lowercase to improve readability.
13870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13871      # Now convert it back to Unix-stile (cygpath)
13872      input_path=`$CYGPATH -u "$shortmode_path"`
13873      new_path="$input_path"
13874    fi
13875  fi
13876
13877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13878  if test "x$test_cygdrive_prefix" = x; then
13879    # As a simple fix, exclude /usr/bin since it's not a real path.
13880    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13882      # a path prefixed by /cygdrive for fixpath to work.
13883      new_path="$CYGWIN_ROOT_PATH$input_path"
13884    fi
13885  fi
13886
13887
13888  if test "x$path" != "x$new_path"; then
13889    BOOT_JDK="$new_path"
13890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13891$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13892  fi
13893
13894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13895
13896  path="$BOOT_JDK"
13897  has_colon=`$ECHO $path | $GREP ^.:`
13898  new_path="$path"
13899  if test "x$has_colon" = x; then
13900    # Not in mixed or Windows style, start by that.
13901    new_path=`cmd //c echo $path`
13902  fi
13903
13904
13905  input_path="$new_path"
13906  # Check if we need to convert this using DOS-style short mode. If the path
13907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13908  # take no chances and rewrite it.
13909  # Note: m4 eats our [], so we need to use [ and ] instead.
13910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13911  if test "x$has_forbidden_chars" != x; then
13912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13914  fi
13915
13916
13917  windows_path="$new_path"
13918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13919    unix_path=`$CYGPATH -u "$windows_path"`
13920    new_path="$unix_path"
13921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13923    new_path="$unix_path"
13924  fi
13925
13926  if test "x$path" != "x$new_path"; then
13927    BOOT_JDK="$new_path"
13928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13929$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13930  fi
13931
13932  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13933  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13934
13935  else
13936    # We're on a posix platform. Hooray! :)
13937    path="$BOOT_JDK"
13938
13939    if test ! -f "$path" && test ! -d "$path"; then
13940      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13941    fi
13942
13943    has_space=`$ECHO "$path" | $GREP " "`
13944    if test "x$has_space" != x; then
13945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13946$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13947      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13948    fi
13949  fi
13950
13951              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13952$as_echo_n "checking for Boot JDK... " >&6; }
13953              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13954$as_echo "$BOOT_JDK" >&6; }
13955              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13956$as_echo_n "checking Boot JDK version... " >&6; }
13957              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13958              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13959$as_echo "$BOOT_JDK_VERSION" >&6; }
13960            fi # end check jdk version
13961          fi # end check rt.jar
13962        fi # end check javac
13963      fi # end check java
13964    fi # end check boot jdk found
13965  fi
13966
13967    done
13968  fi
13969
13970
13971    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13972    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13973      # Do we have a bin/java?
13974      if test ! -x "$BOOT_JDK/bin/java"; then
13975        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13977        BOOT_JDK_FOUND=no
13978      else
13979        # Do we have a bin/javac?
13980        if test ! -x "$BOOT_JDK/bin/javac"; then
13981          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13982$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13983          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13984$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13985          BOOT_JDK_FOUND=no
13986        else
13987          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13988          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13989            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13991            BOOT_JDK_FOUND=no
13992          else
13993            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13994            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13995
13996            # Extra M4 quote needed to protect [] in grep expression.
13997            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13998            if test "x$FOUND_VERSION_78" = x; then
13999              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14001              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14002$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14003              BOOT_JDK_FOUND=no
14004            else
14005              # We're done! :-)
14006              BOOT_JDK_FOUND=yes
14007
14008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14009
14010  # Input might be given as Windows format, start by converting to
14011  # unix format.
14012  path="$BOOT_JDK"
14013  new_path=`$CYGPATH -u "$path"`
14014
14015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14018  # "foo.exe" is OK but "foo" is an error.
14019  #
14020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14021  # It is also a way to make sure we got the proper file name for the real test later on.
14022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14023  if test "x$test_shortpath" = x; then
14024    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14025$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14026    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14027  fi
14028
14029  # Call helper function which possibly converts this using DOS-style short mode.
14030  # If so, the updated path is stored in $new_path.
14031
14032  input_path="$new_path"
14033  # Check if we need to convert this using DOS-style short mode. If the path
14034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14035  # take no chances and rewrite it.
14036  # Note: m4 eats our [], so we need to use [ and ] instead.
14037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14038  if test "x$has_forbidden_chars" != x; then
14039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14043      # Going to short mode and back again did indeed matter. Since short mode is
14044      # case insensitive, let's make it lowercase to improve readability.
14045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14046      # Now convert it back to Unix-stile (cygpath)
14047      input_path=`$CYGPATH -u "$shortmode_path"`
14048      new_path="$input_path"
14049    fi
14050  fi
14051
14052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14053  if test "x$test_cygdrive_prefix" = x; then
14054    # As a simple fix, exclude /usr/bin since it's not a real path.
14055    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14057      # a path prefixed by /cygdrive for fixpath to work.
14058      new_path="$CYGWIN_ROOT_PATH$input_path"
14059    fi
14060  fi
14061
14062
14063  if test "x$path" != "x$new_path"; then
14064    BOOT_JDK="$new_path"
14065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14066$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14067  fi
14068
14069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14070
14071  path="$BOOT_JDK"
14072  has_colon=`$ECHO $path | $GREP ^.:`
14073  new_path="$path"
14074  if test "x$has_colon" = x; then
14075    # Not in mixed or Windows style, start by that.
14076    new_path=`cmd //c echo $path`
14077  fi
14078
14079
14080  input_path="$new_path"
14081  # Check if we need to convert this using DOS-style short mode. If the path
14082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14083  # take no chances and rewrite it.
14084  # Note: m4 eats our [], so we need to use [ and ] instead.
14085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14086  if test "x$has_forbidden_chars" != x; then
14087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14089  fi
14090
14091
14092  windows_path="$new_path"
14093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14094    unix_path=`$CYGPATH -u "$windows_path"`
14095    new_path="$unix_path"
14096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14098    new_path="$unix_path"
14099  fi
14100
14101  if test "x$path" != "x$new_path"; then
14102    BOOT_JDK="$new_path"
14103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14105  fi
14106
14107  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14108  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14109
14110  else
14111    # We're on a posix platform. Hooray! :)
14112    path="$BOOT_JDK"
14113
14114    if test ! -f "$path" && test ! -d "$path"; then
14115      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14116    fi
14117
14118    has_space=`$ECHO "$path" | $GREP " "`
14119    if test "x$has_space" != x; then
14120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14121$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14122      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14123    fi
14124  fi
14125
14126              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14127$as_echo_n "checking for Boot JDK... " >&6; }
14128              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14129$as_echo "$BOOT_JDK" >&6; }
14130              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14131$as_echo_n "checking Boot JDK version... " >&6; }
14132              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14133              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14134$as_echo "$BOOT_JDK_VERSION" >&6; }
14135            fi # end check jdk version
14136          fi # end check rt.jar
14137        fi # end check javac
14138      fi # end check java
14139    fi # end check boot jdk found
14140  fi
14141
14142
14143  if test "x$BOOT_JDK_FOUND" = xno; then
14144    # Now execute the test
14145
14146  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14147  BOOT_JDK_SUFFIX="/Contents/Home"
14148  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14149  if test "x$ALL_JDKS_FOUND" != x; then
14150    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14151
14152  if test "x$BOOT_JDK_FOUND" = xno; then
14153    # Now execute the test
14154
14155        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14156        if test -d "$BOOT_JDK"; then
14157          BOOT_JDK_FOUND=maybe
14158          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14159$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14160        fi
14161
14162
14163    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14164    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14165      # Do we have a bin/java?
14166      if test ! -x "$BOOT_JDK/bin/java"; then
14167        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14168$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14169        BOOT_JDK_FOUND=no
14170      else
14171        # Do we have a bin/javac?
14172        if test ! -x "$BOOT_JDK/bin/javac"; then
14173          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14175          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14176$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14177          BOOT_JDK_FOUND=no
14178        else
14179          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14180          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14181            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14183            BOOT_JDK_FOUND=no
14184          else
14185            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14186            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14187
14188            # Extra M4 quote needed to protect [] in grep expression.
14189            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14190            if test "x$FOUND_VERSION_78" = x; then
14191              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14193              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14194$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14195              BOOT_JDK_FOUND=no
14196            else
14197              # We're done! :-)
14198              BOOT_JDK_FOUND=yes
14199
14200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14201
14202  # Input might be given as Windows format, start by converting to
14203  # unix format.
14204  path="$BOOT_JDK"
14205  new_path=`$CYGPATH -u "$path"`
14206
14207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14210  # "foo.exe" is OK but "foo" is an error.
14211  #
14212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14213  # It is also a way to make sure we got the proper file name for the real test later on.
14214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14215  if test "x$test_shortpath" = x; then
14216    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14217$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14218    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14219  fi
14220
14221  # Call helper function which possibly converts this using DOS-style short mode.
14222  # If so, the updated path is stored in $new_path.
14223
14224  input_path="$new_path"
14225  # Check if we need to convert this using DOS-style short mode. If the path
14226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14227  # take no chances and rewrite it.
14228  # Note: m4 eats our [], so we need to use [ and ] instead.
14229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14230  if test "x$has_forbidden_chars" != x; then
14231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14232    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14233    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14234    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14235      # Going to short mode and back again did indeed matter. Since short mode is
14236      # case insensitive, let's make it lowercase to improve readability.
14237      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14238      # Now convert it back to Unix-stile (cygpath)
14239      input_path=`$CYGPATH -u "$shortmode_path"`
14240      new_path="$input_path"
14241    fi
14242  fi
14243
14244  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14245  if test "x$test_cygdrive_prefix" = x; then
14246    # As a simple fix, exclude /usr/bin since it's not a real path.
14247    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14248      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14249      # a path prefixed by /cygdrive for fixpath to work.
14250      new_path="$CYGWIN_ROOT_PATH$input_path"
14251    fi
14252  fi
14253
14254
14255  if test "x$path" != "x$new_path"; then
14256    BOOT_JDK="$new_path"
14257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14258$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14259  fi
14260
14261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14262
14263  path="$BOOT_JDK"
14264  has_colon=`$ECHO $path | $GREP ^.:`
14265  new_path="$path"
14266  if test "x$has_colon" = x; then
14267    # Not in mixed or Windows style, start by that.
14268    new_path=`cmd //c echo $path`
14269  fi
14270
14271
14272  input_path="$new_path"
14273  # Check if we need to convert this using DOS-style short mode. If the path
14274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14275  # take no chances and rewrite it.
14276  # Note: m4 eats our [], so we need to use [ and ] instead.
14277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14278  if test "x$has_forbidden_chars" != x; then
14279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14281  fi
14282
14283
14284  windows_path="$new_path"
14285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14286    unix_path=`$CYGPATH -u "$windows_path"`
14287    new_path="$unix_path"
14288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14290    new_path="$unix_path"
14291  fi
14292
14293  if test "x$path" != "x$new_path"; then
14294    BOOT_JDK="$new_path"
14295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14296$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14297  fi
14298
14299  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14300  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14301
14302  else
14303    # We're on a posix platform. Hooray! :)
14304    path="$BOOT_JDK"
14305
14306    if test ! -f "$path" && test ! -d "$path"; then
14307      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14308    fi
14309
14310    has_space=`$ECHO "$path" | $GREP " "`
14311    if test "x$has_space" != x; then
14312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14313$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14314      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14315    fi
14316  fi
14317
14318              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14319$as_echo_n "checking for Boot JDK... " >&6; }
14320              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14321$as_echo "$BOOT_JDK" >&6; }
14322              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14323$as_echo_n "checking Boot JDK version... " >&6; }
14324              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14325              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14326$as_echo "$BOOT_JDK_VERSION" >&6; }
14327            fi # end check jdk version
14328          fi # end check rt.jar
14329        fi # end check javac
14330      fi # end check java
14331    fi # end check boot jdk found
14332  fi
14333
14334    done
14335  fi
14336
14337
14338    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14339    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14340      # Do we have a bin/java?
14341      if test ! -x "$BOOT_JDK/bin/java"; then
14342        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14344        BOOT_JDK_FOUND=no
14345      else
14346        # Do we have a bin/javac?
14347        if test ! -x "$BOOT_JDK/bin/javac"; then
14348          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14350          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14351$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14352          BOOT_JDK_FOUND=no
14353        else
14354          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14355          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14356            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14358            BOOT_JDK_FOUND=no
14359          else
14360            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14361            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14362
14363            # Extra M4 quote needed to protect [] in grep expression.
14364            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14365            if test "x$FOUND_VERSION_78" = x; then
14366              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14368              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14369$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14370              BOOT_JDK_FOUND=no
14371            else
14372              # We're done! :-)
14373              BOOT_JDK_FOUND=yes
14374
14375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14376
14377  # Input might be given as Windows format, start by converting to
14378  # unix format.
14379  path="$BOOT_JDK"
14380  new_path=`$CYGPATH -u "$path"`
14381
14382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14385  # "foo.exe" is OK but "foo" is an error.
14386  #
14387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14388  # It is also a way to make sure we got the proper file name for the real test later on.
14389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14390  if test "x$test_shortpath" = x; then
14391    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14392$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14393    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14394  fi
14395
14396  # Call helper function which possibly converts this using DOS-style short mode.
14397  # If so, the updated path is stored in $new_path.
14398
14399  input_path="$new_path"
14400  # Check if we need to convert this using DOS-style short mode. If the path
14401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14402  # take no chances and rewrite it.
14403  # Note: m4 eats our [], so we need to use [ and ] instead.
14404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14405  if test "x$has_forbidden_chars" != x; then
14406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14410      # Going to short mode and back again did indeed matter. Since short mode is
14411      # case insensitive, let's make it lowercase to improve readability.
14412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14413      # Now convert it back to Unix-stile (cygpath)
14414      input_path=`$CYGPATH -u "$shortmode_path"`
14415      new_path="$input_path"
14416    fi
14417  fi
14418
14419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14420  if test "x$test_cygdrive_prefix" = x; then
14421    # As a simple fix, exclude /usr/bin since it's not a real path.
14422    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14424      # a path prefixed by /cygdrive for fixpath to work.
14425      new_path="$CYGWIN_ROOT_PATH$input_path"
14426    fi
14427  fi
14428
14429
14430  if test "x$path" != "x$new_path"; then
14431    BOOT_JDK="$new_path"
14432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14433$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14434  fi
14435
14436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14437
14438  path="$BOOT_JDK"
14439  has_colon=`$ECHO $path | $GREP ^.:`
14440  new_path="$path"
14441  if test "x$has_colon" = x; then
14442    # Not in mixed or Windows style, start by that.
14443    new_path=`cmd //c echo $path`
14444  fi
14445
14446
14447  input_path="$new_path"
14448  # Check if we need to convert this using DOS-style short mode. If the path
14449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14450  # take no chances and rewrite it.
14451  # Note: m4 eats our [], so we need to use [ and ] instead.
14452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14453  if test "x$has_forbidden_chars" != x; then
14454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14456  fi
14457
14458
14459  windows_path="$new_path"
14460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14461    unix_path=`$CYGPATH -u "$windows_path"`
14462    new_path="$unix_path"
14463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14465    new_path="$unix_path"
14466  fi
14467
14468  if test "x$path" != "x$new_path"; then
14469    BOOT_JDK="$new_path"
14470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14471$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14472  fi
14473
14474  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14475  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14476
14477  else
14478    # We're on a posix platform. Hooray! :)
14479    path="$BOOT_JDK"
14480
14481    if test ! -f "$path" && test ! -d "$path"; then
14482      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14483    fi
14484
14485    has_space=`$ECHO "$path" | $GREP " "`
14486    if test "x$has_space" != x; then
14487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14488$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14489      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14490    fi
14491  fi
14492
14493              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14494$as_echo_n "checking for Boot JDK... " >&6; }
14495              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14496$as_echo "$BOOT_JDK" >&6; }
14497              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14498$as_echo_n "checking Boot JDK version... " >&6; }
14499              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14500              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14501$as_echo "$BOOT_JDK_VERSION" >&6; }
14502            fi # end check jdk version
14503          fi # end check rt.jar
14504        fi # end check javac
14505      fi # end check java
14506    fi # end check boot jdk found
14507  fi
14508
14509  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14510
14511  if test "x$BOOT_JDK_FOUND" = xno; then
14512    # Now execute the test
14513
14514  BOOT_JDK_PREFIX="/usr/lib/jvm"
14515  BOOT_JDK_SUFFIX=""
14516  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14517  if test "x$ALL_JDKS_FOUND" != x; then
14518    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14519
14520  if test "x$BOOT_JDK_FOUND" = xno; then
14521    # Now execute the test
14522
14523        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14524        if test -d "$BOOT_JDK"; then
14525          BOOT_JDK_FOUND=maybe
14526          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14527$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14528        fi
14529
14530
14531    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14532    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14533      # Do we have a bin/java?
14534      if test ! -x "$BOOT_JDK/bin/java"; then
14535        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14536$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14537        BOOT_JDK_FOUND=no
14538      else
14539        # Do we have a bin/javac?
14540        if test ! -x "$BOOT_JDK/bin/javac"; then
14541          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14543          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14544$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14545          BOOT_JDK_FOUND=no
14546        else
14547          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14548          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14549            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14551            BOOT_JDK_FOUND=no
14552          else
14553            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14554            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14555
14556            # Extra M4 quote needed to protect [] in grep expression.
14557            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14558            if test "x$FOUND_VERSION_78" = x; then
14559              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14561              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14562$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14563              BOOT_JDK_FOUND=no
14564            else
14565              # We're done! :-)
14566              BOOT_JDK_FOUND=yes
14567
14568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14569
14570  # Input might be given as Windows format, start by converting to
14571  # unix format.
14572  path="$BOOT_JDK"
14573  new_path=`$CYGPATH -u "$path"`
14574
14575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14578  # "foo.exe" is OK but "foo" is an error.
14579  #
14580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14581  # It is also a way to make sure we got the proper file name for the real test later on.
14582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14583  if test "x$test_shortpath" = x; then
14584    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14585$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14586    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14587  fi
14588
14589  # Call helper function which possibly converts this using DOS-style short mode.
14590  # If so, the updated path is stored in $new_path.
14591
14592  input_path="$new_path"
14593  # Check if we need to convert this using DOS-style short mode. If the path
14594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14595  # take no chances and rewrite it.
14596  # Note: m4 eats our [], so we need to use [ and ] instead.
14597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14598  if test "x$has_forbidden_chars" != x; then
14599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14603      # Going to short mode and back again did indeed matter. Since short mode is
14604      # case insensitive, let's make it lowercase to improve readability.
14605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14606      # Now convert it back to Unix-stile (cygpath)
14607      input_path=`$CYGPATH -u "$shortmode_path"`
14608      new_path="$input_path"
14609    fi
14610  fi
14611
14612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14613  if test "x$test_cygdrive_prefix" = x; then
14614    # As a simple fix, exclude /usr/bin since it's not a real path.
14615    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14617      # a path prefixed by /cygdrive for fixpath to work.
14618      new_path="$CYGWIN_ROOT_PATH$input_path"
14619    fi
14620  fi
14621
14622
14623  if test "x$path" != "x$new_path"; then
14624    BOOT_JDK="$new_path"
14625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14626$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14627  fi
14628
14629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14630
14631  path="$BOOT_JDK"
14632  has_colon=`$ECHO $path | $GREP ^.:`
14633  new_path="$path"
14634  if test "x$has_colon" = x; then
14635    # Not in mixed or Windows style, start by that.
14636    new_path=`cmd //c echo $path`
14637  fi
14638
14639
14640  input_path="$new_path"
14641  # Check if we need to convert this using DOS-style short mode. If the path
14642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14643  # take no chances and rewrite it.
14644  # Note: m4 eats our [], so we need to use [ and ] instead.
14645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14646  if test "x$has_forbidden_chars" != x; then
14647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14649  fi
14650
14651
14652  windows_path="$new_path"
14653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14654    unix_path=`$CYGPATH -u "$windows_path"`
14655    new_path="$unix_path"
14656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14658    new_path="$unix_path"
14659  fi
14660
14661  if test "x$path" != "x$new_path"; then
14662    BOOT_JDK="$new_path"
14663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14664$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14665  fi
14666
14667  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14668  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14669
14670  else
14671    # We're on a posix platform. Hooray! :)
14672    path="$BOOT_JDK"
14673
14674    if test ! -f "$path" && test ! -d "$path"; then
14675      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14676    fi
14677
14678    has_space=`$ECHO "$path" | $GREP " "`
14679    if test "x$has_space" != x; then
14680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14681$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14682      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14683    fi
14684  fi
14685
14686              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14687$as_echo_n "checking for Boot JDK... " >&6; }
14688              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14689$as_echo "$BOOT_JDK" >&6; }
14690              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14691$as_echo_n "checking Boot JDK version... " >&6; }
14692              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14693              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14694$as_echo "$BOOT_JDK_VERSION" >&6; }
14695            fi # end check jdk version
14696          fi # end check rt.jar
14697        fi # end check javac
14698      fi # end check java
14699    fi # end check boot jdk found
14700  fi
14701
14702    done
14703  fi
14704
14705
14706    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14707    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14708      # Do we have a bin/java?
14709      if test ! -x "$BOOT_JDK/bin/java"; then
14710        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14712        BOOT_JDK_FOUND=no
14713      else
14714        # Do we have a bin/javac?
14715        if test ! -x "$BOOT_JDK/bin/javac"; then
14716          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14718          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14719$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14720          BOOT_JDK_FOUND=no
14721        else
14722          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14723          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14724            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14726            BOOT_JDK_FOUND=no
14727          else
14728            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14729            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14730
14731            # Extra M4 quote needed to protect [] in grep expression.
14732            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14733            if test "x$FOUND_VERSION_78" = x; then
14734              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14736              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14737$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14738              BOOT_JDK_FOUND=no
14739            else
14740              # We're done! :-)
14741              BOOT_JDK_FOUND=yes
14742
14743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14744
14745  # Input might be given as Windows format, start by converting to
14746  # unix format.
14747  path="$BOOT_JDK"
14748  new_path=`$CYGPATH -u "$path"`
14749
14750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14753  # "foo.exe" is OK but "foo" is an error.
14754  #
14755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14756  # It is also a way to make sure we got the proper file name for the real test later on.
14757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14758  if test "x$test_shortpath" = x; then
14759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14761    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14762  fi
14763
14764  # Call helper function which possibly converts this using DOS-style short mode.
14765  # If so, the updated path is stored in $new_path.
14766
14767  input_path="$new_path"
14768  # Check if we need to convert this using DOS-style short mode. If the path
14769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14770  # take no chances and rewrite it.
14771  # Note: m4 eats our [], so we need to use [ and ] instead.
14772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14773  if test "x$has_forbidden_chars" != x; then
14774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14778      # Going to short mode and back again did indeed matter. Since short mode is
14779      # case insensitive, let's make it lowercase to improve readability.
14780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14781      # Now convert it back to Unix-stile (cygpath)
14782      input_path=`$CYGPATH -u "$shortmode_path"`
14783      new_path="$input_path"
14784    fi
14785  fi
14786
14787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14788  if test "x$test_cygdrive_prefix" = x; then
14789    # As a simple fix, exclude /usr/bin since it's not a real path.
14790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14792      # a path prefixed by /cygdrive for fixpath to work.
14793      new_path="$CYGWIN_ROOT_PATH$input_path"
14794    fi
14795  fi
14796
14797
14798  if test "x$path" != "x$new_path"; then
14799    BOOT_JDK="$new_path"
14800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14801$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14802  fi
14803
14804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14805
14806  path="$BOOT_JDK"
14807  has_colon=`$ECHO $path | $GREP ^.:`
14808  new_path="$path"
14809  if test "x$has_colon" = x; then
14810    # Not in mixed or Windows style, start by that.
14811    new_path=`cmd //c echo $path`
14812  fi
14813
14814
14815  input_path="$new_path"
14816  # Check if we need to convert this using DOS-style short mode. If the path
14817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14818  # take no chances and rewrite it.
14819  # Note: m4 eats our [], so we need to use [ and ] instead.
14820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14821  if test "x$has_forbidden_chars" != x; then
14822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14824  fi
14825
14826
14827  windows_path="$new_path"
14828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14829    unix_path=`$CYGPATH -u "$windows_path"`
14830    new_path="$unix_path"
14831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14833    new_path="$unix_path"
14834  fi
14835
14836  if test "x$path" != "x$new_path"; then
14837    BOOT_JDK="$new_path"
14838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14839$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14840  fi
14841
14842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14844
14845  else
14846    # We're on a posix platform. Hooray! :)
14847    path="$BOOT_JDK"
14848
14849    if test ! -f "$path" && test ! -d "$path"; then
14850      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14851    fi
14852
14853    has_space=`$ECHO "$path" | $GREP " "`
14854    if test "x$has_space" != x; then
14855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14856$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14857      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14858    fi
14859  fi
14860
14861              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14862$as_echo_n "checking for Boot JDK... " >&6; }
14863              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14864$as_echo "$BOOT_JDK" >&6; }
14865              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14866$as_echo_n "checking Boot JDK version... " >&6; }
14867              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14868              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14869$as_echo "$BOOT_JDK_VERSION" >&6; }
14870            fi # end check jdk version
14871          fi # end check rt.jar
14872        fi # end check javac
14873      fi # end check java
14874    fi # end check boot jdk found
14875  fi
14876
14877  fi
14878
14879
14880    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14881    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14882      # Do we have a bin/java?
14883      if test ! -x "$BOOT_JDK/bin/java"; then
14884        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14886        BOOT_JDK_FOUND=no
14887      else
14888        # Do we have a bin/javac?
14889        if test ! -x "$BOOT_JDK/bin/javac"; then
14890          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14892          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14893$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14894          BOOT_JDK_FOUND=no
14895        else
14896          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14897          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14898            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14900            BOOT_JDK_FOUND=no
14901          else
14902            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14903            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14904
14905            # Extra M4 quote needed to protect [] in grep expression.
14906            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14907            if test "x$FOUND_VERSION_78" = x; then
14908              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14910              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14911$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14912              BOOT_JDK_FOUND=no
14913            else
14914              # We're done! :-)
14915              BOOT_JDK_FOUND=yes
14916
14917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14918
14919  # Input might be given as Windows format, start by converting to
14920  # unix format.
14921  path="$BOOT_JDK"
14922  new_path=`$CYGPATH -u "$path"`
14923
14924  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14925  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14926  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14927  # "foo.exe" is OK but "foo" is an error.
14928  #
14929  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14930  # It is also a way to make sure we got the proper file name for the real test later on.
14931  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14932  if test "x$test_shortpath" = x; then
14933    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14934$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14935    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14936  fi
14937
14938  # Call helper function which possibly converts this using DOS-style short mode.
14939  # If so, the updated path is stored in $new_path.
14940
14941  input_path="$new_path"
14942  # Check if we need to convert this using DOS-style short mode. If the path
14943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14944  # take no chances and rewrite it.
14945  # Note: m4 eats our [], so we need to use [ and ] instead.
14946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14947  if test "x$has_forbidden_chars" != x; then
14948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14949    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14950    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14951    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14952      # Going to short mode and back again did indeed matter. Since short mode is
14953      # case insensitive, let's make it lowercase to improve readability.
14954      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14955      # Now convert it back to Unix-stile (cygpath)
14956      input_path=`$CYGPATH -u "$shortmode_path"`
14957      new_path="$input_path"
14958    fi
14959  fi
14960
14961  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14962  if test "x$test_cygdrive_prefix" = x; then
14963    # As a simple fix, exclude /usr/bin since it's not a real path.
14964    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14965      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14966      # a path prefixed by /cygdrive for fixpath to work.
14967      new_path="$CYGWIN_ROOT_PATH$input_path"
14968    fi
14969  fi
14970
14971
14972  if test "x$path" != "x$new_path"; then
14973    BOOT_JDK="$new_path"
14974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14975$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14976  fi
14977
14978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14979
14980  path="$BOOT_JDK"
14981  has_colon=`$ECHO $path | $GREP ^.:`
14982  new_path="$path"
14983  if test "x$has_colon" = x; then
14984    # Not in mixed or Windows style, start by that.
14985    new_path=`cmd //c echo $path`
14986  fi
14987
14988
14989  input_path="$new_path"
14990  # Check if we need to convert this using DOS-style short mode. If the path
14991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14992  # take no chances and rewrite it.
14993  # Note: m4 eats our [], so we need to use [ and ] instead.
14994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14995  if test "x$has_forbidden_chars" != x; then
14996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14998  fi
14999
15000
15001  windows_path="$new_path"
15002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15003    unix_path=`$CYGPATH -u "$windows_path"`
15004    new_path="$unix_path"
15005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15007    new_path="$unix_path"
15008  fi
15009
15010  if test "x$path" != "x$new_path"; then
15011    BOOT_JDK="$new_path"
15012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15013$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15014  fi
15015
15016  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15017  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15018
15019  else
15020    # We're on a posix platform. Hooray! :)
15021    path="$BOOT_JDK"
15022
15023    if test ! -f "$path" && test ! -d "$path"; then
15024      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15025    fi
15026
15027    has_space=`$ECHO "$path" | $GREP " "`
15028    if test "x$has_space" != x; then
15029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15030$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15031      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15032    fi
15033  fi
15034
15035              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15036$as_echo_n "checking for Boot JDK... " >&6; }
15037              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15038$as_echo "$BOOT_JDK" >&6; }
15039              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15040$as_echo_n "checking Boot JDK version... " >&6; }
15041              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15042              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15043$as_echo "$BOOT_JDK_VERSION" >&6; }
15044            fi # end check jdk version
15045          fi # end check rt.jar
15046        fi # end check javac
15047      fi # end check java
15048    fi # end check boot jdk found
15049  fi
15050
15051
15052# If we haven't found anything yet, we've truly lost. Give up.
15053if test "x$BOOT_JDK_FOUND" = xno; then
15054
15055    # Print a helpful message on how to acquire the necessary build dependency.
15056    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15057    MISSING_DEPENDENCY=openjdk
15058    PKGHANDLER_COMMAND=
15059
15060    case $PKGHANDLER in
15061	apt-get)
15062                apt_help     $MISSING_DEPENDENCY ;;
15063    yum)
15064                yum_help     $MISSING_DEPENDENCY ;;
15065	port)
15066                port_help    $MISSING_DEPENDENCY ;;
15067	pkgutil)
15068                pkgutil_help $MISSING_DEPENDENCY ;;
15069	pkgadd)
15070                pkgadd_help  $MISSING_DEPENDENCY ;;
15071    * )
15072      break ;;
15073    esac
15074
15075    if test "x$PKGHANDLER_COMMAND" != x; then
15076        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15077    fi
15078
15079  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15080$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15081  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15082$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15083  as_fn_error $? "Cannot continue" "$LINENO" 5
15084fi
15085
15086# Setup proper paths for what we found
15087BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15088if test ! -f "$BOOT_RTJAR"; then
15089    # On MacOSX it is called classes.jar
15090    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15091    if test -f "$BOOT_RTJAR"; then
15092      # Remove the ..
15093      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15094    fi
15095fi
15096BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15097BOOT_JDK="$BOOT_JDK"
15098
15099
15100
15101
15102# Setup tools from the Boot JDK.
15103
15104  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15105$as_echo_n "checking for java in Boot JDK... " >&6; }
15106  JAVA=$BOOT_JDK/bin/java
15107  if test ! -x $JAVA; then
15108      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15109$as_echo "not found" >&6; }
15110      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15111$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15112      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15113  fi
15114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15115$as_echo "ok" >&6; }
15116
15117
15118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15119$as_echo_n "checking for javac in Boot JDK... " >&6; }
15120  JAVAC=$BOOT_JDK/bin/javac
15121  if test ! -x $JAVAC; then
15122      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15123$as_echo "not found" >&6; }
15124      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15125$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15126      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15127  fi
15128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15129$as_echo "ok" >&6; }
15130
15131
15132  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15133$as_echo_n "checking for javah in Boot JDK... " >&6; }
15134  JAVAH=$BOOT_JDK/bin/javah
15135  if test ! -x $JAVAH; then
15136      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15137$as_echo "not found" >&6; }
15138      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15139$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15140      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15141  fi
15142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15143$as_echo "ok" >&6; }
15144
15145
15146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15147$as_echo_n "checking for javap in Boot JDK... " >&6; }
15148  JAVAP=$BOOT_JDK/bin/javap
15149  if test ! -x $JAVAP; then
15150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15151$as_echo "not found" >&6; }
15152      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15153$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15154      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15155  fi
15156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15157$as_echo "ok" >&6; }
15158
15159
15160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15161$as_echo_n "checking for jar in Boot JDK... " >&6; }
15162  JAR=$BOOT_JDK/bin/jar
15163  if test ! -x $JAR; 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 jar 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 rmic in Boot JDK" >&5
15175$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15176  RMIC=$BOOT_JDK/bin/rmic
15177  if test ! -x $RMIC; 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 rmic 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 native2ascii in Boot JDK" >&5
15189$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15190  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15191  if test ! -x $NATIVE2ASCII; 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 native2ascii 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# Finally, set some other options...
15203
15204# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15205BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15206
15207
15208
15209
15210##############################################################################
15211#
15212# Specify options for anything that is run with the Boot JDK.
15213#
15214
15215# Check whether --with-boot-jdk-jvmargs was given.
15216if test "${with_boot_jdk_jvmargs+set}" = set; then :
15217  withval=$with_boot_jdk_jvmargs;
15218fi
15219
15220
15221if test "x$with_boot_jdk_jvmargs" = x; then
15222    # Not all JVM:s accept the same arguments on the command line.
15223    # OpenJDK specific increase in thread stack for JDK build,
15224    # well more specifically, when running javac.
15225    if test "x$BUILD_NUM_BITS" = x32; then
15226       STACK_SIZE=768
15227    else
15228       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15229       # since 64-bit pointers are pushed on the stach. Apparently, we need
15230       # to increase the stack space when javacing the JDK....
15231       STACK_SIZE=1536
15232    fi
15233
15234    # Minimum amount of heap memory.
15235
15236    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15237    # If so, then append -Xms64M to boot_jdk_jvmargs
15238    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15239    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15240    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15241        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15242    fi
15243
15244    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15245        # Why does macosx need more heap? Its the huge JDK batch.
15246
15247    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15248    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15249    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15250    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15251    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15252        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15253    fi
15254
15255    else
15256
15257    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15258    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15259    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15260    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15261    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15262        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15263    fi
15264
15265    fi
15266    # When is adding -client something that speeds up the JVM?
15267    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15268
15269    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15270    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15271    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15272    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15273    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15274        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15275    fi
15276
15277
15278    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15279    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15280    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15281    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15282    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15283        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15284    fi
15285
15286
15287    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15288    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15289    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15290    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15291    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15292        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15293    fi
15294
15295    # Disable special log output when a debug build is used as Boot JDK...
15296
15297    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15298    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15299    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15300    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15301    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15302        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15303    fi
15304
15305fi
15306
15307BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15308
15309
15310
15311###############################################################################
15312#
15313# Configure the sources to use. We can add or override individual directories.
15314#
15315###############################################################################
15316
15317
15318
15319# Where are the sources. Any of these can be overridden
15320# using --with-override-corba and the likes.
15321LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15322CORBA_TOPDIR="$SRC_ROOT/corba"
15323JAXP_TOPDIR="$SRC_ROOT/jaxp"
15324JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15325HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15326JDK_TOPDIR="$SRC_ROOT/jdk"
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336###############################################################################
15337#
15338# Pickup additional source for a component from outside of the source root
15339# or override source for a component.
15340#
15341
15342# Check whether --with-add-source-root was given.
15343if test "${with_add_source_root+set}" = set; then :
15344  withval=$with_add_source_root;
15345fi
15346
15347
15348
15349# Check whether --with-override-source-root was given.
15350if test "${with_override_source_root+set}" = set; then :
15351  withval=$with_override_source_root;
15352fi
15353
15354
15355
15356# Check whether --with-adds-and-overrides was given.
15357if test "${with_adds_and_overrides+set}" = set; then :
15358  withval=$with_adds_and_overrides;
15359fi
15360
15361
15362if test "x$with_adds_and_overrides" != x; then
15363    with_add_source_root="$with_adds_and_overrides/adds"
15364    with_override_source_root="$with_adds_and_overrides/overrides"
15365fi
15366
15367if test "x$with_add_source_root" != x; then
15368    if ! test -d $with_add_source_root; then
15369       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15370    fi
15371    CURDIR="$PWD"
15372    cd "$with_add_source_root"
15373    ADD_SRC_ROOT="`pwd`"
15374    cd "$CURDIR"
15375    # Verify that the addon source root does not have any root makefiles.
15376    # If it does, then it is usually an error, prevent this.
15377    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15378       test -f $with_add_source_root/langtools/make/Makefile; then
15379        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
15380    fi
15381    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15382       test -f $with_add_source_root/corba/make/Makefile; then
15383        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
15384    fi
15385    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15386       test -f $with_add_source_root/jaxp/make/Makefile; then
15387        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
15388    fi
15389    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15390       test -f $with_add_source_root/jaxws/make/Makefile; then
15391        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
15392    fi
15393    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15394       test -f $with_add_source_root/hotspot/make/Makefile; then
15395        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
15396    fi
15397    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15398       test -f $with_add_source_root/jdk/make/Makefile; then
15399        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
15400    fi
15401fi
15402
15403
15404if test "x$with_override_source_root" != x; then
15405    if ! test -d $with_override_source_root; then
15406       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15407    fi
15408    CURDIR="$PWD"
15409    cd "$with_override_source_root"
15410    OVERRIDE_SRC_ROOT="`pwd`"
15411    cd "$CURDIR"
15412    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15413       test -f $with_override_source_root/langtools/make/Makefile; then
15414        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
15415    fi
15416    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15417       test -f $with_override_source_root/corba/make/Makefile; then
15418        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
15419    fi
15420    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15421       test -f $with_override_source_root/jaxp/make/Makefile; then
15422        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
15423    fi
15424    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15425       test -f $with_override_source_root/jaxws/make/Makefile; then
15426        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
15427    fi
15428    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15429       test -f $with_override_source_root/hotspot/make/Makefile; then
15430        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
15431    fi
15432    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15433       test -f $with_override_source_root/jdk/make/Makefile; then
15434        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
15435    fi
15436fi
15437
15438
15439###############################################################################
15440#
15441# Override a repo completely, this is used for example when you have 3 small
15442# development sandboxes of the langtools sources and want to avoid having 3 full
15443# OpenJDK sources checked out on disk.
15444#
15445# Assuming that the 3 langtools sandboxes are located here:
15446# /home/fredrik/sandbox1/langtools
15447# /home/fredrik/sandbox2/langtools
15448# /home/fredrik/sandbox3/langtools
15449#
15450# From the source root you create build subdirs manually:
15451#     mkdir -p build1 build2 build3
15452# in each build directory run:
15453#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15454#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15455#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15456#
15457
15458
15459# Check whether --with-override-langtools was given.
15460if test "${with_override_langtools+set}" = set; then :
15461  withval=$with_override_langtools;
15462fi
15463
15464
15465
15466# Check whether --with-override-corba was given.
15467if test "${with_override_corba+set}" = set; then :
15468  withval=$with_override_corba;
15469fi
15470
15471
15472
15473# Check whether --with-override-jaxp was given.
15474if test "${with_override_jaxp+set}" = set; then :
15475  withval=$with_override_jaxp;
15476fi
15477
15478
15479
15480# Check whether --with-override-jaxws was given.
15481if test "${with_override_jaxws+set}" = set; then :
15482  withval=$with_override_jaxws;
15483fi
15484
15485
15486
15487# Check whether --with-override-hotspot was given.
15488if test "${with_override_hotspot+set}" = set; then :
15489  withval=$with_override_hotspot;
15490fi
15491
15492
15493
15494# Check whether --with-override-jdk was given.
15495if test "${with_override_jdk+set}" = set; then :
15496  withval=$with_override_jdk;
15497fi
15498
15499
15500if test "x$with_override_langtools" != x; then
15501    CURDIR="$PWD"
15502    cd "$with_override_langtools"
15503    LANGTOOLS_TOPDIR="`pwd`"
15504    cd "$CURDIR"
15505    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15506        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15507    fi
15508    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15509$as_echo_n "checking if langtools should be overridden... " >&6; }
15510    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15511$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15512fi
15513if test "x$with_override_corba" != x; then
15514    CURDIR="$PWD"
15515    cd "$with_override_corba"
15516    CORBA_TOPDIR="`pwd`"
15517    cd "$CURDIR"
15518    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15519        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15520    fi
15521    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15522$as_echo_n "checking if corba should be overridden... " >&6; }
15523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15524$as_echo "yes with $CORBA_TOPDIR" >&6; }
15525fi
15526if test "x$with_override_jaxp" != x; then
15527    CURDIR="$PWD"
15528    cd "$with_override_jaxp"
15529    JAXP_TOPDIR="`pwd`"
15530    cd "$CURDIR"
15531    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15532        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15533    fi
15534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15535$as_echo_n "checking if jaxp should be overridden... " >&6; }
15536    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15537$as_echo "yes with $JAXP_TOPDIR" >&6; }
15538fi
15539if test "x$with_override_jaxws" != x; then
15540    CURDIR="$PWD"
15541    cd "$with_override_jaxws"
15542    JAXWS_TOPDIR="`pwd`"
15543    cd "$CURDIR"
15544    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15545        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15546    fi
15547    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15548$as_echo_n "checking if jaxws should be overridden... " >&6; }
15549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15550$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15551fi
15552if test "x$with_override_hotspot" != x; then
15553    CURDIR="$PWD"
15554    cd "$with_override_hotspot"
15555    HOTSPOT_TOPDIR="`pwd`"
15556    cd "$CURDIR"
15557    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15558       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15559        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15560    fi
15561    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15562$as_echo_n "checking if hotspot should be overridden... " >&6; }
15563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15564$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15565fi
15566if test "x$with_override_jdk" != x; then
15567    CURDIR="$PWD"
15568    cd "$with_override_jdk"
15569    JDK_TOPDIR="`pwd`"
15570    cd "$CURDIR"
15571    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15572        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15573    fi
15574    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15575$as_echo_n "checking if JDK should be overridden... " >&6; }
15576    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15577$as_echo "yes with $JDK_TOPDIR" >&6; }
15578fi
15579
15580
15581
15582BUILD_OUTPUT="$OUTPUT_ROOT"
15583
15584
15585JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15586
15587
15588###############################################################################
15589#
15590# Setup the toolchain (compilers etc), i.e. the tools that need to be
15591# cross-compilation aware.
15592#
15593###############################################################################
15594
15595
15596###############################################################################
15597#
15598# Configure the development tool paths and potential sysroot.
15599#
15600ac_ext=cpp
15601ac_cpp='$CXXCPP $CPPFLAGS'
15602ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15603ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15604ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15605
15606
15607# The option used to specify the target .o,.a or .so file.
15608# When compiling, how to specify the to be created object file.
15609CC_OUT_OPTION='-o$(SPACE)'
15610# When linking, how to specify the to be created executable.
15611EXE_OUT_OPTION='-o$(SPACE)'
15612# When linking, how to specify the to be created dynamically linkable library.
15613LD_OUT_OPTION='-o$(SPACE)'
15614# When archiving, how to specify the to be create static archive for object files.
15615AR_OUT_OPTION='rcs$(SPACE)'
15616
15617
15618
15619
15620
15621# Locate the actual tools
15622
15623if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15624
15625  # Store path to cygwin link.exe to help excluding it when searching for
15626  # VS linker. This must be done before changing the PATH when looking for VS.
15627  # Extract the first word of "link", so it can be a program name with args.
15628set dummy link; ac_word=$2
15629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15630$as_echo_n "checking for $ac_word... " >&6; }
15631if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15632  $as_echo_n "(cached) " >&6
15633else
15634  case $CYGWIN_LINK in
15635  [\\/]* | ?:[\\/]*)
15636  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15637  ;;
15638  *)
15639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15640for as_dir in $PATH
15641do
15642  IFS=$as_save_IFS
15643  test -z "$as_dir" && as_dir=.
15644    for ac_exec_ext in '' $ac_executable_extensions; do
15645  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15646    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15648    break 2
15649  fi
15650done
15651  done
15652IFS=$as_save_IFS
15653
15654  ;;
15655esac
15656fi
15657CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15658if test -n "$CYGWIN_LINK"; then
15659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
15660$as_echo "$CYGWIN_LINK" >&6; }
15661else
15662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15663$as_echo "no" >&6; }
15664fi
15665
15666
15667  if test "x$CYGWIN_LINK" != x; then
15668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
15669$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15670    "$CYGWIN_LINK" --version > /dev/null
15671    if test $? -eq 0 ; then
15672      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15673$as_echo "yes" >&6; }
15674    else
15675      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15676$as_echo "no" >&6; }
15677      # This might be the VS linker. Don't exclude it later on.
15678      CYGWIN_LINK=""
15679    fi
15680  fi
15681
15682  # First-hand choice is to locate and run the vsvars bat file.
15683
15684  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15685    VCVARSFILE="vc/bin/vcvars32.bat"
15686  else
15687    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
15688  fi
15689
15690  VS_ENV_CMD=""
15691  VS_ENV_ARGS=""
15692  if test "x$with_toolsdir" != x; then
15693
15694  if test "x$VS_ENV_CMD" = x; then
15695    VS100BASE="$with_toolsdir/../.."
15696    METHOD="--with-tools-dir"
15697
15698  windows_path="$VS100BASE"
15699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15700    unix_path=`$CYGPATH -u "$windows_path"`
15701    VS100BASE="$unix_path"
15702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15704    VS100BASE="$unix_path"
15705  fi
15706
15707    if test -d "$VS100BASE"; then
15708      if test -f "$VS100BASE/$VCVARSFILE"; then
15709        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15710$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15711        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15712      else
15713        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15714$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15715        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15716$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15717      fi
15718    fi
15719  fi
15720
15721  fi
15722
15723  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
15724    # Having specified an argument which is incorrect will produce an instant failure;
15725    # we should not go on looking
15726    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
15727$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
15728    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
15729$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
15730    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
15731  fi
15732
15733  if test "x$ProgramW6432" != x; then
15734
15735  if test "x$VS_ENV_CMD" = x; then
15736    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
15737    METHOD="well-known name"
15738
15739  windows_path="$WIN_SDK_BASE"
15740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15741    unix_path=`$CYGPATH -u "$windows_path"`
15742    WIN_SDK_BASE="$unix_path"
15743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15745    WIN_SDK_BASE="$unix_path"
15746  fi
15747
15748    if test -d "$WIN_SDK_BASE"; then
15749      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15750        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15751$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15752        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15753        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15754          VS_ENV_ARGS="/x86"
15755        else
15756          VS_ENV_ARGS="/x64"
15757        fi
15758      else
15759        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15760$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15761        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15762$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15763      fi
15764    fi
15765  fi
15766
15767  fi
15768  if test "x$PROGRAMW6432" != x; then
15769
15770  if test "x$VS_ENV_CMD" = x; then
15771    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
15772    METHOD="well-known name"
15773
15774  windows_path="$WIN_SDK_BASE"
15775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15776    unix_path=`$CYGPATH -u "$windows_path"`
15777    WIN_SDK_BASE="$unix_path"
15778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15780    WIN_SDK_BASE="$unix_path"
15781  fi
15782
15783    if test -d "$WIN_SDK_BASE"; then
15784      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15785        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15786$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15787        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15788        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15789          VS_ENV_ARGS="/x86"
15790        else
15791          VS_ENV_ARGS="/x64"
15792        fi
15793      else
15794        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15795$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15796        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15797$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15798      fi
15799    fi
15800  fi
15801
15802  fi
15803  if test "x$PROGRAMFILES" != x; then
15804
15805  if test "x$VS_ENV_CMD" = x; then
15806    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
15807    METHOD="well-known name"
15808
15809  windows_path="$WIN_SDK_BASE"
15810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15811    unix_path=`$CYGPATH -u "$windows_path"`
15812    WIN_SDK_BASE="$unix_path"
15813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15815    WIN_SDK_BASE="$unix_path"
15816  fi
15817
15818    if test -d "$WIN_SDK_BASE"; then
15819      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15820        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15821$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15822        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15823        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15824          VS_ENV_ARGS="/x86"
15825        else
15826          VS_ENV_ARGS="/x64"
15827        fi
15828      else
15829        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15830$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15831        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15832$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15833      fi
15834    fi
15835  fi
15836
15837  fi
15838
15839  if test "x$VS_ENV_CMD" = x; then
15840    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
15841    METHOD="well-known name"
15842
15843  windows_path="$WIN_SDK_BASE"
15844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15845    unix_path=`$CYGPATH -u "$windows_path"`
15846    WIN_SDK_BASE="$unix_path"
15847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15849    WIN_SDK_BASE="$unix_path"
15850  fi
15851
15852    if test -d "$WIN_SDK_BASE"; then
15853      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15854        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15855$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15856        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15857        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15858          VS_ENV_ARGS="/x86"
15859        else
15860          VS_ENV_ARGS="/x64"
15861        fi
15862      else
15863        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15864$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15865        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15866$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15867      fi
15868    fi
15869  fi
15870
15871
15872  if test "x$VS_ENV_CMD" = x; then
15873    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
15874    METHOD="well-known name"
15875
15876  windows_path="$WIN_SDK_BASE"
15877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15878    unix_path=`$CYGPATH -u "$windows_path"`
15879    WIN_SDK_BASE="$unix_path"
15880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15882    WIN_SDK_BASE="$unix_path"
15883  fi
15884
15885    if test -d "$WIN_SDK_BASE"; then
15886      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15887        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15888$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15889        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15890        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15891          VS_ENV_ARGS="/x86"
15892        else
15893          VS_ENV_ARGS="/x64"
15894        fi
15895      else
15896        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15897$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15898        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15899$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15900      fi
15901    fi
15902  fi
15903
15904
15905  if test "x$VS100COMNTOOLS" != x; then
15906
15907  if test "x$VS_ENV_CMD" = x; then
15908    VS100BASE="$VS100COMNTOOLS/../.."
15909    METHOD="VS100COMNTOOLS variable"
15910
15911  windows_path="$VS100BASE"
15912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15913    unix_path=`$CYGPATH -u "$windows_path"`
15914    VS100BASE="$unix_path"
15915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15917    VS100BASE="$unix_path"
15918  fi
15919
15920    if test -d "$VS100BASE"; then
15921      if test -f "$VS100BASE/$VCVARSFILE"; then
15922        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15923$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15924        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15925      else
15926        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15927$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15928        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15929$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15930      fi
15931    fi
15932  fi
15933
15934  fi
15935  if test "x$PROGRAMFILES" != x; then
15936
15937  if test "x$VS_ENV_CMD" = x; then
15938    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
15939    METHOD="well-known name"
15940
15941  windows_path="$VS100BASE"
15942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15943    unix_path=`$CYGPATH -u "$windows_path"`
15944    VS100BASE="$unix_path"
15945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15947    VS100BASE="$unix_path"
15948  fi
15949
15950    if test -d "$VS100BASE"; then
15951      if test -f "$VS100BASE/$VCVARSFILE"; then
15952        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15953$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15954        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15955      else
15956        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15957$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15958        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15959$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15960      fi
15961    fi
15962  fi
15963
15964  fi
15965
15966  if test "x$VS_ENV_CMD" = x; then
15967    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
15968    METHOD="well-known name"
15969
15970  windows_path="$VS100BASE"
15971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15972    unix_path=`$CYGPATH -u "$windows_path"`
15973    VS100BASE="$unix_path"
15974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15976    VS100BASE="$unix_path"
15977  fi
15978
15979    if test -d "$VS100BASE"; then
15980      if test -f "$VS100BASE/$VCVARSFILE"; then
15981        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15982$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15983        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15984      else
15985        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15986$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15987        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15988$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15989      fi
15990    fi
15991  fi
15992
15993
15994  if test "x$VS_ENV_CMD" = x; then
15995    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
15996    METHOD="well-known name"
15997
15998  windows_path="$VS100BASE"
15999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16000    unix_path=`$CYGPATH -u "$windows_path"`
16001    VS100BASE="$unix_path"
16002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16004    VS100BASE="$unix_path"
16005  fi
16006
16007    if test -d "$VS100BASE"; then
16008      if test -f "$VS100BASE/$VCVARSFILE"; then
16009        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16010$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16011        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16012      else
16013        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16014$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16015        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16016$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16017      fi
16018    fi
16019  fi
16020
16021
16022  if test "x$VS_ENV_CMD" != x; then
16023    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16024
16025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16026
16027  # First separate the path from the arguments. This will split at the first
16028  # space.
16029  complete="$VS_ENV_CMD"
16030  path="${complete%% *}"
16031  tmp="$complete EOL"
16032  arguments="${tmp#* }"
16033
16034  # Input might be given as Windows format, start by converting to
16035  # unix format.
16036  new_path=`$CYGPATH -u "$path"`
16037
16038  # Now try to locate executable using which
16039  new_path=`$WHICH "$new_path" 2> /dev/null`
16040  # bat and cmd files are not always considered executable in cygwin causing which
16041  # to not find them
16042  if test "x$new_path" = x \
16043           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16044           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16045    new_path=`$CYGPATH -u "$path"`
16046  fi
16047  if test "x$new_path" = x; then
16048    # Oops. Which didn't find the executable.
16049    # The splitting of arguments from the executable at a space might have been incorrect,
16050    # since paths with space are more likely in Windows. Give it another try with the whole
16051    # argument.
16052    path="$complete"
16053    arguments="EOL"
16054    new_path=`$CYGPATH -u "$path"`
16055    new_path=`$WHICH "$new_path" 2> /dev/null`
16056    # bat and cmd files are not always considered executable in cygwin causing which
16057    # to not find them
16058    if test "x$new_path" = x \
16059             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16060             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16061      new_path=`$CYGPATH -u "$path"`
16062    fi
16063    if test "x$new_path" = x; then
16064      # It's still not found. Now this is an unrecoverable error.
16065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16066$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16067      has_space=`$ECHO "$complete" | $GREP " "`
16068      if test "x$has_space" != x; then
16069        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16070$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16071      fi
16072      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16073    fi
16074  fi
16075
16076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16079  # "foo.exe" is OK but "foo" is an error.
16080  #
16081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16082  # It is also a way to make sure we got the proper file name for the real test later on.
16083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16084  if test "x$test_shortpath" = x; then
16085    # Short path failed, file does not exist as specified.
16086    # Try adding .exe or .cmd
16087    if test -f "${new_path}.exe"; then
16088       input_to_shortpath="${new_path}.exe"
16089    elif test -f "${new_path}.cmd"; then
16090       input_to_shortpath="${new_path}.cmd"
16091    else
16092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16093$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16094      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16095$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16096      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16097    fi
16098  else
16099    input_to_shortpath="$new_path"
16100  fi
16101
16102  # Call helper function which possibly converts this using DOS-style short mode.
16103  # If so, the updated path is stored in $new_path.
16104  new_path="$input_to_shortpath"
16105
16106  input_path="$input_to_shortpath"
16107  # Check if we need to convert this using DOS-style short mode. If the path
16108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16109  # take no chances and rewrite it.
16110  # Note: m4 eats our [], so we need to use [ and ] instead.
16111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16112  if test "x$has_forbidden_chars" != x; then
16113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16117      # Going to short mode and back again did indeed matter. Since short mode is
16118      # case insensitive, let's make it lowercase to improve readability.
16119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16120      # Now convert it back to Unix-stile (cygpath)
16121      input_path=`$CYGPATH -u "$shortmode_path"`
16122      new_path="$input_path"
16123    fi
16124  fi
16125
16126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16127  if test "x$test_cygdrive_prefix" = x; then
16128    # As a simple fix, exclude /usr/bin since it's not a real path.
16129    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16131      # a path prefixed by /cygdrive for fixpath to work.
16132      new_path="$CYGWIN_ROOT_PATH$input_path"
16133    fi
16134  fi
16135
16136  # remove trailing .exe if any
16137  new_path="${new_path/%.exe/}"
16138
16139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16140
16141  # First separate the path from the arguments. This will split at the first
16142  # space.
16143  complete="$VS_ENV_CMD"
16144  path="${complete%% *}"
16145  tmp="$complete EOL"
16146  arguments="${tmp#* }"
16147
16148  # Input might be given as Windows format, start by converting to
16149  # unix format.
16150  new_path="$path"
16151
16152  windows_path="$new_path"
16153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16154    unix_path=`$CYGPATH -u "$windows_path"`
16155    new_path="$unix_path"
16156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16158    new_path="$unix_path"
16159  fi
16160
16161
16162  # Now try to locate executable using which
16163  new_path=`$WHICH "$new_path" 2> /dev/null`
16164
16165  if test "x$new_path" = x; then
16166    # Oops. Which didn't find the executable.
16167    # The splitting of arguments from the executable at a space might have been incorrect,
16168    # since paths with space are more likely in Windows. Give it another try with the whole
16169    # argument.
16170    path="$complete"
16171    arguments="EOL"
16172    new_path="$path"
16173
16174  windows_path="$new_path"
16175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16176    unix_path=`$CYGPATH -u "$windows_path"`
16177    new_path="$unix_path"
16178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16180    new_path="$unix_path"
16181  fi
16182
16183
16184    new_path=`$WHICH "$new_path" 2> /dev/null`
16185
16186    if test "x$new_path" = x; then
16187      # It's still not found. Now this is an unrecoverable error.
16188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16189$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16190      has_space=`$ECHO "$complete" | $GREP " "`
16191      if test "x$has_space" != x; then
16192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16194      fi
16195      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16196    fi
16197  fi
16198
16199  # Now new_path has a complete unix path to the binary
16200  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16201    # Keep paths in /bin as-is, but remove trailing .exe if any
16202    new_path="${new_path/%.exe/}"
16203    # Do not save /bin paths to all_fixpath_prefixes!
16204  else
16205    # Not in mixed or Windows style, start by that.
16206    new_path=`cmd //c echo $new_path`
16207
16208  input_path="$new_path"
16209  # Check if we need to convert this using DOS-style short mode. If the path
16210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16211  # take no chances and rewrite it.
16212  # Note: m4 eats our [], so we need to use [ and ] instead.
16213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16214  if test "x$has_forbidden_chars" != x; then
16215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16217  fi
16218
16219    # Output is in $new_path
16220
16221  windows_path="$new_path"
16222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16223    unix_path=`$CYGPATH -u "$windows_path"`
16224    new_path="$unix_path"
16225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16227    new_path="$unix_path"
16228  fi
16229
16230    # remove trailing .exe if any
16231    new_path="${new_path/%.exe/}"
16232
16233    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16234    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16235  fi
16236
16237  else
16238    # We're on a posix platform. Hooray! :)
16239    # First separate the path from the arguments. This will split at the first
16240    # space.
16241    complete="$VS_ENV_CMD"
16242    path="${complete%% *}"
16243    tmp="$complete EOL"
16244    arguments="${tmp#* }"
16245
16246    new_path=`$WHICH $path 2> /dev/null`
16247    if test "x$new_path" = x; then
16248      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16249      if test "x$is_absolute_path" != x; then
16250        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&5
16251$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&6;}
16252        new_path="$path"
16253      else
16254        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16255$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16256        has_space=`$ECHO "$complete" | $GREP " "`
16257        if test "x$has_space" != x; then
16258          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16259$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16260        fi
16261        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16262      fi
16263    fi
16264  fi
16265
16266  # Now join together the path and the arguments once again
16267  if test "x$arguments" != xEOL; then
16268      new_complete="$new_path ${arguments% *}"
16269  else
16270      new_complete="$new_path"
16271  fi
16272
16273  if test "x$complete" != "x$new_complete"; then
16274    VS_ENV_CMD="$new_complete"
16275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16276$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16277  fi
16278
16279
16280    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16281    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16282$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16283    cd $OUTPUT_ROOT
16284    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16285    # to autoconf standards.
16286
16287    #----
16288
16289    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16290    # but calculate the difference in Cygwin environment before/after running it and then
16291    # apply the diff.
16292
16293    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16294      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16295      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16296      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16297    else
16298      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16299      _dosbash=`cmd //c echo \`which bash\``
16300    fi
16301
16302    # generate the set of exported vars before/after the vs10 setup
16303    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16304    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16305    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16306    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16307
16308    # Now execute the newly created bat file.
16309    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16310    cmd /c localdevenvtmp.bat | cat
16311
16312    # apply the diff (less some non-vs10 vars named by "!")
16313    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16314    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16315    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16316
16317    # cleanup
16318    $RM localdevenvtmp*
16319    #----
16320    cd $CURDIR
16321    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16322      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16323$as_echo "no" >&6; }
16324      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16325$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16326      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16327$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16328      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16329$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16330      as_fn_error $? "Cannot continue" "$LINENO" 5
16331    fi
16332
16333    # Now set all paths and other env variables. This will allow the rest of
16334    # the configure script to find and run the compiler in the proper way.
16335    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16336$as_echo "$as_me: Setting extracted environment variables" >&6;}
16337    . $OUTPUT_ROOT/localdevenv.sh
16338  else
16339    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16340    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16341$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16342  fi
16343
16344  # At this point, we should have corrent variables in the environment, or we can't continue.
16345  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16346$as_echo_n "checking for Visual Studio variables... " >&6; }
16347
16348  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16349    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16350      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16351$as_echo "present but broken" >&6; }
16352      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16353    else
16354      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16355$as_echo "ok" >&6; }
16356      VS_INCLUDE="$INCLUDE"
16357      VS_LIB="$LIB"
16358      VS_PATH="$PATH"
16359
16360
16361
16362    fi
16363  else
16364    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16365$as_echo "not found" >&6; }
16366
16367    if test "x$VS_ENV_CMD" = x; then
16368      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16369$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16370      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16371$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16372    else
16373      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16374$as_echo "$as_me: Running the extraction script failed." >&6;}
16375    fi
16376    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16377$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16378    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16379$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16380    as_fn_error $? "Cannot continue" "$LINENO" 5
16381  fi
16382
16383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16384$as_echo_n "checking for msvcr100.dll... " >&6; }
16385
16386# Check whether --with-msvcr-dll was given.
16387if test "${with_msvcr_dll+set}" = set; then :
16388  withval=$with_msvcr_dll;
16389fi
16390
16391  if test "x$with_msvcr_dll" != x; then
16392    MSVCR_DLL="$with_msvcr_dll"
16393  else
16394    if test "x$VCINSTALLDIR" != x; then
16395      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16396        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16397      else
16398        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16399        if test "x$MSVCR_DLL" = x; then
16400          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16401        fi
16402      fi
16403      if test "x$MSVCR_DLL" != x; then
16404        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16405$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16406      else
16407        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16408$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16409      fi
16410    fi
16411    if test "x$MSVCR_DLL" = x; then
16412      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16413        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16414$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16415        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16416      fi
16417    fi
16418  fi
16419  if test "x$MSVCR_DLL" = x; then
16420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16421$as_echo "no" >&6; }
16422    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16423  fi
16424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16425$as_echo "$MSVCR_DLL" >&6; }
16426
16427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16428
16429  # Input might be given as Windows format, start by converting to
16430  # unix format.
16431  path="$MSVCR_DLL"
16432  new_path=`$CYGPATH -u "$path"`
16433
16434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16437  # "foo.exe" is OK but "foo" is an error.
16438  #
16439  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16440  # It is also a way to make sure we got the proper file name for the real test later on.
16441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16442  if test "x$test_shortpath" = x; then
16443    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16444$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16445    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16446  fi
16447
16448  # Call helper function which possibly converts this using DOS-style short mode.
16449  # If so, the updated path is stored in $new_path.
16450
16451  input_path="$new_path"
16452  # Check if we need to convert this using DOS-style short mode. If the path
16453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16454  # take no chances and rewrite it.
16455  # Note: m4 eats our [], so we need to use [ and ] instead.
16456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16457  if test "x$has_forbidden_chars" != x; then
16458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16462      # Going to short mode and back again did indeed matter. Since short mode is
16463      # case insensitive, let's make it lowercase to improve readability.
16464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16465      # Now convert it back to Unix-stile (cygpath)
16466      input_path=`$CYGPATH -u "$shortmode_path"`
16467      new_path="$input_path"
16468    fi
16469  fi
16470
16471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16472  if test "x$test_cygdrive_prefix" = x; then
16473    # As a simple fix, exclude /usr/bin since it's not a real path.
16474    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16476      # a path prefixed by /cygdrive for fixpath to work.
16477      new_path="$CYGWIN_ROOT_PATH$input_path"
16478    fi
16479  fi
16480
16481
16482  if test "x$path" != "x$new_path"; then
16483    MSVCR_DLL="$new_path"
16484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16485$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16486  fi
16487
16488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16489
16490  path="$MSVCR_DLL"
16491  has_colon=`$ECHO $path | $GREP ^.:`
16492  new_path="$path"
16493  if test "x$has_colon" = x; then
16494    # Not in mixed or Windows style, start by that.
16495    new_path=`cmd //c echo $path`
16496  fi
16497
16498
16499  input_path="$new_path"
16500  # Check if we need to convert this using DOS-style short mode. If the path
16501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16502  # take no chances and rewrite it.
16503  # Note: m4 eats our [], so we need to use [ and ] instead.
16504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16505  if test "x$has_forbidden_chars" != x; then
16506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16508  fi
16509
16510
16511  windows_path="$new_path"
16512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16513    unix_path=`$CYGPATH -u "$windows_path"`
16514    new_path="$unix_path"
16515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16517    new_path="$unix_path"
16518  fi
16519
16520  if test "x$path" != "x$new_path"; then
16521    MSVCR_DLL="$new_path"
16522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16523$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16524  fi
16525
16526  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16527  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16528
16529  else
16530    # We're on a posix platform. Hooray! :)
16531    path="$MSVCR_DLL"
16532
16533    if test ! -f "$path" && test ! -d "$path"; then
16534      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16535    fi
16536
16537    has_space=`$ECHO "$path" | $GREP " "`
16538    if test "x$has_space" != x; then
16539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16540$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16541      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16542    fi
16543  fi
16544
16545
16546fi
16547
16548
16549
16550# If --build AND --host is set, then the configure script will find any
16551# cross compilation tools in the PATH. Cross compilation tools
16552# follows the cross compilation standard where they are prefixed with ${host}.
16553# For example the binary i686-sun-solaris2.10-gcc
16554# will cross compile for i686-sun-solaris2.10
16555# If neither of build and host is not set, then build=host and the
16556# default compiler found in the path will be used.
16557# Setting only --host, does not seem to be really supported.
16558# Please set both --build and --host if you want to cross compile.
16559
16560if test "x$COMPILE_TYPE" = "xcross"; then
16561    # Now we to find a C/C++ compiler that can build executables for the build
16562    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16563    # once. Also, we need to do this before adding a tools dir to the path,
16564    # otherwise we might pick up cross-compilers which don't use standard naming.
16565    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16566    # to wait until they are properly discovered.
16567    for ac_prog in cl cc gcc
16568do
16569  # Extract the first word of "$ac_prog", so it can be a program name with args.
16570set dummy $ac_prog; ac_word=$2
16571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16572$as_echo_n "checking for $ac_word... " >&6; }
16573if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16574  $as_echo_n "(cached) " >&6
16575else
16576  case $BUILD_CC in
16577  [\\/]* | ?:[\\/]*)
16578  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16579  ;;
16580  *)
16581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16582for as_dir in $PATH
16583do
16584  IFS=$as_save_IFS
16585  test -z "$as_dir" && as_dir=.
16586    for ac_exec_ext in '' $ac_executable_extensions; do
16587  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16588    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16590    break 2
16591  fi
16592done
16593  done
16594IFS=$as_save_IFS
16595
16596  ;;
16597esac
16598fi
16599BUILD_CC=$ac_cv_path_BUILD_CC
16600if test -n "$BUILD_CC"; then
16601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
16602$as_echo "$BUILD_CC" >&6; }
16603else
16604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16605$as_echo "no" >&6; }
16606fi
16607
16608
16609  test -n "$BUILD_CC" && break
16610done
16611
16612
16613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16614
16615  # First separate the path from the arguments. This will split at the first
16616  # space.
16617  complete="$BUILD_CC"
16618  path="${complete%% *}"
16619  tmp="$complete EOL"
16620  arguments="${tmp#* }"
16621
16622  # Input might be given as Windows format, start by converting to
16623  # unix format.
16624  new_path=`$CYGPATH -u "$path"`
16625
16626  # Now try to locate executable using which
16627  new_path=`$WHICH "$new_path" 2> /dev/null`
16628  # bat and cmd files are not always considered executable in cygwin causing which
16629  # to not find them
16630  if test "x$new_path" = x \
16631           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16632           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16633    new_path=`$CYGPATH -u "$path"`
16634  fi
16635  if test "x$new_path" = x; then
16636    # Oops. Which didn't find the executable.
16637    # The splitting of arguments from the executable at a space might have been incorrect,
16638    # since paths with space are more likely in Windows. Give it another try with the whole
16639    # argument.
16640    path="$complete"
16641    arguments="EOL"
16642    new_path=`$CYGPATH -u "$path"`
16643    new_path=`$WHICH "$new_path" 2> /dev/null`
16644    # bat and cmd files are not always considered executable in cygwin causing which
16645    # to not find them
16646    if test "x$new_path" = x \
16647             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16648             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16649      new_path=`$CYGPATH -u "$path"`
16650    fi
16651    if test "x$new_path" = x; then
16652      # It's still not found. Now this is an unrecoverable error.
16653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16654$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16655      has_space=`$ECHO "$complete" | $GREP " "`
16656      if test "x$has_space" != x; then
16657        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16658$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16659      fi
16660      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16661    fi
16662  fi
16663
16664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16667  # "foo.exe" is OK but "foo" is an error.
16668  #
16669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16670  # It is also a way to make sure we got the proper file name for the real test later on.
16671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16672  if test "x$test_shortpath" = x; then
16673    # Short path failed, file does not exist as specified.
16674    # Try adding .exe or .cmd
16675    if test -f "${new_path}.exe"; then
16676       input_to_shortpath="${new_path}.exe"
16677    elif test -f "${new_path}.cmd"; then
16678       input_to_shortpath="${new_path}.cmd"
16679    else
16680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
16681$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
16682      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16683$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16684      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16685    fi
16686  else
16687    input_to_shortpath="$new_path"
16688  fi
16689
16690  # Call helper function which possibly converts this using DOS-style short mode.
16691  # If so, the updated path is stored in $new_path.
16692  new_path="$input_to_shortpath"
16693
16694  input_path="$input_to_shortpath"
16695  # Check if we need to convert this using DOS-style short mode. If the path
16696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16697  # take no chances and rewrite it.
16698  # Note: m4 eats our [], so we need to use [ and ] instead.
16699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16700  if test "x$has_forbidden_chars" != x; then
16701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16705      # Going to short mode and back again did indeed matter. Since short mode is
16706      # case insensitive, let's make it lowercase to improve readability.
16707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16708      # Now convert it back to Unix-stile (cygpath)
16709      input_path=`$CYGPATH -u "$shortmode_path"`
16710      new_path="$input_path"
16711    fi
16712  fi
16713
16714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16715  if test "x$test_cygdrive_prefix" = x; then
16716    # As a simple fix, exclude /usr/bin since it's not a real path.
16717    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16719      # a path prefixed by /cygdrive for fixpath to work.
16720      new_path="$CYGWIN_ROOT_PATH$input_path"
16721    fi
16722  fi
16723
16724  # remove trailing .exe if any
16725  new_path="${new_path/%.exe/}"
16726
16727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16728
16729  # First separate the path from the arguments. This will split at the first
16730  # space.
16731  complete="$BUILD_CC"
16732  path="${complete%% *}"
16733  tmp="$complete EOL"
16734  arguments="${tmp#* }"
16735
16736  # Input might be given as Windows format, start by converting to
16737  # unix format.
16738  new_path="$path"
16739
16740  windows_path="$new_path"
16741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16742    unix_path=`$CYGPATH -u "$windows_path"`
16743    new_path="$unix_path"
16744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16746    new_path="$unix_path"
16747  fi
16748
16749
16750  # Now try to locate executable using which
16751  new_path=`$WHICH "$new_path" 2> /dev/null`
16752
16753  if test "x$new_path" = x; then
16754    # Oops. Which didn't find the executable.
16755    # The splitting of arguments from the executable at a space might have been incorrect,
16756    # since paths with space are more likely in Windows. Give it another try with the whole
16757    # argument.
16758    path="$complete"
16759    arguments="EOL"
16760    new_path="$path"
16761
16762  windows_path="$new_path"
16763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16764    unix_path=`$CYGPATH -u "$windows_path"`
16765    new_path="$unix_path"
16766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16768    new_path="$unix_path"
16769  fi
16770
16771
16772    new_path=`$WHICH "$new_path" 2> /dev/null`
16773
16774    if test "x$new_path" = x; then
16775      # It's still not found. Now this is an unrecoverable error.
16776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16777$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16778      has_space=`$ECHO "$complete" | $GREP " "`
16779      if test "x$has_space" != x; then
16780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16782      fi
16783      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16784    fi
16785  fi
16786
16787  # Now new_path has a complete unix path to the binary
16788  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16789    # Keep paths in /bin as-is, but remove trailing .exe if any
16790    new_path="${new_path/%.exe/}"
16791    # Do not save /bin paths to all_fixpath_prefixes!
16792  else
16793    # Not in mixed or Windows style, start by that.
16794    new_path=`cmd //c echo $new_path`
16795
16796  input_path="$new_path"
16797  # Check if we need to convert this using DOS-style short mode. If the path
16798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16799  # take no chances and rewrite it.
16800  # Note: m4 eats our [], so we need to use [ and ] instead.
16801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16802  if test "x$has_forbidden_chars" != x; then
16803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16805  fi
16806
16807    # Output is in $new_path
16808
16809  windows_path="$new_path"
16810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16811    unix_path=`$CYGPATH -u "$windows_path"`
16812    new_path="$unix_path"
16813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16815    new_path="$unix_path"
16816  fi
16817
16818    # remove trailing .exe if any
16819    new_path="${new_path/%.exe/}"
16820
16821    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16822    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16823  fi
16824
16825  else
16826    # We're on a posix platform. Hooray! :)
16827    # First separate the path from the arguments. This will split at the first
16828    # space.
16829    complete="$BUILD_CC"
16830    path="${complete%% *}"
16831    tmp="$complete EOL"
16832    arguments="${tmp#* }"
16833
16834    new_path=`$WHICH $path 2> /dev/null`
16835    if test "x$new_path" = x; then
16836      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16837      if test "x$is_absolute_path" != x; then
16838        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&5
16839$as_echo "$as_me: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&6;}
16840        new_path="$path"
16841      else
16842        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16843$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16844        has_space=`$ECHO "$complete" | $GREP " "`
16845        if test "x$has_space" != x; then
16846          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16847$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16848        fi
16849        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16850      fi
16851    fi
16852  fi
16853
16854  # Now join together the path and the arguments once again
16855  if test "x$arguments" != xEOL; then
16856      new_complete="$new_path ${arguments% *}"
16857  else
16858      new_complete="$new_path"
16859  fi
16860
16861  if test "x$complete" != "x$new_complete"; then
16862    BUILD_CC="$new_complete"
16863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
16864$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
16865  fi
16866
16867    for ac_prog in cl CC g++
16868do
16869  # Extract the first word of "$ac_prog", so it can be a program name with args.
16870set dummy $ac_prog; ac_word=$2
16871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16872$as_echo_n "checking for $ac_word... " >&6; }
16873if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
16874  $as_echo_n "(cached) " >&6
16875else
16876  case $BUILD_CXX in
16877  [\\/]* | ?:[\\/]*)
16878  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
16879  ;;
16880  *)
16881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16882for as_dir in $PATH
16883do
16884  IFS=$as_save_IFS
16885  test -z "$as_dir" && as_dir=.
16886    for ac_exec_ext in '' $ac_executable_extensions; do
16887  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16888    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
16889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16890    break 2
16891  fi
16892done
16893  done
16894IFS=$as_save_IFS
16895
16896  ;;
16897esac
16898fi
16899BUILD_CXX=$ac_cv_path_BUILD_CXX
16900if test -n "$BUILD_CXX"; then
16901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
16902$as_echo "$BUILD_CXX" >&6; }
16903else
16904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16905$as_echo "no" >&6; }
16906fi
16907
16908
16909  test -n "$BUILD_CXX" && break
16910done
16911
16912
16913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16914
16915  # First separate the path from the arguments. This will split at the first
16916  # space.
16917  complete="$BUILD_CXX"
16918  path="${complete%% *}"
16919  tmp="$complete EOL"
16920  arguments="${tmp#* }"
16921
16922  # Input might be given as Windows format, start by converting to
16923  # unix format.
16924  new_path=`$CYGPATH -u "$path"`
16925
16926  # Now try to locate executable using which
16927  new_path=`$WHICH "$new_path" 2> /dev/null`
16928  # bat and cmd files are not always considered executable in cygwin causing which
16929  # to not find them
16930  if test "x$new_path" = x \
16931           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16932           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16933    new_path=`$CYGPATH -u "$path"`
16934  fi
16935  if test "x$new_path" = x; then
16936    # Oops. Which didn't find the executable.
16937    # The splitting of arguments from the executable at a space might have been incorrect,
16938    # since paths with space are more likely in Windows. Give it another try with the whole
16939    # argument.
16940    path="$complete"
16941    arguments="EOL"
16942    new_path=`$CYGPATH -u "$path"`
16943    new_path=`$WHICH "$new_path" 2> /dev/null`
16944    # bat and cmd files are not always considered executable in cygwin causing which
16945    # to not find them
16946    if test "x$new_path" = x \
16947             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16948             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16949      new_path=`$CYGPATH -u "$path"`
16950    fi
16951    if test "x$new_path" = x; then
16952      # It's still not found. Now this is an unrecoverable error.
16953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
16954$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
16955      has_space=`$ECHO "$complete" | $GREP " "`
16956      if test "x$has_space" != x; then
16957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16959      fi
16960      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
16961    fi
16962  fi
16963
16964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16967  # "foo.exe" is OK but "foo" is an error.
16968  #
16969  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16970  # It is also a way to make sure we got the proper file name for the real test later on.
16971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16972  if test "x$test_shortpath" = x; then
16973    # Short path failed, file does not exist as specified.
16974    # Try adding .exe or .cmd
16975    if test -f "${new_path}.exe"; then
16976       input_to_shortpath="${new_path}.exe"
16977    elif test -f "${new_path}.cmd"; then
16978       input_to_shortpath="${new_path}.cmd"
16979    else
16980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
16981$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
16982      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16983$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16984      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
16985    fi
16986  else
16987    input_to_shortpath="$new_path"
16988  fi
16989
16990  # Call helper function which possibly converts this using DOS-style short mode.
16991  # If so, the updated path is stored in $new_path.
16992  new_path="$input_to_shortpath"
16993
16994  input_path="$input_to_shortpath"
16995  # Check if we need to convert this using DOS-style short mode. If the path
16996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16997  # take no chances and rewrite it.
16998  # Note: m4 eats our [], so we need to use [ and ] instead.
16999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17000  if test "x$has_forbidden_chars" != x; then
17001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17002    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17003    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17004    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17005      # Going to short mode and back again did indeed matter. Since short mode is
17006      # case insensitive, let's make it lowercase to improve readability.
17007      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17008      # Now convert it back to Unix-stile (cygpath)
17009      input_path=`$CYGPATH -u "$shortmode_path"`
17010      new_path="$input_path"
17011    fi
17012  fi
17013
17014  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17015  if test "x$test_cygdrive_prefix" = x; then
17016    # As a simple fix, exclude /usr/bin since it's not a real path.
17017    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17018      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17019      # a path prefixed by /cygdrive for fixpath to work.
17020      new_path="$CYGWIN_ROOT_PATH$input_path"
17021    fi
17022  fi
17023
17024  # remove trailing .exe if any
17025  new_path="${new_path/%.exe/}"
17026
17027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17028
17029  # First separate the path from the arguments. This will split at the first
17030  # space.
17031  complete="$BUILD_CXX"
17032  path="${complete%% *}"
17033  tmp="$complete EOL"
17034  arguments="${tmp#* }"
17035
17036  # Input might be given as Windows format, start by converting to
17037  # unix format.
17038  new_path="$path"
17039
17040  windows_path="$new_path"
17041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17042    unix_path=`$CYGPATH -u "$windows_path"`
17043    new_path="$unix_path"
17044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17046    new_path="$unix_path"
17047  fi
17048
17049
17050  # Now try to locate executable using which
17051  new_path=`$WHICH "$new_path" 2> /dev/null`
17052
17053  if test "x$new_path" = x; then
17054    # Oops. Which didn't find the executable.
17055    # The splitting of arguments from the executable at a space might have been incorrect,
17056    # since paths with space are more likely in Windows. Give it another try with the whole
17057    # argument.
17058    path="$complete"
17059    arguments="EOL"
17060    new_path="$path"
17061
17062  windows_path="$new_path"
17063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17064    unix_path=`$CYGPATH -u "$windows_path"`
17065    new_path="$unix_path"
17066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17068    new_path="$unix_path"
17069  fi
17070
17071
17072    new_path=`$WHICH "$new_path" 2> /dev/null`
17073
17074    if test "x$new_path" = x; then
17075      # It's still not found. Now this is an unrecoverable error.
17076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17077$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17078      has_space=`$ECHO "$complete" | $GREP " "`
17079      if test "x$has_space" != x; then
17080        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17081$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17082      fi
17083      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17084    fi
17085  fi
17086
17087  # Now new_path has a complete unix path to the binary
17088  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17089    # Keep paths in /bin as-is, but remove trailing .exe if any
17090    new_path="${new_path/%.exe/}"
17091    # Do not save /bin paths to all_fixpath_prefixes!
17092  else
17093    # Not in mixed or Windows style, start by that.
17094    new_path=`cmd //c echo $new_path`
17095
17096  input_path="$new_path"
17097  # Check if we need to convert this using DOS-style short mode. If the path
17098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17099  # take no chances and rewrite it.
17100  # Note: m4 eats our [], so we need to use [ and ] instead.
17101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17102  if test "x$has_forbidden_chars" != x; then
17103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17105  fi
17106
17107    # Output is in $new_path
17108
17109  windows_path="$new_path"
17110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17111    unix_path=`$CYGPATH -u "$windows_path"`
17112    new_path="$unix_path"
17113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17115    new_path="$unix_path"
17116  fi
17117
17118    # remove trailing .exe if any
17119    new_path="${new_path/%.exe/}"
17120
17121    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17122    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17123  fi
17124
17125  else
17126    # We're on a posix platform. Hooray! :)
17127    # First separate the path from the arguments. This will split at the first
17128    # space.
17129    complete="$BUILD_CXX"
17130    path="${complete%% *}"
17131    tmp="$complete EOL"
17132    arguments="${tmp#* }"
17133
17134    new_path=`$WHICH $path 2> /dev/null`
17135    if test "x$new_path" = x; then
17136      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17137      if test "x$is_absolute_path" != x; then
17138        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&5
17139$as_echo "$as_me: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&6;}
17140        new_path="$path"
17141      else
17142        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17143$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17144        has_space=`$ECHO "$complete" | $GREP " "`
17145        if test "x$has_space" != x; then
17146          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17147$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17148        fi
17149        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17150      fi
17151    fi
17152  fi
17153
17154  # Now join together the path and the arguments once again
17155  if test "x$arguments" != xEOL; then
17156      new_complete="$new_path ${arguments% *}"
17157  else
17158      new_complete="$new_path"
17159  fi
17160
17161  if test "x$complete" != "x$new_complete"; then
17162    BUILD_CXX="$new_complete"
17163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17164$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17165  fi
17166
17167    # Extract the first word of "ld", so it can be a program name with args.
17168set dummy ld; ac_word=$2
17169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17170$as_echo_n "checking for $ac_word... " >&6; }
17171if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17172  $as_echo_n "(cached) " >&6
17173else
17174  case $BUILD_LD in
17175  [\\/]* | ?:[\\/]*)
17176  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17177  ;;
17178  *)
17179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17180for as_dir in $PATH
17181do
17182  IFS=$as_save_IFS
17183  test -z "$as_dir" && as_dir=.
17184    for ac_exec_ext in '' $ac_executable_extensions; do
17185  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17186    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17188    break 2
17189  fi
17190done
17191  done
17192IFS=$as_save_IFS
17193
17194  ;;
17195esac
17196fi
17197BUILD_LD=$ac_cv_path_BUILD_LD
17198if test -n "$BUILD_LD"; then
17199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17200$as_echo "$BUILD_LD" >&6; }
17201else
17202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17203$as_echo "no" >&6; }
17204fi
17205
17206
17207
17208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17209
17210  # First separate the path from the arguments. This will split at the first
17211  # space.
17212  complete="$BUILD_LD"
17213  path="${complete%% *}"
17214  tmp="$complete EOL"
17215  arguments="${tmp#* }"
17216
17217  # Input might be given as Windows format, start by converting to
17218  # unix format.
17219  new_path=`$CYGPATH -u "$path"`
17220
17221  # Now try to locate executable using which
17222  new_path=`$WHICH "$new_path" 2> /dev/null`
17223  # bat and cmd files are not always considered executable in cygwin causing which
17224  # to not find them
17225  if test "x$new_path" = x \
17226           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17227           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17228    new_path=`$CYGPATH -u "$path"`
17229  fi
17230  if test "x$new_path" = x; then
17231    # Oops. Which didn't find the executable.
17232    # The splitting of arguments from the executable at a space might have been incorrect,
17233    # since paths with space are more likely in Windows. Give it another try with the whole
17234    # argument.
17235    path="$complete"
17236    arguments="EOL"
17237    new_path=`$CYGPATH -u "$path"`
17238    new_path=`$WHICH "$new_path" 2> /dev/null`
17239    # bat and cmd files are not always considered executable in cygwin causing which
17240    # to not find them
17241    if test "x$new_path" = x \
17242             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17243             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17244      new_path=`$CYGPATH -u "$path"`
17245    fi
17246    if test "x$new_path" = x; then
17247      # It's still not found. Now this is an unrecoverable error.
17248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17249$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17250      has_space=`$ECHO "$complete" | $GREP " "`
17251      if test "x$has_space" != x; then
17252        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17254      fi
17255      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17256    fi
17257  fi
17258
17259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17262  # "foo.exe" is OK but "foo" is an error.
17263  #
17264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17265  # It is also a way to make sure we got the proper file name for the real test later on.
17266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17267  if test "x$test_shortpath" = x; then
17268    # Short path failed, file does not exist as specified.
17269    # Try adding .exe or .cmd
17270    if test -f "${new_path}.exe"; then
17271       input_to_shortpath="${new_path}.exe"
17272    elif test -f "${new_path}.cmd"; then
17273       input_to_shortpath="${new_path}.cmd"
17274    else
17275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17276$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17277      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17278$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17279      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17280    fi
17281  else
17282    input_to_shortpath="$new_path"
17283  fi
17284
17285  # Call helper function which possibly converts this using DOS-style short mode.
17286  # If so, the updated path is stored in $new_path.
17287  new_path="$input_to_shortpath"
17288
17289  input_path="$input_to_shortpath"
17290  # Check if we need to convert this using DOS-style short mode. If the path
17291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17292  # take no chances and rewrite it.
17293  # Note: m4 eats our [], so we need to use [ and ] instead.
17294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17295  if test "x$has_forbidden_chars" != x; then
17296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17300      # Going to short mode and back again did indeed matter. Since short mode is
17301      # case insensitive, let's make it lowercase to improve readability.
17302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17303      # Now convert it back to Unix-stile (cygpath)
17304      input_path=`$CYGPATH -u "$shortmode_path"`
17305      new_path="$input_path"
17306    fi
17307  fi
17308
17309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17310  if test "x$test_cygdrive_prefix" = x; then
17311    # As a simple fix, exclude /usr/bin since it's not a real path.
17312    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17314      # a path prefixed by /cygdrive for fixpath to work.
17315      new_path="$CYGWIN_ROOT_PATH$input_path"
17316    fi
17317  fi
17318
17319  # remove trailing .exe if any
17320  new_path="${new_path/%.exe/}"
17321
17322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17323
17324  # First separate the path from the arguments. This will split at the first
17325  # space.
17326  complete="$BUILD_LD"
17327  path="${complete%% *}"
17328  tmp="$complete EOL"
17329  arguments="${tmp#* }"
17330
17331  # Input might be given as Windows format, start by converting to
17332  # unix format.
17333  new_path="$path"
17334
17335  windows_path="$new_path"
17336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17337    unix_path=`$CYGPATH -u "$windows_path"`
17338    new_path="$unix_path"
17339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17341    new_path="$unix_path"
17342  fi
17343
17344
17345  # Now try to locate executable using which
17346  new_path=`$WHICH "$new_path" 2> /dev/null`
17347
17348  if test "x$new_path" = x; then
17349    # Oops. Which didn't find the executable.
17350    # The splitting of arguments from the executable at a space might have been incorrect,
17351    # since paths with space are more likely in Windows. Give it another try with the whole
17352    # argument.
17353    path="$complete"
17354    arguments="EOL"
17355    new_path="$path"
17356
17357  windows_path="$new_path"
17358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17359    unix_path=`$CYGPATH -u "$windows_path"`
17360    new_path="$unix_path"
17361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17363    new_path="$unix_path"
17364  fi
17365
17366
17367    new_path=`$WHICH "$new_path" 2> /dev/null`
17368
17369    if test "x$new_path" = x; then
17370      # It's still not found. Now this is an unrecoverable error.
17371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17372$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17373      has_space=`$ECHO "$complete" | $GREP " "`
17374      if test "x$has_space" != x; then
17375        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17376$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17377      fi
17378      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17379    fi
17380  fi
17381
17382  # Now new_path has a complete unix path to the binary
17383  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17384    # Keep paths in /bin as-is, but remove trailing .exe if any
17385    new_path="${new_path/%.exe/}"
17386    # Do not save /bin paths to all_fixpath_prefixes!
17387  else
17388    # Not in mixed or Windows style, start by that.
17389    new_path=`cmd //c echo $new_path`
17390
17391  input_path="$new_path"
17392  # Check if we need to convert this using DOS-style short mode. If the path
17393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17394  # take no chances and rewrite it.
17395  # Note: m4 eats our [], so we need to use [ and ] instead.
17396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17397  if test "x$has_forbidden_chars" != x; then
17398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17400  fi
17401
17402    # Output is in $new_path
17403
17404  windows_path="$new_path"
17405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17406    unix_path=`$CYGPATH -u "$windows_path"`
17407    new_path="$unix_path"
17408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17410    new_path="$unix_path"
17411  fi
17412
17413    # remove trailing .exe if any
17414    new_path="${new_path/%.exe/}"
17415
17416    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17417    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17418  fi
17419
17420  else
17421    # We're on a posix platform. Hooray! :)
17422    # First separate the path from the arguments. This will split at the first
17423    # space.
17424    complete="$BUILD_LD"
17425    path="${complete%% *}"
17426    tmp="$complete EOL"
17427    arguments="${tmp#* }"
17428
17429    new_path=`$WHICH $path 2> /dev/null`
17430    if test "x$new_path" = x; then
17431      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17432      if test "x$is_absolute_path" != x; then
17433        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&5
17434$as_echo "$as_me: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&6;}
17435        new_path="$path"
17436      else
17437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17438$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17439        has_space=`$ECHO "$complete" | $GREP " "`
17440        if test "x$has_space" != x; then
17441          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17442$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17443        fi
17444        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17445      fi
17446    fi
17447  fi
17448
17449  # Now join together the path and the arguments once again
17450  if test "x$arguments" != xEOL; then
17451      new_complete="$new_path ${arguments% *}"
17452  else
17453      new_complete="$new_path"
17454  fi
17455
17456  if test "x$complete" != "x$new_complete"; then
17457    BUILD_LD="$new_complete"
17458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17459$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17460  fi
17461
17462fi
17463
17464
17465
17466
17467# If a devkit is found on the builddeps server, then prepend its path to the
17468# PATH variable. If there are cross compilers available in the devkit, these
17469# will be found by AC_PROG_CC et al.
17470DEVKIT=
17471
17472
17473    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17474        # Source the builddeps file again, to make sure it uses the latest variables!
17475        . $builddepsfile
17476        # Look for a target and build machine specific resource!
17477        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17478        if test "x$resource" = x; then
17479            # Ok, lets instead look for a target specific resource
17480            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17481        fi
17482        if test "x$resource" = x; then
17483            # Ok, lets instead look for a build specific resource
17484            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17485        fi
17486        if test "x$resource" = x; then
17487            # Ok, lets instead look for a generic resource
17488            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17489            resource=${builddep_devkit}
17490        fi
17491        if test "x$resource" != x; then
17492            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17493$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17494	    # If the resource in the builddeps.conf file is an existing directory,
17495	    # for example /java/linux/cups
17496	    if test -d ${resource}; then
17497	       depdir=${resource}
17498	    else
17499
17500# devkit is for example mymodule
17501# $resource is for example libs/general/libmymod_1_2_3.zip
17502# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17503# $with_builddeps_dir is for example /localhome/builddeps
17504# depdir is the name of the variable into which we store the depdir, eg MYMOD
17505# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17506# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17507    filename=`basename $resource`
17508    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17509    filebase=${filename%%.*}
17510    extension=${filename#*.}
17511    installdir=$with_builddeps_dir/$filebase
17512    if test ! -f $installdir/$filename.unpacked; then
17513        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17514$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17515        if test ! -d $installdir; then
17516            mkdir -p $installdir
17517        fi
17518        if test ! -d $installdir; then
17519            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17520        fi
17521        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17522        touch $tmpfile
17523        if test ! -f $tmpfile; then
17524            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17525        fi
17526
17527    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17528    # $tmpfile is the local file name for the downloaded file.
17529    VALID_TOOL=no
17530    if test "x$BDEPS_FTP" = xwget; then
17531       VALID_TOOL=yes
17532       wget -O $tmpfile $with_builddeps_server/$resource
17533    fi
17534    if test "x$BDEPS_FTP" = xlftp; then
17535       VALID_TOOL=yes
17536       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17537    fi
17538    if test "x$BDEPS_FTP" = xftp; then
17539        VALID_TOOL=yes
17540        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17541        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17542        FTPUSERPWD=${FTPSERVER%%@*}
17543        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17544            FTPUSER=${userpwd%%:*}
17545            FTPPWD=${userpwd#*@}
17546            FTPSERVER=${FTPSERVER#*@}
17547        else
17548            FTPUSER=ftp
17549            FTPPWD=ftp
17550        fi
17551        # the "pass" command does not work on some
17552        # ftp clients (read ftp.exe) but if it works,
17553        # passive mode is better!
17554        (\
17555            echo "user $FTPUSER $FTPPWD"        ;\
17556            echo "pass"                         ;\
17557            echo "bin"                          ;\
17558            echo "get $FTPPATH $tmpfile"              ;\
17559        ) | ftp -in $FTPSERVER
17560    fi
17561    if test "x$VALID_TOOL" != xyes; then
17562       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17563    fi
17564
17565        mv $tmpfile $installdir/$filename
17566        if test ! -s $installdir/$filename; then
17567            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17568        fi
17569        case "$extension" in
17570            zip)  echo "Unzipping $installdir/$filename..."
17571               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17572            ;;
17573            tar.gz) echo "Untaring $installdir/$filename..."
17574               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17575            ;;
17576            tgz) echo "Untaring $installdir/$filename..."
17577               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17578            ;;
17579            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
17580            ;;
17581        esac
17582    fi
17583    if test -f $installdir/$filename.unpacked; then
17584        depdir=$installdir
17585    fi
17586
17587	    fi
17588            # Source the builddeps file again, because in the previous command, the depdir
17589            # was updated to point at the current build dependency install directory.
17590            . $builddepsfile
17591            # Now extract variables from the builddeps.conf files.
17592            theroot=${builddep_devkit_ROOT}
17593            thecflags=${builddep_devkit_CFLAGS}
17594            thelibs=${builddep_devkit_LIBS}
17595            if test "x$depdir" = x; then
17596                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
17597            fi
17598            DEVKIT=$depdir
17599            if test "x$theroot" != x; then
17600               DEVKIT="$theroot"
17601            fi
17602            if test "x$thecflags" != x; then
17603               DEVKIT_CFLAGS="$thecflags"
17604            fi
17605            if test "x$thelibs" != x; then
17606               DEVKIT_LIBS="$thelibs"
17607            fi
17608            # Found devkit
17609                     PATH="$DEVKIT/bin:$PATH"
17610                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
17611                     if test "x$x_includes" = "xNONE"; then
17612                         x_includes="$SYS_ROOT/usr/include/X11"
17613                     fi
17614                     if test "x$x_libraries" = "xNONE"; then
17615                         x_libraries="$SYS_ROOT/usr/lib"
17616                     fi
17617
17618
17619        fi
17620
17621    fi
17622
17623
17624if test "x$SYS_ROOT" != "x/" ; then
17625    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
17626    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
17627    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17628    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17629    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
17630    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
17631fi
17632
17633# Store the CFLAGS etal passed to the configure script.
17634ORG_CFLAGS="$CFLAGS"
17635ORG_CXXFLAGS="$CXXFLAGS"
17636ORG_OBJCFLAGS="$OBJCFLAGS"
17637
17638# autoconf magic only relies on PATH, so update it if tools dir is specified
17639OLD_PATH="$PATH"
17640if test "x$TOOLS_DIR" != x; then
17641  PATH=$TOOLS_DIR:$PATH
17642fi
17643
17644
17645### Locate C compiler (CC)
17646
17647# gcc is almost always present, but on Windows we
17648# prefer cl.exe and on Solaris we prefer CC.
17649# Thus test for them in this order.
17650if test "x$OPENJDK_TARGET_OS" = xmacosx; then
17651  # Do not probe for cc on MacOSX.
17652  COMPILER_CHECK_LIST="cl gcc"
17653else
17654  COMPILER_CHECK_LIST="cl cc gcc"
17655fi
17656
17657
17658  COMPILER_NAME=C
17659
17660  # Do a first initial attempt at searching the list of compiler names.
17661  # AC_PATH_PROGS can't be run multiple times with the same variable,
17662  # so create a new name for this run.
17663  for ac_prog in $COMPILER_CHECK_LIST
17664do
17665  # Extract the first word of "$ac_prog", so it can be a program name with args.
17666set dummy $ac_prog; ac_word=$2
17667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17668$as_echo_n "checking for $ac_word... " >&6; }
17669if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
17670  $as_echo_n "(cached) " >&6
17671else
17672  case $POTENTIAL_CC in
17673  [\\/]* | ?:[\\/]*)
17674  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
17675  ;;
17676  *)
17677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17678for as_dir in $PATH
17679do
17680  IFS=$as_save_IFS
17681  test -z "$as_dir" && as_dir=.
17682    for ac_exec_ext in '' $ac_executable_extensions; do
17683  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17684    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
17685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17686    break 2
17687  fi
17688done
17689  done
17690IFS=$as_save_IFS
17691
17692  ;;
17693esac
17694fi
17695POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
17696if test -n "$POTENTIAL_CC"; then
17697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
17698$as_echo "$POTENTIAL_CC" >&6; }
17699else
17700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17701$as_echo "no" >&6; }
17702fi
17703
17704
17705  test -n "$POTENTIAL_CC" && break
17706done
17707
17708  CC=$POTENTIAL_CC
17709
17710  if test "x$$CC" = x; then
17711
17712    # Print a helpful message on how to acquire the necessary build dependency.
17713    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
17714    MISSING_DEPENDENCY=devkit
17715    PKGHANDLER_COMMAND=
17716
17717    case $PKGHANDLER in
17718	apt-get)
17719                apt_help     $MISSING_DEPENDENCY ;;
17720    yum)
17721                yum_help     $MISSING_DEPENDENCY ;;
17722	port)
17723                port_help    $MISSING_DEPENDENCY ;;
17724	pkgutil)
17725                pkgutil_help $MISSING_DEPENDENCY ;;
17726	pkgadd)
17727                pkgadd_help  $MISSING_DEPENDENCY ;;
17728    * )
17729      break ;;
17730    esac
17731
17732    if test "x$PKGHANDLER_COMMAND" != x; then
17733        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
17734    fi
17735
17736      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
17737  fi
17738
17739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17740
17741  # First separate the path from the arguments. This will split at the first
17742  # space.
17743  complete="$CC"
17744  path="${complete%% *}"
17745  tmp="$complete EOL"
17746  arguments="${tmp#* }"
17747
17748  # Input might be given as Windows format, start by converting to
17749  # unix format.
17750  new_path=`$CYGPATH -u "$path"`
17751
17752  # Now try to locate executable using which
17753  new_path=`$WHICH "$new_path" 2> /dev/null`
17754  # bat and cmd files are not always considered executable in cygwin causing which
17755  # to not find them
17756  if test "x$new_path" = x \
17757           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17758           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17759    new_path=`$CYGPATH -u "$path"`
17760  fi
17761  if test "x$new_path" = x; then
17762    # Oops. Which didn't find the executable.
17763    # The splitting of arguments from the executable at a space might have been incorrect,
17764    # since paths with space are more likely in Windows. Give it another try with the whole
17765    # argument.
17766    path="$complete"
17767    arguments="EOL"
17768    new_path=`$CYGPATH -u "$path"`
17769    new_path=`$WHICH "$new_path" 2> /dev/null`
17770    # bat and cmd files are not always considered executable in cygwin causing which
17771    # to not find them
17772    if test "x$new_path" = x \
17773             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17774             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17775      new_path=`$CYGPATH -u "$path"`
17776    fi
17777    if test "x$new_path" = x; then
17778      # It's still not found. Now this is an unrecoverable error.
17779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17780$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17781      has_space=`$ECHO "$complete" | $GREP " "`
17782      if test "x$has_space" != x; then
17783        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17784$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17785      fi
17786      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17787    fi
17788  fi
17789
17790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17793  # "foo.exe" is OK but "foo" is an error.
17794  #
17795  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17796  # It is also a way to make sure we got the proper file name for the real test later on.
17797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17798  if test "x$test_shortpath" = x; then
17799    # Short path failed, file does not exist as specified.
17800    # Try adding .exe or .cmd
17801    if test -f "${new_path}.exe"; then
17802       input_to_shortpath="${new_path}.exe"
17803    elif test -f "${new_path}.cmd"; then
17804       input_to_shortpath="${new_path}.cmd"
17805    else
17806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
17807$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
17808      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17809$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17810      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17811    fi
17812  else
17813    input_to_shortpath="$new_path"
17814  fi
17815
17816  # Call helper function which possibly converts this using DOS-style short mode.
17817  # If so, the updated path is stored in $new_path.
17818  new_path="$input_to_shortpath"
17819
17820  input_path="$input_to_shortpath"
17821  # Check if we need to convert this using DOS-style short mode. If the path
17822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17823  # take no chances and rewrite it.
17824  # Note: m4 eats our [], so we need to use [ and ] instead.
17825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17826  if test "x$has_forbidden_chars" != x; then
17827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17831      # Going to short mode and back again did indeed matter. Since short mode is
17832      # case insensitive, let's make it lowercase to improve readability.
17833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17834      # Now convert it back to Unix-stile (cygpath)
17835      input_path=`$CYGPATH -u "$shortmode_path"`
17836      new_path="$input_path"
17837    fi
17838  fi
17839
17840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17841  if test "x$test_cygdrive_prefix" = x; then
17842    # As a simple fix, exclude /usr/bin since it's not a real path.
17843    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17845      # a path prefixed by /cygdrive for fixpath to work.
17846      new_path="$CYGWIN_ROOT_PATH$input_path"
17847    fi
17848  fi
17849
17850  # remove trailing .exe if any
17851  new_path="${new_path/%.exe/}"
17852
17853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17854
17855  # First separate the path from the arguments. This will split at the first
17856  # space.
17857  complete="$CC"
17858  path="${complete%% *}"
17859  tmp="$complete EOL"
17860  arguments="${tmp#* }"
17861
17862  # Input might be given as Windows format, start by converting to
17863  # unix format.
17864  new_path="$path"
17865
17866  windows_path="$new_path"
17867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17868    unix_path=`$CYGPATH -u "$windows_path"`
17869    new_path="$unix_path"
17870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17872    new_path="$unix_path"
17873  fi
17874
17875
17876  # Now try to locate executable using which
17877  new_path=`$WHICH "$new_path" 2> /dev/null`
17878
17879  if test "x$new_path" = x; then
17880    # Oops. Which didn't find the executable.
17881    # The splitting of arguments from the executable at a space might have been incorrect,
17882    # since paths with space are more likely in Windows. Give it another try with the whole
17883    # argument.
17884    path="$complete"
17885    arguments="EOL"
17886    new_path="$path"
17887
17888  windows_path="$new_path"
17889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17890    unix_path=`$CYGPATH -u "$windows_path"`
17891    new_path="$unix_path"
17892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17894    new_path="$unix_path"
17895  fi
17896
17897
17898    new_path=`$WHICH "$new_path" 2> /dev/null`
17899
17900    if test "x$new_path" = x; then
17901      # It's still not found. Now this is an unrecoverable error.
17902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17903$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17904      has_space=`$ECHO "$complete" | $GREP " "`
17905      if test "x$has_space" != x; then
17906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17908      fi
17909      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17910    fi
17911  fi
17912
17913  # Now new_path has a complete unix path to the binary
17914  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17915    # Keep paths in /bin as-is, but remove trailing .exe if any
17916    new_path="${new_path/%.exe/}"
17917    # Do not save /bin paths to all_fixpath_prefixes!
17918  else
17919    # Not in mixed or Windows style, start by that.
17920    new_path=`cmd //c echo $new_path`
17921
17922  input_path="$new_path"
17923  # Check if we need to convert this using DOS-style short mode. If the path
17924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17925  # take no chances and rewrite it.
17926  # Note: m4 eats our [], so we need to use [ and ] instead.
17927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17928  if test "x$has_forbidden_chars" != x; then
17929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17931  fi
17932
17933    # Output is in $new_path
17934
17935  windows_path="$new_path"
17936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17937    unix_path=`$CYGPATH -u "$windows_path"`
17938    new_path="$unix_path"
17939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17941    new_path="$unix_path"
17942  fi
17943
17944    # remove trailing .exe if any
17945    new_path="${new_path/%.exe/}"
17946
17947    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17948    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17949  fi
17950
17951  else
17952    # We're on a posix platform. Hooray! :)
17953    # First separate the path from the arguments. This will split at the first
17954    # space.
17955    complete="$CC"
17956    path="${complete%% *}"
17957    tmp="$complete EOL"
17958    arguments="${tmp#* }"
17959
17960    new_path=`$WHICH $path 2> /dev/null`
17961    if test "x$new_path" = x; then
17962      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17963      if test "x$is_absolute_path" != x; then
17964        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) with 'which' failed, using $path directly." >&5
17965$as_echo "$as_me: Resolving CC (as $path) with 'which' failed, using $path directly." >&6;}
17966        new_path="$path"
17967      else
17968        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17969$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17970        has_space=`$ECHO "$complete" | $GREP " "`
17971        if test "x$has_space" != x; then
17972          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17973$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17974        fi
17975        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17976      fi
17977    fi
17978  fi
17979
17980  # Now join together the path and the arguments once again
17981  if test "x$arguments" != xEOL; then
17982      new_complete="$new_path ${arguments% *}"
17983  else
17984      new_complete="$new_path"
17985  fi
17986
17987  if test "x$complete" != "x$new_complete"; then
17988    CC="$new_complete"
17989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
17990$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
17991  fi
17992
17993  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
17994$as_echo_n "checking resolved symbolic links for CC... " >&6; }
17995  TEST_COMPILER="$CC"
17996
17997    if test "x$OPENJDK_BUILD_OS" != xwindows; then
17998        # Follow a chain of symbolic links. Use readlink
17999        # where it exists, else fall back to horribly
18000        # complicated shell code.
18001        if test "x$READLINK_TESTED" != yes; then
18002            # On MacOSX there is a readlink tool with a different
18003            # purpose than the GNU readlink tool. Check the found readlink.
18004            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
18005            if test "x$ISGNU" = x; then
18006                 # A readlink that we do not know how to use.
18007                 # Are there other non-GNU readlinks out there?
18008                 READLINK_TESTED=yes
18009                 READLINK=
18010            fi
18011        fi
18012
18013        if test "x$READLINK" != x; then
18014            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18015        else
18016            STARTDIR=$PWD
18017            COUNTER=0
18018            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18019            sym_link_file=`$BASENAME $TEST_COMPILER`
18020            while test $COUNTER -lt 20; do
18021                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18022                if test "x$ISLINK" == x; then
18023                    # This is not a symbolic link! We are done!
18024                    break
18025                fi
18026                # The link might be relative! We have to use cd to travel safely.
18027                cd $sym_link_dir
18028                # ... and we must get the to the absolute path, not one using symbolic links.
18029                cd `pwd -P`
18030                cd `$DIRNAME $ISLINK`
18031                sym_link_dir=`$THEPWDCMD`
18032                sym_link_file=`$BASENAME $ISLINK`
18033                let COUNTER=COUNTER+1
18034            done
18035            cd $STARTDIR
18036            TEST_COMPILER=$sym_link_dir/$sym_link_file
18037        fi
18038    fi
18039
18040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18041$as_echo "$TEST_COMPILER" >&6; }
18042  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18043$as_echo_n "checking if CC is disguised ccache... " >&6; }
18044
18045  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18046  if test "x$COMPILER_BASENAME" = "xccache"; then
18047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18048$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18049    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18050    # We want to control ccache invocation ourselves, so ignore this cc and try
18051    # searching again.
18052
18053    # Remove the path to the fake ccache cc from the PATH
18054    RETRY_COMPILER_SAVED_PATH="$PATH"
18055    COMPILER_DIRNAME=`$DIRNAME $CC`
18056    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18057
18058    # Try again looking for our compiler
18059    if test -n "$ac_tool_prefix"; then
18060  for ac_prog in $COMPILER_CHECK_LIST
18061  do
18062    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18063set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18065$as_echo_n "checking for $ac_word... " >&6; }
18066if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18067  $as_echo_n "(cached) " >&6
18068else
18069  if test -n "$PROPER_COMPILER_CC"; then
18070  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18071else
18072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18073for as_dir in $PATH
18074do
18075  IFS=$as_save_IFS
18076  test -z "$as_dir" && as_dir=.
18077    for ac_exec_ext in '' $ac_executable_extensions; do
18078  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18079    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18081    break 2
18082  fi
18083done
18084  done
18085IFS=$as_save_IFS
18086
18087fi
18088fi
18089PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18090if test -n "$PROPER_COMPILER_CC"; then
18091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18092$as_echo "$PROPER_COMPILER_CC" >&6; }
18093else
18094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18095$as_echo "no" >&6; }
18096fi
18097
18098
18099    test -n "$PROPER_COMPILER_CC" && break
18100  done
18101fi
18102if test -z "$PROPER_COMPILER_CC"; then
18103  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18104  for ac_prog in $COMPILER_CHECK_LIST
18105do
18106  # Extract the first word of "$ac_prog", so it can be a program name with args.
18107set dummy $ac_prog; ac_word=$2
18108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18109$as_echo_n "checking for $ac_word... " >&6; }
18110if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18111  $as_echo_n "(cached) " >&6
18112else
18113  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18114  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18115else
18116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18117for as_dir in $PATH
18118do
18119  IFS=$as_save_IFS
18120  test -z "$as_dir" && as_dir=.
18121    for ac_exec_ext in '' $ac_executable_extensions; do
18122  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18123    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18125    break 2
18126  fi
18127done
18128  done
18129IFS=$as_save_IFS
18130
18131fi
18132fi
18133ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18134if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18136$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18137else
18138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18139$as_echo "no" >&6; }
18140fi
18141
18142
18143  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18144done
18145
18146  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18147    PROPER_COMPILER_CC=""
18148  else
18149    case $cross_compiling:$ac_tool_warned in
18150yes:)
18151{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18152$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18153ac_tool_warned=yes ;;
18154esac
18155    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18156  fi
18157fi
18158
18159
18160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18161
18162  # First separate the path from the arguments. This will split at the first
18163  # space.
18164  complete="$PROPER_COMPILER_CC"
18165  path="${complete%% *}"
18166  tmp="$complete EOL"
18167  arguments="${tmp#* }"
18168
18169  # Input might be given as Windows format, start by converting to
18170  # unix format.
18171  new_path=`$CYGPATH -u "$path"`
18172
18173  # Now try to locate executable using which
18174  new_path=`$WHICH "$new_path" 2> /dev/null`
18175  # bat and cmd files are not always considered executable in cygwin causing which
18176  # to not find them
18177  if test "x$new_path" = x \
18178           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18179           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18180    new_path=`$CYGPATH -u "$path"`
18181  fi
18182  if test "x$new_path" = x; then
18183    # Oops. Which didn't find the executable.
18184    # The splitting of arguments from the executable at a space might have been incorrect,
18185    # since paths with space are more likely in Windows. Give it another try with the whole
18186    # argument.
18187    path="$complete"
18188    arguments="EOL"
18189    new_path=`$CYGPATH -u "$path"`
18190    new_path=`$WHICH "$new_path" 2> /dev/null`
18191    # bat and cmd files are not always considered executable in cygwin causing which
18192    # to not find them
18193    if test "x$new_path" = x \
18194             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18195             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18196      new_path=`$CYGPATH -u "$path"`
18197    fi
18198    if test "x$new_path" = x; then
18199      # It's still not found. Now this is an unrecoverable error.
18200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18201$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18202      has_space=`$ECHO "$complete" | $GREP " "`
18203      if test "x$has_space" != x; then
18204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18206      fi
18207      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18208    fi
18209  fi
18210
18211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18214  # "foo.exe" is OK but "foo" is an error.
18215  #
18216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18217  # It is also a way to make sure we got the proper file name for the real test later on.
18218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18219  if test "x$test_shortpath" = x; then
18220    # Short path failed, file does not exist as specified.
18221    # Try adding .exe or .cmd
18222    if test -f "${new_path}.exe"; then
18223       input_to_shortpath="${new_path}.exe"
18224    elif test -f "${new_path}.cmd"; then
18225       input_to_shortpath="${new_path}.cmd"
18226    else
18227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18228$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18229      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18230$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18231      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18232    fi
18233  else
18234    input_to_shortpath="$new_path"
18235  fi
18236
18237  # Call helper function which possibly converts this using DOS-style short mode.
18238  # If so, the updated path is stored in $new_path.
18239  new_path="$input_to_shortpath"
18240
18241  input_path="$input_to_shortpath"
18242  # Check if we need to convert this using DOS-style short mode. If the path
18243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18244  # take no chances and rewrite it.
18245  # Note: m4 eats our [], so we need to use [ and ] instead.
18246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18247  if test "x$has_forbidden_chars" != x; then
18248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18252      # Going to short mode and back again did indeed matter. Since short mode is
18253      # case insensitive, let's make it lowercase to improve readability.
18254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18255      # Now convert it back to Unix-stile (cygpath)
18256      input_path=`$CYGPATH -u "$shortmode_path"`
18257      new_path="$input_path"
18258    fi
18259  fi
18260
18261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18262  if test "x$test_cygdrive_prefix" = x; then
18263    # As a simple fix, exclude /usr/bin since it's not a real path.
18264    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18266      # a path prefixed by /cygdrive for fixpath to work.
18267      new_path="$CYGWIN_ROOT_PATH$input_path"
18268    fi
18269  fi
18270
18271  # remove trailing .exe if any
18272  new_path="${new_path/%.exe/}"
18273
18274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18275
18276  # First separate the path from the arguments. This will split at the first
18277  # space.
18278  complete="$PROPER_COMPILER_CC"
18279  path="${complete%% *}"
18280  tmp="$complete EOL"
18281  arguments="${tmp#* }"
18282
18283  # Input might be given as Windows format, start by converting to
18284  # unix format.
18285  new_path="$path"
18286
18287  windows_path="$new_path"
18288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18289    unix_path=`$CYGPATH -u "$windows_path"`
18290    new_path="$unix_path"
18291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18293    new_path="$unix_path"
18294  fi
18295
18296
18297  # Now try to locate executable using which
18298  new_path=`$WHICH "$new_path" 2> /dev/null`
18299
18300  if test "x$new_path" = x; then
18301    # Oops. Which didn't find the executable.
18302    # The splitting of arguments from the executable at a space might have been incorrect,
18303    # since paths with space are more likely in Windows. Give it another try with the whole
18304    # argument.
18305    path="$complete"
18306    arguments="EOL"
18307    new_path="$path"
18308
18309  windows_path="$new_path"
18310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18311    unix_path=`$CYGPATH -u "$windows_path"`
18312    new_path="$unix_path"
18313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18315    new_path="$unix_path"
18316  fi
18317
18318
18319    new_path=`$WHICH "$new_path" 2> /dev/null`
18320
18321    if test "x$new_path" = x; then
18322      # It's still not found. Now this is an unrecoverable error.
18323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18324$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18325      has_space=`$ECHO "$complete" | $GREP " "`
18326      if test "x$has_space" != x; then
18327        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18328$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18329      fi
18330      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18331    fi
18332  fi
18333
18334  # Now new_path has a complete unix path to the binary
18335  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18336    # Keep paths in /bin as-is, but remove trailing .exe if any
18337    new_path="${new_path/%.exe/}"
18338    # Do not save /bin paths to all_fixpath_prefixes!
18339  else
18340    # Not in mixed or Windows style, start by that.
18341    new_path=`cmd //c echo $new_path`
18342
18343  input_path="$new_path"
18344  # Check if we need to convert this using DOS-style short mode. If the path
18345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18346  # take no chances and rewrite it.
18347  # Note: m4 eats our [], so we need to use [ and ] instead.
18348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18349  if test "x$has_forbidden_chars" != x; then
18350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18352  fi
18353
18354    # Output is in $new_path
18355
18356  windows_path="$new_path"
18357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18358    unix_path=`$CYGPATH -u "$windows_path"`
18359    new_path="$unix_path"
18360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18362    new_path="$unix_path"
18363  fi
18364
18365    # remove trailing .exe if any
18366    new_path="${new_path/%.exe/}"
18367
18368    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18369    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18370  fi
18371
18372  else
18373    # We're on a posix platform. Hooray! :)
18374    # First separate the path from the arguments. This will split at the first
18375    # space.
18376    complete="$PROPER_COMPILER_CC"
18377    path="${complete%% *}"
18378    tmp="$complete EOL"
18379    arguments="${tmp#* }"
18380
18381    new_path=`$WHICH $path 2> /dev/null`
18382    if test "x$new_path" = x; then
18383      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18384      if test "x$is_absolute_path" != x; then
18385        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&5
18386$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&6;}
18387        new_path="$path"
18388      else
18389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18390$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18391        has_space=`$ECHO "$complete" | $GREP " "`
18392        if test "x$has_space" != x; then
18393          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18394$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18395        fi
18396        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18397      fi
18398    fi
18399  fi
18400
18401  # Now join together the path and the arguments once again
18402  if test "x$arguments" != xEOL; then
18403      new_complete="$new_path ${arguments% *}"
18404  else
18405      new_complete="$new_path"
18406  fi
18407
18408  if test "x$complete" != "x$new_complete"; then
18409    PROPER_COMPILER_CC="$new_complete"
18410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18411$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18412  fi
18413
18414    PATH="$RETRY_COMPILER_SAVED_PATH"
18415
18416    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18417$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18418
18419    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18420        # Follow a chain of symbolic links. Use readlink
18421        # where it exists, else fall back to horribly
18422        # complicated shell code.
18423        if test "x$READLINK_TESTED" != yes; then
18424            # On MacOSX there is a readlink tool with a different
18425            # purpose than the GNU readlink tool. Check the found readlink.
18426            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
18427            if test "x$ISGNU" = x; then
18428                 # A readlink that we do not know how to use.
18429                 # Are there other non-GNU readlinks out there?
18430                 READLINK_TESTED=yes
18431                 READLINK=
18432            fi
18433        fi
18434
18435        if test "x$READLINK" != x; then
18436            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18437        else
18438            STARTDIR=$PWD
18439            COUNTER=0
18440            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18441            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18442            while test $COUNTER -lt 20; do
18443                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18444                if test "x$ISLINK" == x; then
18445                    # This is not a symbolic link! We are done!
18446                    break
18447                fi
18448                # The link might be relative! We have to use cd to travel safely.
18449                cd $sym_link_dir
18450                # ... and we must get the to the absolute path, not one using symbolic links.
18451                cd `pwd -P`
18452                cd `$DIRNAME $ISLINK`
18453                sym_link_dir=`$THEPWDCMD`
18454                sym_link_file=`$BASENAME $ISLINK`
18455                let COUNTER=COUNTER+1
18456            done
18457            cd $STARTDIR
18458            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18459        fi
18460    fi
18461
18462    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18463$as_echo "$PROPER_COMPILER_CC" >&6; }
18464    CC="$PROPER_COMPILER_CC"
18465  else
18466    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18467$as_echo "no, keeping CC" >&6; }
18468    CC="$TEST_COMPILER"
18469  fi
18470
18471  COMPILER=$CC
18472  COMPILER_NAME=$COMPILER_NAME
18473
18474  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18475    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18476    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18477    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18478    if test $? -ne 0; then
18479      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18480
18481      { $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
18482$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18483      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18484$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18485      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18486    else
18487      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18488      COMPILER_VENDOR="Sun Studio"
18489    fi
18490  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18491    # First line typically looks something like:
18492    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18493    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18494    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18495    COMPILER_VENDOR="Microsoft CL.EXE"
18496    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18497    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18498      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18499        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
18500      fi
18501    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18502      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18503        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
18504      fi
18505    fi
18506  else
18507    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18508    # Check that this is likely to be GCC.
18509    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
18510    if test $? -ne 0; then
18511      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
18512$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
18513      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
18514$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
18515      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18516    fi
18517
18518    # First line typically looks something like:
18519    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
18520    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
18521    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
18522  fi
18523  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
18524  CC_VERSION="$COMPILER_VERSION"
18525  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
18526  CC_VENDOR="$COMPILER_VENDOR"
18527
18528  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
18529$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
18530
18531
18532# Now that we have resolved CC ourself, let autoconf have it's go at it
18533ac_ext=c
18534ac_cpp='$CPP $CPPFLAGS'
18535ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18536ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18537ac_compiler_gnu=$ac_cv_c_compiler_gnu
18538if test -n "$ac_tool_prefix"; then
18539  for ac_prog in $CC
18540  do
18541    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18542set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18544$as_echo_n "checking for $ac_word... " >&6; }
18545if test "${ac_cv_prog_CC+set}" = set; then :
18546  $as_echo_n "(cached) " >&6
18547else
18548  if test -n "$CC"; then
18549  ac_cv_prog_CC="$CC" # Let the user override the test.
18550else
18551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18552for as_dir in $PATH
18553do
18554  IFS=$as_save_IFS
18555  test -z "$as_dir" && as_dir=.
18556    for ac_exec_ext in '' $ac_executable_extensions; do
18557  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18558    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
18559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18560    break 2
18561  fi
18562done
18563  done
18564IFS=$as_save_IFS
18565
18566fi
18567fi
18568CC=$ac_cv_prog_CC
18569if test -n "$CC"; then
18570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
18571$as_echo "$CC" >&6; }
18572else
18573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18574$as_echo "no" >&6; }
18575fi
18576
18577
18578    test -n "$CC" && break
18579  done
18580fi
18581if test -z "$CC"; then
18582  ac_ct_CC=$CC
18583  for ac_prog in $CC
18584do
18585  # Extract the first word of "$ac_prog", so it can be a program name with args.
18586set dummy $ac_prog; ac_word=$2
18587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18588$as_echo_n "checking for $ac_word... " >&6; }
18589if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
18590  $as_echo_n "(cached) " >&6
18591else
18592  if test -n "$ac_ct_CC"; then
18593  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
18594else
18595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18596for as_dir in $PATH
18597do
18598  IFS=$as_save_IFS
18599  test -z "$as_dir" && as_dir=.
18600    for ac_exec_ext in '' $ac_executable_extensions; do
18601  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18602    ac_cv_prog_ac_ct_CC="$ac_prog"
18603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18604    break 2
18605  fi
18606done
18607  done
18608IFS=$as_save_IFS
18609
18610fi
18611fi
18612ac_ct_CC=$ac_cv_prog_ac_ct_CC
18613if test -n "$ac_ct_CC"; then
18614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
18615$as_echo "$ac_ct_CC" >&6; }
18616else
18617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18618$as_echo "no" >&6; }
18619fi
18620
18621
18622  test -n "$ac_ct_CC" && break
18623done
18624
18625  if test "x$ac_ct_CC" = x; then
18626    CC=""
18627  else
18628    case $cross_compiling:$ac_tool_warned in
18629yes:)
18630{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18631$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18632ac_tool_warned=yes ;;
18633esac
18634    CC=$ac_ct_CC
18635  fi
18636fi
18637
18638
18639test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18640$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18641as_fn_error $? "no acceptable C compiler found in \$PATH
18642See \`config.log' for more details" "$LINENO" 5 ; }
18643
18644# Provide some information about the compiler.
18645$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
18646set X $ac_compile
18647ac_compiler=$2
18648for ac_option in --version -v -V -qversion; do
18649  { { ac_try="$ac_compiler $ac_option >&5"
18650case "(($ac_try" in
18651  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18652  *) ac_try_echo=$ac_try;;
18653esac
18654eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18655$as_echo "$ac_try_echo"; } >&5
18656  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
18657  ac_status=$?
18658  if test -s conftest.err; then
18659    sed '10a\
18660... rest of stderr output deleted ...
18661         10q' conftest.err >conftest.er1
18662    cat conftest.er1 >&5
18663  fi
18664  rm -f conftest.er1 conftest.err
18665  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18666  test $ac_status = 0; }
18667done
18668
18669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18670/* end confdefs.h.  */
18671
18672int
18673main ()
18674{
18675
18676  ;
18677  return 0;
18678}
18679_ACEOF
18680ac_clean_files_save=$ac_clean_files
18681ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
18682# Try to create an executable without -o first, disregard a.out.
18683# It will help us diagnose broken compilers, and finding out an intuition
18684# of exeext.
18685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
18686$as_echo_n "checking whether the C compiler works... " >&6; }
18687ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
18688
18689# The possible output files:
18690ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
18691
18692ac_rmfiles=
18693for ac_file in $ac_files
18694do
18695  case $ac_file in
18696    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18697    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
18698  esac
18699done
18700rm -f $ac_rmfiles
18701
18702if { { ac_try="$ac_link_default"
18703case "(($ac_try" in
18704  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18705  *) ac_try_echo=$ac_try;;
18706esac
18707eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18708$as_echo "$ac_try_echo"; } >&5
18709  (eval "$ac_link_default") 2>&5
18710  ac_status=$?
18711  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18712  test $ac_status = 0; }; then :
18713  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
18714# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
18715# in a Makefile.  We should not override ac_cv_exeext if it was cached,
18716# so that the user can short-circuit this test for compilers unknown to
18717# Autoconf.
18718for ac_file in $ac_files ''
18719do
18720  test -f "$ac_file" || continue
18721  case $ac_file in
18722    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
18723	;;
18724    [ab].out )
18725	# We found the default executable, but exeext='' is most
18726	# certainly right.
18727	break;;
18728    *.* )
18729	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
18730	then :; else
18731	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18732	fi
18733	# We set ac_cv_exeext here because the later test for it is not
18734	# safe: cross compilers may not add the suffix if given an `-o'
18735	# argument, so we may need to know it at that point already.
18736	# Even if this section looks crufty: it has the advantage of
18737	# actually working.
18738	break;;
18739    * )
18740	break;;
18741  esac
18742done
18743test "$ac_cv_exeext" = no && ac_cv_exeext=
18744
18745else
18746  ac_file=''
18747fi
18748if test -z "$ac_file"; then :
18749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18750$as_echo "no" >&6; }
18751$as_echo "$as_me: failed program was:" >&5
18752sed 's/^/| /' conftest.$ac_ext >&5
18753
18754{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18755$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18756as_fn_error 77 "C compiler cannot create executables
18757See \`config.log' for more details" "$LINENO" 5 ; }
18758else
18759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18760$as_echo "yes" >&6; }
18761fi
18762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
18763$as_echo_n "checking for C compiler default output file name... " >&6; }
18764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
18765$as_echo "$ac_file" >&6; }
18766ac_exeext=$ac_cv_exeext
18767
18768rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
18769ac_clean_files=$ac_clean_files_save
18770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
18771$as_echo_n "checking for suffix of executables... " >&6; }
18772if { { ac_try="$ac_link"
18773case "(($ac_try" in
18774  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18775  *) ac_try_echo=$ac_try;;
18776esac
18777eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18778$as_echo "$ac_try_echo"; } >&5
18779  (eval "$ac_link") 2>&5
18780  ac_status=$?
18781  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18782  test $ac_status = 0; }; then :
18783  # If both `conftest.exe' and `conftest' are `present' (well, observable)
18784# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
18785# work properly (i.e., refer to `conftest.exe'), while it won't with
18786# `rm'.
18787for ac_file in conftest.exe conftest conftest.*; do
18788  test -f "$ac_file" || continue
18789  case $ac_file in
18790    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18791    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18792	  break;;
18793    * ) break;;
18794  esac
18795done
18796else
18797  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18798$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18799as_fn_error $? "cannot compute suffix of executables: cannot compile and link
18800See \`config.log' for more details" "$LINENO" 5 ; }
18801fi
18802rm -f conftest conftest$ac_cv_exeext
18803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
18804$as_echo "$ac_cv_exeext" >&6; }
18805
18806rm -f conftest.$ac_ext
18807EXEEXT=$ac_cv_exeext
18808ac_exeext=$EXEEXT
18809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18810/* end confdefs.h.  */
18811#include <stdio.h>
18812int
18813main ()
18814{
18815FILE *f = fopen ("conftest.out", "w");
18816 return ferror (f) || fclose (f) != 0;
18817
18818  ;
18819  return 0;
18820}
18821_ACEOF
18822ac_clean_files="$ac_clean_files conftest.out"
18823# Check that the compiler produces executables we can run.  If not, either
18824# the compiler is broken, or we cross compile.
18825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
18826$as_echo_n "checking whether we are cross compiling... " >&6; }
18827if test "$cross_compiling" != yes; then
18828  { { ac_try="$ac_link"
18829case "(($ac_try" in
18830  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18831  *) ac_try_echo=$ac_try;;
18832esac
18833eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18834$as_echo "$ac_try_echo"; } >&5
18835  (eval "$ac_link") 2>&5
18836  ac_status=$?
18837  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18838  test $ac_status = 0; }
18839  if { ac_try='./conftest$ac_cv_exeext'
18840  { { case "(($ac_try" in
18841  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18842  *) ac_try_echo=$ac_try;;
18843esac
18844eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18845$as_echo "$ac_try_echo"; } >&5
18846  (eval "$ac_try") 2>&5
18847  ac_status=$?
18848  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18849  test $ac_status = 0; }; }; then
18850    cross_compiling=no
18851  else
18852    if test "$cross_compiling" = maybe; then
18853	cross_compiling=yes
18854    else
18855	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18856$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18857as_fn_error $? "cannot run C compiled programs.
18858If you meant to cross compile, use \`--host'.
18859See \`config.log' for more details" "$LINENO" 5 ; }
18860    fi
18861  fi
18862fi
18863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
18864$as_echo "$cross_compiling" >&6; }
18865
18866rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
18867ac_clean_files=$ac_clean_files_save
18868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
18869$as_echo_n "checking for suffix of object files... " >&6; }
18870if test "${ac_cv_objext+set}" = set; then :
18871  $as_echo_n "(cached) " >&6
18872else
18873  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18874/* end confdefs.h.  */
18875
18876int
18877main ()
18878{
18879
18880  ;
18881  return 0;
18882}
18883_ACEOF
18884rm -f conftest.o conftest.obj
18885if { { ac_try="$ac_compile"
18886case "(($ac_try" in
18887  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18888  *) ac_try_echo=$ac_try;;
18889esac
18890eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18891$as_echo "$ac_try_echo"; } >&5
18892  (eval "$ac_compile") 2>&5
18893  ac_status=$?
18894  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18895  test $ac_status = 0; }; then :
18896  for ac_file in conftest.o conftest.obj conftest.*; do
18897  test -f "$ac_file" || continue;
18898  case $ac_file in
18899    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
18900    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
18901       break;;
18902  esac
18903done
18904else
18905  $as_echo "$as_me: failed program was:" >&5
18906sed 's/^/| /' conftest.$ac_ext >&5
18907
18908{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18909$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18910as_fn_error $? "cannot compute suffix of object files: cannot compile
18911See \`config.log' for more details" "$LINENO" 5 ; }
18912fi
18913rm -f conftest.$ac_cv_objext conftest.$ac_ext
18914fi
18915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
18916$as_echo "$ac_cv_objext" >&6; }
18917OBJEXT=$ac_cv_objext
18918ac_objext=$OBJEXT
18919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
18920$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
18921if test "${ac_cv_c_compiler_gnu+set}" = set; then :
18922  $as_echo_n "(cached) " >&6
18923else
18924  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18925/* end confdefs.h.  */
18926
18927int
18928main ()
18929{
18930#ifndef __GNUC__
18931       choke me
18932#endif
18933
18934  ;
18935  return 0;
18936}
18937_ACEOF
18938if ac_fn_c_try_compile "$LINENO"; then :
18939  ac_compiler_gnu=yes
18940else
18941  ac_compiler_gnu=no
18942fi
18943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18944ac_cv_c_compiler_gnu=$ac_compiler_gnu
18945
18946fi
18947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
18948$as_echo "$ac_cv_c_compiler_gnu" >&6; }
18949if test $ac_compiler_gnu = yes; then
18950  GCC=yes
18951else
18952  GCC=
18953fi
18954ac_test_CFLAGS=${CFLAGS+set}
18955ac_save_CFLAGS=$CFLAGS
18956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
18957$as_echo_n "checking whether $CC accepts -g... " >&6; }
18958if test "${ac_cv_prog_cc_g+set}" = set; then :
18959  $as_echo_n "(cached) " >&6
18960else
18961  ac_save_c_werror_flag=$ac_c_werror_flag
18962   ac_c_werror_flag=yes
18963   ac_cv_prog_cc_g=no
18964   CFLAGS="-g"
18965   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18966/* end confdefs.h.  */
18967
18968int
18969main ()
18970{
18971
18972  ;
18973  return 0;
18974}
18975_ACEOF
18976if ac_fn_c_try_compile "$LINENO"; then :
18977  ac_cv_prog_cc_g=yes
18978else
18979  CFLAGS=""
18980      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18981/* end confdefs.h.  */
18982
18983int
18984main ()
18985{
18986
18987  ;
18988  return 0;
18989}
18990_ACEOF
18991if ac_fn_c_try_compile "$LINENO"; then :
18992
18993else
18994  ac_c_werror_flag=$ac_save_c_werror_flag
18995	 CFLAGS="-g"
18996	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18997/* end confdefs.h.  */
18998
18999int
19000main ()
19001{
19002
19003  ;
19004  return 0;
19005}
19006_ACEOF
19007if ac_fn_c_try_compile "$LINENO"; then :
19008  ac_cv_prog_cc_g=yes
19009fi
19010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19011fi
19012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19013fi
19014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19015   ac_c_werror_flag=$ac_save_c_werror_flag
19016fi
19017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19018$as_echo "$ac_cv_prog_cc_g" >&6; }
19019if test "$ac_test_CFLAGS" = set; then
19020  CFLAGS=$ac_save_CFLAGS
19021elif test $ac_cv_prog_cc_g = yes; then
19022  if test "$GCC" = yes; then
19023    CFLAGS="-g -O2"
19024  else
19025    CFLAGS="-g"
19026  fi
19027else
19028  if test "$GCC" = yes; then
19029    CFLAGS="-O2"
19030  else
19031    CFLAGS=
19032  fi
19033fi
19034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19035$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19036if test "${ac_cv_prog_cc_c89+set}" = set; then :
19037  $as_echo_n "(cached) " >&6
19038else
19039  ac_cv_prog_cc_c89=no
19040ac_save_CC=$CC
19041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19042/* end confdefs.h.  */
19043#include <stdarg.h>
19044#include <stdio.h>
19045#include <sys/types.h>
19046#include <sys/stat.h>
19047/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19048struct buf { int x; };
19049FILE * (*rcsopen) (struct buf *, struct stat *, int);
19050static char *e (p, i)
19051     char **p;
19052     int i;
19053{
19054  return p[i];
19055}
19056static char *f (char * (*g) (char **, int), char **p, ...)
19057{
19058  char *s;
19059  va_list v;
19060  va_start (v,p);
19061  s = g (p, va_arg (v,int));
19062  va_end (v);
19063  return s;
19064}
19065
19066/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19067   function prototypes and stuff, but not '\xHH' hex character constants.
19068   These don't provoke an error unfortunately, instead are silently treated
19069   as 'x'.  The following induces an error, until -std is added to get
19070   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19071   array size at least.  It's necessary to write '\x00'==0 to get something
19072   that's true only with -std.  */
19073int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19074
19075/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19076   inside strings and character constants.  */
19077#define FOO(x) 'x'
19078int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19079
19080int test (int i, double x);
19081struct s1 {int (*f) (int a);};
19082struct s2 {int (*f) (double a);};
19083int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19084int argc;
19085char **argv;
19086int
19087main ()
19088{
19089return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19090  ;
19091  return 0;
19092}
19093_ACEOF
19094for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19095	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19096do
19097  CC="$ac_save_CC $ac_arg"
19098  if ac_fn_c_try_compile "$LINENO"; then :
19099  ac_cv_prog_cc_c89=$ac_arg
19100fi
19101rm -f core conftest.err conftest.$ac_objext
19102  test "x$ac_cv_prog_cc_c89" != "xno" && break
19103done
19104rm -f conftest.$ac_ext
19105CC=$ac_save_CC
19106
19107fi
19108# AC_CACHE_VAL
19109case "x$ac_cv_prog_cc_c89" in
19110  x)
19111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19112$as_echo "none needed" >&6; } ;;
19113  xno)
19114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19115$as_echo "unsupported" >&6; } ;;
19116  *)
19117    CC="$CC $ac_cv_prog_cc_c89"
19118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19119$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19120esac
19121if test "x$ac_cv_prog_cc_c89" != xno; then :
19122
19123fi
19124
19125ac_ext=cpp
19126ac_cpp='$CXXCPP $CPPFLAGS'
19127ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19128ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19129ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19130
19131
19132### Locate C++ compiler (CXX)
19133
19134if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19135  # Do not probe for CC on MacOSX.
19136  COMPILER_CHECK_LIST="cl g++"
19137else
19138  COMPILER_CHECK_LIST="cl CC g++"
19139fi
19140
19141  COMPILER_NAME=C++
19142
19143  # Do a first initial attempt at searching the list of compiler names.
19144  # AC_PATH_PROGS can't be run multiple times with the same variable,
19145  # so create a new name for this run.
19146  for ac_prog in $COMPILER_CHECK_LIST
19147do
19148  # Extract the first word of "$ac_prog", so it can be a program name with args.
19149set dummy $ac_prog; ac_word=$2
19150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19151$as_echo_n "checking for $ac_word... " >&6; }
19152if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19153  $as_echo_n "(cached) " >&6
19154else
19155  case $POTENTIAL_CXX in
19156  [\\/]* | ?:[\\/]*)
19157  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19158  ;;
19159  *)
19160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19161for as_dir in $PATH
19162do
19163  IFS=$as_save_IFS
19164  test -z "$as_dir" && as_dir=.
19165    for ac_exec_ext in '' $ac_executable_extensions; do
19166  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19167    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19169    break 2
19170  fi
19171done
19172  done
19173IFS=$as_save_IFS
19174
19175  ;;
19176esac
19177fi
19178POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19179if test -n "$POTENTIAL_CXX"; then
19180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19181$as_echo "$POTENTIAL_CXX" >&6; }
19182else
19183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19184$as_echo "no" >&6; }
19185fi
19186
19187
19188  test -n "$POTENTIAL_CXX" && break
19189done
19190
19191  CXX=$POTENTIAL_CXX
19192
19193  if test "x$$CXX" = x; then
19194
19195    # Print a helpful message on how to acquire the necessary build dependency.
19196    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19197    MISSING_DEPENDENCY=devkit
19198    PKGHANDLER_COMMAND=
19199
19200    case $PKGHANDLER in
19201	apt-get)
19202                apt_help     $MISSING_DEPENDENCY ;;
19203    yum)
19204                yum_help     $MISSING_DEPENDENCY ;;
19205	port)
19206                port_help    $MISSING_DEPENDENCY ;;
19207	pkgutil)
19208                pkgutil_help $MISSING_DEPENDENCY ;;
19209	pkgadd)
19210                pkgadd_help  $MISSING_DEPENDENCY ;;
19211    * )
19212      break ;;
19213    esac
19214
19215    if test "x$PKGHANDLER_COMMAND" != x; then
19216        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19217    fi
19218
19219      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19220  fi
19221
19222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19223
19224  # First separate the path from the arguments. This will split at the first
19225  # space.
19226  complete="$CXX"
19227  path="${complete%% *}"
19228  tmp="$complete EOL"
19229  arguments="${tmp#* }"
19230
19231  # Input might be given as Windows format, start by converting to
19232  # unix format.
19233  new_path=`$CYGPATH -u "$path"`
19234
19235  # Now try to locate executable using which
19236  new_path=`$WHICH "$new_path" 2> /dev/null`
19237  # bat and cmd files are not always considered executable in cygwin causing which
19238  # to not find them
19239  if test "x$new_path" = x \
19240           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19241           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19242    new_path=`$CYGPATH -u "$path"`
19243  fi
19244  if test "x$new_path" = x; then
19245    # Oops. Which didn't find the executable.
19246    # The splitting of arguments from the executable at a space might have been incorrect,
19247    # since paths with space are more likely in Windows. Give it another try with the whole
19248    # argument.
19249    path="$complete"
19250    arguments="EOL"
19251    new_path=`$CYGPATH -u "$path"`
19252    new_path=`$WHICH "$new_path" 2> /dev/null`
19253    # bat and cmd files are not always considered executable in cygwin causing which
19254    # to not find them
19255    if test "x$new_path" = x \
19256             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19257             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19258      new_path=`$CYGPATH -u "$path"`
19259    fi
19260    if test "x$new_path" = x; then
19261      # It's still not found. Now this is an unrecoverable error.
19262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19263$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19264      has_space=`$ECHO "$complete" | $GREP " "`
19265      if test "x$has_space" != x; then
19266        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19267$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19268      fi
19269      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19270    fi
19271  fi
19272
19273  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19274  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19275  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19276  # "foo.exe" is OK but "foo" is an error.
19277  #
19278  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19279  # It is also a way to make sure we got the proper file name for the real test later on.
19280  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19281  if test "x$test_shortpath" = x; then
19282    # Short path failed, file does not exist as specified.
19283    # Try adding .exe or .cmd
19284    if test -f "${new_path}.exe"; then
19285       input_to_shortpath="${new_path}.exe"
19286    elif test -f "${new_path}.cmd"; then
19287       input_to_shortpath="${new_path}.cmd"
19288    else
19289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19290$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19291      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19292$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19293      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19294    fi
19295  else
19296    input_to_shortpath="$new_path"
19297  fi
19298
19299  # Call helper function which possibly converts this using DOS-style short mode.
19300  # If so, the updated path is stored in $new_path.
19301  new_path="$input_to_shortpath"
19302
19303  input_path="$input_to_shortpath"
19304  # Check if we need to convert this using DOS-style short mode. If the path
19305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19306  # take no chances and rewrite it.
19307  # Note: m4 eats our [], so we need to use [ and ] instead.
19308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19309  if test "x$has_forbidden_chars" != x; then
19310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19314      # Going to short mode and back again did indeed matter. Since short mode is
19315      # case insensitive, let's make it lowercase to improve readability.
19316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19317      # Now convert it back to Unix-stile (cygpath)
19318      input_path=`$CYGPATH -u "$shortmode_path"`
19319      new_path="$input_path"
19320    fi
19321  fi
19322
19323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19324  if test "x$test_cygdrive_prefix" = x; then
19325    # As a simple fix, exclude /usr/bin since it's not a real path.
19326    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19328      # a path prefixed by /cygdrive for fixpath to work.
19329      new_path="$CYGWIN_ROOT_PATH$input_path"
19330    fi
19331  fi
19332
19333  # remove trailing .exe if any
19334  new_path="${new_path/%.exe/}"
19335
19336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19337
19338  # First separate the path from the arguments. This will split at the first
19339  # space.
19340  complete="$CXX"
19341  path="${complete%% *}"
19342  tmp="$complete EOL"
19343  arguments="${tmp#* }"
19344
19345  # Input might be given as Windows format, start by converting to
19346  # unix format.
19347  new_path="$path"
19348
19349  windows_path="$new_path"
19350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19351    unix_path=`$CYGPATH -u "$windows_path"`
19352    new_path="$unix_path"
19353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19355    new_path="$unix_path"
19356  fi
19357
19358
19359  # Now try to locate executable using which
19360  new_path=`$WHICH "$new_path" 2> /dev/null`
19361
19362  if test "x$new_path" = x; then
19363    # Oops. Which didn't find the executable.
19364    # The splitting of arguments from the executable at a space might have been incorrect,
19365    # since paths with space are more likely in Windows. Give it another try with the whole
19366    # argument.
19367    path="$complete"
19368    arguments="EOL"
19369    new_path="$path"
19370
19371  windows_path="$new_path"
19372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19373    unix_path=`$CYGPATH -u "$windows_path"`
19374    new_path="$unix_path"
19375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19377    new_path="$unix_path"
19378  fi
19379
19380
19381    new_path=`$WHICH "$new_path" 2> /dev/null`
19382
19383    if test "x$new_path" = x; then
19384      # It's still not found. Now this is an unrecoverable error.
19385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19386$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19387      has_space=`$ECHO "$complete" | $GREP " "`
19388      if test "x$has_space" != x; then
19389        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19390$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19391      fi
19392      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19393    fi
19394  fi
19395
19396  # Now new_path has a complete unix path to the binary
19397  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19398    # Keep paths in /bin as-is, but remove trailing .exe if any
19399    new_path="${new_path/%.exe/}"
19400    # Do not save /bin paths to all_fixpath_prefixes!
19401  else
19402    # Not in mixed or Windows style, start by that.
19403    new_path=`cmd //c echo $new_path`
19404
19405  input_path="$new_path"
19406  # Check if we need to convert this using DOS-style short mode. If the path
19407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19408  # take no chances and rewrite it.
19409  # Note: m4 eats our [], so we need to use [ and ] instead.
19410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19411  if test "x$has_forbidden_chars" != x; then
19412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19414  fi
19415
19416    # Output is in $new_path
19417
19418  windows_path="$new_path"
19419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19420    unix_path=`$CYGPATH -u "$windows_path"`
19421    new_path="$unix_path"
19422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19424    new_path="$unix_path"
19425  fi
19426
19427    # remove trailing .exe if any
19428    new_path="${new_path/%.exe/}"
19429
19430    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19431    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19432  fi
19433
19434  else
19435    # We're on a posix platform. Hooray! :)
19436    # First separate the path from the arguments. This will split at the first
19437    # space.
19438    complete="$CXX"
19439    path="${complete%% *}"
19440    tmp="$complete EOL"
19441    arguments="${tmp#* }"
19442
19443    new_path=`$WHICH $path 2> /dev/null`
19444    if test "x$new_path" = x; then
19445      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19446      if test "x$is_absolute_path" != x; then
19447        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) with 'which' failed, using $path directly." >&5
19448$as_echo "$as_me: Resolving CXX (as $path) with 'which' failed, using $path directly." >&6;}
19449        new_path="$path"
19450      else
19451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19452$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19453        has_space=`$ECHO "$complete" | $GREP " "`
19454        if test "x$has_space" != x; then
19455          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19456$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19457        fi
19458        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19459      fi
19460    fi
19461  fi
19462
19463  # Now join together the path and the arguments once again
19464  if test "x$arguments" != xEOL; then
19465      new_complete="$new_path ${arguments% *}"
19466  else
19467      new_complete="$new_path"
19468  fi
19469
19470  if test "x$complete" != "x$new_complete"; then
19471    CXX="$new_complete"
19472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
19473$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
19474  fi
19475
19476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
19477$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
19478  TEST_COMPILER="$CXX"
19479
19480    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19481        # Follow a chain of symbolic links. Use readlink
19482        # where it exists, else fall back to horribly
19483        # complicated shell code.
19484        if test "x$READLINK_TESTED" != yes; then
19485            # On MacOSX there is a readlink tool with a different
19486            # purpose than the GNU readlink tool. Check the found readlink.
19487            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
19488            if test "x$ISGNU" = x; then
19489                 # A readlink that we do not know how to use.
19490                 # Are there other non-GNU readlinks out there?
19491                 READLINK_TESTED=yes
19492                 READLINK=
19493            fi
19494        fi
19495
19496        if test "x$READLINK" != x; then
19497            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19498        else
19499            STARTDIR=$PWD
19500            COUNTER=0
19501            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19502            sym_link_file=`$BASENAME $TEST_COMPILER`
19503            while test $COUNTER -lt 20; do
19504                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19505                if test "x$ISLINK" == x; then
19506                    # This is not a symbolic link! We are done!
19507                    break
19508                fi
19509                # The link might be relative! We have to use cd to travel safely.
19510                cd $sym_link_dir
19511                # ... and we must get the to the absolute path, not one using symbolic links.
19512                cd `pwd -P`
19513                cd `$DIRNAME $ISLINK`
19514                sym_link_dir=`$THEPWDCMD`
19515                sym_link_file=`$BASENAME $ISLINK`
19516                let COUNTER=COUNTER+1
19517            done
19518            cd $STARTDIR
19519            TEST_COMPILER=$sym_link_dir/$sym_link_file
19520        fi
19521    fi
19522
19523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19524$as_echo "$TEST_COMPILER" >&6; }
19525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
19526$as_echo_n "checking if CXX is disguised ccache... " >&6; }
19527
19528  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19529  if test "x$COMPILER_BASENAME" = "xccache"; then
19530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19531$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19532    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19533    # We want to control ccache invocation ourselves, so ignore this cc and try
19534    # searching again.
19535
19536    # Remove the path to the fake ccache cc from the PATH
19537    RETRY_COMPILER_SAVED_PATH="$PATH"
19538    COMPILER_DIRNAME=`$DIRNAME $CXX`
19539    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19540
19541    # Try again looking for our compiler
19542    if test -n "$ac_tool_prefix"; then
19543  for ac_prog in $COMPILER_CHECK_LIST
19544  do
19545    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19546set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19548$as_echo_n "checking for $ac_word... " >&6; }
19549if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
19550  $as_echo_n "(cached) " >&6
19551else
19552  if test -n "$PROPER_COMPILER_CXX"; then
19553  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
19554else
19555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19556for as_dir in $PATH
19557do
19558  IFS=$as_save_IFS
19559  test -z "$as_dir" && as_dir=.
19560    for ac_exec_ext in '' $ac_executable_extensions; do
19561  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19562    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
19563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19564    break 2
19565  fi
19566done
19567  done
19568IFS=$as_save_IFS
19569
19570fi
19571fi
19572PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
19573if test -n "$PROPER_COMPILER_CXX"; then
19574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
19575$as_echo "$PROPER_COMPILER_CXX" >&6; }
19576else
19577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19578$as_echo "no" >&6; }
19579fi
19580
19581
19582    test -n "$PROPER_COMPILER_CXX" && break
19583  done
19584fi
19585if test -z "$PROPER_COMPILER_CXX"; then
19586  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
19587  for ac_prog in $COMPILER_CHECK_LIST
19588do
19589  # Extract the first word of "$ac_prog", so it can be a program name with args.
19590set dummy $ac_prog; ac_word=$2
19591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19592$as_echo_n "checking for $ac_word... " >&6; }
19593if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
19594  $as_echo_n "(cached) " >&6
19595else
19596  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19597  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
19598else
19599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19600for as_dir in $PATH
19601do
19602  IFS=$as_save_IFS
19603  test -z "$as_dir" && as_dir=.
19604    for ac_exec_ext in '' $ac_executable_extensions; do
19605  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19606    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
19607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19608    break 2
19609  fi
19610done
19611  done
19612IFS=$as_save_IFS
19613
19614fi
19615fi
19616ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
19617if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
19619$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
19620else
19621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19622$as_echo "no" >&6; }
19623fi
19624
19625
19626  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
19627done
19628
19629  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
19630    PROPER_COMPILER_CXX=""
19631  else
19632    case $cross_compiling:$ac_tool_warned in
19633yes:)
19634{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19635$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19636ac_tool_warned=yes ;;
19637esac
19638    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
19639  fi
19640fi
19641
19642
19643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19644
19645  # First separate the path from the arguments. This will split at the first
19646  # space.
19647  complete="$PROPER_COMPILER_CXX"
19648  path="${complete%% *}"
19649  tmp="$complete EOL"
19650  arguments="${tmp#* }"
19651
19652  # Input might be given as Windows format, start by converting to
19653  # unix format.
19654  new_path=`$CYGPATH -u "$path"`
19655
19656  # Now try to locate executable using which
19657  new_path=`$WHICH "$new_path" 2> /dev/null`
19658  # bat and cmd files are not always considered executable in cygwin causing which
19659  # to not find them
19660  if test "x$new_path" = x \
19661           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19662           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19663    new_path=`$CYGPATH -u "$path"`
19664  fi
19665  if test "x$new_path" = x; then
19666    # Oops. Which didn't find the executable.
19667    # The splitting of arguments from the executable at a space might have been incorrect,
19668    # since paths with space are more likely in Windows. Give it another try with the whole
19669    # argument.
19670    path="$complete"
19671    arguments="EOL"
19672    new_path=`$CYGPATH -u "$path"`
19673    new_path=`$WHICH "$new_path" 2> /dev/null`
19674    # bat and cmd files are not always considered executable in cygwin causing which
19675    # to not find them
19676    if test "x$new_path" = x \
19677             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19678             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19679      new_path=`$CYGPATH -u "$path"`
19680    fi
19681    if test "x$new_path" = x; then
19682      # It's still not found. Now this is an unrecoverable error.
19683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19684$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19685      has_space=`$ECHO "$complete" | $GREP " "`
19686      if test "x$has_space" != x; then
19687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19689      fi
19690      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19691    fi
19692  fi
19693
19694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19697  # "foo.exe" is OK but "foo" is an error.
19698  #
19699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19700  # It is also a way to make sure we got the proper file name for the real test later on.
19701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19702  if test "x$test_shortpath" = x; then
19703    # Short path failed, file does not exist as specified.
19704    # Try adding .exe or .cmd
19705    if test -f "${new_path}.exe"; then
19706       input_to_shortpath="${new_path}.exe"
19707    elif test -f "${new_path}.cmd"; then
19708       input_to_shortpath="${new_path}.cmd"
19709    else
19710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
19711$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
19712      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19713$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19714      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19715    fi
19716  else
19717    input_to_shortpath="$new_path"
19718  fi
19719
19720  # Call helper function which possibly converts this using DOS-style short mode.
19721  # If so, the updated path is stored in $new_path.
19722  new_path="$input_to_shortpath"
19723
19724  input_path="$input_to_shortpath"
19725  # Check if we need to convert this using DOS-style short mode. If the path
19726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19727  # take no chances and rewrite it.
19728  # Note: m4 eats our [], so we need to use [ and ] instead.
19729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19730  if test "x$has_forbidden_chars" != x; then
19731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19735      # Going to short mode and back again did indeed matter. Since short mode is
19736      # case insensitive, let's make it lowercase to improve readability.
19737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19738      # Now convert it back to Unix-stile (cygpath)
19739      input_path=`$CYGPATH -u "$shortmode_path"`
19740      new_path="$input_path"
19741    fi
19742  fi
19743
19744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19745  if test "x$test_cygdrive_prefix" = x; then
19746    # As a simple fix, exclude /usr/bin since it's not a real path.
19747    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19749      # a path prefixed by /cygdrive for fixpath to work.
19750      new_path="$CYGWIN_ROOT_PATH$input_path"
19751    fi
19752  fi
19753
19754  # remove trailing .exe if any
19755  new_path="${new_path/%.exe/}"
19756
19757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19758
19759  # First separate the path from the arguments. This will split at the first
19760  # space.
19761  complete="$PROPER_COMPILER_CXX"
19762  path="${complete%% *}"
19763  tmp="$complete EOL"
19764  arguments="${tmp#* }"
19765
19766  # Input might be given as Windows format, start by converting to
19767  # unix format.
19768  new_path="$path"
19769
19770  windows_path="$new_path"
19771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19772    unix_path=`$CYGPATH -u "$windows_path"`
19773    new_path="$unix_path"
19774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19776    new_path="$unix_path"
19777  fi
19778
19779
19780  # Now try to locate executable using which
19781  new_path=`$WHICH "$new_path" 2> /dev/null`
19782
19783  if test "x$new_path" = x; then
19784    # Oops. Which didn't find the executable.
19785    # The splitting of arguments from the executable at a space might have been incorrect,
19786    # since paths with space are more likely in Windows. Give it another try with the whole
19787    # argument.
19788    path="$complete"
19789    arguments="EOL"
19790    new_path="$path"
19791
19792  windows_path="$new_path"
19793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19794    unix_path=`$CYGPATH -u "$windows_path"`
19795    new_path="$unix_path"
19796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19798    new_path="$unix_path"
19799  fi
19800
19801
19802    new_path=`$WHICH "$new_path" 2> /dev/null`
19803
19804    if test "x$new_path" = x; then
19805      # It's still not found. Now this is an unrecoverable error.
19806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19807$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19808      has_space=`$ECHO "$complete" | $GREP " "`
19809      if test "x$has_space" != x; then
19810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19812      fi
19813      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19814    fi
19815  fi
19816
19817  # Now new_path has a complete unix path to the binary
19818  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19819    # Keep paths in /bin as-is, but remove trailing .exe if any
19820    new_path="${new_path/%.exe/}"
19821    # Do not save /bin paths to all_fixpath_prefixes!
19822  else
19823    # Not in mixed or Windows style, start by that.
19824    new_path=`cmd //c echo $new_path`
19825
19826  input_path="$new_path"
19827  # Check if we need to convert this using DOS-style short mode. If the path
19828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19829  # take no chances and rewrite it.
19830  # Note: m4 eats our [], so we need to use [ and ] instead.
19831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19832  if test "x$has_forbidden_chars" != x; then
19833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19835  fi
19836
19837    # Output is in $new_path
19838
19839  windows_path="$new_path"
19840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19841    unix_path=`$CYGPATH -u "$windows_path"`
19842    new_path="$unix_path"
19843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19845    new_path="$unix_path"
19846  fi
19847
19848    # remove trailing .exe if any
19849    new_path="${new_path/%.exe/}"
19850
19851    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19852    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19853  fi
19854
19855  else
19856    # We're on a posix platform. Hooray! :)
19857    # First separate the path from the arguments. This will split at the first
19858    # space.
19859    complete="$PROPER_COMPILER_CXX"
19860    path="${complete%% *}"
19861    tmp="$complete EOL"
19862    arguments="${tmp#* }"
19863
19864    new_path=`$WHICH $path 2> /dev/null`
19865    if test "x$new_path" = x; then
19866      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19867      if test "x$is_absolute_path" != x; then
19868        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&5
19869$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&6;}
19870        new_path="$path"
19871      else
19872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19873$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19874        has_space=`$ECHO "$complete" | $GREP " "`
19875        if test "x$has_space" != x; then
19876          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19877$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19878        fi
19879        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19880      fi
19881    fi
19882  fi
19883
19884  # Now join together the path and the arguments once again
19885  if test "x$arguments" != xEOL; then
19886      new_complete="$new_path ${arguments% *}"
19887  else
19888      new_complete="$new_path"
19889  fi
19890
19891  if test "x$complete" != "x$new_complete"; then
19892    PROPER_COMPILER_CXX="$new_complete"
19893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
19894$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
19895  fi
19896
19897    PATH="$RETRY_COMPILER_SAVED_PATH"
19898
19899    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
19900$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
19901
19902    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19903        # Follow a chain of symbolic links. Use readlink
19904        # where it exists, else fall back to horribly
19905        # complicated shell code.
19906        if test "x$READLINK_TESTED" != yes; then
19907            # On MacOSX there is a readlink tool with a different
19908            # purpose than the GNU readlink tool. Check the found readlink.
19909            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
19910            if test "x$ISGNU" = x; then
19911                 # A readlink that we do not know how to use.
19912                 # Are there other non-GNU readlinks out there?
19913                 READLINK_TESTED=yes
19914                 READLINK=
19915            fi
19916        fi
19917
19918        if test "x$READLINK" != x; then
19919            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
19920        else
19921            STARTDIR=$PWD
19922            COUNTER=0
19923            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
19924            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
19925            while test $COUNTER -lt 20; do
19926                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19927                if test "x$ISLINK" == x; then
19928                    # This is not a symbolic link! We are done!
19929                    break
19930                fi
19931                # The link might be relative! We have to use cd to travel safely.
19932                cd $sym_link_dir
19933                # ... and we must get the to the absolute path, not one using symbolic links.
19934                cd `pwd -P`
19935                cd `$DIRNAME $ISLINK`
19936                sym_link_dir=`$THEPWDCMD`
19937                sym_link_file=`$BASENAME $ISLINK`
19938                let COUNTER=COUNTER+1
19939            done
19940            cd $STARTDIR
19941            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
19942        fi
19943    fi
19944
19945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
19946$as_echo "$PROPER_COMPILER_CXX" >&6; }
19947    CXX="$PROPER_COMPILER_CXX"
19948  else
19949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
19950$as_echo "no, keeping CXX" >&6; }
19951    CXX="$TEST_COMPILER"
19952  fi
19953
19954  COMPILER=$CXX
19955  COMPILER_NAME=$COMPILER_NAME
19956
19957  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19958    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19959    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19960    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19961    if test $? -ne 0; then
19962      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19963
19964      { $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
19965$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19966      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19967$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19968      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19969    else
19970      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19971      COMPILER_VENDOR="Sun Studio"
19972    fi
19973  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19974    # First line typically looks something like:
19975    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19976    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19977    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19978    COMPILER_VENDOR="Microsoft CL.EXE"
19979    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19980    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19981      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19982        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19983      fi
19984    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19985      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19986        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19987      fi
19988    fi
19989  else
19990    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19991    # Check that this is likely to be GCC.
19992    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19993    if test $? -ne 0; then
19994      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19995$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19996      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19997$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19998      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19999    fi
20000
20001    # First line typically looks something like:
20002    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20003    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20004    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20005  fi
20006  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20007  CXX_VERSION="$COMPILER_VERSION"
20008  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20009  CXX_VENDOR="$COMPILER_VENDOR"
20010
20011  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20012$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20013
20014
20015# Now that we have resolved CXX ourself, let autoconf have it's go at it
20016ac_ext=cpp
20017ac_cpp='$CXXCPP $CPPFLAGS'
20018ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20019ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20020ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20021if test -z "$CXX"; then
20022  if test -n "$CCC"; then
20023    CXX=$CCC
20024  else
20025    if test -n "$ac_tool_prefix"; then
20026  for ac_prog in $CXX
20027  do
20028    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20029set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20031$as_echo_n "checking for $ac_word... " >&6; }
20032if test "${ac_cv_prog_CXX+set}" = set; then :
20033  $as_echo_n "(cached) " >&6
20034else
20035  if test -n "$CXX"; then
20036  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20037else
20038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20039for as_dir in $PATH
20040do
20041  IFS=$as_save_IFS
20042  test -z "$as_dir" && as_dir=.
20043    for ac_exec_ext in '' $ac_executable_extensions; do
20044  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20045    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20047    break 2
20048  fi
20049done
20050  done
20051IFS=$as_save_IFS
20052
20053fi
20054fi
20055CXX=$ac_cv_prog_CXX
20056if test -n "$CXX"; then
20057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20058$as_echo "$CXX" >&6; }
20059else
20060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20061$as_echo "no" >&6; }
20062fi
20063
20064
20065    test -n "$CXX" && break
20066  done
20067fi
20068if test -z "$CXX"; then
20069  ac_ct_CXX=$CXX
20070  for ac_prog in $CXX
20071do
20072  # Extract the first word of "$ac_prog", so it can be a program name with args.
20073set dummy $ac_prog; ac_word=$2
20074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20075$as_echo_n "checking for $ac_word... " >&6; }
20076if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20077  $as_echo_n "(cached) " >&6
20078else
20079  if test -n "$ac_ct_CXX"; then
20080  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20081else
20082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20083for as_dir in $PATH
20084do
20085  IFS=$as_save_IFS
20086  test -z "$as_dir" && as_dir=.
20087    for ac_exec_ext in '' $ac_executable_extensions; do
20088  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20089    ac_cv_prog_ac_ct_CXX="$ac_prog"
20090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20091    break 2
20092  fi
20093done
20094  done
20095IFS=$as_save_IFS
20096
20097fi
20098fi
20099ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20100if test -n "$ac_ct_CXX"; then
20101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20102$as_echo "$ac_ct_CXX" >&6; }
20103else
20104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20105$as_echo "no" >&6; }
20106fi
20107
20108
20109  test -n "$ac_ct_CXX" && break
20110done
20111
20112  if test "x$ac_ct_CXX" = x; then
20113    CXX="g++"
20114  else
20115    case $cross_compiling:$ac_tool_warned in
20116yes:)
20117{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20118$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20119ac_tool_warned=yes ;;
20120esac
20121    CXX=$ac_ct_CXX
20122  fi
20123fi
20124
20125  fi
20126fi
20127# Provide some information about the compiler.
20128$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20129set X $ac_compile
20130ac_compiler=$2
20131for ac_option in --version -v -V -qversion; do
20132  { { ac_try="$ac_compiler $ac_option >&5"
20133case "(($ac_try" in
20134  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20135  *) ac_try_echo=$ac_try;;
20136esac
20137eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20138$as_echo "$ac_try_echo"; } >&5
20139  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20140  ac_status=$?
20141  if test -s conftest.err; then
20142    sed '10a\
20143... rest of stderr output deleted ...
20144         10q' conftest.err >conftest.er1
20145    cat conftest.er1 >&5
20146  fi
20147  rm -f conftest.er1 conftest.err
20148  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20149  test $ac_status = 0; }
20150done
20151
20152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20153$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20154if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20155  $as_echo_n "(cached) " >&6
20156else
20157  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20158/* end confdefs.h.  */
20159
20160int
20161main ()
20162{
20163#ifndef __GNUC__
20164       choke me
20165#endif
20166
20167  ;
20168  return 0;
20169}
20170_ACEOF
20171if ac_fn_cxx_try_compile "$LINENO"; then :
20172  ac_compiler_gnu=yes
20173else
20174  ac_compiler_gnu=no
20175fi
20176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20177ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20178
20179fi
20180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20181$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20182if test $ac_compiler_gnu = yes; then
20183  GXX=yes
20184else
20185  GXX=
20186fi
20187ac_test_CXXFLAGS=${CXXFLAGS+set}
20188ac_save_CXXFLAGS=$CXXFLAGS
20189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20190$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20191if test "${ac_cv_prog_cxx_g+set}" = set; then :
20192  $as_echo_n "(cached) " >&6
20193else
20194  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20195   ac_cxx_werror_flag=yes
20196   ac_cv_prog_cxx_g=no
20197   CXXFLAGS="-g"
20198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20199/* end confdefs.h.  */
20200
20201int
20202main ()
20203{
20204
20205  ;
20206  return 0;
20207}
20208_ACEOF
20209if ac_fn_cxx_try_compile "$LINENO"; then :
20210  ac_cv_prog_cxx_g=yes
20211else
20212  CXXFLAGS=""
20213      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20214/* end confdefs.h.  */
20215
20216int
20217main ()
20218{
20219
20220  ;
20221  return 0;
20222}
20223_ACEOF
20224if ac_fn_cxx_try_compile "$LINENO"; then :
20225
20226else
20227  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20228	 CXXFLAGS="-g"
20229	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20230/* end confdefs.h.  */
20231
20232int
20233main ()
20234{
20235
20236  ;
20237  return 0;
20238}
20239_ACEOF
20240if ac_fn_cxx_try_compile "$LINENO"; then :
20241  ac_cv_prog_cxx_g=yes
20242fi
20243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20244fi
20245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20246fi
20247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20248   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20249fi
20250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20251$as_echo "$ac_cv_prog_cxx_g" >&6; }
20252if test "$ac_test_CXXFLAGS" = set; then
20253  CXXFLAGS=$ac_save_CXXFLAGS
20254elif test $ac_cv_prog_cxx_g = yes; then
20255  if test "$GXX" = yes; then
20256    CXXFLAGS="-g -O2"
20257  else
20258    CXXFLAGS="-g"
20259  fi
20260else
20261  if test "$GXX" = yes; then
20262    CXXFLAGS="-O2"
20263  else
20264    CXXFLAGS=
20265  fi
20266fi
20267ac_ext=cpp
20268ac_cpp='$CXXCPP $CPPFLAGS'
20269ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20270ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20271ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20272
20273
20274### Locate other tools
20275
20276if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20277    ac_ext=m
20278ac_cpp='$OBJCPP $CPPFLAGS'
20279ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20280ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20281ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20282if test -n "$ac_tool_prefix"; then
20283  for ac_prog in gcc objcc objc cc CC
20284  do
20285    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20286set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20288$as_echo_n "checking for $ac_word... " >&6; }
20289if test "${ac_cv_prog_OBJC+set}" = set; then :
20290  $as_echo_n "(cached) " >&6
20291else
20292  if test -n "$OBJC"; then
20293  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20294else
20295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20296for as_dir in $PATH
20297do
20298  IFS=$as_save_IFS
20299  test -z "$as_dir" && as_dir=.
20300    for ac_exec_ext in '' $ac_executable_extensions; do
20301  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20302    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20304    break 2
20305  fi
20306done
20307  done
20308IFS=$as_save_IFS
20309
20310fi
20311fi
20312OBJC=$ac_cv_prog_OBJC
20313if test -n "$OBJC"; then
20314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20315$as_echo "$OBJC" >&6; }
20316else
20317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20318$as_echo "no" >&6; }
20319fi
20320
20321
20322    test -n "$OBJC" && break
20323  done
20324fi
20325if test -z "$OBJC"; then
20326  ac_ct_OBJC=$OBJC
20327  for ac_prog in gcc objcc objc cc CC
20328do
20329  # Extract the first word of "$ac_prog", so it can be a program name with args.
20330set dummy $ac_prog; ac_word=$2
20331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20332$as_echo_n "checking for $ac_word... " >&6; }
20333if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20334  $as_echo_n "(cached) " >&6
20335else
20336  if test -n "$ac_ct_OBJC"; then
20337  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20338else
20339as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20340for as_dir in $PATH
20341do
20342  IFS=$as_save_IFS
20343  test -z "$as_dir" && as_dir=.
20344    for ac_exec_ext in '' $ac_executable_extensions; do
20345  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20346    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20348    break 2
20349  fi
20350done
20351  done
20352IFS=$as_save_IFS
20353
20354fi
20355fi
20356ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20357if test -n "$ac_ct_OBJC"; then
20358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20359$as_echo "$ac_ct_OBJC" >&6; }
20360else
20361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20362$as_echo "no" >&6; }
20363fi
20364
20365
20366  test -n "$ac_ct_OBJC" && break
20367done
20368
20369  if test "x$ac_ct_OBJC" = x; then
20370    OBJC="gcc"
20371  else
20372    case $cross_compiling:$ac_tool_warned in
20373yes:)
20374{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20375$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20376ac_tool_warned=yes ;;
20377esac
20378    OBJC=$ac_ct_OBJC
20379  fi
20380fi
20381
20382# Provide some information about the compiler.
20383$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20384set X $ac_compile
20385ac_compiler=$2
20386for ac_option in --version -v -V -qversion; do
20387  { { ac_try="$ac_compiler $ac_option >&5"
20388case "(($ac_try" in
20389  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20390  *) ac_try_echo=$ac_try;;
20391esac
20392eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20393$as_echo "$ac_try_echo"; } >&5
20394  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20395  ac_status=$?
20396  if test -s conftest.err; then
20397    sed '10a\
20398... rest of stderr output deleted ...
20399         10q' conftest.err >conftest.er1
20400    cat conftest.er1 >&5
20401  fi
20402  rm -f conftest.er1 conftest.err
20403  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20404  test $ac_status = 0; }
20405done
20406
20407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
20408$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20409if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
20410  $as_echo_n "(cached) " >&6
20411else
20412  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20413/* end confdefs.h.  */
20414
20415int
20416main ()
20417{
20418#ifndef __GNUC__
20419       choke me
20420#endif
20421
20422  ;
20423  return 0;
20424}
20425_ACEOF
20426if ac_fn_objc_try_compile "$LINENO"; then :
20427  ac_compiler_gnu=yes
20428else
20429  ac_compiler_gnu=no
20430fi
20431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20432ac_cv_objc_compiler_gnu=$ac_compiler_gnu
20433
20434fi
20435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
20436$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
20437if test $ac_compiler_gnu = yes; then
20438  GOBJC=yes
20439else
20440  GOBJC=
20441fi
20442ac_test_OBJCFLAGS=${OBJCFLAGS+set}
20443ac_save_OBJCFLAGS=$OBJCFLAGS
20444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
20445$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
20446if test "${ac_cv_prog_objc_g+set}" = set; then :
20447  $as_echo_n "(cached) " >&6
20448else
20449  ac_save_objc_werror_flag=$ac_objc_werror_flag
20450   ac_objc_werror_flag=yes
20451   ac_cv_prog_objc_g=no
20452   OBJCFLAGS="-g"
20453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20454/* end confdefs.h.  */
20455
20456int
20457main ()
20458{
20459
20460  ;
20461  return 0;
20462}
20463_ACEOF
20464if ac_fn_objc_try_compile "$LINENO"; then :
20465  ac_cv_prog_objc_g=yes
20466else
20467  OBJCFLAGS=""
20468      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20469/* end confdefs.h.  */
20470
20471int
20472main ()
20473{
20474
20475  ;
20476  return 0;
20477}
20478_ACEOF
20479if ac_fn_objc_try_compile "$LINENO"; then :
20480
20481else
20482  ac_objc_werror_flag=$ac_save_objc_werror_flag
20483	 OBJCFLAGS="-g"
20484	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20485/* end confdefs.h.  */
20486
20487int
20488main ()
20489{
20490
20491  ;
20492  return 0;
20493}
20494_ACEOF
20495if ac_fn_objc_try_compile "$LINENO"; then :
20496  ac_cv_prog_objc_g=yes
20497fi
20498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20499fi
20500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20501fi
20502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20503   ac_objc_werror_flag=$ac_save_objc_werror_flag
20504fi
20505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
20506$as_echo "$ac_cv_prog_objc_g" >&6; }
20507if test "$ac_test_OBJCFLAGS" = set; then
20508  OBJCFLAGS=$ac_save_OBJCFLAGS
20509elif test $ac_cv_prog_objc_g = yes; then
20510  if test "$GOBJC" = yes; then
20511    OBJCFLAGS="-g -O2"
20512  else
20513    OBJCFLAGS="-g"
20514  fi
20515else
20516  if test "$GOBJC" = yes; then
20517    OBJCFLAGS="-O2"
20518  else
20519    OBJCFLAGS=
20520  fi
20521fi
20522ac_ext=cpp
20523ac_cpp='$CXXCPP $CPPFLAGS'
20524ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20525ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20526ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20527
20528
20529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20530
20531  # First separate the path from the arguments. This will split at the first
20532  # space.
20533  complete="$OBJC"
20534  path="${complete%% *}"
20535  tmp="$complete EOL"
20536  arguments="${tmp#* }"
20537
20538  # Input might be given as Windows format, start by converting to
20539  # unix format.
20540  new_path=`$CYGPATH -u "$path"`
20541
20542  # Now try to locate executable using which
20543  new_path=`$WHICH "$new_path" 2> /dev/null`
20544  # bat and cmd files are not always considered executable in cygwin causing which
20545  # to not find them
20546  if test "x$new_path" = x \
20547           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20548           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20549    new_path=`$CYGPATH -u "$path"`
20550  fi
20551  if test "x$new_path" = x; then
20552    # Oops. Which didn't find the executable.
20553    # The splitting of arguments from the executable at a space might have been incorrect,
20554    # since paths with space are more likely in Windows. Give it another try with the whole
20555    # argument.
20556    path="$complete"
20557    arguments="EOL"
20558    new_path=`$CYGPATH -u "$path"`
20559    new_path=`$WHICH "$new_path" 2> /dev/null`
20560    # bat and cmd files are not always considered executable in cygwin causing which
20561    # to not find them
20562    if test "x$new_path" = x \
20563             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20564             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20565      new_path=`$CYGPATH -u "$path"`
20566    fi
20567    if test "x$new_path" = x; then
20568      # It's still not found. Now this is an unrecoverable error.
20569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20570$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20571      has_space=`$ECHO "$complete" | $GREP " "`
20572      if test "x$has_space" != x; then
20573        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20574$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20575      fi
20576      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20577    fi
20578  fi
20579
20580  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20581  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20582  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20583  # "foo.exe" is OK but "foo" is an error.
20584  #
20585  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20586  # It is also a way to make sure we got the proper file name for the real test later on.
20587  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20588  if test "x$test_shortpath" = x; then
20589    # Short path failed, file does not exist as specified.
20590    # Try adding .exe or .cmd
20591    if test -f "${new_path}.exe"; then
20592       input_to_shortpath="${new_path}.exe"
20593    elif test -f "${new_path}.cmd"; then
20594       input_to_shortpath="${new_path}.cmd"
20595    else
20596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
20597$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
20598      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20599$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20600      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20601    fi
20602  else
20603    input_to_shortpath="$new_path"
20604  fi
20605
20606  # Call helper function which possibly converts this using DOS-style short mode.
20607  # If so, the updated path is stored in $new_path.
20608  new_path="$input_to_shortpath"
20609
20610  input_path="$input_to_shortpath"
20611  # Check if we need to convert this using DOS-style short mode. If the path
20612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20613  # take no chances and rewrite it.
20614  # Note: m4 eats our [], so we need to use [ and ] instead.
20615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20616  if test "x$has_forbidden_chars" != x; then
20617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20618    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20619    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20620    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20621      # Going to short mode and back again did indeed matter. Since short mode is
20622      # case insensitive, let's make it lowercase to improve readability.
20623      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20624      # Now convert it back to Unix-stile (cygpath)
20625      input_path=`$CYGPATH -u "$shortmode_path"`
20626      new_path="$input_path"
20627    fi
20628  fi
20629
20630  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20631  if test "x$test_cygdrive_prefix" = x; then
20632    # As a simple fix, exclude /usr/bin since it's not a real path.
20633    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20634      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20635      # a path prefixed by /cygdrive for fixpath to work.
20636      new_path="$CYGWIN_ROOT_PATH$input_path"
20637    fi
20638  fi
20639
20640  # remove trailing .exe if any
20641  new_path="${new_path/%.exe/}"
20642
20643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20644
20645  # First separate the path from the arguments. This will split at the first
20646  # space.
20647  complete="$OBJC"
20648  path="${complete%% *}"
20649  tmp="$complete EOL"
20650  arguments="${tmp#* }"
20651
20652  # Input might be given as Windows format, start by converting to
20653  # unix format.
20654  new_path="$path"
20655
20656  windows_path="$new_path"
20657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20658    unix_path=`$CYGPATH -u "$windows_path"`
20659    new_path="$unix_path"
20660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20662    new_path="$unix_path"
20663  fi
20664
20665
20666  # Now try to locate executable using which
20667  new_path=`$WHICH "$new_path" 2> /dev/null`
20668
20669  if test "x$new_path" = x; then
20670    # Oops. Which didn't find the executable.
20671    # The splitting of arguments from the executable at a space might have been incorrect,
20672    # since paths with space are more likely in Windows. Give it another try with the whole
20673    # argument.
20674    path="$complete"
20675    arguments="EOL"
20676    new_path="$path"
20677
20678  windows_path="$new_path"
20679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20680    unix_path=`$CYGPATH -u "$windows_path"`
20681    new_path="$unix_path"
20682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20684    new_path="$unix_path"
20685  fi
20686
20687
20688    new_path=`$WHICH "$new_path" 2> /dev/null`
20689
20690    if test "x$new_path" = x; then
20691      # It's still not found. Now this is an unrecoverable error.
20692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20693$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20694      has_space=`$ECHO "$complete" | $GREP " "`
20695      if test "x$has_space" != x; then
20696        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20697$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20698      fi
20699      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20700    fi
20701  fi
20702
20703  # Now new_path has a complete unix path to the binary
20704  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20705    # Keep paths in /bin as-is, but remove trailing .exe if any
20706    new_path="${new_path/%.exe/}"
20707    # Do not save /bin paths to all_fixpath_prefixes!
20708  else
20709    # Not in mixed or Windows style, start by that.
20710    new_path=`cmd //c echo $new_path`
20711
20712  input_path="$new_path"
20713  # Check if we need to convert this using DOS-style short mode. If the path
20714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20715  # take no chances and rewrite it.
20716  # Note: m4 eats our [], so we need to use [ and ] instead.
20717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20718  if test "x$has_forbidden_chars" != x; then
20719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20721  fi
20722
20723    # Output is in $new_path
20724
20725  windows_path="$new_path"
20726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20727    unix_path=`$CYGPATH -u "$windows_path"`
20728    new_path="$unix_path"
20729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20731    new_path="$unix_path"
20732  fi
20733
20734    # remove trailing .exe if any
20735    new_path="${new_path/%.exe/}"
20736
20737    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20738    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20739  fi
20740
20741  else
20742    # We're on a posix platform. Hooray! :)
20743    # First separate the path from the arguments. This will split at the first
20744    # space.
20745    complete="$OBJC"
20746    path="${complete%% *}"
20747    tmp="$complete EOL"
20748    arguments="${tmp#* }"
20749
20750    new_path=`$WHICH $path 2> /dev/null`
20751    if test "x$new_path" = x; then
20752      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20753      if test "x$is_absolute_path" != x; then
20754        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&5
20755$as_echo "$as_me: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&6;}
20756        new_path="$path"
20757      else
20758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20759$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20760        has_space=`$ECHO "$complete" | $GREP " "`
20761        if test "x$has_space" != x; then
20762          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20763$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20764        fi
20765        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20766      fi
20767    fi
20768  fi
20769
20770  # Now join together the path and the arguments once again
20771  if test "x$arguments" != xEOL; then
20772      new_complete="$new_path ${arguments% *}"
20773  else
20774      new_complete="$new_path"
20775  fi
20776
20777  if test "x$complete" != "x$new_complete"; then
20778    OBJC="$new_complete"
20779    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
20780$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
20781  fi
20782
20783else
20784    OBJC=
20785fi
20786
20787# Restore the flags to the user specified values.
20788# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
20789CFLAGS="$ORG_CFLAGS"
20790CXXFLAGS="$ORG_CXXFLAGS"
20791OBJCFLAGS="$ORG_OBJCFLAGS"
20792
20793LD="$CC"
20794LDEXE="$CC"
20795LDCXX="$CXX"
20796LDEXECXX="$CXX"
20797
20798# LDEXE is the linker to use, when creating executables.
20799
20800# Linking C++ libraries.
20801
20802# Linking C++ executables.
20803
20804
20805if test "x$OPENJDK_TARGET_OS" != xwindows; then
20806    if test -n "$ac_tool_prefix"; then
20807  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
20808set dummy ${ac_tool_prefix}ar; ac_word=$2
20809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20810$as_echo_n "checking for $ac_word... " >&6; }
20811if test "${ac_cv_prog_AR+set}" = set; then :
20812  $as_echo_n "(cached) " >&6
20813else
20814  if test -n "$AR"; then
20815  ac_cv_prog_AR="$AR" # Let the user override the test.
20816else
20817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20818for as_dir in $PATH
20819do
20820  IFS=$as_save_IFS
20821  test -z "$as_dir" && as_dir=.
20822    for ac_exec_ext in '' $ac_executable_extensions; do
20823  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20824    ac_cv_prog_AR="${ac_tool_prefix}ar"
20825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20826    break 2
20827  fi
20828done
20829  done
20830IFS=$as_save_IFS
20831
20832fi
20833fi
20834AR=$ac_cv_prog_AR
20835if test -n "$AR"; then
20836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
20837$as_echo "$AR" >&6; }
20838else
20839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20840$as_echo "no" >&6; }
20841fi
20842
20843
20844fi
20845if test -z "$ac_cv_prog_AR"; then
20846  ac_ct_AR=$AR
20847  # Extract the first word of "ar", so it can be a program name with args.
20848set dummy ar; ac_word=$2
20849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20850$as_echo_n "checking for $ac_word... " >&6; }
20851if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
20852  $as_echo_n "(cached) " >&6
20853else
20854  if test -n "$ac_ct_AR"; then
20855  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
20856else
20857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20858for as_dir in $PATH
20859do
20860  IFS=$as_save_IFS
20861  test -z "$as_dir" && as_dir=.
20862    for ac_exec_ext in '' $ac_executable_extensions; do
20863  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20864    ac_cv_prog_ac_ct_AR="ar"
20865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20866    break 2
20867  fi
20868done
20869  done
20870IFS=$as_save_IFS
20871
20872fi
20873fi
20874ac_ct_AR=$ac_cv_prog_ac_ct_AR
20875if test -n "$ac_ct_AR"; then
20876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
20877$as_echo "$ac_ct_AR" >&6; }
20878else
20879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20880$as_echo "no" >&6; }
20881fi
20882
20883  if test "x$ac_ct_AR" = x; then
20884    AR=""
20885  else
20886    case $cross_compiling:$ac_tool_warned in
20887yes:)
20888{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20889$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20890ac_tool_warned=yes ;;
20891esac
20892    AR=$ac_ct_AR
20893  fi
20894else
20895  AR="$ac_cv_prog_AR"
20896fi
20897
20898
20899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20900
20901  # First separate the path from the arguments. This will split at the first
20902  # space.
20903  complete="$AR"
20904  path="${complete%% *}"
20905  tmp="$complete EOL"
20906  arguments="${tmp#* }"
20907
20908  # Input might be given as Windows format, start by converting to
20909  # unix format.
20910  new_path=`$CYGPATH -u "$path"`
20911
20912  # Now try to locate executable using which
20913  new_path=`$WHICH "$new_path" 2> /dev/null`
20914  # bat and cmd files are not always considered executable in cygwin causing which
20915  # to not find them
20916  if test "x$new_path" = x \
20917           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20918           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20919    new_path=`$CYGPATH -u "$path"`
20920  fi
20921  if test "x$new_path" = x; then
20922    # Oops. Which didn't find the executable.
20923    # The splitting of arguments from the executable at a space might have been incorrect,
20924    # since paths with space are more likely in Windows. Give it another try with the whole
20925    # argument.
20926    path="$complete"
20927    arguments="EOL"
20928    new_path=`$CYGPATH -u "$path"`
20929    new_path=`$WHICH "$new_path" 2> /dev/null`
20930    # bat and cmd files are not always considered executable in cygwin causing which
20931    # to not find them
20932    if test "x$new_path" = x \
20933             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20934             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20935      new_path=`$CYGPATH -u "$path"`
20936    fi
20937    if test "x$new_path" = x; then
20938      # It's still not found. Now this is an unrecoverable error.
20939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
20940$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
20941      has_space=`$ECHO "$complete" | $GREP " "`
20942      if test "x$has_space" != x; then
20943        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20944$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20945      fi
20946      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
20947    fi
20948  fi
20949
20950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20953  # "foo.exe" is OK but "foo" is an error.
20954  #
20955  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20956  # It is also a way to make sure we got the proper file name for the real test later on.
20957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20958  if test "x$test_shortpath" = x; then
20959    # Short path failed, file does not exist as specified.
20960    # Try adding .exe or .cmd
20961    if test -f "${new_path}.exe"; then
20962       input_to_shortpath="${new_path}.exe"
20963    elif test -f "${new_path}.cmd"; then
20964       input_to_shortpath="${new_path}.cmd"
20965    else
20966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
20967$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
20968      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20969$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20970      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
20971    fi
20972  else
20973    input_to_shortpath="$new_path"
20974  fi
20975
20976  # Call helper function which possibly converts this using DOS-style short mode.
20977  # If so, the updated path is stored in $new_path.
20978  new_path="$input_to_shortpath"
20979
20980  input_path="$input_to_shortpath"
20981  # Check if we need to convert this using DOS-style short mode. If the path
20982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20983  # take no chances and rewrite it.
20984  # Note: m4 eats our [], so we need to use [ and ] instead.
20985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20986  if test "x$has_forbidden_chars" != x; then
20987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20991      # Going to short mode and back again did indeed matter. Since short mode is
20992      # case insensitive, let's make it lowercase to improve readability.
20993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20994      # Now convert it back to Unix-stile (cygpath)
20995      input_path=`$CYGPATH -u "$shortmode_path"`
20996      new_path="$input_path"
20997    fi
20998  fi
20999
21000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21001  if test "x$test_cygdrive_prefix" = x; then
21002    # As a simple fix, exclude /usr/bin since it's not a real path.
21003    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21005      # a path prefixed by /cygdrive for fixpath to work.
21006      new_path="$CYGWIN_ROOT_PATH$input_path"
21007    fi
21008  fi
21009
21010  # remove trailing .exe if any
21011  new_path="${new_path/%.exe/}"
21012
21013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21014
21015  # First separate the path from the arguments. This will split at the first
21016  # space.
21017  complete="$AR"
21018  path="${complete%% *}"
21019  tmp="$complete EOL"
21020  arguments="${tmp#* }"
21021
21022  # Input might be given as Windows format, start by converting to
21023  # unix format.
21024  new_path="$path"
21025
21026  windows_path="$new_path"
21027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21028    unix_path=`$CYGPATH -u "$windows_path"`
21029    new_path="$unix_path"
21030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21032    new_path="$unix_path"
21033  fi
21034
21035
21036  # Now try to locate executable using which
21037  new_path=`$WHICH "$new_path" 2> /dev/null`
21038
21039  if test "x$new_path" = x; then
21040    # Oops. Which didn't find the executable.
21041    # The splitting of arguments from the executable at a space might have been incorrect,
21042    # since paths with space are more likely in Windows. Give it another try with the whole
21043    # argument.
21044    path="$complete"
21045    arguments="EOL"
21046    new_path="$path"
21047
21048  windows_path="$new_path"
21049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21050    unix_path=`$CYGPATH -u "$windows_path"`
21051    new_path="$unix_path"
21052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21054    new_path="$unix_path"
21055  fi
21056
21057
21058    new_path=`$WHICH "$new_path" 2> /dev/null`
21059
21060    if test "x$new_path" = x; then
21061      # It's still not found. Now this is an unrecoverable error.
21062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21063$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21064      has_space=`$ECHO "$complete" | $GREP " "`
21065      if test "x$has_space" != x; then
21066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21068      fi
21069      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21070    fi
21071  fi
21072
21073  # Now new_path has a complete unix path to the binary
21074  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21075    # Keep paths in /bin as-is, but remove trailing .exe if any
21076    new_path="${new_path/%.exe/}"
21077    # Do not save /bin paths to all_fixpath_prefixes!
21078  else
21079    # Not in mixed or Windows style, start by that.
21080    new_path=`cmd //c echo $new_path`
21081
21082  input_path="$new_path"
21083  # Check if we need to convert this using DOS-style short mode. If the path
21084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21085  # take no chances and rewrite it.
21086  # Note: m4 eats our [], so we need to use [ and ] instead.
21087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21088  if test "x$has_forbidden_chars" != x; then
21089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21091  fi
21092
21093    # Output is in $new_path
21094
21095  windows_path="$new_path"
21096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21097    unix_path=`$CYGPATH -u "$windows_path"`
21098    new_path="$unix_path"
21099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21101    new_path="$unix_path"
21102  fi
21103
21104    # remove trailing .exe if any
21105    new_path="${new_path/%.exe/}"
21106
21107    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21108    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21109  fi
21110
21111  else
21112    # We're on a posix platform. Hooray! :)
21113    # First separate the path from the arguments. This will split at the first
21114    # space.
21115    complete="$AR"
21116    path="${complete%% *}"
21117    tmp="$complete EOL"
21118    arguments="${tmp#* }"
21119
21120    new_path=`$WHICH $path 2> /dev/null`
21121    if test "x$new_path" = x; then
21122      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21123      if test "x$is_absolute_path" != x; then
21124        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) with 'which' failed, using $path directly." >&5
21125$as_echo "$as_me: Resolving AR (as $path) with 'which' failed, using $path directly." >&6;}
21126        new_path="$path"
21127      else
21128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21129$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21130        has_space=`$ECHO "$complete" | $GREP " "`
21131        if test "x$has_space" != x; then
21132          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21133$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21134        fi
21135        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21136      fi
21137    fi
21138  fi
21139
21140  # Now join together the path and the arguments once again
21141  if test "x$arguments" != xEOL; then
21142      new_complete="$new_path ${arguments% *}"
21143  else
21144      new_complete="$new_path"
21145  fi
21146
21147  if test "x$complete" != "x$new_complete"; then
21148    AR="$new_complete"
21149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21150$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21151  fi
21152
21153fi
21154if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21155    ARFLAGS="-r"
21156else
21157    ARFLAGS=""
21158fi
21159
21160
21161# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21162HOTSPOT_CXX="$CXX"
21163HOTSPOT_LD="$LD"
21164
21165
21166
21167COMPILER_NAME=gcc
21168COMPILER_TYPE=CC
21169if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21170
21171    # For now, assume that we are always compiling using cl.exe.
21172    CC_OUT_OPTION=-Fo
21173    EXE_OUT_OPTION=-out:
21174    LD_OUT_OPTION=-out:
21175    AR_OUT_OPTION=-out:
21176    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21177    # program for something completely different.
21178    # Extract the first word of "link", so it can be a program name with args.
21179set dummy link; ac_word=$2
21180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21181$as_echo_n "checking for $ac_word... " >&6; }
21182if test "${ac_cv_prog_WINLD+set}" = set; then :
21183  $as_echo_n "(cached) " >&6
21184else
21185  if test -n "$WINLD"; then
21186  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21187else
21188  ac_prog_rejected=no
21189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21190for as_dir in $PATH
21191do
21192  IFS=$as_save_IFS
21193  test -z "$as_dir" && as_dir=.
21194    for ac_exec_ext in '' $ac_executable_extensions; do
21195  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21196    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21197       ac_prog_rejected=yes
21198       continue
21199     fi
21200    ac_cv_prog_WINLD="link"
21201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21202    break 2
21203  fi
21204done
21205  done
21206IFS=$as_save_IFS
21207
21208if test $ac_prog_rejected = yes; then
21209  # We found a bogon in the path, so make sure we never use it.
21210  set dummy $ac_cv_prog_WINLD
21211  shift
21212  if test $# != 0; then
21213    # We chose a different compiler from the bogus one.
21214    # However, it has the same basename, so the bogon will be chosen
21215    # first if we set WINLD to just the basename; use the full file name.
21216    shift
21217    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21218  fi
21219fi
21220fi
21221fi
21222WINLD=$ac_cv_prog_WINLD
21223if test -n "$WINLD"; then
21224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21225$as_echo "$WINLD" >&6; }
21226else
21227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21228$as_echo "no" >&6; }
21229fi
21230
21231
21232    # Since we must ignore the first found link, WINLD will contain
21233    # the full path to the link.exe program.
21234
21235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21236
21237  # First separate the path from the arguments. This will split at the first
21238  # space.
21239  complete="$WINLD"
21240  path="${complete%% *}"
21241  tmp="$complete EOL"
21242  arguments="${tmp#* }"
21243
21244  # Input might be given as Windows format, start by converting to
21245  # unix format.
21246  new_path=`$CYGPATH -u "$path"`
21247
21248  # Now try to locate executable using which
21249  new_path=`$WHICH "$new_path" 2> /dev/null`
21250  # bat and cmd files are not always considered executable in cygwin causing which
21251  # to not find them
21252  if test "x$new_path" = x \
21253           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21254           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21255    new_path=`$CYGPATH -u "$path"`
21256  fi
21257  if test "x$new_path" = x; then
21258    # Oops. Which didn't find the executable.
21259    # The splitting of arguments from the executable at a space might have been incorrect,
21260    # since paths with space are more likely in Windows. Give it another try with the whole
21261    # argument.
21262    path="$complete"
21263    arguments="EOL"
21264    new_path=`$CYGPATH -u "$path"`
21265    new_path=`$WHICH "$new_path" 2> /dev/null`
21266    # bat and cmd files are not always considered executable in cygwin causing which
21267    # to not find them
21268    if test "x$new_path" = x \
21269             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21270             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21271      new_path=`$CYGPATH -u "$path"`
21272    fi
21273    if test "x$new_path" = x; then
21274      # It's still not found. Now this is an unrecoverable error.
21275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21276$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21277      has_space=`$ECHO "$complete" | $GREP " "`
21278      if test "x$has_space" != x; then
21279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21281      fi
21282      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21283    fi
21284  fi
21285
21286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21289  # "foo.exe" is OK but "foo" is an error.
21290  #
21291  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21292  # It is also a way to make sure we got the proper file name for the real test later on.
21293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21294  if test "x$test_shortpath" = x; then
21295    # Short path failed, file does not exist as specified.
21296    # Try adding .exe or .cmd
21297    if test -f "${new_path}.exe"; then
21298       input_to_shortpath="${new_path}.exe"
21299    elif test -f "${new_path}.cmd"; then
21300       input_to_shortpath="${new_path}.cmd"
21301    else
21302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21303$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21306      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21307    fi
21308  else
21309    input_to_shortpath="$new_path"
21310  fi
21311
21312  # Call helper function which possibly converts this using DOS-style short mode.
21313  # If so, the updated path is stored in $new_path.
21314  new_path="$input_to_shortpath"
21315
21316  input_path="$input_to_shortpath"
21317  # Check if we need to convert this using DOS-style short mode. If the path
21318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21319  # take no chances and rewrite it.
21320  # Note: m4 eats our [], so we need to use [ and ] instead.
21321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21322  if test "x$has_forbidden_chars" != x; then
21323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21327      # Going to short mode and back again did indeed matter. Since short mode is
21328      # case insensitive, let's make it lowercase to improve readability.
21329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21330      # Now convert it back to Unix-stile (cygpath)
21331      input_path=`$CYGPATH -u "$shortmode_path"`
21332      new_path="$input_path"
21333    fi
21334  fi
21335
21336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21337  if test "x$test_cygdrive_prefix" = x; then
21338    # As a simple fix, exclude /usr/bin since it's not a real path.
21339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21341      # a path prefixed by /cygdrive for fixpath to work.
21342      new_path="$CYGWIN_ROOT_PATH$input_path"
21343    fi
21344  fi
21345
21346  # remove trailing .exe if any
21347  new_path="${new_path/%.exe/}"
21348
21349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21350
21351  # First separate the path from the arguments. This will split at the first
21352  # space.
21353  complete="$WINLD"
21354  path="${complete%% *}"
21355  tmp="$complete EOL"
21356  arguments="${tmp#* }"
21357
21358  # Input might be given as Windows format, start by converting to
21359  # unix format.
21360  new_path="$path"
21361
21362  windows_path="$new_path"
21363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21364    unix_path=`$CYGPATH -u "$windows_path"`
21365    new_path="$unix_path"
21366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21368    new_path="$unix_path"
21369  fi
21370
21371
21372  # Now try to locate executable using which
21373  new_path=`$WHICH "$new_path" 2> /dev/null`
21374
21375  if test "x$new_path" = x; then
21376    # Oops. Which didn't find the executable.
21377    # The splitting of arguments from the executable at a space might have been incorrect,
21378    # since paths with space are more likely in Windows. Give it another try with the whole
21379    # argument.
21380    path="$complete"
21381    arguments="EOL"
21382    new_path="$path"
21383
21384  windows_path="$new_path"
21385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21386    unix_path=`$CYGPATH -u "$windows_path"`
21387    new_path="$unix_path"
21388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21390    new_path="$unix_path"
21391  fi
21392
21393
21394    new_path=`$WHICH "$new_path" 2> /dev/null`
21395
21396    if test "x$new_path" = x; then
21397      # It's still not found. Now this is an unrecoverable error.
21398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21399$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21400      has_space=`$ECHO "$complete" | $GREP " "`
21401      if test "x$has_space" != x; then
21402        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21403$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21404      fi
21405      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21406    fi
21407  fi
21408
21409  # Now new_path has a complete unix path to the binary
21410  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21411    # Keep paths in /bin as-is, but remove trailing .exe if any
21412    new_path="${new_path/%.exe/}"
21413    # Do not save /bin paths to all_fixpath_prefixes!
21414  else
21415    # Not in mixed or Windows style, start by that.
21416    new_path=`cmd //c echo $new_path`
21417
21418  input_path="$new_path"
21419  # Check if we need to convert this using DOS-style short mode. If the path
21420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21421  # take no chances and rewrite it.
21422  # Note: m4 eats our [], so we need to use [ and ] instead.
21423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21424  if test "x$has_forbidden_chars" != x; then
21425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21427  fi
21428
21429    # Output is in $new_path
21430
21431  windows_path="$new_path"
21432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21433    unix_path=`$CYGPATH -u "$windows_path"`
21434    new_path="$unix_path"
21435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21437    new_path="$unix_path"
21438  fi
21439
21440    # remove trailing .exe if any
21441    new_path="${new_path/%.exe/}"
21442
21443    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21444    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21445  fi
21446
21447  else
21448    # We're on a posix platform. Hooray! :)
21449    # First separate the path from the arguments. This will split at the first
21450    # space.
21451    complete="$WINLD"
21452    path="${complete%% *}"
21453    tmp="$complete EOL"
21454    arguments="${tmp#* }"
21455
21456    new_path=`$WHICH $path 2> /dev/null`
21457    if test "x$new_path" = x; then
21458      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21459      if test "x$is_absolute_path" != x; then
21460        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&5
21461$as_echo "$as_me: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&6;}
21462        new_path="$path"
21463      else
21464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21465$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21466        has_space=`$ECHO "$complete" | $GREP " "`
21467        if test "x$has_space" != x; then
21468          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21469$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21470        fi
21471        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21472      fi
21473    fi
21474  fi
21475
21476  # Now join together the path and the arguments once again
21477  if test "x$arguments" != xEOL; then
21478      new_complete="$new_path ${arguments% *}"
21479  else
21480      new_complete="$new_path"
21481  fi
21482
21483  if test "x$complete" != "x$new_complete"; then
21484    WINLD="$new_complete"
21485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
21486$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
21487  fi
21488
21489    printf "Windows linker was found at $WINLD\n"
21490    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
21491$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
21492    "$WINLD" --version > /dev/null
21493    if test $? -eq 0 ; then
21494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21495$as_echo "no" >&6; }
21496      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
21497    else
21498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21499$as_echo "yes" >&6; }
21500    fi
21501    LD="$WINLD"
21502    LDEXE="$WINLD"
21503    LDCXX="$WINLD"
21504    LDEXECXX="$WINLD"
21505
21506    # Extract the first word of "mt", so it can be a program name with args.
21507set dummy mt; ac_word=$2
21508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21509$as_echo_n "checking for $ac_word... " >&6; }
21510if test "${ac_cv_prog_MT+set}" = set; then :
21511  $as_echo_n "(cached) " >&6
21512else
21513  if test -n "$MT"; then
21514  ac_cv_prog_MT="$MT" # Let the user override the test.
21515else
21516  ac_prog_rejected=no
21517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21518for as_dir in $PATH
21519do
21520  IFS=$as_save_IFS
21521  test -z "$as_dir" && as_dir=.
21522    for ac_exec_ext in '' $ac_executable_extensions; do
21523  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21524    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
21525       ac_prog_rejected=yes
21526       continue
21527     fi
21528    ac_cv_prog_MT="mt"
21529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21530    break 2
21531  fi
21532done
21533  done
21534IFS=$as_save_IFS
21535
21536if test $ac_prog_rejected = yes; then
21537  # We found a bogon in the path, so make sure we never use it.
21538  set dummy $ac_cv_prog_MT
21539  shift
21540  if test $# != 0; then
21541    # We chose a different compiler from the bogus one.
21542    # However, it has the same basename, so the bogon will be chosen
21543    # first if we set MT to just the basename; use the full file name.
21544    shift
21545    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
21546  fi
21547fi
21548fi
21549fi
21550MT=$ac_cv_prog_MT
21551if test -n "$MT"; then
21552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
21553$as_echo "$MT" >&6; }
21554else
21555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21556$as_echo "no" >&6; }
21557fi
21558
21559
21560
21561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21562
21563  # First separate the path from the arguments. This will split at the first
21564  # space.
21565  complete="$MT"
21566  path="${complete%% *}"
21567  tmp="$complete EOL"
21568  arguments="${tmp#* }"
21569
21570  # Input might be given as Windows format, start by converting to
21571  # unix format.
21572  new_path=`$CYGPATH -u "$path"`
21573
21574  # Now try to locate executable using which
21575  new_path=`$WHICH "$new_path" 2> /dev/null`
21576  # bat and cmd files are not always considered executable in cygwin causing which
21577  # to not find them
21578  if test "x$new_path" = x \
21579           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21580           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21581    new_path=`$CYGPATH -u "$path"`
21582  fi
21583  if test "x$new_path" = x; then
21584    # Oops. Which didn't find the executable.
21585    # The splitting of arguments from the executable at a space might have been incorrect,
21586    # since paths with space are more likely in Windows. Give it another try with the whole
21587    # argument.
21588    path="$complete"
21589    arguments="EOL"
21590    new_path=`$CYGPATH -u "$path"`
21591    new_path=`$WHICH "$new_path" 2> /dev/null`
21592    # bat and cmd files are not always considered executable in cygwin causing which
21593    # to not find them
21594    if test "x$new_path" = x \
21595             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21596             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21597      new_path=`$CYGPATH -u "$path"`
21598    fi
21599    if test "x$new_path" = x; then
21600      # It's still not found. Now this is an unrecoverable error.
21601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21602$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21603      has_space=`$ECHO "$complete" | $GREP " "`
21604      if test "x$has_space" != x; then
21605        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21606$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21607      fi
21608      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21609    fi
21610  fi
21611
21612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21615  # "foo.exe" is OK but "foo" is an error.
21616  #
21617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21618  # It is also a way to make sure we got the proper file name for the real test later on.
21619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21620  if test "x$test_shortpath" = x; then
21621    # Short path failed, file does not exist as specified.
21622    # Try adding .exe or .cmd
21623    if test -f "${new_path}.exe"; then
21624       input_to_shortpath="${new_path}.exe"
21625    elif test -f "${new_path}.cmd"; then
21626       input_to_shortpath="${new_path}.cmd"
21627    else
21628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
21629$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
21630      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21631$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21632      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21633    fi
21634  else
21635    input_to_shortpath="$new_path"
21636  fi
21637
21638  # Call helper function which possibly converts this using DOS-style short mode.
21639  # If so, the updated path is stored in $new_path.
21640  new_path="$input_to_shortpath"
21641
21642  input_path="$input_to_shortpath"
21643  # Check if we need to convert this using DOS-style short mode. If the path
21644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21645  # take no chances and rewrite it.
21646  # Note: m4 eats our [], so we need to use [ and ] instead.
21647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21648  if test "x$has_forbidden_chars" != x; then
21649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21653      # Going to short mode and back again did indeed matter. Since short mode is
21654      # case insensitive, let's make it lowercase to improve readability.
21655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21656      # Now convert it back to Unix-stile (cygpath)
21657      input_path=`$CYGPATH -u "$shortmode_path"`
21658      new_path="$input_path"
21659    fi
21660  fi
21661
21662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21663  if test "x$test_cygdrive_prefix" = x; then
21664    # As a simple fix, exclude /usr/bin since it's not a real path.
21665    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21667      # a path prefixed by /cygdrive for fixpath to work.
21668      new_path="$CYGWIN_ROOT_PATH$input_path"
21669    fi
21670  fi
21671
21672  # remove trailing .exe if any
21673  new_path="${new_path/%.exe/}"
21674
21675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21676
21677  # First separate the path from the arguments. This will split at the first
21678  # space.
21679  complete="$MT"
21680  path="${complete%% *}"
21681  tmp="$complete EOL"
21682  arguments="${tmp#* }"
21683
21684  # Input might be given as Windows format, start by converting to
21685  # unix format.
21686  new_path="$path"
21687
21688  windows_path="$new_path"
21689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21690    unix_path=`$CYGPATH -u "$windows_path"`
21691    new_path="$unix_path"
21692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21694    new_path="$unix_path"
21695  fi
21696
21697
21698  # Now try to locate executable using which
21699  new_path=`$WHICH "$new_path" 2> /dev/null`
21700
21701  if test "x$new_path" = x; then
21702    # Oops. Which didn't find the executable.
21703    # The splitting of arguments from the executable at a space might have been incorrect,
21704    # since paths with space are more likely in Windows. Give it another try with the whole
21705    # argument.
21706    path="$complete"
21707    arguments="EOL"
21708    new_path="$path"
21709
21710  windows_path="$new_path"
21711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21712    unix_path=`$CYGPATH -u "$windows_path"`
21713    new_path="$unix_path"
21714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21716    new_path="$unix_path"
21717  fi
21718
21719
21720    new_path=`$WHICH "$new_path" 2> /dev/null`
21721
21722    if test "x$new_path" = x; then
21723      # It's still not found. Now this is an unrecoverable error.
21724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21725$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21726      has_space=`$ECHO "$complete" | $GREP " "`
21727      if test "x$has_space" != x; then
21728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21730      fi
21731      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21732    fi
21733  fi
21734
21735  # Now new_path has a complete unix path to the binary
21736  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21737    # Keep paths in /bin as-is, but remove trailing .exe if any
21738    new_path="${new_path/%.exe/}"
21739    # Do not save /bin paths to all_fixpath_prefixes!
21740  else
21741    # Not in mixed or Windows style, start by that.
21742    new_path=`cmd //c echo $new_path`
21743
21744  input_path="$new_path"
21745  # Check if we need to convert this using DOS-style short mode. If the path
21746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21747  # take no chances and rewrite it.
21748  # Note: m4 eats our [], so we need to use [ and ] instead.
21749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21750  if test "x$has_forbidden_chars" != x; then
21751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21752    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21753  fi
21754
21755    # Output is in $new_path
21756
21757  windows_path="$new_path"
21758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21759    unix_path=`$CYGPATH -u "$windows_path"`
21760    new_path="$unix_path"
21761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21763    new_path="$unix_path"
21764  fi
21765
21766    # remove trailing .exe if any
21767    new_path="${new_path/%.exe/}"
21768
21769    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21770    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21771  fi
21772
21773  else
21774    # We're on a posix platform. Hooray! :)
21775    # First separate the path from the arguments. This will split at the first
21776    # space.
21777    complete="$MT"
21778    path="${complete%% *}"
21779    tmp="$complete EOL"
21780    arguments="${tmp#* }"
21781
21782    new_path=`$WHICH $path 2> /dev/null`
21783    if test "x$new_path" = x; then
21784      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21785      if test "x$is_absolute_path" != x; then
21786        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) with 'which' failed, using $path directly." >&5
21787$as_echo "$as_me: Resolving MT (as $path) with 'which' failed, using $path directly." >&6;}
21788        new_path="$path"
21789      else
21790        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21791$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21792        has_space=`$ECHO "$complete" | $GREP " "`
21793        if test "x$has_space" != x; then
21794          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21795$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21796        fi
21797        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21798      fi
21799    fi
21800  fi
21801
21802  # Now join together the path and the arguments once again
21803  if test "x$arguments" != xEOL; then
21804      new_complete="$new_path ${arguments% *}"
21805  else
21806      new_complete="$new_path"
21807  fi
21808
21809  if test "x$complete" != "x$new_complete"; then
21810    MT="$new_complete"
21811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
21812$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
21813  fi
21814
21815    # The resource compiler
21816    # Extract the first word of "rc", so it can be a program name with args.
21817set dummy rc; ac_word=$2
21818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21819$as_echo_n "checking for $ac_word... " >&6; }
21820if test "${ac_cv_prog_RC+set}" = set; then :
21821  $as_echo_n "(cached) " >&6
21822else
21823  if test -n "$RC"; then
21824  ac_cv_prog_RC="$RC" # Let the user override the test.
21825else
21826  ac_prog_rejected=no
21827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21828for as_dir in $PATH
21829do
21830  IFS=$as_save_IFS
21831  test -z "$as_dir" && as_dir=.
21832    for ac_exec_ext in '' $ac_executable_extensions; do
21833  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21834    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
21835       ac_prog_rejected=yes
21836       continue
21837     fi
21838    ac_cv_prog_RC="rc"
21839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21840    break 2
21841  fi
21842done
21843  done
21844IFS=$as_save_IFS
21845
21846if test $ac_prog_rejected = yes; then
21847  # We found a bogon in the path, so make sure we never use it.
21848  set dummy $ac_cv_prog_RC
21849  shift
21850  if test $# != 0; then
21851    # We chose a different compiler from the bogus one.
21852    # However, it has the same basename, so the bogon will be chosen
21853    # first if we set RC to just the basename; use the full file name.
21854    shift
21855    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
21856  fi
21857fi
21858fi
21859fi
21860RC=$ac_cv_prog_RC
21861if test -n "$RC"; then
21862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
21863$as_echo "$RC" >&6; }
21864else
21865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21866$as_echo "no" >&6; }
21867fi
21868
21869
21870
21871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21872
21873  # First separate the path from the arguments. This will split at the first
21874  # space.
21875  complete="$RC"
21876  path="${complete%% *}"
21877  tmp="$complete EOL"
21878  arguments="${tmp#* }"
21879
21880  # Input might be given as Windows format, start by converting to
21881  # unix format.
21882  new_path=`$CYGPATH -u "$path"`
21883
21884  # Now try to locate executable using which
21885  new_path=`$WHICH "$new_path" 2> /dev/null`
21886  # bat and cmd files are not always considered executable in cygwin causing which
21887  # to not find them
21888  if test "x$new_path" = x \
21889           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21890           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21891    new_path=`$CYGPATH -u "$path"`
21892  fi
21893  if test "x$new_path" = x; then
21894    # Oops. Which didn't find the executable.
21895    # The splitting of arguments from the executable at a space might have been incorrect,
21896    # since paths with space are more likely in Windows. Give it another try with the whole
21897    # argument.
21898    path="$complete"
21899    arguments="EOL"
21900    new_path=`$CYGPATH -u "$path"`
21901    new_path=`$WHICH "$new_path" 2> /dev/null`
21902    # bat and cmd files are not always considered executable in cygwin causing which
21903    # to not find them
21904    if test "x$new_path" = x \
21905             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21906             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21907      new_path=`$CYGPATH -u "$path"`
21908    fi
21909    if test "x$new_path" = x; then
21910      # It's still not found. Now this is an unrecoverable error.
21911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
21912$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
21913      has_space=`$ECHO "$complete" | $GREP " "`
21914      if test "x$has_space" != x; then
21915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21917      fi
21918      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
21919    fi
21920  fi
21921
21922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21925  # "foo.exe" is OK but "foo" is an error.
21926  #
21927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21928  # It is also a way to make sure we got the proper file name for the real test later on.
21929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21930  if test "x$test_shortpath" = x; then
21931    # Short path failed, file does not exist as specified.
21932    # Try adding .exe or .cmd
21933    if test -f "${new_path}.exe"; then
21934       input_to_shortpath="${new_path}.exe"
21935    elif test -f "${new_path}.cmd"; then
21936       input_to_shortpath="${new_path}.cmd"
21937    else
21938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
21939$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
21940      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21941$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21942      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
21943    fi
21944  else
21945    input_to_shortpath="$new_path"
21946  fi
21947
21948  # Call helper function which possibly converts this using DOS-style short mode.
21949  # If so, the updated path is stored in $new_path.
21950  new_path="$input_to_shortpath"
21951
21952  input_path="$input_to_shortpath"
21953  # Check if we need to convert this using DOS-style short mode. If the path
21954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21955  # take no chances and rewrite it.
21956  # Note: m4 eats our [], so we need to use [ and ] instead.
21957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21958  if test "x$has_forbidden_chars" != x; then
21959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21963      # Going to short mode and back again did indeed matter. Since short mode is
21964      # case insensitive, let's make it lowercase to improve readability.
21965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21966      # Now convert it back to Unix-stile (cygpath)
21967      input_path=`$CYGPATH -u "$shortmode_path"`
21968      new_path="$input_path"
21969    fi
21970  fi
21971
21972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21973  if test "x$test_cygdrive_prefix" = x; then
21974    # As a simple fix, exclude /usr/bin since it's not a real path.
21975    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21977      # a path prefixed by /cygdrive for fixpath to work.
21978      new_path="$CYGWIN_ROOT_PATH$input_path"
21979    fi
21980  fi
21981
21982  # remove trailing .exe if any
21983  new_path="${new_path/%.exe/}"
21984
21985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21986
21987  # First separate the path from the arguments. This will split at the first
21988  # space.
21989  complete="$RC"
21990  path="${complete%% *}"
21991  tmp="$complete EOL"
21992  arguments="${tmp#* }"
21993
21994  # Input might be given as Windows format, start by converting to
21995  # unix format.
21996  new_path="$path"
21997
21998  windows_path="$new_path"
21999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22000    unix_path=`$CYGPATH -u "$windows_path"`
22001    new_path="$unix_path"
22002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22004    new_path="$unix_path"
22005  fi
22006
22007
22008  # Now try to locate executable using which
22009  new_path=`$WHICH "$new_path" 2> /dev/null`
22010
22011  if test "x$new_path" = x; then
22012    # Oops. Which didn't find the executable.
22013    # The splitting of arguments from the executable at a space might have been incorrect,
22014    # since paths with space are more likely in Windows. Give it another try with the whole
22015    # argument.
22016    path="$complete"
22017    arguments="EOL"
22018    new_path="$path"
22019
22020  windows_path="$new_path"
22021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22022    unix_path=`$CYGPATH -u "$windows_path"`
22023    new_path="$unix_path"
22024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22026    new_path="$unix_path"
22027  fi
22028
22029
22030    new_path=`$WHICH "$new_path" 2> /dev/null`
22031
22032    if test "x$new_path" = x; then
22033      # It's still not found. Now this is an unrecoverable error.
22034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22035$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22036      has_space=`$ECHO "$complete" | $GREP " "`
22037      if test "x$has_space" != x; then
22038        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22039$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22040      fi
22041      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22042    fi
22043  fi
22044
22045  # Now new_path has a complete unix path to the binary
22046  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22047    # Keep paths in /bin as-is, but remove trailing .exe if any
22048    new_path="${new_path/%.exe/}"
22049    # Do not save /bin paths to all_fixpath_prefixes!
22050  else
22051    # Not in mixed or Windows style, start by that.
22052    new_path=`cmd //c echo $new_path`
22053
22054  input_path="$new_path"
22055  # Check if we need to convert this using DOS-style short mode. If the path
22056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22057  # take no chances and rewrite it.
22058  # Note: m4 eats our [], so we need to use [ and ] instead.
22059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22060  if test "x$has_forbidden_chars" != x; then
22061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22063  fi
22064
22065    # Output is in $new_path
22066
22067  windows_path="$new_path"
22068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22069    unix_path=`$CYGPATH -u "$windows_path"`
22070    new_path="$unix_path"
22071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22073    new_path="$unix_path"
22074  fi
22075
22076    # remove trailing .exe if any
22077    new_path="${new_path/%.exe/}"
22078
22079    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22080    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22081  fi
22082
22083  else
22084    # We're on a posix platform. Hooray! :)
22085    # First separate the path from the arguments. This will split at the first
22086    # space.
22087    complete="$RC"
22088    path="${complete%% *}"
22089    tmp="$complete EOL"
22090    arguments="${tmp#* }"
22091
22092    new_path=`$WHICH $path 2> /dev/null`
22093    if test "x$new_path" = x; then
22094      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22095      if test "x$is_absolute_path" != x; then
22096        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) with 'which' failed, using $path directly." >&5
22097$as_echo "$as_me: Resolving RC (as $path) with 'which' failed, using $path directly." >&6;}
22098        new_path="$path"
22099      else
22100        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22101$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22102        has_space=`$ECHO "$complete" | $GREP " "`
22103        if test "x$has_space" != x; then
22104          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22105$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22106        fi
22107        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22108      fi
22109    fi
22110  fi
22111
22112  # Now join together the path and the arguments once again
22113  if test "x$arguments" != xEOL; then
22114      new_complete="$new_path ${arguments% *}"
22115  else
22116      new_complete="$new_path"
22117  fi
22118
22119  if test "x$complete" != "x$new_complete"; then
22120    RC="$new_complete"
22121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22122$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22123  fi
22124
22125
22126    # For hotspot, we need these in Windows mixed path,
22127    # so rewrite them all. Need added .exe suffix.
22128    HOTSPOT_CXX="$CXX.exe"
22129    HOTSPOT_LD="$LD.exe"
22130    HOTSPOT_MT="$MT.exe"
22131    HOTSPOT_RC="$RC.exe"
22132
22133  unix_path="$HOTSPOT_CXX"
22134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22135    windows_path=`$CYGPATH -m "$unix_path"`
22136    HOTSPOT_CXX="$windows_path"
22137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22138    windows_path=`cmd //c echo $unix_path`
22139    HOTSPOT_CXX="$windows_path"
22140  fi
22141
22142
22143  unix_path="$HOTSPOT_LD"
22144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22145    windows_path=`$CYGPATH -m "$unix_path"`
22146    HOTSPOT_LD="$windows_path"
22147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22148    windows_path=`cmd //c echo $unix_path`
22149    HOTSPOT_LD="$windows_path"
22150  fi
22151
22152
22153  unix_path="$HOTSPOT_MT"
22154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22155    windows_path=`$CYGPATH -m "$unix_path"`
22156    HOTSPOT_MT="$windows_path"
22157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22158    windows_path=`cmd //c echo $unix_path`
22159    HOTSPOT_MT="$windows_path"
22160  fi
22161
22162
22163  unix_path="$HOTSPOT_RC"
22164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22165    windows_path=`$CYGPATH -m "$unix_path"`
22166    HOTSPOT_RC="$windows_path"
22167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22168    windows_path=`cmd //c echo $unix_path`
22169    HOTSPOT_RC="$windows_path"
22170  fi
22171
22172
22173
22174
22175    RC_FLAGS="-nologo -l 0x409 -r"
22176    if test "x$VARIANT" = xOPT; then :
22177
22178        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22179
22180fi
22181    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22182    if test "x$JDK_UPDATE_VERSION" = x; then :
22183
22184        JDK_UPDATE_VERSION_NOTNULL=0
22185
22186fi
22187    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22188    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22189    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22190    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22191    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22192    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22193    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22194
22195    # lib.exe is used to create static libraries.
22196    # Extract the first word of "lib", so it can be a program name with args.
22197set dummy lib; ac_word=$2
22198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22199$as_echo_n "checking for $ac_word... " >&6; }
22200if test "${ac_cv_prog_WINAR+set}" = set; then :
22201  $as_echo_n "(cached) " >&6
22202else
22203  if test -n "$WINAR"; then
22204  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22205else
22206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22207for as_dir in $PATH
22208do
22209  IFS=$as_save_IFS
22210  test -z "$as_dir" && as_dir=.
22211    for ac_exec_ext in '' $ac_executable_extensions; do
22212  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22213    ac_cv_prog_WINAR="lib"
22214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22215    break 2
22216  fi
22217done
22218  done
22219IFS=$as_save_IFS
22220
22221fi
22222fi
22223WINAR=$ac_cv_prog_WINAR
22224if test -n "$WINAR"; then
22225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22226$as_echo "$WINAR" >&6; }
22227else
22228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22229$as_echo "no" >&6; }
22230fi
22231
22232
22233
22234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22235
22236  # First separate the path from the arguments. This will split at the first
22237  # space.
22238  complete="$WINAR"
22239  path="${complete%% *}"
22240  tmp="$complete EOL"
22241  arguments="${tmp#* }"
22242
22243  # Input might be given as Windows format, start by converting to
22244  # unix format.
22245  new_path=`$CYGPATH -u "$path"`
22246
22247  # Now try to locate executable using which
22248  new_path=`$WHICH "$new_path" 2> /dev/null`
22249  # bat and cmd files are not always considered executable in cygwin causing which
22250  # to not find them
22251  if test "x$new_path" = x \
22252           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22253           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22254    new_path=`$CYGPATH -u "$path"`
22255  fi
22256  if test "x$new_path" = x; then
22257    # Oops. Which didn't find the executable.
22258    # The splitting of arguments from the executable at a space might have been incorrect,
22259    # since paths with space are more likely in Windows. Give it another try with the whole
22260    # argument.
22261    path="$complete"
22262    arguments="EOL"
22263    new_path=`$CYGPATH -u "$path"`
22264    new_path=`$WHICH "$new_path" 2> /dev/null`
22265    # bat and cmd files are not always considered executable in cygwin causing which
22266    # to not find them
22267    if test "x$new_path" = x \
22268             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22269             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22270      new_path=`$CYGPATH -u "$path"`
22271    fi
22272    if test "x$new_path" = x; then
22273      # It's still not found. Now this is an unrecoverable error.
22274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22275$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22276      has_space=`$ECHO "$complete" | $GREP " "`
22277      if test "x$has_space" != x; then
22278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22280      fi
22281      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22282    fi
22283  fi
22284
22285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22288  # "foo.exe" is OK but "foo" is an error.
22289  #
22290  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22291  # It is also a way to make sure we got the proper file name for the real test later on.
22292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22293  if test "x$test_shortpath" = x; then
22294    # Short path failed, file does not exist as specified.
22295    # Try adding .exe or .cmd
22296    if test -f "${new_path}.exe"; then
22297       input_to_shortpath="${new_path}.exe"
22298    elif test -f "${new_path}.cmd"; then
22299       input_to_shortpath="${new_path}.cmd"
22300    else
22301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22302$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22303      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22304$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22305      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22306    fi
22307  else
22308    input_to_shortpath="$new_path"
22309  fi
22310
22311  # Call helper function which possibly converts this using DOS-style short mode.
22312  # If so, the updated path is stored in $new_path.
22313  new_path="$input_to_shortpath"
22314
22315  input_path="$input_to_shortpath"
22316  # Check if we need to convert this using DOS-style short mode. If the path
22317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22318  # take no chances and rewrite it.
22319  # Note: m4 eats our [], so we need to use [ and ] instead.
22320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22321  if test "x$has_forbidden_chars" != x; then
22322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22326      # Going to short mode and back again did indeed matter. Since short mode is
22327      # case insensitive, let's make it lowercase to improve readability.
22328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22329      # Now convert it back to Unix-stile (cygpath)
22330      input_path=`$CYGPATH -u "$shortmode_path"`
22331      new_path="$input_path"
22332    fi
22333  fi
22334
22335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22336  if test "x$test_cygdrive_prefix" = x; then
22337    # As a simple fix, exclude /usr/bin since it's not a real path.
22338    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22340      # a path prefixed by /cygdrive for fixpath to work.
22341      new_path="$CYGWIN_ROOT_PATH$input_path"
22342    fi
22343  fi
22344
22345  # remove trailing .exe if any
22346  new_path="${new_path/%.exe/}"
22347
22348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22349
22350  # First separate the path from the arguments. This will split at the first
22351  # space.
22352  complete="$WINAR"
22353  path="${complete%% *}"
22354  tmp="$complete EOL"
22355  arguments="${tmp#* }"
22356
22357  # Input might be given as Windows format, start by converting to
22358  # unix format.
22359  new_path="$path"
22360
22361  windows_path="$new_path"
22362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22363    unix_path=`$CYGPATH -u "$windows_path"`
22364    new_path="$unix_path"
22365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22367    new_path="$unix_path"
22368  fi
22369
22370
22371  # Now try to locate executable using which
22372  new_path=`$WHICH "$new_path" 2> /dev/null`
22373
22374  if test "x$new_path" = x; then
22375    # Oops. Which didn't find the executable.
22376    # The splitting of arguments from the executable at a space might have been incorrect,
22377    # since paths with space are more likely in Windows. Give it another try with the whole
22378    # argument.
22379    path="$complete"
22380    arguments="EOL"
22381    new_path="$path"
22382
22383  windows_path="$new_path"
22384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22385    unix_path=`$CYGPATH -u "$windows_path"`
22386    new_path="$unix_path"
22387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22389    new_path="$unix_path"
22390  fi
22391
22392
22393    new_path=`$WHICH "$new_path" 2> /dev/null`
22394
22395    if test "x$new_path" = x; then
22396      # It's still not found. Now this is an unrecoverable error.
22397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22398$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22399      has_space=`$ECHO "$complete" | $GREP " "`
22400      if test "x$has_space" != x; then
22401        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22402$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22403      fi
22404      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22405    fi
22406  fi
22407
22408  # Now new_path has a complete unix path to the binary
22409  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22410    # Keep paths in /bin as-is, but remove trailing .exe if any
22411    new_path="${new_path/%.exe/}"
22412    # Do not save /bin paths to all_fixpath_prefixes!
22413  else
22414    # Not in mixed or Windows style, start by that.
22415    new_path=`cmd //c echo $new_path`
22416
22417  input_path="$new_path"
22418  # Check if we need to convert this using DOS-style short mode. If the path
22419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22420  # take no chances and rewrite it.
22421  # Note: m4 eats our [], so we need to use [ and ] instead.
22422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22423  if test "x$has_forbidden_chars" != x; then
22424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22426  fi
22427
22428    # Output is in $new_path
22429
22430  windows_path="$new_path"
22431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22432    unix_path=`$CYGPATH -u "$windows_path"`
22433    new_path="$unix_path"
22434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22436    new_path="$unix_path"
22437  fi
22438
22439    # remove trailing .exe if any
22440    new_path="${new_path/%.exe/}"
22441
22442    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22443    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22444  fi
22445
22446  else
22447    # We're on a posix platform. Hooray! :)
22448    # First separate the path from the arguments. This will split at the first
22449    # space.
22450    complete="$WINAR"
22451    path="${complete%% *}"
22452    tmp="$complete EOL"
22453    arguments="${tmp#* }"
22454
22455    new_path=`$WHICH $path 2> /dev/null`
22456    if test "x$new_path" = x; then
22457      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22458      if test "x$is_absolute_path" != x; then
22459        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&5
22460$as_echo "$as_me: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&6;}
22461        new_path="$path"
22462      else
22463        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22464$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22465        has_space=`$ECHO "$complete" | $GREP " "`
22466        if test "x$has_space" != x; then
22467          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22468$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22469        fi
22470        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22471      fi
22472    fi
22473  fi
22474
22475  # Now join together the path and the arguments once again
22476  if test "x$arguments" != xEOL; then
22477      new_complete="$new_path ${arguments% *}"
22478  else
22479      new_complete="$new_path"
22480  fi
22481
22482  if test "x$complete" != "x$new_complete"; then
22483    WINAR="$new_complete"
22484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
22485$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
22486  fi
22487
22488    AR="$WINAR"
22489    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
22490
22491    # Extract the first word of "dumpbin", so it can be a program name with args.
22492set dummy dumpbin; ac_word=$2
22493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22494$as_echo_n "checking for $ac_word... " >&6; }
22495if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
22496  $as_echo_n "(cached) " >&6
22497else
22498  if test -n "$DUMPBIN"; then
22499  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
22500else
22501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22502for as_dir in $PATH
22503do
22504  IFS=$as_save_IFS
22505  test -z "$as_dir" && as_dir=.
22506    for ac_exec_ext in '' $ac_executable_extensions; do
22507  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22508    ac_cv_prog_DUMPBIN="dumpbin"
22509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22510    break 2
22511  fi
22512done
22513  done
22514IFS=$as_save_IFS
22515
22516fi
22517fi
22518DUMPBIN=$ac_cv_prog_DUMPBIN
22519if test -n "$DUMPBIN"; then
22520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
22521$as_echo "$DUMPBIN" >&6; }
22522else
22523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22524$as_echo "no" >&6; }
22525fi
22526
22527
22528
22529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22530
22531  # First separate the path from the arguments. This will split at the first
22532  # space.
22533  complete="$DUMPBIN"
22534  path="${complete%% *}"
22535  tmp="$complete EOL"
22536  arguments="${tmp#* }"
22537
22538  # Input might be given as Windows format, start by converting to
22539  # unix format.
22540  new_path=`$CYGPATH -u "$path"`
22541
22542  # Now try to locate executable using which
22543  new_path=`$WHICH "$new_path" 2> /dev/null`
22544  # bat and cmd files are not always considered executable in cygwin causing which
22545  # to not find them
22546  if test "x$new_path" = x \
22547           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22548           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22549    new_path=`$CYGPATH -u "$path"`
22550  fi
22551  if test "x$new_path" = x; then
22552    # Oops. Which didn't find the executable.
22553    # The splitting of arguments from the executable at a space might have been incorrect,
22554    # since paths with space are more likely in Windows. Give it another try with the whole
22555    # argument.
22556    path="$complete"
22557    arguments="EOL"
22558    new_path=`$CYGPATH -u "$path"`
22559    new_path=`$WHICH "$new_path" 2> /dev/null`
22560    # bat and cmd files are not always considered executable in cygwin causing which
22561    # to not find them
22562    if test "x$new_path" = x \
22563             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22564             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22565      new_path=`$CYGPATH -u "$path"`
22566    fi
22567    if test "x$new_path" = x; then
22568      # It's still not found. Now this is an unrecoverable error.
22569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22570$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22571      has_space=`$ECHO "$complete" | $GREP " "`
22572      if test "x$has_space" != x; then
22573        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22574$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22575      fi
22576      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22577    fi
22578  fi
22579
22580  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22581  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22582  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22583  # "foo.exe" is OK but "foo" is an error.
22584  #
22585  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22586  # It is also a way to make sure we got the proper file name for the real test later on.
22587  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22588  if test "x$test_shortpath" = x; then
22589    # Short path failed, file does not exist as specified.
22590    # Try adding .exe or .cmd
22591    if test -f "${new_path}.exe"; then
22592       input_to_shortpath="${new_path}.exe"
22593    elif test -f "${new_path}.cmd"; then
22594       input_to_shortpath="${new_path}.cmd"
22595    else
22596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
22597$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
22598      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22599$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22600      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22601    fi
22602  else
22603    input_to_shortpath="$new_path"
22604  fi
22605
22606  # Call helper function which possibly converts this using DOS-style short mode.
22607  # If so, the updated path is stored in $new_path.
22608  new_path="$input_to_shortpath"
22609
22610  input_path="$input_to_shortpath"
22611  # Check if we need to convert this using DOS-style short mode. If the path
22612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22613  # take no chances and rewrite it.
22614  # Note: m4 eats our [], so we need to use [ and ] instead.
22615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22616  if test "x$has_forbidden_chars" != x; then
22617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22618    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22619    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22620    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22621      # Going to short mode and back again did indeed matter. Since short mode is
22622      # case insensitive, let's make it lowercase to improve readability.
22623      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22624      # Now convert it back to Unix-stile (cygpath)
22625      input_path=`$CYGPATH -u "$shortmode_path"`
22626      new_path="$input_path"
22627    fi
22628  fi
22629
22630  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22631  if test "x$test_cygdrive_prefix" = x; then
22632    # As a simple fix, exclude /usr/bin since it's not a real path.
22633    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22634      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22635      # a path prefixed by /cygdrive for fixpath to work.
22636      new_path="$CYGWIN_ROOT_PATH$input_path"
22637    fi
22638  fi
22639
22640  # remove trailing .exe if any
22641  new_path="${new_path/%.exe/}"
22642
22643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22644
22645  # First separate the path from the arguments. This will split at the first
22646  # space.
22647  complete="$DUMPBIN"
22648  path="${complete%% *}"
22649  tmp="$complete EOL"
22650  arguments="${tmp#* }"
22651
22652  # Input might be given as Windows format, start by converting to
22653  # unix format.
22654  new_path="$path"
22655
22656  windows_path="$new_path"
22657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22658    unix_path=`$CYGPATH -u "$windows_path"`
22659    new_path="$unix_path"
22660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22662    new_path="$unix_path"
22663  fi
22664
22665
22666  # Now try to locate executable using which
22667  new_path=`$WHICH "$new_path" 2> /dev/null`
22668
22669  if test "x$new_path" = x; then
22670    # Oops. Which didn't find the executable.
22671    # The splitting of arguments from the executable at a space might have been incorrect,
22672    # since paths with space are more likely in Windows. Give it another try with the whole
22673    # argument.
22674    path="$complete"
22675    arguments="EOL"
22676    new_path="$path"
22677
22678  windows_path="$new_path"
22679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22680    unix_path=`$CYGPATH -u "$windows_path"`
22681    new_path="$unix_path"
22682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22684    new_path="$unix_path"
22685  fi
22686
22687
22688    new_path=`$WHICH "$new_path" 2> /dev/null`
22689
22690    if test "x$new_path" = x; then
22691      # It's still not found. Now this is an unrecoverable error.
22692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22693$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22694      has_space=`$ECHO "$complete" | $GREP " "`
22695      if test "x$has_space" != x; then
22696        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22697$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22698      fi
22699      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22700    fi
22701  fi
22702
22703  # Now new_path has a complete unix path to the binary
22704  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22705    # Keep paths in /bin as-is, but remove trailing .exe if any
22706    new_path="${new_path/%.exe/}"
22707    # Do not save /bin paths to all_fixpath_prefixes!
22708  else
22709    # Not in mixed or Windows style, start by that.
22710    new_path=`cmd //c echo $new_path`
22711
22712  input_path="$new_path"
22713  # Check if we need to convert this using DOS-style short mode. If the path
22714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22715  # take no chances and rewrite it.
22716  # Note: m4 eats our [], so we need to use [ and ] instead.
22717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22718  if test "x$has_forbidden_chars" != x; then
22719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22721  fi
22722
22723    # Output is in $new_path
22724
22725  windows_path="$new_path"
22726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22727    unix_path=`$CYGPATH -u "$windows_path"`
22728    new_path="$unix_path"
22729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22731    new_path="$unix_path"
22732  fi
22733
22734    # remove trailing .exe if any
22735    new_path="${new_path/%.exe/}"
22736
22737    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22738    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22739  fi
22740
22741  else
22742    # We're on a posix platform. Hooray! :)
22743    # First separate the path from the arguments. This will split at the first
22744    # space.
22745    complete="$DUMPBIN"
22746    path="${complete%% *}"
22747    tmp="$complete EOL"
22748    arguments="${tmp#* }"
22749
22750    new_path=`$WHICH $path 2> /dev/null`
22751    if test "x$new_path" = x; then
22752      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22753      if test "x$is_absolute_path" != x; then
22754        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&5
22755$as_echo "$as_me: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&6;}
22756        new_path="$path"
22757      else
22758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22759$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22760        has_space=`$ECHO "$complete" | $GREP " "`
22761        if test "x$has_space" != x; then
22762          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22763$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22764        fi
22765        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22766      fi
22767    fi
22768  fi
22769
22770  # Now join together the path and the arguments once again
22771  if test "x$arguments" != xEOL; then
22772      new_complete="$new_path ${arguments% *}"
22773  else
22774      new_complete="$new_path"
22775  fi
22776
22777  if test "x$complete" != "x$new_complete"; then
22778    DUMPBIN="$new_complete"
22779    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
22780$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
22781  fi
22782
22783
22784    COMPILER_TYPE=CL
22785    CCXXFLAGS="$CCXXFLAGS -nologo"
22786
22787fi
22788
22789
22790
22791ac_ext=c
22792ac_cpp='$CPP $CPPFLAGS'
22793ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22794ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22795ac_compiler_gnu=$ac_cv_c_compiler_gnu
22796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
22797$as_echo_n "checking how to run the C preprocessor... " >&6; }
22798# On Suns, sometimes $CPP names a directory.
22799if test -n "$CPP" && test -d "$CPP"; then
22800  CPP=
22801fi
22802if test -z "$CPP"; then
22803  if test "${ac_cv_prog_CPP+set}" = set; then :
22804  $as_echo_n "(cached) " >&6
22805else
22806      # Double quotes because CPP needs to be expanded
22807    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
22808    do
22809      ac_preproc_ok=false
22810for ac_c_preproc_warn_flag in '' yes
22811do
22812  # Use a header file that comes with gcc, so configuring glibc
22813  # with a fresh cross-compiler works.
22814  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22815  # <limits.h> exists even on freestanding compilers.
22816  # On the NeXT, cc -E runs the code through the compiler's parser,
22817  # not just through cpp. "Syntax error" is here to catch this case.
22818  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22819/* end confdefs.h.  */
22820#ifdef __STDC__
22821# include <limits.h>
22822#else
22823# include <assert.h>
22824#endif
22825		     Syntax error
22826_ACEOF
22827if ac_fn_c_try_cpp "$LINENO"; then :
22828
22829else
22830  # Broken: fails on valid input.
22831continue
22832fi
22833rm -f conftest.err conftest.i conftest.$ac_ext
22834
22835  # OK, works on sane cases.  Now check whether nonexistent headers
22836  # can be detected and how.
22837  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22838/* end confdefs.h.  */
22839#include <ac_nonexistent.h>
22840_ACEOF
22841if ac_fn_c_try_cpp "$LINENO"; then :
22842  # Broken: success on invalid input.
22843continue
22844else
22845  # Passes both tests.
22846ac_preproc_ok=:
22847break
22848fi
22849rm -f conftest.err conftest.i conftest.$ac_ext
22850
22851done
22852# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22853rm -f conftest.i conftest.err conftest.$ac_ext
22854if $ac_preproc_ok; then :
22855  break
22856fi
22857
22858    done
22859    ac_cv_prog_CPP=$CPP
22860
22861fi
22862  CPP=$ac_cv_prog_CPP
22863else
22864  ac_cv_prog_CPP=$CPP
22865fi
22866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
22867$as_echo "$CPP" >&6; }
22868ac_preproc_ok=false
22869for ac_c_preproc_warn_flag in '' yes
22870do
22871  # Use a header file that comes with gcc, so configuring glibc
22872  # with a fresh cross-compiler works.
22873  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22874  # <limits.h> exists even on freestanding compilers.
22875  # On the NeXT, cc -E runs the code through the compiler's parser,
22876  # not just through cpp. "Syntax error" is here to catch this case.
22877  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22878/* end confdefs.h.  */
22879#ifdef __STDC__
22880# include <limits.h>
22881#else
22882# include <assert.h>
22883#endif
22884		     Syntax error
22885_ACEOF
22886if ac_fn_c_try_cpp "$LINENO"; then :
22887
22888else
22889  # Broken: fails on valid input.
22890continue
22891fi
22892rm -f conftest.err conftest.i conftest.$ac_ext
22893
22894  # OK, works on sane cases.  Now check whether nonexistent headers
22895  # can be detected and how.
22896  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22897/* end confdefs.h.  */
22898#include <ac_nonexistent.h>
22899_ACEOF
22900if ac_fn_c_try_cpp "$LINENO"; then :
22901  # Broken: success on invalid input.
22902continue
22903else
22904  # Passes both tests.
22905ac_preproc_ok=:
22906break
22907fi
22908rm -f conftest.err conftest.i conftest.$ac_ext
22909
22910done
22911# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22912rm -f conftest.i conftest.err conftest.$ac_ext
22913if $ac_preproc_ok; then :
22914
22915else
22916  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22918as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
22919See \`config.log' for more details" "$LINENO" 5 ; }
22920fi
22921
22922ac_ext=cpp
22923ac_cpp='$CXXCPP $CPPFLAGS'
22924ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22925ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22926ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22927
22928
22929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22930
22931  # First separate the path from the arguments. This will split at the first
22932  # space.
22933  complete="$CPP"
22934  path="${complete%% *}"
22935  tmp="$complete EOL"
22936  arguments="${tmp#* }"
22937
22938  # Input might be given as Windows format, start by converting to
22939  # unix format.
22940  new_path=`$CYGPATH -u "$path"`
22941
22942  # Now try to locate executable using which
22943  new_path=`$WHICH "$new_path" 2> /dev/null`
22944  # bat and cmd files are not always considered executable in cygwin causing which
22945  # to not find them
22946  if test "x$new_path" = x \
22947           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22948           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22949    new_path=`$CYGPATH -u "$path"`
22950  fi
22951  if test "x$new_path" = x; then
22952    # Oops. Which didn't find the executable.
22953    # The splitting of arguments from the executable at a space might have been incorrect,
22954    # since paths with space are more likely in Windows. Give it another try with the whole
22955    # argument.
22956    path="$complete"
22957    arguments="EOL"
22958    new_path=`$CYGPATH -u "$path"`
22959    new_path=`$WHICH "$new_path" 2> /dev/null`
22960    # bat and cmd files are not always considered executable in cygwin causing which
22961    # to not find them
22962    if test "x$new_path" = x \
22963             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22964             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22965      new_path=`$CYGPATH -u "$path"`
22966    fi
22967    if test "x$new_path" = x; then
22968      # It's still not found. Now this is an unrecoverable error.
22969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
22970$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
22971      has_space=`$ECHO "$complete" | $GREP " "`
22972      if test "x$has_space" != x; then
22973        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22974$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22975      fi
22976      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
22977    fi
22978  fi
22979
22980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22983  # "foo.exe" is OK but "foo" is an error.
22984  #
22985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22986  # It is also a way to make sure we got the proper file name for the real test later on.
22987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22988  if test "x$test_shortpath" = x; then
22989    # Short path failed, file does not exist as specified.
22990    # Try adding .exe or .cmd
22991    if test -f "${new_path}.exe"; then
22992       input_to_shortpath="${new_path}.exe"
22993    elif test -f "${new_path}.cmd"; then
22994       input_to_shortpath="${new_path}.cmd"
22995    else
22996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
22997$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
22998      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22999$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23000      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23001    fi
23002  else
23003    input_to_shortpath="$new_path"
23004  fi
23005
23006  # Call helper function which possibly converts this using DOS-style short mode.
23007  # If so, the updated path is stored in $new_path.
23008  new_path="$input_to_shortpath"
23009
23010  input_path="$input_to_shortpath"
23011  # Check if we need to convert this using DOS-style short mode. If the path
23012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23013  # take no chances and rewrite it.
23014  # Note: m4 eats our [], so we need to use [ and ] instead.
23015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23016  if test "x$has_forbidden_chars" != x; then
23017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23018    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23019    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23020    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23021      # Going to short mode and back again did indeed matter. Since short mode is
23022      # case insensitive, let's make it lowercase to improve readability.
23023      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23024      # Now convert it back to Unix-stile (cygpath)
23025      input_path=`$CYGPATH -u "$shortmode_path"`
23026      new_path="$input_path"
23027    fi
23028  fi
23029
23030  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23031  if test "x$test_cygdrive_prefix" = x; then
23032    # As a simple fix, exclude /usr/bin since it's not a real path.
23033    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23034      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23035      # a path prefixed by /cygdrive for fixpath to work.
23036      new_path="$CYGWIN_ROOT_PATH$input_path"
23037    fi
23038  fi
23039
23040  # remove trailing .exe if any
23041  new_path="${new_path/%.exe/}"
23042
23043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23044
23045  # First separate the path from the arguments. This will split at the first
23046  # space.
23047  complete="$CPP"
23048  path="${complete%% *}"
23049  tmp="$complete EOL"
23050  arguments="${tmp#* }"
23051
23052  # Input might be given as Windows format, start by converting to
23053  # unix format.
23054  new_path="$path"
23055
23056  windows_path="$new_path"
23057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23058    unix_path=`$CYGPATH -u "$windows_path"`
23059    new_path="$unix_path"
23060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23062    new_path="$unix_path"
23063  fi
23064
23065
23066  # Now try to locate executable using which
23067  new_path=`$WHICH "$new_path" 2> /dev/null`
23068
23069  if test "x$new_path" = x; then
23070    # Oops. Which didn't find the executable.
23071    # The splitting of arguments from the executable at a space might have been incorrect,
23072    # since paths with space are more likely in Windows. Give it another try with the whole
23073    # argument.
23074    path="$complete"
23075    arguments="EOL"
23076    new_path="$path"
23077
23078  windows_path="$new_path"
23079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23080    unix_path=`$CYGPATH -u "$windows_path"`
23081    new_path="$unix_path"
23082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23084    new_path="$unix_path"
23085  fi
23086
23087
23088    new_path=`$WHICH "$new_path" 2> /dev/null`
23089
23090    if test "x$new_path" = x; then
23091      # It's still not found. Now this is an unrecoverable error.
23092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23093$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23094      has_space=`$ECHO "$complete" | $GREP " "`
23095      if test "x$has_space" != x; then
23096        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23097$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23098      fi
23099      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23100    fi
23101  fi
23102
23103  # Now new_path has a complete unix path to the binary
23104  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23105    # Keep paths in /bin as-is, but remove trailing .exe if any
23106    new_path="${new_path/%.exe/}"
23107    # Do not save /bin paths to all_fixpath_prefixes!
23108  else
23109    # Not in mixed or Windows style, start by that.
23110    new_path=`cmd //c echo $new_path`
23111
23112  input_path="$new_path"
23113  # Check if we need to convert this using DOS-style short mode. If the path
23114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23115  # take no chances and rewrite it.
23116  # Note: m4 eats our [], so we need to use [ and ] instead.
23117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23118  if test "x$has_forbidden_chars" != x; then
23119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23121  fi
23122
23123    # Output is in $new_path
23124
23125  windows_path="$new_path"
23126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23127    unix_path=`$CYGPATH -u "$windows_path"`
23128    new_path="$unix_path"
23129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23131    new_path="$unix_path"
23132  fi
23133
23134    # remove trailing .exe if any
23135    new_path="${new_path/%.exe/}"
23136
23137    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23138    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23139  fi
23140
23141  else
23142    # We're on a posix platform. Hooray! :)
23143    # First separate the path from the arguments. This will split at the first
23144    # space.
23145    complete="$CPP"
23146    path="${complete%% *}"
23147    tmp="$complete EOL"
23148    arguments="${tmp#* }"
23149
23150    new_path=`$WHICH $path 2> /dev/null`
23151    if test "x$new_path" = x; then
23152      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23153      if test "x$is_absolute_path" != x; then
23154        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) with 'which' failed, using $path directly." >&5
23155$as_echo "$as_me: Resolving CPP (as $path) with 'which' failed, using $path directly." >&6;}
23156        new_path="$path"
23157      else
23158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23159$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23160        has_space=`$ECHO "$complete" | $GREP " "`
23161        if test "x$has_space" != x; then
23162          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23163$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23164        fi
23165        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23166      fi
23167    fi
23168  fi
23169
23170  # Now join together the path and the arguments once again
23171  if test "x$arguments" != xEOL; then
23172      new_complete="$new_path ${arguments% *}"
23173  else
23174      new_complete="$new_path"
23175  fi
23176
23177  if test "x$complete" != "x$new_complete"; then
23178    CPP="$new_complete"
23179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23180$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23181  fi
23182
23183
23184ac_ext=cpp
23185ac_cpp='$CXXCPP $CPPFLAGS'
23186ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23187ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23188ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23190$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23191if test -z "$CXXCPP"; then
23192  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23193  $as_echo_n "(cached) " >&6
23194else
23195      # Double quotes because CXXCPP needs to be expanded
23196    for CXXCPP in "$CXX -E" "/lib/cpp"
23197    do
23198      ac_preproc_ok=false
23199for ac_cxx_preproc_warn_flag in '' yes
23200do
23201  # Use a header file that comes with gcc, so configuring glibc
23202  # with a fresh cross-compiler works.
23203  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23204  # <limits.h> exists even on freestanding compilers.
23205  # On the NeXT, cc -E runs the code through the compiler's parser,
23206  # not just through cpp. "Syntax error" is here to catch this case.
23207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23208/* end confdefs.h.  */
23209#ifdef __STDC__
23210# include <limits.h>
23211#else
23212# include <assert.h>
23213#endif
23214		     Syntax error
23215_ACEOF
23216if ac_fn_cxx_try_cpp "$LINENO"; then :
23217
23218else
23219  # Broken: fails on valid input.
23220continue
23221fi
23222rm -f conftest.err conftest.i conftest.$ac_ext
23223
23224  # OK, works on sane cases.  Now check whether nonexistent headers
23225  # can be detected and how.
23226  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23227/* end confdefs.h.  */
23228#include <ac_nonexistent.h>
23229_ACEOF
23230if ac_fn_cxx_try_cpp "$LINENO"; then :
23231  # Broken: success on invalid input.
23232continue
23233else
23234  # Passes both tests.
23235ac_preproc_ok=:
23236break
23237fi
23238rm -f conftest.err conftest.i conftest.$ac_ext
23239
23240done
23241# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23242rm -f conftest.i conftest.err conftest.$ac_ext
23243if $ac_preproc_ok; then :
23244  break
23245fi
23246
23247    done
23248    ac_cv_prog_CXXCPP=$CXXCPP
23249
23250fi
23251  CXXCPP=$ac_cv_prog_CXXCPP
23252else
23253  ac_cv_prog_CXXCPP=$CXXCPP
23254fi
23255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23256$as_echo "$CXXCPP" >&6; }
23257ac_preproc_ok=false
23258for ac_cxx_preproc_warn_flag in '' yes
23259do
23260  # Use a header file that comes with gcc, so configuring glibc
23261  # with a fresh cross-compiler works.
23262  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23263  # <limits.h> exists even on freestanding compilers.
23264  # On the NeXT, cc -E runs the code through the compiler's parser,
23265  # not just through cpp. "Syntax error" is here to catch this case.
23266  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23267/* end confdefs.h.  */
23268#ifdef __STDC__
23269# include <limits.h>
23270#else
23271# include <assert.h>
23272#endif
23273		     Syntax error
23274_ACEOF
23275if ac_fn_cxx_try_cpp "$LINENO"; then :
23276
23277else
23278  # Broken: fails on valid input.
23279continue
23280fi
23281rm -f conftest.err conftest.i conftest.$ac_ext
23282
23283  # OK, works on sane cases.  Now check whether nonexistent headers
23284  # can be detected and how.
23285  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23286/* end confdefs.h.  */
23287#include <ac_nonexistent.h>
23288_ACEOF
23289if ac_fn_cxx_try_cpp "$LINENO"; then :
23290  # Broken: success on invalid input.
23291continue
23292else
23293  # Passes both tests.
23294ac_preproc_ok=:
23295break
23296fi
23297rm -f conftest.err conftest.i conftest.$ac_ext
23298
23299done
23300# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23301rm -f conftest.i conftest.err conftest.$ac_ext
23302if $ac_preproc_ok; then :
23303
23304else
23305  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23306$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23307as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
23308See \`config.log' for more details" "$LINENO" 5 ; }
23309fi
23310
23311ac_ext=cpp
23312ac_cpp='$CXXCPP $CPPFLAGS'
23313ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23314ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23315ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23316
23317
23318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23319
23320  # First separate the path from the arguments. This will split at the first
23321  # space.
23322  complete="$CXXCPP"
23323  path="${complete%% *}"
23324  tmp="$complete EOL"
23325  arguments="${tmp#* }"
23326
23327  # Input might be given as Windows format, start by converting to
23328  # unix format.
23329  new_path=`$CYGPATH -u "$path"`
23330
23331  # Now try to locate executable using which
23332  new_path=`$WHICH "$new_path" 2> /dev/null`
23333  # bat and cmd files are not always considered executable in cygwin causing which
23334  # to not find them
23335  if test "x$new_path" = x \
23336           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23337           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23338    new_path=`$CYGPATH -u "$path"`
23339  fi
23340  if test "x$new_path" = x; then
23341    # Oops. Which didn't find the executable.
23342    # The splitting of arguments from the executable at a space might have been incorrect,
23343    # since paths with space are more likely in Windows. Give it another try with the whole
23344    # argument.
23345    path="$complete"
23346    arguments="EOL"
23347    new_path=`$CYGPATH -u "$path"`
23348    new_path=`$WHICH "$new_path" 2> /dev/null`
23349    # bat and cmd files are not always considered executable in cygwin causing which
23350    # to not find them
23351    if test "x$new_path" = x \
23352             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23353             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23354      new_path=`$CYGPATH -u "$path"`
23355    fi
23356    if test "x$new_path" = x; then
23357      # It's still not found. Now this is an unrecoverable error.
23358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23359$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23360      has_space=`$ECHO "$complete" | $GREP " "`
23361      if test "x$has_space" != x; then
23362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23364      fi
23365      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23366    fi
23367  fi
23368
23369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23372  # "foo.exe" is OK but "foo" is an error.
23373  #
23374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23375  # It is also a way to make sure we got the proper file name for the real test later on.
23376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23377  if test "x$test_shortpath" = x; then
23378    # Short path failed, file does not exist as specified.
23379    # Try adding .exe or .cmd
23380    if test -f "${new_path}.exe"; then
23381       input_to_shortpath="${new_path}.exe"
23382    elif test -f "${new_path}.cmd"; then
23383       input_to_shortpath="${new_path}.cmd"
23384    else
23385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
23386$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
23387      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23388$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23389      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23390    fi
23391  else
23392    input_to_shortpath="$new_path"
23393  fi
23394
23395  # Call helper function which possibly converts this using DOS-style short mode.
23396  # If so, the updated path is stored in $new_path.
23397  new_path="$input_to_shortpath"
23398
23399  input_path="$input_to_shortpath"
23400  # Check if we need to convert this using DOS-style short mode. If the path
23401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23402  # take no chances and rewrite it.
23403  # Note: m4 eats our [], so we need to use [ and ] instead.
23404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23405  if test "x$has_forbidden_chars" != x; then
23406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23410      # Going to short mode and back again did indeed matter. Since short mode is
23411      # case insensitive, let's make it lowercase to improve readability.
23412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23413      # Now convert it back to Unix-stile (cygpath)
23414      input_path=`$CYGPATH -u "$shortmode_path"`
23415      new_path="$input_path"
23416    fi
23417  fi
23418
23419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23420  if test "x$test_cygdrive_prefix" = x; then
23421    # As a simple fix, exclude /usr/bin since it's not a real path.
23422    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23424      # a path prefixed by /cygdrive for fixpath to work.
23425      new_path="$CYGWIN_ROOT_PATH$input_path"
23426    fi
23427  fi
23428
23429  # remove trailing .exe if any
23430  new_path="${new_path/%.exe/}"
23431
23432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23433
23434  # First separate the path from the arguments. This will split at the first
23435  # space.
23436  complete="$CXXCPP"
23437  path="${complete%% *}"
23438  tmp="$complete EOL"
23439  arguments="${tmp#* }"
23440
23441  # Input might be given as Windows format, start by converting to
23442  # unix format.
23443  new_path="$path"
23444
23445  windows_path="$new_path"
23446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23447    unix_path=`$CYGPATH -u "$windows_path"`
23448    new_path="$unix_path"
23449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23451    new_path="$unix_path"
23452  fi
23453
23454
23455  # Now try to locate executable using which
23456  new_path=`$WHICH "$new_path" 2> /dev/null`
23457
23458  if test "x$new_path" = x; then
23459    # Oops. Which didn't find the executable.
23460    # The splitting of arguments from the executable at a space might have been incorrect,
23461    # since paths with space are more likely in Windows. Give it another try with the whole
23462    # argument.
23463    path="$complete"
23464    arguments="EOL"
23465    new_path="$path"
23466
23467  windows_path="$new_path"
23468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23469    unix_path=`$CYGPATH -u "$windows_path"`
23470    new_path="$unix_path"
23471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23473    new_path="$unix_path"
23474  fi
23475
23476
23477    new_path=`$WHICH "$new_path" 2> /dev/null`
23478
23479    if test "x$new_path" = x; then
23480      # It's still not found. Now this is an unrecoverable error.
23481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23482$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23483      has_space=`$ECHO "$complete" | $GREP " "`
23484      if test "x$has_space" != x; then
23485        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23486$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23487      fi
23488      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23489    fi
23490  fi
23491
23492  # Now new_path has a complete unix path to the binary
23493  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23494    # Keep paths in /bin as-is, but remove trailing .exe if any
23495    new_path="${new_path/%.exe/}"
23496    # Do not save /bin paths to all_fixpath_prefixes!
23497  else
23498    # Not in mixed or Windows style, start by that.
23499    new_path=`cmd //c echo $new_path`
23500
23501  input_path="$new_path"
23502  # Check if we need to convert this using DOS-style short mode. If the path
23503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23504  # take no chances and rewrite it.
23505  # Note: m4 eats our [], so we need to use [ and ] instead.
23506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23507  if test "x$has_forbidden_chars" != x; then
23508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23510  fi
23511
23512    # Output is in $new_path
23513
23514  windows_path="$new_path"
23515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23516    unix_path=`$CYGPATH -u "$windows_path"`
23517    new_path="$unix_path"
23518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23520    new_path="$unix_path"
23521  fi
23522
23523    # remove trailing .exe if any
23524    new_path="${new_path/%.exe/}"
23525
23526    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23527    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23528  fi
23529
23530  else
23531    # We're on a posix platform. Hooray! :)
23532    # First separate the path from the arguments. This will split at the first
23533    # space.
23534    complete="$CXXCPP"
23535    path="${complete%% *}"
23536    tmp="$complete EOL"
23537    arguments="${tmp#* }"
23538
23539    new_path=`$WHICH $path 2> /dev/null`
23540    if test "x$new_path" = x; then
23541      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23542      if test "x$is_absolute_path" != x; then
23543        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&5
23544$as_echo "$as_me: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&6;}
23545        new_path="$path"
23546      else
23547        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23548$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23549        has_space=`$ECHO "$complete" | $GREP " "`
23550        if test "x$has_space" != x; then
23551          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23552$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23553        fi
23554        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23555      fi
23556    fi
23557  fi
23558
23559  # Now join together the path and the arguments once again
23560  if test "x$arguments" != xEOL; then
23561      new_complete="$new_path ${arguments% *}"
23562  else
23563      new_complete="$new_path"
23564  fi
23565
23566  if test "x$complete" != "x$new_complete"; then
23567    CXXCPP="$new_complete"
23568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
23569$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
23570  fi
23571
23572
23573if test "x$COMPILE_TYPE" != "xcross"; then
23574    # If we are not cross compiling, use the same compilers for
23575    # building the build platform executables. The cross-compilation
23576    # case needed to be done earlier, but this can only be done after
23577    # the native tools have been localized.
23578    BUILD_CC="$CC"
23579    BUILD_CXX="$CXX"
23580    BUILD_LD="$LD"
23581fi
23582
23583# for solaris we really need solaris tools, and not gnu equivalent
23584#   these seems to normally reside in /usr/ccs/bin so add that to path before
23585#   starting to probe
23586#
23587#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
23588#         so that it can be overriden --with-tools-dir
23589if test "x$OPENJDK_BUILD_OS" = xsolaris; then
23590    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
23591fi
23592
23593# Find the right assembler.
23594if test "x$OPENJDK_TARGET_OS" = xsolaris; then
23595    # Extract the first word of "as", so it can be a program name with args.
23596set dummy as; ac_word=$2
23597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23598$as_echo_n "checking for $ac_word... " >&6; }
23599if test "${ac_cv_path_AS+set}" = set; then :
23600  $as_echo_n "(cached) " >&6
23601else
23602  case $AS in
23603  [\\/]* | ?:[\\/]*)
23604  ac_cv_path_AS="$AS" # Let the user override the test with a path.
23605  ;;
23606  *)
23607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23608for as_dir in $PATH
23609do
23610  IFS=$as_save_IFS
23611  test -z "$as_dir" && as_dir=.
23612    for ac_exec_ext in '' $ac_executable_extensions; do
23613  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23614    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
23615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23616    break 2
23617  fi
23618done
23619  done
23620IFS=$as_save_IFS
23621
23622  ;;
23623esac
23624fi
23625AS=$ac_cv_path_AS
23626if test -n "$AS"; then
23627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
23628$as_echo "$AS" >&6; }
23629else
23630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23631$as_echo "no" >&6; }
23632fi
23633
23634
23635
23636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23637
23638  # First separate the path from the arguments. This will split at the first
23639  # space.
23640  complete="$AS"
23641  path="${complete%% *}"
23642  tmp="$complete EOL"
23643  arguments="${tmp#* }"
23644
23645  # Input might be given as Windows format, start by converting to
23646  # unix format.
23647  new_path=`$CYGPATH -u "$path"`
23648
23649  # Now try to locate executable using which
23650  new_path=`$WHICH "$new_path" 2> /dev/null`
23651  # bat and cmd files are not always considered executable in cygwin causing which
23652  # to not find them
23653  if test "x$new_path" = x \
23654           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23655           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23656    new_path=`$CYGPATH -u "$path"`
23657  fi
23658  if test "x$new_path" = x; then
23659    # Oops. Which didn't find the executable.
23660    # The splitting of arguments from the executable at a space might have been incorrect,
23661    # since paths with space are more likely in Windows. Give it another try with the whole
23662    # argument.
23663    path="$complete"
23664    arguments="EOL"
23665    new_path=`$CYGPATH -u "$path"`
23666    new_path=`$WHICH "$new_path" 2> /dev/null`
23667    # bat and cmd files are not always considered executable in cygwin causing which
23668    # to not find them
23669    if test "x$new_path" = x \
23670             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23671             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23672      new_path=`$CYGPATH -u "$path"`
23673    fi
23674    if test "x$new_path" = x; then
23675      # It's still not found. Now this is an unrecoverable error.
23676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23677$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23678      has_space=`$ECHO "$complete" | $GREP " "`
23679      if test "x$has_space" != x; then
23680        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23681$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23682      fi
23683      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23684    fi
23685  fi
23686
23687  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23688  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23689  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23690  # "foo.exe" is OK but "foo" is an error.
23691  #
23692  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23693  # It is also a way to make sure we got the proper file name for the real test later on.
23694  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23695  if test "x$test_shortpath" = x; then
23696    # Short path failed, file does not exist as specified.
23697    # Try adding .exe or .cmd
23698    if test -f "${new_path}.exe"; then
23699       input_to_shortpath="${new_path}.exe"
23700    elif test -f "${new_path}.cmd"; then
23701       input_to_shortpath="${new_path}.cmd"
23702    else
23703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
23704$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
23705      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23706$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23707      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23708    fi
23709  else
23710    input_to_shortpath="$new_path"
23711  fi
23712
23713  # Call helper function which possibly converts this using DOS-style short mode.
23714  # If so, the updated path is stored in $new_path.
23715  new_path="$input_to_shortpath"
23716
23717  input_path="$input_to_shortpath"
23718  # Check if we need to convert this using DOS-style short mode. If the path
23719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23720  # take no chances and rewrite it.
23721  # Note: m4 eats our [], so we need to use [ and ] instead.
23722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23723  if test "x$has_forbidden_chars" != x; then
23724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23728      # Going to short mode and back again did indeed matter. Since short mode is
23729      # case insensitive, let's make it lowercase to improve readability.
23730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23731      # Now convert it back to Unix-stile (cygpath)
23732      input_path=`$CYGPATH -u "$shortmode_path"`
23733      new_path="$input_path"
23734    fi
23735  fi
23736
23737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23738  if test "x$test_cygdrive_prefix" = x; then
23739    # As a simple fix, exclude /usr/bin since it's not a real path.
23740    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23742      # a path prefixed by /cygdrive for fixpath to work.
23743      new_path="$CYGWIN_ROOT_PATH$input_path"
23744    fi
23745  fi
23746
23747  # remove trailing .exe if any
23748  new_path="${new_path/%.exe/}"
23749
23750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23751
23752  # First separate the path from the arguments. This will split at the first
23753  # space.
23754  complete="$AS"
23755  path="${complete%% *}"
23756  tmp="$complete EOL"
23757  arguments="${tmp#* }"
23758
23759  # Input might be given as Windows format, start by converting to
23760  # unix format.
23761  new_path="$path"
23762
23763  windows_path="$new_path"
23764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23765    unix_path=`$CYGPATH -u "$windows_path"`
23766    new_path="$unix_path"
23767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23769    new_path="$unix_path"
23770  fi
23771
23772
23773  # Now try to locate executable using which
23774  new_path=`$WHICH "$new_path" 2> /dev/null`
23775
23776  if test "x$new_path" = x; then
23777    # Oops. Which didn't find the executable.
23778    # The splitting of arguments from the executable at a space might have been incorrect,
23779    # since paths with space are more likely in Windows. Give it another try with the whole
23780    # argument.
23781    path="$complete"
23782    arguments="EOL"
23783    new_path="$path"
23784
23785  windows_path="$new_path"
23786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23787    unix_path=`$CYGPATH -u "$windows_path"`
23788    new_path="$unix_path"
23789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23791    new_path="$unix_path"
23792  fi
23793
23794
23795    new_path=`$WHICH "$new_path" 2> /dev/null`
23796
23797    if test "x$new_path" = x; then
23798      # It's still not found. Now this is an unrecoverable error.
23799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23800$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23801      has_space=`$ECHO "$complete" | $GREP " "`
23802      if test "x$has_space" != x; then
23803        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23804$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23805      fi
23806      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23807    fi
23808  fi
23809
23810  # Now new_path has a complete unix path to the binary
23811  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23812    # Keep paths in /bin as-is, but remove trailing .exe if any
23813    new_path="${new_path/%.exe/}"
23814    # Do not save /bin paths to all_fixpath_prefixes!
23815  else
23816    # Not in mixed or Windows style, start by that.
23817    new_path=`cmd //c echo $new_path`
23818
23819  input_path="$new_path"
23820  # Check if we need to convert this using DOS-style short mode. If the path
23821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23822  # take no chances and rewrite it.
23823  # Note: m4 eats our [], so we need to use [ and ] instead.
23824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23825  if test "x$has_forbidden_chars" != x; then
23826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23828  fi
23829
23830    # Output is in $new_path
23831
23832  windows_path="$new_path"
23833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23834    unix_path=`$CYGPATH -u "$windows_path"`
23835    new_path="$unix_path"
23836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23838    new_path="$unix_path"
23839  fi
23840
23841    # remove trailing .exe if any
23842    new_path="${new_path/%.exe/}"
23843
23844    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23845    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23846  fi
23847
23848  else
23849    # We're on a posix platform. Hooray! :)
23850    # First separate the path from the arguments. This will split at the first
23851    # space.
23852    complete="$AS"
23853    path="${complete%% *}"
23854    tmp="$complete EOL"
23855    arguments="${tmp#* }"
23856
23857    new_path=`$WHICH $path 2> /dev/null`
23858    if test "x$new_path" = x; then
23859      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23860      if test "x$is_absolute_path" != x; then
23861        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) with 'which' failed, using $path directly." >&5
23862$as_echo "$as_me: Resolving AS (as $path) with 'which' failed, using $path directly." >&6;}
23863        new_path="$path"
23864      else
23865        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23866$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23867        has_space=`$ECHO "$complete" | $GREP " "`
23868        if test "x$has_space" != x; then
23869          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23870$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23871        fi
23872        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23873      fi
23874    fi
23875  fi
23876
23877  # Now join together the path and the arguments once again
23878  if test "x$arguments" != xEOL; then
23879      new_complete="$new_path ${arguments% *}"
23880  else
23881      new_complete="$new_path"
23882  fi
23883
23884  if test "x$complete" != "x$new_complete"; then
23885    AS="$new_complete"
23886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
23887$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
23888  fi
23889
23890else
23891    AS="$CC -c"
23892fi
23893
23894
23895if test "x$OPENJDK_TARGET_OS" = xsolaris; then
23896    for ac_prog in gnm nm
23897do
23898  # Extract the first word of "$ac_prog", so it can be a program name with args.
23899set dummy $ac_prog; ac_word=$2
23900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23901$as_echo_n "checking for $ac_word... " >&6; }
23902if test "${ac_cv_path_NM+set}" = set; then :
23903  $as_echo_n "(cached) " >&6
23904else
23905  case $NM in
23906  [\\/]* | ?:[\\/]*)
23907  ac_cv_path_NM="$NM" # Let the user override the test with a path.
23908  ;;
23909  *)
23910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23911for as_dir in $PATH
23912do
23913  IFS=$as_save_IFS
23914  test -z "$as_dir" && as_dir=.
23915    for ac_exec_ext in '' $ac_executable_extensions; do
23916  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23917    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
23918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23919    break 2
23920  fi
23921done
23922  done
23923IFS=$as_save_IFS
23924
23925  ;;
23926esac
23927fi
23928NM=$ac_cv_path_NM
23929if test -n "$NM"; then
23930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
23931$as_echo "$NM" >&6; }
23932else
23933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23934$as_echo "no" >&6; }
23935fi
23936
23937
23938  test -n "$NM" && break
23939done
23940
23941
23942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23943
23944  # First separate the path from the arguments. This will split at the first
23945  # space.
23946  complete="$NM"
23947  path="${complete%% *}"
23948  tmp="$complete EOL"
23949  arguments="${tmp#* }"
23950
23951  # Input might be given as Windows format, start by converting to
23952  # unix format.
23953  new_path=`$CYGPATH -u "$path"`
23954
23955  # Now try to locate executable using which
23956  new_path=`$WHICH "$new_path" 2> /dev/null`
23957  # bat and cmd files are not always considered executable in cygwin causing which
23958  # to not find them
23959  if test "x$new_path" = x \
23960           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23961           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23962    new_path=`$CYGPATH -u "$path"`
23963  fi
23964  if test "x$new_path" = x; then
23965    # Oops. Which didn't find the executable.
23966    # The splitting of arguments from the executable at a space might have been incorrect,
23967    # since paths with space are more likely in Windows. Give it another try with the whole
23968    # argument.
23969    path="$complete"
23970    arguments="EOL"
23971    new_path=`$CYGPATH -u "$path"`
23972    new_path=`$WHICH "$new_path" 2> /dev/null`
23973    # bat and cmd files are not always considered executable in cygwin causing which
23974    # to not find them
23975    if test "x$new_path" = x \
23976             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23977             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23978      new_path=`$CYGPATH -u "$path"`
23979    fi
23980    if test "x$new_path" = x; then
23981      # It's still not found. Now this is an unrecoverable error.
23982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
23983$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
23984      has_space=`$ECHO "$complete" | $GREP " "`
23985      if test "x$has_space" != x; then
23986        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23987$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23988      fi
23989      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
23990    fi
23991  fi
23992
23993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23996  # "foo.exe" is OK but "foo" is an error.
23997  #
23998  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23999  # It is also a way to make sure we got the proper file name for the real test later on.
24000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24001  if test "x$test_shortpath" = x; then
24002    # Short path failed, file does not exist as specified.
24003    # Try adding .exe or .cmd
24004    if test -f "${new_path}.exe"; then
24005       input_to_shortpath="${new_path}.exe"
24006    elif test -f "${new_path}.cmd"; then
24007       input_to_shortpath="${new_path}.cmd"
24008    else
24009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24010$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24011      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24012$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24013      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24014    fi
24015  else
24016    input_to_shortpath="$new_path"
24017  fi
24018
24019  # Call helper function which possibly converts this using DOS-style short mode.
24020  # If so, the updated path is stored in $new_path.
24021  new_path="$input_to_shortpath"
24022
24023  input_path="$input_to_shortpath"
24024  # Check if we need to convert this using DOS-style short mode. If the path
24025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24026  # take no chances and rewrite it.
24027  # Note: m4 eats our [], so we need to use [ and ] instead.
24028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24029  if test "x$has_forbidden_chars" != x; then
24030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24034      # Going to short mode and back again did indeed matter. Since short mode is
24035      # case insensitive, let's make it lowercase to improve readability.
24036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24037      # Now convert it back to Unix-stile (cygpath)
24038      input_path=`$CYGPATH -u "$shortmode_path"`
24039      new_path="$input_path"
24040    fi
24041  fi
24042
24043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24044  if test "x$test_cygdrive_prefix" = x; then
24045    # As a simple fix, exclude /usr/bin since it's not a real path.
24046    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24048      # a path prefixed by /cygdrive for fixpath to work.
24049      new_path="$CYGWIN_ROOT_PATH$input_path"
24050    fi
24051  fi
24052
24053  # remove trailing .exe if any
24054  new_path="${new_path/%.exe/}"
24055
24056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24057
24058  # First separate the path from the arguments. This will split at the first
24059  # space.
24060  complete="$NM"
24061  path="${complete%% *}"
24062  tmp="$complete EOL"
24063  arguments="${tmp#* }"
24064
24065  # Input might be given as Windows format, start by converting to
24066  # unix format.
24067  new_path="$path"
24068
24069  windows_path="$new_path"
24070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24071    unix_path=`$CYGPATH -u "$windows_path"`
24072    new_path="$unix_path"
24073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24075    new_path="$unix_path"
24076  fi
24077
24078
24079  # Now try to locate executable using which
24080  new_path=`$WHICH "$new_path" 2> /dev/null`
24081
24082  if test "x$new_path" = x; then
24083    # Oops. Which didn't find the executable.
24084    # The splitting of arguments from the executable at a space might have been incorrect,
24085    # since paths with space are more likely in Windows. Give it another try with the whole
24086    # argument.
24087    path="$complete"
24088    arguments="EOL"
24089    new_path="$path"
24090
24091  windows_path="$new_path"
24092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24093    unix_path=`$CYGPATH -u "$windows_path"`
24094    new_path="$unix_path"
24095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24097    new_path="$unix_path"
24098  fi
24099
24100
24101    new_path=`$WHICH "$new_path" 2> /dev/null`
24102
24103    if test "x$new_path" = x; then
24104      # It's still not found. Now this is an unrecoverable error.
24105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24106$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24107      has_space=`$ECHO "$complete" | $GREP " "`
24108      if test "x$has_space" != x; then
24109        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24110$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24111      fi
24112      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24113    fi
24114  fi
24115
24116  # Now new_path has a complete unix path to the binary
24117  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24118    # Keep paths in /bin as-is, but remove trailing .exe if any
24119    new_path="${new_path/%.exe/}"
24120    # Do not save /bin paths to all_fixpath_prefixes!
24121  else
24122    # Not in mixed or Windows style, start by that.
24123    new_path=`cmd //c echo $new_path`
24124
24125  input_path="$new_path"
24126  # Check if we need to convert this using DOS-style short mode. If the path
24127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24128  # take no chances and rewrite it.
24129  # Note: m4 eats our [], so we need to use [ and ] instead.
24130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24131  if test "x$has_forbidden_chars" != x; then
24132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24134  fi
24135
24136    # Output is in $new_path
24137
24138  windows_path="$new_path"
24139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24140    unix_path=`$CYGPATH -u "$windows_path"`
24141    new_path="$unix_path"
24142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24144    new_path="$unix_path"
24145  fi
24146
24147    # remove trailing .exe if any
24148    new_path="${new_path/%.exe/}"
24149
24150    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24151    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24152  fi
24153
24154  else
24155    # We're on a posix platform. Hooray! :)
24156    # First separate the path from the arguments. This will split at the first
24157    # space.
24158    complete="$NM"
24159    path="${complete%% *}"
24160    tmp="$complete EOL"
24161    arguments="${tmp#* }"
24162
24163    new_path=`$WHICH $path 2> /dev/null`
24164    if test "x$new_path" = x; then
24165      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24166      if test "x$is_absolute_path" != x; then
24167        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
24168$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
24169        new_path="$path"
24170      else
24171        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24172$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24173        has_space=`$ECHO "$complete" | $GREP " "`
24174        if test "x$has_space" != x; then
24175          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24176$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24177        fi
24178        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24179      fi
24180    fi
24181  fi
24182
24183  # Now join together the path and the arguments once again
24184  if test "x$arguments" != xEOL; then
24185      new_complete="$new_path ${arguments% *}"
24186  else
24187      new_complete="$new_path"
24188  fi
24189
24190  if test "x$complete" != "x$new_complete"; then
24191    NM="$new_complete"
24192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24193$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24194  fi
24195
24196    # Extract the first word of "strip", so it can be a program name with args.
24197set dummy strip; ac_word=$2
24198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24199$as_echo_n "checking for $ac_word... " >&6; }
24200if test "${ac_cv_path_STRIP+set}" = set; then :
24201  $as_echo_n "(cached) " >&6
24202else
24203  case $STRIP in
24204  [\\/]* | ?:[\\/]*)
24205  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24206  ;;
24207  *)
24208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24209for as_dir in $PATH
24210do
24211  IFS=$as_save_IFS
24212  test -z "$as_dir" && as_dir=.
24213    for ac_exec_ext in '' $ac_executable_extensions; do
24214  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24215    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24217    break 2
24218  fi
24219done
24220  done
24221IFS=$as_save_IFS
24222
24223  ;;
24224esac
24225fi
24226STRIP=$ac_cv_path_STRIP
24227if test -n "$STRIP"; then
24228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24229$as_echo "$STRIP" >&6; }
24230else
24231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24232$as_echo "no" >&6; }
24233fi
24234
24235
24236
24237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24238
24239  # First separate the path from the arguments. This will split at the first
24240  # space.
24241  complete="$STRIP"
24242  path="${complete%% *}"
24243  tmp="$complete EOL"
24244  arguments="${tmp#* }"
24245
24246  # Input might be given as Windows format, start by converting to
24247  # unix format.
24248  new_path=`$CYGPATH -u "$path"`
24249
24250  # Now try to locate executable using which
24251  new_path=`$WHICH "$new_path" 2> /dev/null`
24252  # bat and cmd files are not always considered executable in cygwin causing which
24253  # to not find them
24254  if test "x$new_path" = x \
24255           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24256           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24257    new_path=`$CYGPATH -u "$path"`
24258  fi
24259  if test "x$new_path" = x; then
24260    # Oops. Which didn't find the executable.
24261    # The splitting of arguments from the executable at a space might have been incorrect,
24262    # since paths with space are more likely in Windows. Give it another try with the whole
24263    # argument.
24264    path="$complete"
24265    arguments="EOL"
24266    new_path=`$CYGPATH -u "$path"`
24267    new_path=`$WHICH "$new_path" 2> /dev/null`
24268    # bat and cmd files are not always considered executable in cygwin causing which
24269    # to not find them
24270    if test "x$new_path" = x \
24271             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24272             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24273      new_path=`$CYGPATH -u "$path"`
24274    fi
24275    if test "x$new_path" = x; then
24276      # It's still not found. Now this is an unrecoverable error.
24277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24278$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24279      has_space=`$ECHO "$complete" | $GREP " "`
24280      if test "x$has_space" != x; then
24281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24283      fi
24284      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24285    fi
24286  fi
24287
24288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24291  # "foo.exe" is OK but "foo" is an error.
24292  #
24293  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24294  # It is also a way to make sure we got the proper file name for the real test later on.
24295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24296  if test "x$test_shortpath" = x; then
24297    # Short path failed, file does not exist as specified.
24298    # Try adding .exe or .cmd
24299    if test -f "${new_path}.exe"; then
24300       input_to_shortpath="${new_path}.exe"
24301    elif test -f "${new_path}.cmd"; then
24302       input_to_shortpath="${new_path}.cmd"
24303    else
24304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
24305$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
24306      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24307$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24308      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24309    fi
24310  else
24311    input_to_shortpath="$new_path"
24312  fi
24313
24314  # Call helper function which possibly converts this using DOS-style short mode.
24315  # If so, the updated path is stored in $new_path.
24316  new_path="$input_to_shortpath"
24317
24318  input_path="$input_to_shortpath"
24319  # Check if we need to convert this using DOS-style short mode. If the path
24320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24321  # take no chances and rewrite it.
24322  # Note: m4 eats our [], so we need to use [ and ] instead.
24323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24324  if test "x$has_forbidden_chars" != x; then
24325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24329      # Going to short mode and back again did indeed matter. Since short mode is
24330      # case insensitive, let's make it lowercase to improve readability.
24331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24332      # Now convert it back to Unix-stile (cygpath)
24333      input_path=`$CYGPATH -u "$shortmode_path"`
24334      new_path="$input_path"
24335    fi
24336  fi
24337
24338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24339  if test "x$test_cygdrive_prefix" = x; then
24340    # As a simple fix, exclude /usr/bin since it's not a real path.
24341    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24343      # a path prefixed by /cygdrive for fixpath to work.
24344      new_path="$CYGWIN_ROOT_PATH$input_path"
24345    fi
24346  fi
24347
24348  # remove trailing .exe if any
24349  new_path="${new_path/%.exe/}"
24350
24351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24352
24353  # First separate the path from the arguments. This will split at the first
24354  # space.
24355  complete="$STRIP"
24356  path="${complete%% *}"
24357  tmp="$complete EOL"
24358  arguments="${tmp#* }"
24359
24360  # Input might be given as Windows format, start by converting to
24361  # unix format.
24362  new_path="$path"
24363
24364  windows_path="$new_path"
24365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24366    unix_path=`$CYGPATH -u "$windows_path"`
24367    new_path="$unix_path"
24368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24370    new_path="$unix_path"
24371  fi
24372
24373
24374  # Now try to locate executable using which
24375  new_path=`$WHICH "$new_path" 2> /dev/null`
24376
24377  if test "x$new_path" = x; then
24378    # Oops. Which didn't find the executable.
24379    # The splitting of arguments from the executable at a space might have been incorrect,
24380    # since paths with space are more likely in Windows. Give it another try with the whole
24381    # argument.
24382    path="$complete"
24383    arguments="EOL"
24384    new_path="$path"
24385
24386  windows_path="$new_path"
24387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24388    unix_path=`$CYGPATH -u "$windows_path"`
24389    new_path="$unix_path"
24390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24392    new_path="$unix_path"
24393  fi
24394
24395
24396    new_path=`$WHICH "$new_path" 2> /dev/null`
24397
24398    if test "x$new_path" = x; then
24399      # It's still not found. Now this is an unrecoverable error.
24400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24401$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24402      has_space=`$ECHO "$complete" | $GREP " "`
24403      if test "x$has_space" != x; then
24404        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24405$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24406      fi
24407      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24408    fi
24409  fi
24410
24411  # Now new_path has a complete unix path to the binary
24412  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24413    # Keep paths in /bin as-is, but remove trailing .exe if any
24414    new_path="${new_path/%.exe/}"
24415    # Do not save /bin paths to all_fixpath_prefixes!
24416  else
24417    # Not in mixed or Windows style, start by that.
24418    new_path=`cmd //c echo $new_path`
24419
24420  input_path="$new_path"
24421  # Check if we need to convert this using DOS-style short mode. If the path
24422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24423  # take no chances and rewrite it.
24424  # Note: m4 eats our [], so we need to use [ and ] instead.
24425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24426  if test "x$has_forbidden_chars" != x; then
24427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24429  fi
24430
24431    # Output is in $new_path
24432
24433  windows_path="$new_path"
24434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24435    unix_path=`$CYGPATH -u "$windows_path"`
24436    new_path="$unix_path"
24437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24439    new_path="$unix_path"
24440  fi
24441
24442    # remove trailing .exe if any
24443    new_path="${new_path/%.exe/}"
24444
24445    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24446    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24447  fi
24448
24449  else
24450    # We're on a posix platform. Hooray! :)
24451    # First separate the path from the arguments. This will split at the first
24452    # space.
24453    complete="$STRIP"
24454    path="${complete%% *}"
24455    tmp="$complete EOL"
24456    arguments="${tmp#* }"
24457
24458    new_path=`$WHICH $path 2> /dev/null`
24459    if test "x$new_path" = x; then
24460      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24461      if test "x$is_absolute_path" != x; then
24462        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
24463$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
24464        new_path="$path"
24465      else
24466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24467$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24468        has_space=`$ECHO "$complete" | $GREP " "`
24469        if test "x$has_space" != x; then
24470          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24471$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24472        fi
24473        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24474      fi
24475    fi
24476  fi
24477
24478  # Now join together the path and the arguments once again
24479  if test "x$arguments" != xEOL; then
24480      new_complete="$new_path ${arguments% *}"
24481  else
24482      new_complete="$new_path"
24483  fi
24484
24485  if test "x$complete" != "x$new_complete"; then
24486    STRIP="$new_complete"
24487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
24488$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
24489  fi
24490
24491    # Extract the first word of "mcs", so it can be a program name with args.
24492set dummy mcs; ac_word=$2
24493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24494$as_echo_n "checking for $ac_word... " >&6; }
24495if test "${ac_cv_path_MCS+set}" = set; then :
24496  $as_echo_n "(cached) " >&6
24497else
24498  case $MCS in
24499  [\\/]* | ?:[\\/]*)
24500  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
24501  ;;
24502  *)
24503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24504for as_dir in $PATH
24505do
24506  IFS=$as_save_IFS
24507  test -z "$as_dir" && as_dir=.
24508    for ac_exec_ext in '' $ac_executable_extensions; do
24509  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24510    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
24511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24512    break 2
24513  fi
24514done
24515  done
24516IFS=$as_save_IFS
24517
24518  ;;
24519esac
24520fi
24521MCS=$ac_cv_path_MCS
24522if test -n "$MCS"; then
24523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
24524$as_echo "$MCS" >&6; }
24525else
24526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24527$as_echo "no" >&6; }
24528fi
24529
24530
24531
24532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24533
24534  # First separate the path from the arguments. This will split at the first
24535  # space.
24536  complete="$MCS"
24537  path="${complete%% *}"
24538  tmp="$complete EOL"
24539  arguments="${tmp#* }"
24540
24541  # Input might be given as Windows format, start by converting to
24542  # unix format.
24543  new_path=`$CYGPATH -u "$path"`
24544
24545  # Now try to locate executable using which
24546  new_path=`$WHICH "$new_path" 2> /dev/null`
24547  # bat and cmd files are not always considered executable in cygwin causing which
24548  # to not find them
24549  if test "x$new_path" = x \
24550           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24551           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24552    new_path=`$CYGPATH -u "$path"`
24553  fi
24554  if test "x$new_path" = x; then
24555    # Oops. Which didn't find the executable.
24556    # The splitting of arguments from the executable at a space might have been incorrect,
24557    # since paths with space are more likely in Windows. Give it another try with the whole
24558    # argument.
24559    path="$complete"
24560    arguments="EOL"
24561    new_path=`$CYGPATH -u "$path"`
24562    new_path=`$WHICH "$new_path" 2> /dev/null`
24563    # bat and cmd files are not always considered executable in cygwin causing which
24564    # to not find them
24565    if test "x$new_path" = x \
24566             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24567             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24568      new_path=`$CYGPATH -u "$path"`
24569    fi
24570    if test "x$new_path" = x; then
24571      # It's still not found. Now this is an unrecoverable error.
24572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24573$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24574      has_space=`$ECHO "$complete" | $GREP " "`
24575      if test "x$has_space" != x; then
24576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24578      fi
24579      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24580    fi
24581  fi
24582
24583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24586  # "foo.exe" is OK but "foo" is an error.
24587  #
24588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24589  # It is also a way to make sure we got the proper file name for the real test later on.
24590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24591  if test "x$test_shortpath" = x; then
24592    # Short path failed, file does not exist as specified.
24593    # Try adding .exe or .cmd
24594    if test -f "${new_path}.exe"; then
24595       input_to_shortpath="${new_path}.exe"
24596    elif test -f "${new_path}.cmd"; then
24597       input_to_shortpath="${new_path}.cmd"
24598    else
24599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
24600$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
24601      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24602$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24603      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24604    fi
24605  else
24606    input_to_shortpath="$new_path"
24607  fi
24608
24609  # Call helper function which possibly converts this using DOS-style short mode.
24610  # If so, the updated path is stored in $new_path.
24611  new_path="$input_to_shortpath"
24612
24613  input_path="$input_to_shortpath"
24614  # Check if we need to convert this using DOS-style short mode. If the path
24615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24616  # take no chances and rewrite it.
24617  # Note: m4 eats our [], so we need to use [ and ] instead.
24618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24619  if test "x$has_forbidden_chars" != x; then
24620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24624      # Going to short mode and back again did indeed matter. Since short mode is
24625      # case insensitive, let's make it lowercase to improve readability.
24626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24627      # Now convert it back to Unix-stile (cygpath)
24628      input_path=`$CYGPATH -u "$shortmode_path"`
24629      new_path="$input_path"
24630    fi
24631  fi
24632
24633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24634  if test "x$test_cygdrive_prefix" = x; then
24635    # As a simple fix, exclude /usr/bin since it's not a real path.
24636    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24638      # a path prefixed by /cygdrive for fixpath to work.
24639      new_path="$CYGWIN_ROOT_PATH$input_path"
24640    fi
24641  fi
24642
24643  # remove trailing .exe if any
24644  new_path="${new_path/%.exe/}"
24645
24646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24647
24648  # First separate the path from the arguments. This will split at the first
24649  # space.
24650  complete="$MCS"
24651  path="${complete%% *}"
24652  tmp="$complete EOL"
24653  arguments="${tmp#* }"
24654
24655  # Input might be given as Windows format, start by converting to
24656  # unix format.
24657  new_path="$path"
24658
24659  windows_path="$new_path"
24660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24661    unix_path=`$CYGPATH -u "$windows_path"`
24662    new_path="$unix_path"
24663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24665    new_path="$unix_path"
24666  fi
24667
24668
24669  # Now try to locate executable using which
24670  new_path=`$WHICH "$new_path" 2> /dev/null`
24671
24672  if test "x$new_path" = x; then
24673    # Oops. Which didn't find the executable.
24674    # The splitting of arguments from the executable at a space might have been incorrect,
24675    # since paths with space are more likely in Windows. Give it another try with the whole
24676    # argument.
24677    path="$complete"
24678    arguments="EOL"
24679    new_path="$path"
24680
24681  windows_path="$new_path"
24682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24683    unix_path=`$CYGPATH -u "$windows_path"`
24684    new_path="$unix_path"
24685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24687    new_path="$unix_path"
24688  fi
24689
24690
24691    new_path=`$WHICH "$new_path" 2> /dev/null`
24692
24693    if test "x$new_path" = x; then
24694      # It's still not found. Now this is an unrecoverable error.
24695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24696$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24697      has_space=`$ECHO "$complete" | $GREP " "`
24698      if test "x$has_space" != x; then
24699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24701      fi
24702      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24703    fi
24704  fi
24705
24706  # Now new_path has a complete unix path to the binary
24707  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24708    # Keep paths in /bin as-is, but remove trailing .exe if any
24709    new_path="${new_path/%.exe/}"
24710    # Do not save /bin paths to all_fixpath_prefixes!
24711  else
24712    # Not in mixed or Windows style, start by that.
24713    new_path=`cmd //c echo $new_path`
24714
24715  input_path="$new_path"
24716  # Check if we need to convert this using DOS-style short mode. If the path
24717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24718  # take no chances and rewrite it.
24719  # Note: m4 eats our [], so we need to use [ and ] instead.
24720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24721  if test "x$has_forbidden_chars" != x; then
24722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24724  fi
24725
24726    # Output is in $new_path
24727
24728  windows_path="$new_path"
24729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24730    unix_path=`$CYGPATH -u "$windows_path"`
24731    new_path="$unix_path"
24732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24734    new_path="$unix_path"
24735  fi
24736
24737    # remove trailing .exe if any
24738    new_path="${new_path/%.exe/}"
24739
24740    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24741    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24742  fi
24743
24744  else
24745    # We're on a posix platform. Hooray! :)
24746    # First separate the path from the arguments. This will split at the first
24747    # space.
24748    complete="$MCS"
24749    path="${complete%% *}"
24750    tmp="$complete EOL"
24751    arguments="${tmp#* }"
24752
24753    new_path=`$WHICH $path 2> /dev/null`
24754    if test "x$new_path" = x; then
24755      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24756      if test "x$is_absolute_path" != x; then
24757        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) with 'which' failed, using $path directly." >&5
24758$as_echo "$as_me: Resolving MCS (as $path) with 'which' failed, using $path directly." >&6;}
24759        new_path="$path"
24760      else
24761        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24762$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24763        has_space=`$ECHO "$complete" | $GREP " "`
24764        if test "x$has_space" != x; then
24765          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24766$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24767        fi
24768        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24769      fi
24770    fi
24771  fi
24772
24773  # Now join together the path and the arguments once again
24774  if test "x$arguments" != xEOL; then
24775      new_complete="$new_path ${arguments% *}"
24776  else
24777      new_complete="$new_path"
24778  fi
24779
24780  if test "x$complete" != "x$new_complete"; then
24781    MCS="$new_complete"
24782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
24783$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
24784  fi
24785
24786elif test "x$OPENJDK_TARGET_OS" != xwindows; then
24787    if test -n "$ac_tool_prefix"; then
24788  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
24789set dummy ${ac_tool_prefix}nm; ac_word=$2
24790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24791$as_echo_n "checking for $ac_word... " >&6; }
24792if test "${ac_cv_prog_NM+set}" = set; then :
24793  $as_echo_n "(cached) " >&6
24794else
24795  if test -n "$NM"; then
24796  ac_cv_prog_NM="$NM" # Let the user override the test.
24797else
24798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24799for as_dir in $PATH
24800do
24801  IFS=$as_save_IFS
24802  test -z "$as_dir" && as_dir=.
24803    for ac_exec_ext in '' $ac_executable_extensions; do
24804  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24805    ac_cv_prog_NM="${ac_tool_prefix}nm"
24806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24807    break 2
24808  fi
24809done
24810  done
24811IFS=$as_save_IFS
24812
24813fi
24814fi
24815NM=$ac_cv_prog_NM
24816if test -n "$NM"; then
24817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24818$as_echo "$NM" >&6; }
24819else
24820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24821$as_echo "no" >&6; }
24822fi
24823
24824
24825fi
24826if test -z "$ac_cv_prog_NM"; then
24827  ac_ct_NM=$NM
24828  # Extract the first word of "nm", so it can be a program name with args.
24829set dummy nm; ac_word=$2
24830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24831$as_echo_n "checking for $ac_word... " >&6; }
24832if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
24833  $as_echo_n "(cached) " >&6
24834else
24835  if test -n "$ac_ct_NM"; then
24836  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
24837else
24838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24839for as_dir in $PATH
24840do
24841  IFS=$as_save_IFS
24842  test -z "$as_dir" && as_dir=.
24843    for ac_exec_ext in '' $ac_executable_extensions; do
24844  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24845    ac_cv_prog_ac_ct_NM="nm"
24846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24847    break 2
24848  fi
24849done
24850  done
24851IFS=$as_save_IFS
24852
24853fi
24854fi
24855ac_ct_NM=$ac_cv_prog_ac_ct_NM
24856if test -n "$ac_ct_NM"; then
24857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
24858$as_echo "$ac_ct_NM" >&6; }
24859else
24860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24861$as_echo "no" >&6; }
24862fi
24863
24864  if test "x$ac_ct_NM" = x; then
24865    NM=""
24866  else
24867    case $cross_compiling:$ac_tool_warned in
24868yes:)
24869{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24870$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24871ac_tool_warned=yes ;;
24872esac
24873    NM=$ac_ct_NM
24874  fi
24875else
24876  NM="$ac_cv_prog_NM"
24877fi
24878
24879
24880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24881
24882  # First separate the path from the arguments. This will split at the first
24883  # space.
24884  complete="$NM"
24885  path="${complete%% *}"
24886  tmp="$complete EOL"
24887  arguments="${tmp#* }"
24888
24889  # Input might be given as Windows format, start by converting to
24890  # unix format.
24891  new_path=`$CYGPATH -u "$path"`
24892
24893  # Now try to locate executable using which
24894  new_path=`$WHICH "$new_path" 2> /dev/null`
24895  # bat and cmd files are not always considered executable in cygwin causing which
24896  # to not find them
24897  if test "x$new_path" = x \
24898           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24899           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24900    new_path=`$CYGPATH -u "$path"`
24901  fi
24902  if test "x$new_path" = x; then
24903    # Oops. Which didn't find the executable.
24904    # The splitting of arguments from the executable at a space might have been incorrect,
24905    # since paths with space are more likely in Windows. Give it another try with the whole
24906    # argument.
24907    path="$complete"
24908    arguments="EOL"
24909    new_path=`$CYGPATH -u "$path"`
24910    new_path=`$WHICH "$new_path" 2> /dev/null`
24911    # bat and cmd files are not always considered executable in cygwin causing which
24912    # to not find them
24913    if test "x$new_path" = x \
24914             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24915             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24916      new_path=`$CYGPATH -u "$path"`
24917    fi
24918    if test "x$new_path" = x; then
24919      # It's still not found. Now this is an unrecoverable error.
24920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24921$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24922      has_space=`$ECHO "$complete" | $GREP " "`
24923      if test "x$has_space" != x; then
24924        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24925$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24926      fi
24927      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24928    fi
24929  fi
24930
24931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24934  # "foo.exe" is OK but "foo" is an error.
24935  #
24936  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24937  # It is also a way to make sure we got the proper file name for the real test later on.
24938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24939  if test "x$test_shortpath" = x; then
24940    # Short path failed, file does not exist as specified.
24941    # Try adding .exe or .cmd
24942    if test -f "${new_path}.exe"; then
24943       input_to_shortpath="${new_path}.exe"
24944    elif test -f "${new_path}.cmd"; then
24945       input_to_shortpath="${new_path}.cmd"
24946    else
24947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24948$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24949      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24950$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24951      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24952    fi
24953  else
24954    input_to_shortpath="$new_path"
24955  fi
24956
24957  # Call helper function which possibly converts this using DOS-style short mode.
24958  # If so, the updated path is stored in $new_path.
24959  new_path="$input_to_shortpath"
24960
24961  input_path="$input_to_shortpath"
24962  # Check if we need to convert this using DOS-style short mode. If the path
24963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24964  # take no chances and rewrite it.
24965  # Note: m4 eats our [], so we need to use [ and ] instead.
24966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24967  if test "x$has_forbidden_chars" != x; then
24968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24972      # Going to short mode and back again did indeed matter. Since short mode is
24973      # case insensitive, let's make it lowercase to improve readability.
24974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24975      # Now convert it back to Unix-stile (cygpath)
24976      input_path=`$CYGPATH -u "$shortmode_path"`
24977      new_path="$input_path"
24978    fi
24979  fi
24980
24981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24982  if test "x$test_cygdrive_prefix" = x; then
24983    # As a simple fix, exclude /usr/bin since it's not a real path.
24984    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24986      # a path prefixed by /cygdrive for fixpath to work.
24987      new_path="$CYGWIN_ROOT_PATH$input_path"
24988    fi
24989  fi
24990
24991  # remove trailing .exe if any
24992  new_path="${new_path/%.exe/}"
24993
24994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24995
24996  # First separate the path from the arguments. This will split at the first
24997  # space.
24998  complete="$NM"
24999  path="${complete%% *}"
25000  tmp="$complete EOL"
25001  arguments="${tmp#* }"
25002
25003  # Input might be given as Windows format, start by converting to
25004  # unix format.
25005  new_path="$path"
25006
25007  windows_path="$new_path"
25008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25009    unix_path=`$CYGPATH -u "$windows_path"`
25010    new_path="$unix_path"
25011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25013    new_path="$unix_path"
25014  fi
25015
25016
25017  # Now try to locate executable using which
25018  new_path=`$WHICH "$new_path" 2> /dev/null`
25019
25020  if test "x$new_path" = x; then
25021    # Oops. Which didn't find the executable.
25022    # The splitting of arguments from the executable at a space might have been incorrect,
25023    # since paths with space are more likely in Windows. Give it another try with the whole
25024    # argument.
25025    path="$complete"
25026    arguments="EOL"
25027    new_path="$path"
25028
25029  windows_path="$new_path"
25030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25031    unix_path=`$CYGPATH -u "$windows_path"`
25032    new_path="$unix_path"
25033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25035    new_path="$unix_path"
25036  fi
25037
25038
25039    new_path=`$WHICH "$new_path" 2> /dev/null`
25040
25041    if test "x$new_path" = x; then
25042      # It's still not found. Now this is an unrecoverable error.
25043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25044$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25045      has_space=`$ECHO "$complete" | $GREP " "`
25046      if test "x$has_space" != x; then
25047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25049      fi
25050      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25051    fi
25052  fi
25053
25054  # Now new_path has a complete unix path to the binary
25055  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25056    # Keep paths in /bin as-is, but remove trailing .exe if any
25057    new_path="${new_path/%.exe/}"
25058    # Do not save /bin paths to all_fixpath_prefixes!
25059  else
25060    # Not in mixed or Windows style, start by that.
25061    new_path=`cmd //c echo $new_path`
25062
25063  input_path="$new_path"
25064  # Check if we need to convert this using DOS-style short mode. If the path
25065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25066  # take no chances and rewrite it.
25067  # Note: m4 eats our [], so we need to use [ and ] instead.
25068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25069  if test "x$has_forbidden_chars" != x; then
25070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25072  fi
25073
25074    # Output is in $new_path
25075
25076  windows_path="$new_path"
25077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25078    unix_path=`$CYGPATH -u "$windows_path"`
25079    new_path="$unix_path"
25080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25082    new_path="$unix_path"
25083  fi
25084
25085    # remove trailing .exe if any
25086    new_path="${new_path/%.exe/}"
25087
25088    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25089    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25090  fi
25091
25092  else
25093    # We're on a posix platform. Hooray! :)
25094    # First separate the path from the arguments. This will split at the first
25095    # space.
25096    complete="$NM"
25097    path="${complete%% *}"
25098    tmp="$complete EOL"
25099    arguments="${tmp#* }"
25100
25101    new_path=`$WHICH $path 2> /dev/null`
25102    if test "x$new_path" = x; then
25103      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25104      if test "x$is_absolute_path" != x; then
25105        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
25106$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
25107        new_path="$path"
25108      else
25109        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25110$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25111        has_space=`$ECHO "$complete" | $GREP " "`
25112        if test "x$has_space" != x; then
25113          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25114$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25115        fi
25116        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25117      fi
25118    fi
25119  fi
25120
25121  # Now join together the path and the arguments once again
25122  if test "x$arguments" != xEOL; then
25123      new_complete="$new_path ${arguments% *}"
25124  else
25125      new_complete="$new_path"
25126  fi
25127
25128  if test "x$complete" != "x$new_complete"; then
25129    NM="$new_complete"
25130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25131$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25132  fi
25133
25134    if test -n "$ac_tool_prefix"; then
25135  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25136set dummy ${ac_tool_prefix}strip; ac_word=$2
25137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25138$as_echo_n "checking for $ac_word... " >&6; }
25139if test "${ac_cv_prog_STRIP+set}" = set; then :
25140  $as_echo_n "(cached) " >&6
25141else
25142  if test -n "$STRIP"; then
25143  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25144else
25145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25146for as_dir in $PATH
25147do
25148  IFS=$as_save_IFS
25149  test -z "$as_dir" && as_dir=.
25150    for ac_exec_ext in '' $ac_executable_extensions; do
25151  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25152    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25154    break 2
25155  fi
25156done
25157  done
25158IFS=$as_save_IFS
25159
25160fi
25161fi
25162STRIP=$ac_cv_prog_STRIP
25163if test -n "$STRIP"; then
25164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25165$as_echo "$STRIP" >&6; }
25166else
25167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25168$as_echo "no" >&6; }
25169fi
25170
25171
25172fi
25173if test -z "$ac_cv_prog_STRIP"; then
25174  ac_ct_STRIP=$STRIP
25175  # Extract the first word of "strip", so it can be a program name with args.
25176set dummy strip; ac_word=$2
25177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25178$as_echo_n "checking for $ac_word... " >&6; }
25179if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25180  $as_echo_n "(cached) " >&6
25181else
25182  if test -n "$ac_ct_STRIP"; then
25183  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25184else
25185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25186for as_dir in $PATH
25187do
25188  IFS=$as_save_IFS
25189  test -z "$as_dir" && as_dir=.
25190    for ac_exec_ext in '' $ac_executable_extensions; do
25191  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25192    ac_cv_prog_ac_ct_STRIP="strip"
25193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25194    break 2
25195  fi
25196done
25197  done
25198IFS=$as_save_IFS
25199
25200fi
25201fi
25202ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25203if test -n "$ac_ct_STRIP"; then
25204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25205$as_echo "$ac_ct_STRIP" >&6; }
25206else
25207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25208$as_echo "no" >&6; }
25209fi
25210
25211  if test "x$ac_ct_STRIP" = x; then
25212    STRIP=""
25213  else
25214    case $cross_compiling:$ac_tool_warned in
25215yes:)
25216{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25217$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25218ac_tool_warned=yes ;;
25219esac
25220    STRIP=$ac_ct_STRIP
25221  fi
25222else
25223  STRIP="$ac_cv_prog_STRIP"
25224fi
25225
25226
25227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25228
25229  # First separate the path from the arguments. This will split at the first
25230  # space.
25231  complete="$STRIP"
25232  path="${complete%% *}"
25233  tmp="$complete EOL"
25234  arguments="${tmp#* }"
25235
25236  # Input might be given as Windows format, start by converting to
25237  # unix format.
25238  new_path=`$CYGPATH -u "$path"`
25239
25240  # Now try to locate executable using which
25241  new_path=`$WHICH "$new_path" 2> /dev/null`
25242  # bat and cmd files are not always considered executable in cygwin causing which
25243  # to not find them
25244  if test "x$new_path" = x \
25245           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25246           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25247    new_path=`$CYGPATH -u "$path"`
25248  fi
25249  if test "x$new_path" = x; then
25250    # Oops. Which didn't find the executable.
25251    # The splitting of arguments from the executable at a space might have been incorrect,
25252    # since paths with space are more likely in Windows. Give it another try with the whole
25253    # argument.
25254    path="$complete"
25255    arguments="EOL"
25256    new_path=`$CYGPATH -u "$path"`
25257    new_path=`$WHICH "$new_path" 2> /dev/null`
25258    # bat and cmd files are not always considered executable in cygwin causing which
25259    # to not find them
25260    if test "x$new_path" = x \
25261             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25262             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25263      new_path=`$CYGPATH -u "$path"`
25264    fi
25265    if test "x$new_path" = x; then
25266      # It's still not found. Now this is an unrecoverable error.
25267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25268$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25269      has_space=`$ECHO "$complete" | $GREP " "`
25270      if test "x$has_space" != x; then
25271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25273      fi
25274      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25275    fi
25276  fi
25277
25278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25281  # "foo.exe" is OK but "foo" is an error.
25282  #
25283  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25284  # It is also a way to make sure we got the proper file name for the real test later on.
25285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25286  if test "x$test_shortpath" = x; then
25287    # Short path failed, file does not exist as specified.
25288    # Try adding .exe or .cmd
25289    if test -f "${new_path}.exe"; then
25290       input_to_shortpath="${new_path}.exe"
25291    elif test -f "${new_path}.cmd"; then
25292       input_to_shortpath="${new_path}.cmd"
25293    else
25294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25295$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25296      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25297$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25298      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25299    fi
25300  else
25301    input_to_shortpath="$new_path"
25302  fi
25303
25304  # Call helper function which possibly converts this using DOS-style short mode.
25305  # If so, the updated path is stored in $new_path.
25306  new_path="$input_to_shortpath"
25307
25308  input_path="$input_to_shortpath"
25309  # Check if we need to convert this using DOS-style short mode. If the path
25310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25311  # take no chances and rewrite it.
25312  # Note: m4 eats our [], so we need to use [ and ] instead.
25313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25314  if test "x$has_forbidden_chars" != x; then
25315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25319      # Going to short mode and back again did indeed matter. Since short mode is
25320      # case insensitive, let's make it lowercase to improve readability.
25321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25322      # Now convert it back to Unix-stile (cygpath)
25323      input_path=`$CYGPATH -u "$shortmode_path"`
25324      new_path="$input_path"
25325    fi
25326  fi
25327
25328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25329  if test "x$test_cygdrive_prefix" = x; then
25330    # As a simple fix, exclude /usr/bin since it's not a real path.
25331    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25333      # a path prefixed by /cygdrive for fixpath to work.
25334      new_path="$CYGWIN_ROOT_PATH$input_path"
25335    fi
25336  fi
25337
25338  # remove trailing .exe if any
25339  new_path="${new_path/%.exe/}"
25340
25341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25342
25343  # First separate the path from the arguments. This will split at the first
25344  # space.
25345  complete="$STRIP"
25346  path="${complete%% *}"
25347  tmp="$complete EOL"
25348  arguments="${tmp#* }"
25349
25350  # Input might be given as Windows format, start by converting to
25351  # unix format.
25352  new_path="$path"
25353
25354  windows_path="$new_path"
25355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25356    unix_path=`$CYGPATH -u "$windows_path"`
25357    new_path="$unix_path"
25358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25360    new_path="$unix_path"
25361  fi
25362
25363
25364  # Now try to locate executable using which
25365  new_path=`$WHICH "$new_path" 2> /dev/null`
25366
25367  if test "x$new_path" = x; then
25368    # Oops. Which didn't find the executable.
25369    # The splitting of arguments from the executable at a space might have been incorrect,
25370    # since paths with space are more likely in Windows. Give it another try with the whole
25371    # argument.
25372    path="$complete"
25373    arguments="EOL"
25374    new_path="$path"
25375
25376  windows_path="$new_path"
25377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25378    unix_path=`$CYGPATH -u "$windows_path"`
25379    new_path="$unix_path"
25380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25382    new_path="$unix_path"
25383  fi
25384
25385
25386    new_path=`$WHICH "$new_path" 2> /dev/null`
25387
25388    if test "x$new_path" = x; then
25389      # It's still not found. Now this is an unrecoverable error.
25390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25391$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25392      has_space=`$ECHO "$complete" | $GREP " "`
25393      if test "x$has_space" != x; then
25394        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25395$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25396      fi
25397      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25398    fi
25399  fi
25400
25401  # Now new_path has a complete unix path to the binary
25402  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25403    # Keep paths in /bin as-is, but remove trailing .exe if any
25404    new_path="${new_path/%.exe/}"
25405    # Do not save /bin paths to all_fixpath_prefixes!
25406  else
25407    # Not in mixed or Windows style, start by that.
25408    new_path=`cmd //c echo $new_path`
25409
25410  input_path="$new_path"
25411  # Check if we need to convert this using DOS-style short mode. If the path
25412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25413  # take no chances and rewrite it.
25414  # Note: m4 eats our [], so we need to use [ and ] instead.
25415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25416  if test "x$has_forbidden_chars" != x; then
25417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25419  fi
25420
25421    # Output is in $new_path
25422
25423  windows_path="$new_path"
25424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25425    unix_path=`$CYGPATH -u "$windows_path"`
25426    new_path="$unix_path"
25427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25429    new_path="$unix_path"
25430  fi
25431
25432    # remove trailing .exe if any
25433    new_path="${new_path/%.exe/}"
25434
25435    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25436    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25437  fi
25438
25439  else
25440    # We're on a posix platform. Hooray! :)
25441    # First separate the path from the arguments. This will split at the first
25442    # space.
25443    complete="$STRIP"
25444    path="${complete%% *}"
25445    tmp="$complete EOL"
25446    arguments="${tmp#* }"
25447
25448    new_path=`$WHICH $path 2> /dev/null`
25449    if test "x$new_path" = x; then
25450      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25451      if test "x$is_absolute_path" != x; then
25452        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
25453$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
25454        new_path="$path"
25455      else
25456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25457$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25458        has_space=`$ECHO "$complete" | $GREP " "`
25459        if test "x$has_space" != x; then
25460          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25461$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25462        fi
25463        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25464      fi
25465    fi
25466  fi
25467
25468  # Now join together the path and the arguments once again
25469  if test "x$arguments" != xEOL; then
25470      new_complete="$new_path ${arguments% *}"
25471  else
25472      new_complete="$new_path"
25473  fi
25474
25475  if test "x$complete" != "x$new_complete"; then
25476    STRIP="$new_complete"
25477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25478$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25479  fi
25480
25481fi
25482
25483# objcopy is used for moving debug symbols to separate files when
25484# full debug symbols are enabled.
25485if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
25486    if test -n "$ac_tool_prefix"; then
25487  for ac_prog in gobjcopy objcopy
25488  do
25489    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
25490set dummy $ac_tool_prefix$ac_prog; ac_word=$2
25491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25492$as_echo_n "checking for $ac_word... " >&6; }
25493if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
25494  $as_echo_n "(cached) " >&6
25495else
25496  if test -n "$OBJCOPY"; then
25497  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
25498else
25499as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25500for as_dir in $PATH
25501do
25502  IFS=$as_save_IFS
25503  test -z "$as_dir" && as_dir=.
25504    for ac_exec_ext in '' $ac_executable_extensions; do
25505  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25506    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
25507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25508    break 2
25509  fi
25510done
25511  done
25512IFS=$as_save_IFS
25513
25514fi
25515fi
25516OBJCOPY=$ac_cv_prog_OBJCOPY
25517if test -n "$OBJCOPY"; then
25518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
25519$as_echo "$OBJCOPY" >&6; }
25520else
25521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25522$as_echo "no" >&6; }
25523fi
25524
25525
25526    test -n "$OBJCOPY" && break
25527  done
25528fi
25529if test -z "$OBJCOPY"; then
25530  ac_ct_OBJCOPY=$OBJCOPY
25531  for ac_prog in gobjcopy objcopy
25532do
25533  # Extract the first word of "$ac_prog", so it can be a program name with args.
25534set dummy $ac_prog; ac_word=$2
25535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25536$as_echo_n "checking for $ac_word... " >&6; }
25537if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
25538  $as_echo_n "(cached) " >&6
25539else
25540  if test -n "$ac_ct_OBJCOPY"; then
25541  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
25542else
25543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25544for as_dir in $PATH
25545do
25546  IFS=$as_save_IFS
25547  test -z "$as_dir" && as_dir=.
25548    for ac_exec_ext in '' $ac_executable_extensions; do
25549  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25550    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
25551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25552    break 2
25553  fi
25554done
25555  done
25556IFS=$as_save_IFS
25557
25558fi
25559fi
25560ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
25561if test -n "$ac_ct_OBJCOPY"; then
25562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
25563$as_echo "$ac_ct_OBJCOPY" >&6; }
25564else
25565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25566$as_echo "no" >&6; }
25567fi
25568
25569
25570  test -n "$ac_ct_OBJCOPY" && break
25571done
25572
25573  if test "x$ac_ct_OBJCOPY" = x; then
25574    OBJCOPY=""
25575  else
25576    case $cross_compiling:$ac_tool_warned in
25577yes:)
25578{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25579$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25580ac_tool_warned=yes ;;
25581esac
25582    OBJCOPY=$ac_ct_OBJCOPY
25583  fi
25584fi
25585
25586
25587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25588
25589  # First separate the path from the arguments. This will split at the first
25590  # space.
25591  complete="$OBJCOPY"
25592  path="${complete%% *}"
25593  tmp="$complete EOL"
25594  arguments="${tmp#* }"
25595
25596  # Input might be given as Windows format, start by converting to
25597  # unix format.
25598  new_path=`$CYGPATH -u "$path"`
25599
25600  # Now try to locate executable using which
25601  new_path=`$WHICH "$new_path" 2> /dev/null`
25602  # bat and cmd files are not always considered executable in cygwin causing which
25603  # to not find them
25604  if test "x$new_path" = x \
25605           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25606           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25607    new_path=`$CYGPATH -u "$path"`
25608  fi
25609  if test "x$new_path" = x; then
25610    # Oops. Which didn't find the executable.
25611    # The splitting of arguments from the executable at a space might have been incorrect,
25612    # since paths with space are more likely in Windows. Give it another try with the whole
25613    # argument.
25614    path="$complete"
25615    arguments="EOL"
25616    new_path=`$CYGPATH -u "$path"`
25617    new_path=`$WHICH "$new_path" 2> /dev/null`
25618    # bat and cmd files are not always considered executable in cygwin causing which
25619    # to not find them
25620    if test "x$new_path" = x \
25621             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25622             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25623      new_path=`$CYGPATH -u "$path"`
25624    fi
25625    if test "x$new_path" = x; then
25626      # It's still not found. Now this is an unrecoverable error.
25627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25628$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25629      has_space=`$ECHO "$complete" | $GREP " "`
25630      if test "x$has_space" != x; then
25631        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25632$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25633      fi
25634      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25635    fi
25636  fi
25637
25638  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25639  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25640  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25641  # "foo.exe" is OK but "foo" is an error.
25642  #
25643  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25644  # It is also a way to make sure we got the proper file name for the real test later on.
25645  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25646  if test "x$test_shortpath" = x; then
25647    # Short path failed, file does not exist as specified.
25648    # Try adding .exe or .cmd
25649    if test -f "${new_path}.exe"; then
25650       input_to_shortpath="${new_path}.exe"
25651    elif test -f "${new_path}.cmd"; then
25652       input_to_shortpath="${new_path}.cmd"
25653    else
25654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
25655$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
25656      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25657$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25658      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25659    fi
25660  else
25661    input_to_shortpath="$new_path"
25662  fi
25663
25664  # Call helper function which possibly converts this using DOS-style short mode.
25665  # If so, the updated path is stored in $new_path.
25666  new_path="$input_to_shortpath"
25667
25668  input_path="$input_to_shortpath"
25669  # Check if we need to convert this using DOS-style short mode. If the path
25670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25671  # take no chances and rewrite it.
25672  # Note: m4 eats our [], so we need to use [ and ] instead.
25673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25674  if test "x$has_forbidden_chars" != x; then
25675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25679      # Going to short mode and back again did indeed matter. Since short mode is
25680      # case insensitive, let's make it lowercase to improve readability.
25681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25682      # Now convert it back to Unix-stile (cygpath)
25683      input_path=`$CYGPATH -u "$shortmode_path"`
25684      new_path="$input_path"
25685    fi
25686  fi
25687
25688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25689  if test "x$test_cygdrive_prefix" = x; then
25690    # As a simple fix, exclude /usr/bin since it's not a real path.
25691    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25693      # a path prefixed by /cygdrive for fixpath to work.
25694      new_path="$CYGWIN_ROOT_PATH$input_path"
25695    fi
25696  fi
25697
25698  # remove trailing .exe if any
25699  new_path="${new_path/%.exe/}"
25700
25701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25702
25703  # First separate the path from the arguments. This will split at the first
25704  # space.
25705  complete="$OBJCOPY"
25706  path="${complete%% *}"
25707  tmp="$complete EOL"
25708  arguments="${tmp#* }"
25709
25710  # Input might be given as Windows format, start by converting to
25711  # unix format.
25712  new_path="$path"
25713
25714  windows_path="$new_path"
25715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25716    unix_path=`$CYGPATH -u "$windows_path"`
25717    new_path="$unix_path"
25718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25720    new_path="$unix_path"
25721  fi
25722
25723
25724  # Now try to locate executable using which
25725  new_path=`$WHICH "$new_path" 2> /dev/null`
25726
25727  if test "x$new_path" = x; then
25728    # Oops. Which didn't find the executable.
25729    # The splitting of arguments from the executable at a space might have been incorrect,
25730    # since paths with space are more likely in Windows. Give it another try with the whole
25731    # argument.
25732    path="$complete"
25733    arguments="EOL"
25734    new_path="$path"
25735
25736  windows_path="$new_path"
25737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25738    unix_path=`$CYGPATH -u "$windows_path"`
25739    new_path="$unix_path"
25740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25742    new_path="$unix_path"
25743  fi
25744
25745
25746    new_path=`$WHICH "$new_path" 2> /dev/null`
25747
25748    if test "x$new_path" = x; then
25749      # It's still not found. Now this is an unrecoverable error.
25750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25751$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25752      has_space=`$ECHO "$complete" | $GREP " "`
25753      if test "x$has_space" != x; then
25754        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25755$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25756      fi
25757      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25758    fi
25759  fi
25760
25761  # Now new_path has a complete unix path to the binary
25762  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25763    # Keep paths in /bin as-is, but remove trailing .exe if any
25764    new_path="${new_path/%.exe/}"
25765    # Do not save /bin paths to all_fixpath_prefixes!
25766  else
25767    # Not in mixed or Windows style, start by that.
25768    new_path=`cmd //c echo $new_path`
25769
25770  input_path="$new_path"
25771  # Check if we need to convert this using DOS-style short mode. If the path
25772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25773  # take no chances and rewrite it.
25774  # Note: m4 eats our [], so we need to use [ and ] instead.
25775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25776  if test "x$has_forbidden_chars" != x; then
25777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25778    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25779  fi
25780
25781    # Output is in $new_path
25782
25783  windows_path="$new_path"
25784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25785    unix_path=`$CYGPATH -u "$windows_path"`
25786    new_path="$unix_path"
25787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25789    new_path="$unix_path"
25790  fi
25791
25792    # remove trailing .exe if any
25793    new_path="${new_path/%.exe/}"
25794
25795    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25796    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25797  fi
25798
25799  else
25800    # We're on a posix platform. Hooray! :)
25801    # First separate the path from the arguments. This will split at the first
25802    # space.
25803    complete="$OBJCOPY"
25804    path="${complete%% *}"
25805    tmp="$complete EOL"
25806    arguments="${tmp#* }"
25807
25808    new_path=`$WHICH $path 2> /dev/null`
25809    if test "x$new_path" = x; then
25810      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25811      if test "x$is_absolute_path" != x; then
25812        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&5
25813$as_echo "$as_me: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&6;}
25814        new_path="$path"
25815      else
25816        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25817$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25818        has_space=`$ECHO "$complete" | $GREP " "`
25819        if test "x$has_space" != x; then
25820          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25821$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25822        fi
25823        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25824      fi
25825    fi
25826  fi
25827
25828  # Now join together the path and the arguments once again
25829  if test "x$arguments" != xEOL; then
25830      new_complete="$new_path ${arguments% *}"
25831  else
25832      new_complete="$new_path"
25833  fi
25834
25835  if test "x$complete" != "x$new_complete"; then
25836    OBJCOPY="$new_complete"
25837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
25838$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
25839  fi
25840
25841fi
25842
25843if test -n "$ac_tool_prefix"; then
25844  for ac_prog in gobjdump objdump
25845  do
25846    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
25847set dummy $ac_tool_prefix$ac_prog; ac_word=$2
25848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25849$as_echo_n "checking for $ac_word... " >&6; }
25850if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
25851  $as_echo_n "(cached) " >&6
25852else
25853  if test -n "$OBJDUMP"; then
25854  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
25855else
25856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25857for as_dir in $PATH
25858do
25859  IFS=$as_save_IFS
25860  test -z "$as_dir" && as_dir=.
25861    for ac_exec_ext in '' $ac_executable_extensions; do
25862  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25863    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
25864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25865    break 2
25866  fi
25867done
25868  done
25869IFS=$as_save_IFS
25870
25871fi
25872fi
25873OBJDUMP=$ac_cv_prog_OBJDUMP
25874if test -n "$OBJDUMP"; then
25875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
25876$as_echo "$OBJDUMP" >&6; }
25877else
25878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25879$as_echo "no" >&6; }
25880fi
25881
25882
25883    test -n "$OBJDUMP" && break
25884  done
25885fi
25886if test -z "$OBJDUMP"; then
25887  ac_ct_OBJDUMP=$OBJDUMP
25888  for ac_prog in gobjdump objdump
25889do
25890  # Extract the first word of "$ac_prog", so it can be a program name with args.
25891set dummy $ac_prog; ac_word=$2
25892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25893$as_echo_n "checking for $ac_word... " >&6; }
25894if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
25895  $as_echo_n "(cached) " >&6
25896else
25897  if test -n "$ac_ct_OBJDUMP"; then
25898  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
25899else
25900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25901for as_dir in $PATH
25902do
25903  IFS=$as_save_IFS
25904  test -z "$as_dir" && as_dir=.
25905    for ac_exec_ext in '' $ac_executable_extensions; do
25906  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25907    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
25908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25909    break 2
25910  fi
25911done
25912  done
25913IFS=$as_save_IFS
25914
25915fi
25916fi
25917ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
25918if test -n "$ac_ct_OBJDUMP"; then
25919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
25920$as_echo "$ac_ct_OBJDUMP" >&6; }
25921else
25922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25923$as_echo "no" >&6; }
25924fi
25925
25926
25927  test -n "$ac_ct_OBJDUMP" && break
25928done
25929
25930  if test "x$ac_ct_OBJDUMP" = x; then
25931    OBJDUMP=""
25932  else
25933    case $cross_compiling:$ac_tool_warned in
25934yes:)
25935{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25936$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25937ac_tool_warned=yes ;;
25938esac
25939    OBJDUMP=$ac_ct_OBJDUMP
25940  fi
25941fi
25942
25943if test "x$OBJDUMP" != x; then
25944  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
25945
25946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25947
25948  # First separate the path from the arguments. This will split at the first
25949  # space.
25950  complete="$OBJDUMP"
25951  path="${complete%% *}"
25952  tmp="$complete EOL"
25953  arguments="${tmp#* }"
25954
25955  # Input might be given as Windows format, start by converting to
25956  # unix format.
25957  new_path=`$CYGPATH -u "$path"`
25958
25959  # Now try to locate executable using which
25960  new_path=`$WHICH "$new_path" 2> /dev/null`
25961  # bat and cmd files are not always considered executable in cygwin causing which
25962  # to not find them
25963  if test "x$new_path" = x \
25964           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25965           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25966    new_path=`$CYGPATH -u "$path"`
25967  fi
25968  if test "x$new_path" = x; then
25969    # Oops. Which didn't find the executable.
25970    # The splitting of arguments from the executable at a space might have been incorrect,
25971    # since paths with space are more likely in Windows. Give it another try with the whole
25972    # argument.
25973    path="$complete"
25974    arguments="EOL"
25975    new_path=`$CYGPATH -u "$path"`
25976    new_path=`$WHICH "$new_path" 2> /dev/null`
25977    # bat and cmd files are not always considered executable in cygwin causing which
25978    # to not find them
25979    if test "x$new_path" = x \
25980             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25981             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25982      new_path=`$CYGPATH -u "$path"`
25983    fi
25984    if test "x$new_path" = x; then
25985      # It's still not found. Now this is an unrecoverable error.
25986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
25987$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
25988      has_space=`$ECHO "$complete" | $GREP " "`
25989      if test "x$has_space" != x; then
25990        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25991$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25992      fi
25993      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
25994    fi
25995  fi
25996
25997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26000  # "foo.exe" is OK but "foo" is an error.
26001  #
26002  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26003  # It is also a way to make sure we got the proper file name for the real test later on.
26004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26005  if test "x$test_shortpath" = x; then
26006    # Short path failed, file does not exist as specified.
26007    # Try adding .exe or .cmd
26008    if test -f "${new_path}.exe"; then
26009       input_to_shortpath="${new_path}.exe"
26010    elif test -f "${new_path}.cmd"; then
26011       input_to_shortpath="${new_path}.cmd"
26012    else
26013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26014$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26015      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26016$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26017      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26018    fi
26019  else
26020    input_to_shortpath="$new_path"
26021  fi
26022
26023  # Call helper function which possibly converts this using DOS-style short mode.
26024  # If so, the updated path is stored in $new_path.
26025  new_path="$input_to_shortpath"
26026
26027  input_path="$input_to_shortpath"
26028  # Check if we need to convert this using DOS-style short mode. If the path
26029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26030  # take no chances and rewrite it.
26031  # Note: m4 eats our [], so we need to use [ and ] instead.
26032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26033  if test "x$has_forbidden_chars" != x; then
26034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26038      # Going to short mode and back again did indeed matter. Since short mode is
26039      # case insensitive, let's make it lowercase to improve readability.
26040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26041      # Now convert it back to Unix-stile (cygpath)
26042      input_path=`$CYGPATH -u "$shortmode_path"`
26043      new_path="$input_path"
26044    fi
26045  fi
26046
26047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26048  if test "x$test_cygdrive_prefix" = x; then
26049    # As a simple fix, exclude /usr/bin since it's not a real path.
26050    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26052      # a path prefixed by /cygdrive for fixpath to work.
26053      new_path="$CYGWIN_ROOT_PATH$input_path"
26054    fi
26055  fi
26056
26057  # remove trailing .exe if any
26058  new_path="${new_path/%.exe/}"
26059
26060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26061
26062  # First separate the path from the arguments. This will split at the first
26063  # space.
26064  complete="$OBJDUMP"
26065  path="${complete%% *}"
26066  tmp="$complete EOL"
26067  arguments="${tmp#* }"
26068
26069  # Input might be given as Windows format, start by converting to
26070  # unix format.
26071  new_path="$path"
26072
26073  windows_path="$new_path"
26074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26075    unix_path=`$CYGPATH -u "$windows_path"`
26076    new_path="$unix_path"
26077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26079    new_path="$unix_path"
26080  fi
26081
26082
26083  # Now try to locate executable using which
26084  new_path=`$WHICH "$new_path" 2> /dev/null`
26085
26086  if test "x$new_path" = x; then
26087    # Oops. Which didn't find the executable.
26088    # The splitting of arguments from the executable at a space might have been incorrect,
26089    # since paths with space are more likely in Windows. Give it another try with the whole
26090    # argument.
26091    path="$complete"
26092    arguments="EOL"
26093    new_path="$path"
26094
26095  windows_path="$new_path"
26096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26097    unix_path=`$CYGPATH -u "$windows_path"`
26098    new_path="$unix_path"
26099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26101    new_path="$unix_path"
26102  fi
26103
26104
26105    new_path=`$WHICH "$new_path" 2> /dev/null`
26106
26107    if test "x$new_path" = x; then
26108      # It's still not found. Now this is an unrecoverable error.
26109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26110$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26111      has_space=`$ECHO "$complete" | $GREP " "`
26112      if test "x$has_space" != x; then
26113        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26114$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26115      fi
26116      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26117    fi
26118  fi
26119
26120  # Now new_path has a complete unix path to the binary
26121  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26122    # Keep paths in /bin as-is, but remove trailing .exe if any
26123    new_path="${new_path/%.exe/}"
26124    # Do not save /bin paths to all_fixpath_prefixes!
26125  else
26126    # Not in mixed or Windows style, start by that.
26127    new_path=`cmd //c echo $new_path`
26128
26129  input_path="$new_path"
26130  # Check if we need to convert this using DOS-style short mode. If the path
26131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26132  # take no chances and rewrite it.
26133  # Note: m4 eats our [], so we need to use [ and ] instead.
26134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26135  if test "x$has_forbidden_chars" != x; then
26136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26137    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26138  fi
26139
26140    # Output is in $new_path
26141
26142  windows_path="$new_path"
26143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26144    unix_path=`$CYGPATH -u "$windows_path"`
26145    new_path="$unix_path"
26146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26148    new_path="$unix_path"
26149  fi
26150
26151    # remove trailing .exe if any
26152    new_path="${new_path/%.exe/}"
26153
26154    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26155    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26156  fi
26157
26158  else
26159    # We're on a posix platform. Hooray! :)
26160    # First separate the path from the arguments. This will split at the first
26161    # space.
26162    complete="$OBJDUMP"
26163    path="${complete%% *}"
26164    tmp="$complete EOL"
26165    arguments="${tmp#* }"
26166
26167    new_path=`$WHICH $path 2> /dev/null`
26168    if test "x$new_path" = x; then
26169      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26170      if test "x$is_absolute_path" != x; then
26171        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&5
26172$as_echo "$as_me: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&6;}
26173        new_path="$path"
26174      else
26175        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26176$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26177        has_space=`$ECHO "$complete" | $GREP " "`
26178        if test "x$has_space" != x; then
26179          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26180$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26181        fi
26182        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26183      fi
26184    fi
26185  fi
26186
26187  # Now join together the path and the arguments once again
26188  if test "x$arguments" != xEOL; then
26189      new_complete="$new_path ${arguments% *}"
26190  else
26191      new_complete="$new_path"
26192  fi
26193
26194  if test "x$complete" != "x$new_complete"; then
26195    OBJDUMP="$new_complete"
26196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26197$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26198  fi
26199
26200fi
26201
26202if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26203   # Extract the first word of "lipo", so it can be a program name with args.
26204set dummy lipo; ac_word=$2
26205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26206$as_echo_n "checking for $ac_word... " >&6; }
26207if test "${ac_cv_path_LIPO+set}" = set; then :
26208  $as_echo_n "(cached) " >&6
26209else
26210  case $LIPO in
26211  [\\/]* | ?:[\\/]*)
26212  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26213  ;;
26214  *)
26215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26216for as_dir in $PATH
26217do
26218  IFS=$as_save_IFS
26219  test -z "$as_dir" && as_dir=.
26220    for ac_exec_ext in '' $ac_executable_extensions; do
26221  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26222    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26224    break 2
26225  fi
26226done
26227  done
26228IFS=$as_save_IFS
26229
26230  ;;
26231esac
26232fi
26233LIPO=$ac_cv_path_LIPO
26234if test -n "$LIPO"; then
26235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
26236$as_echo "$LIPO" >&6; }
26237else
26238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26239$as_echo "no" >&6; }
26240fi
26241
26242
26243
26244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26245
26246  # First separate the path from the arguments. This will split at the first
26247  # space.
26248  complete="$LIPO"
26249  path="${complete%% *}"
26250  tmp="$complete EOL"
26251  arguments="${tmp#* }"
26252
26253  # Input might be given as Windows format, start by converting to
26254  # unix format.
26255  new_path=`$CYGPATH -u "$path"`
26256
26257  # Now try to locate executable using which
26258  new_path=`$WHICH "$new_path" 2> /dev/null`
26259  # bat and cmd files are not always considered executable in cygwin causing which
26260  # to not find them
26261  if test "x$new_path" = x \
26262           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26263           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26264    new_path=`$CYGPATH -u "$path"`
26265  fi
26266  if test "x$new_path" = x; then
26267    # Oops. Which didn't find the executable.
26268    # The splitting of arguments from the executable at a space might have been incorrect,
26269    # since paths with space are more likely in Windows. Give it another try with the whole
26270    # argument.
26271    path="$complete"
26272    arguments="EOL"
26273    new_path=`$CYGPATH -u "$path"`
26274    new_path=`$WHICH "$new_path" 2> /dev/null`
26275    # bat and cmd files are not always considered executable in cygwin causing which
26276    # to not find them
26277    if test "x$new_path" = x \
26278             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26279             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26280      new_path=`$CYGPATH -u "$path"`
26281    fi
26282    if test "x$new_path" = x; then
26283      # It's still not found. Now this is an unrecoverable error.
26284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26285$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26286      has_space=`$ECHO "$complete" | $GREP " "`
26287      if test "x$has_space" != x; then
26288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26290      fi
26291      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26292    fi
26293  fi
26294
26295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26298  # "foo.exe" is OK but "foo" is an error.
26299  #
26300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26301  # It is also a way to make sure we got the proper file name for the real test later on.
26302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26303  if test "x$test_shortpath" = x; then
26304    # Short path failed, file does not exist as specified.
26305    # Try adding .exe or .cmd
26306    if test -f "${new_path}.exe"; then
26307       input_to_shortpath="${new_path}.exe"
26308    elif test -f "${new_path}.cmd"; then
26309       input_to_shortpath="${new_path}.cmd"
26310    else
26311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
26312$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
26313      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26314$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26315      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26316    fi
26317  else
26318    input_to_shortpath="$new_path"
26319  fi
26320
26321  # Call helper function which possibly converts this using DOS-style short mode.
26322  # If so, the updated path is stored in $new_path.
26323  new_path="$input_to_shortpath"
26324
26325  input_path="$input_to_shortpath"
26326  # Check if we need to convert this using DOS-style short mode. If the path
26327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26328  # take no chances and rewrite it.
26329  # Note: m4 eats our [], so we need to use [ and ] instead.
26330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26331  if test "x$has_forbidden_chars" != x; then
26332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26336      # Going to short mode and back again did indeed matter. Since short mode is
26337      # case insensitive, let's make it lowercase to improve readability.
26338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26339      # Now convert it back to Unix-stile (cygpath)
26340      input_path=`$CYGPATH -u "$shortmode_path"`
26341      new_path="$input_path"
26342    fi
26343  fi
26344
26345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26346  if test "x$test_cygdrive_prefix" = x; then
26347    # As a simple fix, exclude /usr/bin since it's not a real path.
26348    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26350      # a path prefixed by /cygdrive for fixpath to work.
26351      new_path="$CYGWIN_ROOT_PATH$input_path"
26352    fi
26353  fi
26354
26355  # remove trailing .exe if any
26356  new_path="${new_path/%.exe/}"
26357
26358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26359
26360  # First separate the path from the arguments. This will split at the first
26361  # space.
26362  complete="$LIPO"
26363  path="${complete%% *}"
26364  tmp="$complete EOL"
26365  arguments="${tmp#* }"
26366
26367  # Input might be given as Windows format, start by converting to
26368  # unix format.
26369  new_path="$path"
26370
26371  windows_path="$new_path"
26372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26373    unix_path=`$CYGPATH -u "$windows_path"`
26374    new_path="$unix_path"
26375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26377    new_path="$unix_path"
26378  fi
26379
26380
26381  # Now try to locate executable using which
26382  new_path=`$WHICH "$new_path" 2> /dev/null`
26383
26384  if test "x$new_path" = x; then
26385    # Oops. Which didn't find the executable.
26386    # The splitting of arguments from the executable at a space might have been incorrect,
26387    # since paths with space are more likely in Windows. Give it another try with the whole
26388    # argument.
26389    path="$complete"
26390    arguments="EOL"
26391    new_path="$path"
26392
26393  windows_path="$new_path"
26394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26395    unix_path=`$CYGPATH -u "$windows_path"`
26396    new_path="$unix_path"
26397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26399    new_path="$unix_path"
26400  fi
26401
26402
26403    new_path=`$WHICH "$new_path" 2> /dev/null`
26404
26405    if test "x$new_path" = x; then
26406      # It's still not found. Now this is an unrecoverable error.
26407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26408$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26409      has_space=`$ECHO "$complete" | $GREP " "`
26410      if test "x$has_space" != x; then
26411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26413      fi
26414      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26415    fi
26416  fi
26417
26418  # Now new_path has a complete unix path to the binary
26419  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26420    # Keep paths in /bin as-is, but remove trailing .exe if any
26421    new_path="${new_path/%.exe/}"
26422    # Do not save /bin paths to all_fixpath_prefixes!
26423  else
26424    # Not in mixed or Windows style, start by that.
26425    new_path=`cmd //c echo $new_path`
26426
26427  input_path="$new_path"
26428  # Check if we need to convert this using DOS-style short mode. If the path
26429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26430  # take no chances and rewrite it.
26431  # Note: m4 eats our [], so we need to use [ and ] instead.
26432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26433  if test "x$has_forbidden_chars" != x; then
26434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26436  fi
26437
26438    # Output is in $new_path
26439
26440  windows_path="$new_path"
26441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26442    unix_path=`$CYGPATH -u "$windows_path"`
26443    new_path="$unix_path"
26444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26446    new_path="$unix_path"
26447  fi
26448
26449    # remove trailing .exe if any
26450    new_path="${new_path/%.exe/}"
26451
26452    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26453    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26454  fi
26455
26456  else
26457    # We're on a posix platform. Hooray! :)
26458    # First separate the path from the arguments. This will split at the first
26459    # space.
26460    complete="$LIPO"
26461    path="${complete%% *}"
26462    tmp="$complete EOL"
26463    arguments="${tmp#* }"
26464
26465    new_path=`$WHICH $path 2> /dev/null`
26466    if test "x$new_path" = x; then
26467      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26468      if test "x$is_absolute_path" != x; then
26469        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&5
26470$as_echo "$as_me: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&6;}
26471        new_path="$path"
26472      else
26473        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26474$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26475        has_space=`$ECHO "$complete" | $GREP " "`
26476        if test "x$has_space" != x; then
26477          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26478$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26479        fi
26480        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26481      fi
26482    fi
26483  fi
26484
26485  # Now join together the path and the arguments once again
26486  if test "x$arguments" != xEOL; then
26487      new_complete="$new_path ${arguments% *}"
26488  else
26489      new_complete="$new_path"
26490  fi
26491
26492  if test "x$complete" != "x$new_complete"; then
26493    LIPO="$new_complete"
26494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
26495$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
26496  fi
26497
26498fi
26499
26500# Restore old path without tools dir
26501PATH="$OLD_PATH"
26502
26503
26504# FIXME: Currently we must test this after paths but before flags. Fix!
26505
26506# And we can test some aspects on the target using configure macros.
26507
26508
26509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
26510$as_echo_n "checking for ANSI C header files... " >&6; }
26511if test "${ac_cv_header_stdc+set}" = set; then :
26512  $as_echo_n "(cached) " >&6
26513else
26514  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26515/* end confdefs.h.  */
26516#include <stdlib.h>
26517#include <stdarg.h>
26518#include <string.h>
26519#include <float.h>
26520
26521int
26522main ()
26523{
26524
26525  ;
26526  return 0;
26527}
26528_ACEOF
26529if ac_fn_cxx_try_compile "$LINENO"; then :
26530  ac_cv_header_stdc=yes
26531else
26532  ac_cv_header_stdc=no
26533fi
26534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26535
26536if test $ac_cv_header_stdc = yes; then
26537  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
26538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26539/* end confdefs.h.  */
26540#include <string.h>
26541
26542_ACEOF
26543if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26544  $EGREP "memchr" >/dev/null 2>&1; then :
26545
26546else
26547  ac_cv_header_stdc=no
26548fi
26549rm -f conftest*
26550
26551fi
26552
26553if test $ac_cv_header_stdc = yes; then
26554  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
26555  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26556/* end confdefs.h.  */
26557#include <stdlib.h>
26558
26559_ACEOF
26560if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26561  $EGREP "free" >/dev/null 2>&1; then :
26562
26563else
26564  ac_cv_header_stdc=no
26565fi
26566rm -f conftest*
26567
26568fi
26569
26570if test $ac_cv_header_stdc = yes; then
26571  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
26572  if test "$cross_compiling" = yes; then :
26573  :
26574else
26575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26576/* end confdefs.h.  */
26577#include <ctype.h>
26578#include <stdlib.h>
26579#if ((' ' & 0x0FF) == 0x020)
26580# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
26581# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
26582#else
26583# define ISLOWER(c) \
26584		   (('a' <= (c) && (c) <= 'i') \
26585		     || ('j' <= (c) && (c) <= 'r') \
26586		     || ('s' <= (c) && (c) <= 'z'))
26587# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
26588#endif
26589
26590#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
26591int
26592main ()
26593{
26594  int i;
26595  for (i = 0; i < 256; i++)
26596    if (XOR (islower (i), ISLOWER (i))
26597	|| toupper (i) != TOUPPER (i))
26598      return 2;
26599  return 0;
26600}
26601_ACEOF
26602if ac_fn_cxx_try_run "$LINENO"; then :
26603
26604else
26605  ac_cv_header_stdc=no
26606fi
26607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26608  conftest.$ac_objext conftest.beam conftest.$ac_ext
26609fi
26610
26611fi
26612fi
26613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
26614$as_echo "$ac_cv_header_stdc" >&6; }
26615if test $ac_cv_header_stdc = yes; then
26616
26617$as_echo "#define STDC_HEADERS 1" >>confdefs.h
26618
26619fi
26620
26621# On IRIX 5.3, sys/types and inttypes.h are conflicting.
26622for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
26623		  inttypes.h stdint.h unistd.h
26624do :
26625  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26626ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
26627"
26628if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26629  cat >>confdefs.h <<_ACEOF
26630#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26631_ACEOF
26632
26633fi
26634
26635done
26636
26637
26638
26639###############################################################################
26640#
26641# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
26642# (The JVM can use 32 or 64 bit Java pointers but that decision
26643# is made at runtime.)
26644#
26645if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26646  # Always specify -m flags on Solaris
26647
26648  # keep track of c/cxx flags that we added outselves...
26649  #   to prevent emitting warning...
26650  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26651  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26652  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26653
26654  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
26655  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
26656  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
26657
26658  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
26659  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
26660  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
26661
26662elif test "x$COMPILE_TYPE" = xreduced; then
26663  if test "x$OPENJDK_TARGET_OS" != xwindows; then
26664    # Specify -m if running reduced on other Posix platforms
26665
26666  # keep track of c/cxx flags that we added outselves...
26667  #   to prevent emitting warning...
26668  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26669  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26670  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26671
26672  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
26673  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
26674  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
26675
26676  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
26677  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
26678  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
26679
26680  fi
26681fi
26682
26683# Make compilation sanity check
26684for ac_header in stdio.h
26685do :
26686  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
26687if test "x$ac_cv_header_stdio_h" = x""yes; then :
26688  cat >>confdefs.h <<_ACEOF
26689#define HAVE_STDIO_H 1
26690_ACEOF
26691
26692else
26693
26694  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
26695$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
26696  if test "x$COMPILE_TYPE" = xreduced; then
26697    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
26698$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
26699  elif test "x$COMPILE_TYPE" = xcross; then
26700    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
26701$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
26702  fi
26703  as_fn_error $? "Cannot continue." "$LINENO" 5
26704
26705fi
26706
26707done
26708
26709
26710# The cast to long int works around a bug in the HP C Compiler
26711# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
26712# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
26713# This bug is HP SR number 8606223364.
26714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
26715$as_echo_n "checking size of int *... " >&6; }
26716if test "${ac_cv_sizeof_int_p+set}" = set; then :
26717  $as_echo_n "(cached) " >&6
26718else
26719  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
26720
26721else
26722  if test "$ac_cv_type_int_p" = yes; then
26723     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
26724$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26725as_fn_error 77 "cannot compute sizeof (int *)
26726See \`config.log' for more details" "$LINENO" 5 ; }
26727   else
26728     ac_cv_sizeof_int_p=0
26729   fi
26730fi
26731
26732fi
26733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
26734$as_echo "$ac_cv_sizeof_int_p" >&6; }
26735
26736
26737
26738cat >>confdefs.h <<_ACEOF
26739#define SIZEOF_INT_P $ac_cv_sizeof_int_p
26740_ACEOF
26741
26742
26743
26744if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
26745  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
26746  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
26747fi
26748
26749if test "x$SIZEOF_INT_P" = x; then
26750    # The test failed, lets stick to the assumed value.
26751    { $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
26752$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
26753else
26754    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
26755
26756    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
26757        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
26758    fi
26759fi
26760
26761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
26762$as_echo_n "checking for target address size... " >&6; }
26763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
26764$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
26765
26766
26767###############################################################################
26768#
26769# Is the target little of big endian?
26770#
26771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
26772$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
26773if test "${ac_cv_c_bigendian+set}" = set; then :
26774  $as_echo_n "(cached) " >&6
26775else
26776  ac_cv_c_bigendian=unknown
26777    # See if we're dealing with a universal compiler.
26778    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26779/* end confdefs.h.  */
26780#ifndef __APPLE_CC__
26781	       not a universal capable compiler
26782	     #endif
26783	     typedef int dummy;
26784
26785_ACEOF
26786if ac_fn_cxx_try_compile "$LINENO"; then :
26787
26788	# Check for potential -arch flags.  It is not universal unless
26789	# there are at least two -arch flags with different values.
26790	ac_arch=
26791	ac_prev=
26792	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
26793	 if test -n "$ac_prev"; then
26794	   case $ac_word in
26795	     i?86 | x86_64 | ppc | ppc64)
26796	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
26797		 ac_arch=$ac_word
26798	       else
26799		 ac_cv_c_bigendian=universal
26800		 break
26801	       fi
26802	       ;;
26803	   esac
26804	   ac_prev=
26805	 elif test "x$ac_word" = "x-arch"; then
26806	   ac_prev=arch
26807	 fi
26808       done
26809fi
26810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26811    if test $ac_cv_c_bigendian = unknown; then
26812      # See if sys/param.h defines the BYTE_ORDER macro.
26813      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26814/* end confdefs.h.  */
26815#include <sys/types.h>
26816	     #include <sys/param.h>
26817
26818int
26819main ()
26820{
26821#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
26822		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
26823		     && LITTLE_ENDIAN)
26824	      bogus endian macros
26825	     #endif
26826
26827  ;
26828  return 0;
26829}
26830_ACEOF
26831if ac_fn_cxx_try_compile "$LINENO"; then :
26832  # It does; now see whether it defined to BIG_ENDIAN or not.
26833	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26834/* end confdefs.h.  */
26835#include <sys/types.h>
26836		#include <sys/param.h>
26837
26838int
26839main ()
26840{
26841#if BYTE_ORDER != BIG_ENDIAN
26842		 not big endian
26843		#endif
26844
26845  ;
26846  return 0;
26847}
26848_ACEOF
26849if ac_fn_cxx_try_compile "$LINENO"; then :
26850  ac_cv_c_bigendian=yes
26851else
26852  ac_cv_c_bigendian=no
26853fi
26854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26855fi
26856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26857    fi
26858    if test $ac_cv_c_bigendian = unknown; then
26859      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
26860      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26861/* end confdefs.h.  */
26862#include <limits.h>
26863
26864int
26865main ()
26866{
26867#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
26868	      bogus endian macros
26869	     #endif
26870
26871  ;
26872  return 0;
26873}
26874_ACEOF
26875if ac_fn_cxx_try_compile "$LINENO"; then :
26876  # It does; now see whether it defined to _BIG_ENDIAN or not.
26877	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26878/* end confdefs.h.  */
26879#include <limits.h>
26880
26881int
26882main ()
26883{
26884#ifndef _BIG_ENDIAN
26885		 not big endian
26886		#endif
26887
26888  ;
26889  return 0;
26890}
26891_ACEOF
26892if ac_fn_cxx_try_compile "$LINENO"; then :
26893  ac_cv_c_bigendian=yes
26894else
26895  ac_cv_c_bigendian=no
26896fi
26897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26898fi
26899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26900    fi
26901    if test $ac_cv_c_bigendian = unknown; then
26902      # Compile a test program.
26903      if test "$cross_compiling" = yes; then :
26904  # Try to guess by grepping values from an object file.
26905	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26906/* end confdefs.h.  */
26907short int ascii_mm[] =
26908		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
26909		short int ascii_ii[] =
26910		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
26911		int use_ascii (int i) {
26912		  return ascii_mm[i] + ascii_ii[i];
26913		}
26914		short int ebcdic_ii[] =
26915		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
26916		short int ebcdic_mm[] =
26917		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
26918		int use_ebcdic (int i) {
26919		  return ebcdic_mm[i] + ebcdic_ii[i];
26920		}
26921		extern int foo;
26922
26923int
26924main ()
26925{
26926return use_ascii (foo) == use_ebcdic (foo);
26927  ;
26928  return 0;
26929}
26930_ACEOF
26931if ac_fn_cxx_try_compile "$LINENO"; then :
26932  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
26933	      ac_cv_c_bigendian=yes
26934	    fi
26935	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
26936	      if test "$ac_cv_c_bigendian" = unknown; then
26937		ac_cv_c_bigendian=no
26938	      else
26939		# finding both strings is unlikely to happen, but who knows?
26940		ac_cv_c_bigendian=unknown
26941	      fi
26942	    fi
26943fi
26944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26945else
26946  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26947/* end confdefs.h.  */
26948$ac_includes_default
26949int
26950main ()
26951{
26952
26953	     /* Are we little or big endian?  From Harbison&Steele.  */
26954	     union
26955	     {
26956	       long int l;
26957	       char c[sizeof (long int)];
26958	     } u;
26959	     u.l = 1;
26960	     return u.c[sizeof (long int) - 1] == 1;
26961
26962  ;
26963  return 0;
26964}
26965_ACEOF
26966if ac_fn_cxx_try_run "$LINENO"; then :
26967  ac_cv_c_bigendian=no
26968else
26969  ac_cv_c_bigendian=yes
26970fi
26971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26972  conftest.$ac_objext conftest.beam conftest.$ac_ext
26973fi
26974
26975    fi
26976fi
26977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
26978$as_echo "$ac_cv_c_bigendian" >&6; }
26979 case $ac_cv_c_bigendian in #(
26980   yes)
26981     ENDIAN="big";; #(
26982   no)
26983     ENDIAN="little" ;; #(
26984   universal)
26985     ENDIAN="universal_endianness"
26986     ;; #(
26987   *)
26988     ENDIAN="unknown" ;;
26989 esac
26990
26991
26992if test "x$ENDIAN" = xuniversal_endianness; then
26993    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
26994fi
26995if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
26996    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
26997fi
26998
26999
27000# Configure flags for the tools
27001
27002
27003###############################################################################
27004#
27005# How to compile shared libraries.
27006#
27007
27008if test "x$GCC" = xyes; then
27009    COMPILER_NAME=gcc
27010    PICFLAG="-fPIC"
27011    LIBRARY_PREFIX=lib
27012    SHARED_LIBRARY='lib$1.so'
27013    STATIC_LIBRARY='lib$1.a'
27014    SHARED_LIBRARY_FLAGS="-shared"
27015    SHARED_LIBRARY_SUFFIX='.so'
27016    STATIC_LIBRARY_SUFFIX='.a'
27017    OBJ_SUFFIX='.o'
27018    EXE_SUFFIX=''
27019    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27020    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27021    C_FLAG_REORDER=''
27022    CXX_FLAG_REORDER=''
27023    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27024    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27025    LD="$CC"
27026    LDEXE="$CC"
27027    LDCXX="$CXX"
27028    LDEXECXX="$CXX"
27029    POST_STRIP_CMD="$STRIP -g"
27030
27031    # Linking is different on MacOSX
27032    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27033        # Might change in the future to clang.
27034        COMPILER_NAME=gcc
27035        SHARED_LIBRARY='lib$1.dylib'
27036        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27037        SHARED_LIBRARY_SUFFIX='.dylib'
27038        EXE_SUFFIX=''
27039        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27040        SET_SHARED_LIBRARY_MAPFILE=''
27041        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27042        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27043        POST_STRIP_CMD="$STRIP -S"
27044    fi
27045else
27046    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27047        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27048        COMPILER_NAME=ossc
27049        PICFLAG="-KPIC"
27050        LIBRARY_PREFIX=lib
27051        SHARED_LIBRARY='lib$1.so'
27052        STATIC_LIBRARY='lib$1.a'
27053        SHARED_LIBRARY_FLAGS="-G"
27054        SHARED_LIBRARY_SUFFIX='.so'
27055        STATIC_LIBRARY_SUFFIX='.a'
27056        OBJ_SUFFIX='.o'
27057        EXE_SUFFIX=''
27058        SET_SHARED_LIBRARY_NAME=''
27059        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27060	C_FLAG_REORDER='-xF'
27061	CXX_FLAG_REORDER='-xF'
27062        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27063        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27064        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27065        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27066        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27067        POST_STRIP_CMD="$STRIP -x"
27068        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27069    fi
27070    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27071        # If it is not gcc, then assume it is the MS Visual Studio compiler
27072        COMPILER_NAME=cl
27073        PICFLAG=""
27074        LIBRARY_PREFIX=
27075        SHARED_LIBRARY='$1.dll'
27076        STATIC_LIBRARY='$1.lib'
27077        SHARED_LIBRARY_FLAGS="-LD"
27078        SHARED_LIBRARY_SUFFIX='.dll'
27079        STATIC_LIBRARY_SUFFIX='.lib'
27080        OBJ_SUFFIX='.obj'
27081        EXE_SUFFIX='.exe'
27082        SET_SHARED_LIBRARY_NAME=''
27083        SET_SHARED_LIBRARY_MAPFILE=''
27084        SET_SHARED_LIBRARY_ORIGIN=''
27085        SET_EXECUTABLE_ORIGIN=''
27086    fi
27087fi
27088
27089
27090
27091
27092
27093
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106# The (cross) compiler is now configured, we can now test capabilities
27107# of the target platform.
27108
27109
27110
27111###############################################################################
27112#
27113# Setup the opt flags for different compilers
27114# and different operating systems.
27115#
27116
27117#
27118# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27119#
27120if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27121    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27122    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27123    CFLAGS="$CFLAGS -mstackrealign"
27124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27125$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27126    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27127/* end confdefs.h.  */
27128int main() { return 0; }
27129_ACEOF
27130if ac_fn_cxx_try_link "$LINENO"; then :
27131
27132		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27133$as_echo "yes" >&6; }
27134
27135else
27136
27137		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27138$as_echo "no" >&6; }
27139	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27140
27141fi
27142rm -f core conftest.err conftest.$ac_objext \
27143    conftest$ac_exeext conftest.$ac_ext
27144fi
27145
27146C_FLAG_DEPS="-MMD -MF"
27147CXX_FLAG_DEPS="-MMD -MF"
27148
27149case $COMPILER_TYPE in
27150  CC )
27151    D_FLAG="-g"
27152    case $COMPILER_NAME in
27153      gcc )
27154      	case $OPENJDK_TARGET_OS in
27155	  macosx )
27156	    # On MacOSX we optimize for size, something
27157	    # we should do for all platforms?
27158	    C_O_FLAG_HI="-Os"
27159	    C_O_FLAG_NORM="-Os"
27160	    C_O_FLAG_NONE=""
27161	    ;;
27162	  *)
27163	    C_O_FLAG_HI="-O3"
27164	    C_O_FLAG_NORM="-O2"
27165	    C_O_FLAG_NONE="-O0"
27166	    CFLAGS_DEBUG_SYMBOLS="-g"
27167	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27168	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27169	       CFLAGS_DEBUG_SYMBOLS="-g1"
27170	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27171	    fi
27172	    ;;
27173	esac
27174        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27175        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27176        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27177        ;;
27178      ossc )
27179        #
27180        # Forte has different names for this with their C++ compiler...
27181        #
27182        C_FLAG_DEPS="-xMMD -xMF"
27183        CXX_FLAG_DEPS="-xMMD -xMF"
27184
27185        # Extra options used with HIGHEST
27186        #
27187        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27188        #          done with care, there are some assumptions below that need to
27189        #          be understood about the use of pointers, and IEEE behavior.
27190        #
27191        # Use non-standard floating point mode (not IEEE 754)
27192        CC_HIGHEST="$CC_HIGHEST -fns"
27193        # Do some simplification of floating point arithmetic (not IEEE 754)
27194        CC_HIGHEST="$CC_HIGHEST -fsimple"
27195        # Use single precision floating point with 'float'
27196        CC_HIGHEST="$CC_HIGHEST -fsingle"
27197        # Assume memory references via basic pointer types do not alias
27198        #   (Source with excessing pointer casting and data access with mixed
27199        #    pointer types are not recommended)
27200        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
27201        # Use intrinsic or inline versions for math/std functions
27202        #   (If you expect perfect errno behavior, do not use this)
27203        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
27204        # Loop data dependency optimizations (need -xO3 or higher)
27205        CC_HIGHEST="$CC_HIGHEST -xdepend"
27206        # Pointer parameters to functions do not overlap
27207        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
27208        #    If you pass in multiple pointers to the same data, do not use this)
27209        CC_HIGHEST="$CC_HIGHEST -xrestrict"
27210        # Inline some library routines
27211        #   (If you expect perfect errno behavior, do not use this)
27212        CC_HIGHEST="$CC_HIGHEST -xlibmil"
27213        # Use optimized math routines
27214        #   (If you expect perfect errno behavior, do not use this)
27215        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
27216        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
27217
27218        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
27219          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
27220          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
27221        fi
27222
27223        case $OPENJDK_TARGET_CPU_ARCH in
27224          x86)
27225            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
27226            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
27227            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
27228            C_O_FLAG_NONE="-xregs=no%frameptr"
27229            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
27230            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
27231            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
27232            CXX_O_FLAG_NONE="-xregs=no%frameptr"
27233            if test "x$OPENJDK_TARGET_CPU" = xx86; then
27234               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
27235               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
27236            fi
27237            ;;
27238          sparc)
27239            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27240            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27241            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27242            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27243            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27244            C_O_FLAG_NONE=""
27245            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27246            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27247            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27248            CXX_O_FLAG_NONE=""
27249            ;;
27250        esac
27251
27252    CFLAGS_DEBUG_SYMBOLS="-g -xs"
27253    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
27254    esac
27255    ;;
27256  CL )
27257    D_FLAG=
27258    C_O_FLAG_HIGHEST="-O2"
27259    C_O_FLAG_HI="-O1"
27260    C_O_FLAG_NORM="-O1"
27261    C_O_FLAG_NONE="-Od"
27262    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
27263    CXX_O_FLAG_HI="$C_O_FLAG_HI"
27264    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27265    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27266    ;;
27267esac
27268
27269if test -z "$C_O_FLAG_HIGHEST"; then
27270   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
27271fi
27272
27273if test -z "$CXX_O_FLAG_HIGHEST"; then
27274   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
27275fi
27276
27277
27278
27279
27280
27281
27282
27283
27284
27285
27286
27287
27288
27289
27290if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
27291   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
27292$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
27293fi
27294
27295if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
27296   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
27297$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
27298fi
27299
27300if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
27301   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
27302$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
27303fi
27304
27305
27306# Check whether --with-extra-cflags was given.
27307if test "${with_extra_cflags+set}" = set; then :
27308  withval=$with_extra_cflags;
27309fi
27310
27311
27312
27313# Check whether --with-extra-cxxflags was given.
27314if test "${with_extra_cxxflags+set}" = set; then :
27315  withval=$with_extra_cxxflags;
27316fi
27317
27318
27319
27320# Check whether --with-extra-ldflags was given.
27321if test "${with_extra_ldflags+set}" = set; then :
27322  withval=$with_extra_ldflags;
27323fi
27324
27325
27326CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
27327CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
27328LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
27329
27330# Hotspot needs these set in their legacy form
27331LEGACY_EXTRA_CFLAGS=$with_extra_cflags
27332LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
27333LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
27334
27335
27336
27337
27338
27339###############################################################################
27340#
27341# Now setup the CFLAGS and LDFLAGS for the JDK build.
27342# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
27343#
27344case $COMPILER_NAME in
27345      gcc )
27346      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
27347                          -pipe \
27348                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
27349	  case $OPENJDK_TARGET_CPU_ARCH in
27350	  arm )
27351            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
27352	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27353	  ;;
27354	  ppc )
27355            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
27356	  ;;
27357	  * )
27358	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
27359	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27360          ;;
27361	  esac
27362          ;;
27363      ossc )
27364          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
27365          case $OPENJDK_TARGET_CPU_ARCH in
27366          x86 )
27367            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
27368       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
27369          ;;
27370          esac
27371
27372      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
27373      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
27374
27375          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
27376          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
27377          ;;
27378      cl )
27379          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
27380               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
27381	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
27382	       -DWIN32 -DIAL"
27383          case $OPENJDK_TARGET_CPU in
27384              x86 )
27385                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
27386                  ;;
27387              x86_64 )
27388                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
27389                  ;;
27390          esac
27391          ;;
27392esac
27393
27394###############################################################################
27395
27396CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
27397
27398# The package path is used only on macosx?
27399PACKAGE_PATH=/opt/local
27400
27401
27402if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
27403    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
27404    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
27405    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
27406    #   Note: -Dmacro         is the same as    #define macro 1
27407    #         -Dmacro=	    is the same as    #define macro
27408    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27409        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
27410    else
27411        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
27412    fi
27413else
27414    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
27415fi
27416if test "x$OPENJDK_TARGET_OS" = xlinux; then
27417    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
27418fi
27419if test "x$OPENJDK_TARGET_OS" = xwindows; then
27420    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
27421fi
27422if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27423    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
27424fi
27425if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27426    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
27427fi
27428if test "x$OPENJDK_TARGET_OS" = xbsd; then
27429    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
27430fi
27431if test "x$DEBUG_LEVEL" = xrelease; then
27432    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
27433    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27434        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
27435    fi
27436else
27437    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
27438fi
27439
27440CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
27441CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
27442
27443CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
27444        -I${JDK_OUTPUTDIR}/include \
27445        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
27446        -I${JDK_TOPDIR}/src/share/javavm/export \
27447        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
27448        -I${JDK_TOPDIR}/src/share/native/common \
27449        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
27450
27451# The shared libraries are compiled using the picflag.
27452CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
27453CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
27454
27455# Executable flags
27456CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
27457CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
27458
27459# Now this is odd. The JDK native libraries have to link against libjvm.so
27460# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
27461# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
27462# is identical for client and server? Yes. Which is picked at runtime (client or server)?
27463# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
27464# libraries will link to whatever is in memory. Yuck.
27465#
27466# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
27467if test "x$COMPILER_NAME" = xcl; then
27468    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
27469    if test "x$OPENJDK_TARGET_CPU" = xx86; then
27470        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
27471    fi
27472    # TODO: make -debug optional "--disable-full-debug-symbols"
27473    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
27474    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
27475    LDFLAGS_JDKLIB_SUFFIX=""
27476    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
27477        LDFLAGS_STACK_SIZE=1048576
27478    else
27479        LDFLAGS_STACK_SIZE=327680
27480    fi
27481    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
27482else
27483    if test "x$COMPILER_NAME" = xgcc; then
27484        # If this is a --hash-style=gnu system, use --hash-style=both, why?
27485        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
27486        if test -n "$HAS_GNU_HASH"; then
27487            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
27488        fi
27489        if test "x$OPENJDK_TARGET_OS" = xlinux; then
27490          # And since we now know that the linker is gnu, then add -z defs, to forbid
27491          # undefined symbols in object files.
27492          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
27493          if test "x$DEBUG_LEVEL" = "xrelease"; then
27494              # When building release libraries, tell the linker optimize them.
27495              # Should this be supplied to the OSS linker as well?
27496              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
27497          fi
27498        fi
27499    fi
27500    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
27501                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server \
27502                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client \
27503                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
27504
27505    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
27506    if test "x$COMPILER_NAME" = xossc; then
27507        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
27508    fi
27509
27510    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
27511    if test "x$OPENJDK_TARGET_OS" = xlinux; then
27512        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
27513    fi
27514fi
27515
27516# Adjust flags according to debug level.
27517case $DEBUG_LEVEL in
27518      fastdebug )
27519              CFLAGS="$CFLAGS $D_FLAG"
27520              JAVAC_FLAGS="$JAVAC_FLAGS -g"
27521              ;;
27522      slowdebug )
27523              CFLAGS="$CFLAGS $D_FLAG"
27524	      C_O_FLAG_HI="$C_O_FLAG_NONE"
27525	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
27526	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
27527	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
27528              JAVAC_FLAGS="$JAVAC_FLAGS -g"
27529              ;;
27530esac
27531
27532
27533
27534
27535
27536
27537
27538
27539
27540
27541
27542
27543
27544
27545
27546# Setup debug symbols (need objcopy from the toolchain for that)
27547
27548#
27549# ENABLE_DEBUG_SYMBOLS
27550# This must be done after the toolchain is setup, since we're looking at objcopy.
27551#
27552ENABLE_DEBUG_SYMBOLS=default
27553
27554# default on macosx is no...
27555if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27556   ENABLE_DEBUG_SYMBOLS=no
27557fi
27558
27559# Check whether --enable-debug-symbols was given.
27560if test "${enable_debug_symbols+set}" = set; then :
27561  enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}
27562fi
27563
27564
27565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
27566$as_echo_n "checking if we should generate debug symbols... " >&6; }
27567
27568if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
27569   # explicit enabling of enable-debug-symbols and can't find objcopy
27570   #   this is an error
27571   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
27572fi
27573
27574if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
27575  # Default is on if objcopy is found, otherwise off
27576  if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
27577     ENABLE_DEBUG_SYMBOLS=yes
27578  else
27579     ENABLE_DEBUG_SYMBOLS=no
27580  fi
27581fi
27582
27583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
27584$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
27585
27586#
27587# ZIP_DEBUGINFO_FILES
27588#
27589ZIP_DEBUGINFO_FILES=yes
27590
27591# Check whether --enable-zip-debug-info was given.
27592if test "${enable_zip_debug_info+set}" = set; then :
27593  enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}
27594fi
27595
27596
27597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
27598$as_echo_n "checking if we should zip debug-info files... " >&6; }
27599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP_DEBUGINFO_FILES" >&5
27600$as_echo "$ZIP_DEBUGINFO_FILES" >&6; }
27601
27602# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
27603#   use that...
27604if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
27605   ZIP_DEBUGINFO_FILES=1
27606else
27607   ZIP_DEBUGINFO_FILES=0
27608fi
27609
27610
27611
27612
27613
27614
27615
27616###############################################################################
27617#
27618# Check dependencies for external and internal libraries.
27619#
27620###############################################################################
27621
27622
27623
27624###############################################################################
27625#
27626# OS specific settings that we never will need to probe.
27627#
27628if test "x$OPENJDK_TARGET_OS" = xlinux; then
27629    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
27630$as_echo_n "checking what is not needed on Linux?... " >&6; }
27631    PULSE_NOT_NEEDED=yes
27632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
27633$as_echo "pulse" >&6; }
27634fi
27635
27636if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
27638$as_echo_n "checking what is not needed on Solaris?... " >&6; }
27639    ALSA_NOT_NEEDED=yes
27640    PULSE_NOT_NEEDED=yes
27641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
27642$as_echo "alsa pulse" >&6; }
27643fi
27644
27645if test "x$OPENJDK_TARGET_OS" = xwindows; then
27646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
27647$as_echo_n "checking what is not needed on Windows?... " >&6; }
27648    CUPS_NOT_NEEDED=yes
27649    ALSA_NOT_NEEDED=yes
27650    PULSE_NOT_NEEDED=yes
27651    X11_NOT_NEEDED=yes
27652    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
27653$as_echo "alsa cups pulse x11" >&6; }
27654fi
27655
27656if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27657    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
27658$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
27659    ALSA_NOT_NEEDED=yes
27660    PULSE_NOT_NEEDED=yes
27661    X11_NOT_NEEDED=yes
27662    FREETYPE2_NOT_NEEDED=yes
27663    # If the java runtime framework is disabled, then we need X11.
27664    # This will be adjusted below.
27665    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
27666$as_echo "alsa pulse x11" >&6; }
27667fi
27668
27669if test "x$OPENJDK_TARGET_OS" = xbsd; then
27670    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
27671$as_echo_n "checking what is not needed on bsd?... " >&6; }
27672    ALSA_NOT_NEEDED=yes
27673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
27674$as_echo "alsa" >&6; }
27675fi
27676
27677if test "x$OPENJDK" = "xfalse"; then
27678    FREETYPE2_NOT_NEEDED=yes
27679fi
27680
27681if test "x$SUPPORT_HEADFUL" = xno; then
27682    X11_NOT_NEEDED=yes
27683fi
27684
27685###############################################################################
27686#
27687# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
27688# that uses this API.
27689#
27690# Check whether --enable-macosx-runtime-support was given.
27691if test "${enable_macosx_runtime_support+set}" = set; then :
27692  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
27693else
27694  MACOSX_RUNTIME_SUPPORT="no"
27695fi
27696
27697
27698USE_MACOSX_RUNTIME_SUPPORT=no
27699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
27700$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
27701if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
27702    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
27703        MACOSX_RUNTIME_SUPPORT=yes
27704        USE_MACOSX_RUNTIME_SUPPORT=yes
27705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
27706$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
27707    else
27708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
27709$as_echo "yes, but explicitly disabled." >&6; }
27710    fi
27711else
27712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27713$as_echo "no" >&6; }
27714fi
27715
27716if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
27717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
27718$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
27719    X11_NOT_NEEDED=
27720    FREETYPE2_NOT_NEEDED=
27721    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
27722$as_echo "alsa pulse" >&6; }
27723fi
27724
27725
27726
27727
27728###############################################################################
27729#
27730# Check for X Windows
27731#
27732
27733# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
27734# Make a simple check for the libraries at the sysroot, and setup --x-includes and
27735# --x-libraries for the sysroot, if that seems to be correct.
27736if test "x$SYS_ROOT" != "x/"; then
27737  if test "x$x_includes" = xNONE; then
27738    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
27739      x_includes="$SYS_ROOT/usr/X11R6/include"
27740    fi
27741  fi
27742  if test "x$x_libraries" = xNONE; then
27743    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
27744      x_libraries="$SYS_ROOT/usr/X11R6/lib"
27745    fi
27746  fi
27747fi
27748
27749# Now let autoconf do it's magic
27750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
27751$as_echo_n "checking for X... " >&6; }
27752
27753
27754# Check whether --with-x was given.
27755if test "${with_x+set}" = set; then :
27756  withval=$with_x;
27757fi
27758
27759# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
27760if test "x$with_x" = xno; then
27761  # The user explicitly disabled X.
27762  have_x=disabled
27763else
27764  case $x_includes,$x_libraries in #(
27765    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
27766    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
27767  $as_echo_n "(cached) " >&6
27768else
27769  # One or both of the vars are not set, and there is no cached value.
27770ac_x_includes=no ac_x_libraries=no
27771rm -f -r conftest.dir
27772if mkdir conftest.dir; then
27773  cd conftest.dir
27774  cat >Imakefile <<'_ACEOF'
27775incroot:
27776	@echo incroot='${INCROOT}'
27777usrlibdir:
27778	@echo usrlibdir='${USRLIBDIR}'
27779libdir:
27780	@echo libdir='${LIBDIR}'
27781_ACEOF
27782  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
27783    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
27784    for ac_var in incroot usrlibdir libdir; do
27785      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
27786    done
27787    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
27788    for ac_extension in a so sl dylib la dll; do
27789      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
27790	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
27791	ac_im_usrlibdir=$ac_im_libdir; break
27792      fi
27793    done
27794    # Screen out bogus values from the imake configuration.  They are
27795    # bogus both because they are the default anyway, and because
27796    # using them would break gcc on systems where it needs fixed includes.
27797    case $ac_im_incroot in
27798	/usr/include) ac_x_includes= ;;
27799	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
27800    esac
27801    case $ac_im_usrlibdir in
27802	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
27803	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
27804    esac
27805  fi
27806  cd ..
27807  rm -f -r conftest.dir
27808fi
27809
27810# Standard set of common directories for X headers.
27811# Check X11 before X11Rn because it is often a symlink to the current release.
27812ac_x_header_dirs='
27813/usr/X11/include
27814/usr/X11R7/include
27815/usr/X11R6/include
27816/usr/X11R5/include
27817/usr/X11R4/include
27818
27819/usr/include/X11
27820/usr/include/X11R7
27821/usr/include/X11R6
27822/usr/include/X11R5
27823/usr/include/X11R4
27824
27825/usr/local/X11/include
27826/usr/local/X11R7/include
27827/usr/local/X11R6/include
27828/usr/local/X11R5/include
27829/usr/local/X11R4/include
27830
27831/usr/local/include/X11
27832/usr/local/include/X11R7
27833/usr/local/include/X11R6
27834/usr/local/include/X11R5
27835/usr/local/include/X11R4
27836
27837/usr/X386/include
27838/usr/x386/include
27839/usr/XFree86/include/X11
27840
27841/usr/include
27842/usr/local/include
27843/usr/unsupported/include
27844/usr/athena/include
27845/usr/local/x11r5/include
27846/usr/lpp/Xamples/include
27847
27848/usr/openwin/include
27849/usr/openwin/share/include'
27850
27851if test "$ac_x_includes" = no; then
27852  # Guess where to find include files, by looking for Xlib.h.
27853  # First, try using that file with no special directory specified.
27854  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27855/* end confdefs.h.  */
27856#include <X11/Xlib.h>
27857_ACEOF
27858if ac_fn_cxx_try_cpp "$LINENO"; then :
27859  # We can compile using X headers with no special include directory.
27860ac_x_includes=
27861else
27862  for ac_dir in $ac_x_header_dirs; do
27863  if test -r "$ac_dir/X11/Xlib.h"; then
27864    ac_x_includes=$ac_dir
27865    break
27866  fi
27867done
27868fi
27869rm -f conftest.err conftest.i conftest.$ac_ext
27870fi # $ac_x_includes = no
27871
27872if test "$ac_x_libraries" = no; then
27873  # Check for the libraries.
27874  # See if we find them without any special options.
27875  # Don't add to $LIBS permanently.
27876  ac_save_LIBS=$LIBS
27877  LIBS="-lX11 $LIBS"
27878  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27879/* end confdefs.h.  */
27880#include <X11/Xlib.h>
27881int
27882main ()
27883{
27884XrmInitialize ()
27885  ;
27886  return 0;
27887}
27888_ACEOF
27889if ac_fn_cxx_try_link "$LINENO"; then :
27890  LIBS=$ac_save_LIBS
27891# We can link X programs with no special library path.
27892ac_x_libraries=
27893else
27894  LIBS=$ac_save_LIBS
27895for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
27896do
27897  # Don't even attempt the hair of trying to link an X program!
27898  for ac_extension in a so sl dylib la dll; do
27899    if test -r "$ac_dir/libX11.$ac_extension"; then
27900      ac_x_libraries=$ac_dir
27901      break 2
27902    fi
27903  done
27904done
27905fi
27906rm -f core conftest.err conftest.$ac_objext \
27907    conftest$ac_exeext conftest.$ac_ext
27908fi # $ac_x_libraries = no
27909
27910case $ac_x_includes,$ac_x_libraries in #(
27911  no,* | *,no | *\'*)
27912    # Didn't find X, or a directory has "'" in its name.
27913    ac_cv_have_x="have_x=no";; #(
27914  *)
27915    # Record where we found X for the cache.
27916    ac_cv_have_x="have_x=yes\
27917	ac_x_includes='$ac_x_includes'\
27918	ac_x_libraries='$ac_x_libraries'"
27919esac
27920fi
27921;; #(
27922    *) have_x=yes;;
27923  esac
27924  eval "$ac_cv_have_x"
27925fi # $with_x != no
27926
27927if test "$have_x" != yes; then
27928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
27929$as_echo "$have_x" >&6; }
27930  no_x=yes
27931else
27932  # If each of the values was on the command line, it overrides each guess.
27933  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
27934  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
27935  # Update the cache value to reflect the command line values.
27936  ac_cv_have_x="have_x=yes\
27937	ac_x_includes='$x_includes'\
27938	ac_x_libraries='$x_libraries'"
27939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
27940$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
27941fi
27942
27943if test "$no_x" = yes; then
27944  # Not all programs may use this symbol, but it does not hurt to define it.
27945
27946$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
27947
27948  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
27949else
27950  if test -n "$x_includes"; then
27951    X_CFLAGS="$X_CFLAGS -I$x_includes"
27952  fi
27953
27954  # It would also be nice to do this for all -L options, not just this one.
27955  if test -n "$x_libraries"; then
27956    X_LIBS="$X_LIBS -L$x_libraries"
27957    # For Solaris; some versions of Sun CC require a space after -R and
27958    # others require no space.  Words are not sufficient . . . .
27959    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
27960$as_echo_n "checking whether -R must be followed by a space... " >&6; }
27961    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
27962    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
27963    ac_cxx_werror_flag=yes
27964    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27965/* end confdefs.h.  */
27966
27967int
27968main ()
27969{
27970
27971  ;
27972  return 0;
27973}
27974_ACEOF
27975if ac_fn_cxx_try_link "$LINENO"; then :
27976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27977$as_echo "no" >&6; }
27978       X_LIBS="$X_LIBS -R$x_libraries"
27979else
27980  LIBS="$ac_xsave_LIBS -R $x_libraries"
27981       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27982/* end confdefs.h.  */
27983
27984int
27985main ()
27986{
27987
27988  ;
27989  return 0;
27990}
27991_ACEOF
27992if ac_fn_cxx_try_link "$LINENO"; then :
27993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27994$as_echo "yes" >&6; }
27995	  X_LIBS="$X_LIBS -R $x_libraries"
27996else
27997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
27998$as_echo "neither works" >&6; }
27999fi
28000rm -f core conftest.err conftest.$ac_objext \
28001    conftest$ac_exeext conftest.$ac_ext
28002fi
28003rm -f core conftest.err conftest.$ac_objext \
28004    conftest$ac_exeext conftest.$ac_ext
28005    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28006    LIBS=$ac_xsave_LIBS
28007  fi
28008
28009  # Check for system-dependent libraries X programs must link with.
28010  # Do this before checking for the system-independent R6 libraries
28011  # (-lICE), since we may need -lsocket or whatever for X linking.
28012
28013  if test "$ISC" = yes; then
28014    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28015  else
28016    # Martyn Johnson says this is needed for Ultrix, if the X
28017    # libraries were built with DECnet support.  And Karl Berry says
28018    # the Alpha needs dnet_stub (dnet does not exist).
28019    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28020    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28021/* end confdefs.h.  */
28022
28023/* Override any GCC internal prototype to avoid an error.
28024   Use char because int might match the return type of a GCC
28025   builtin and then its argument prototype would still apply.  */
28026#ifdef __cplusplus
28027extern "C"
28028#endif
28029char XOpenDisplay ();
28030int
28031main ()
28032{
28033return XOpenDisplay ();
28034  ;
28035  return 0;
28036}
28037_ACEOF
28038if ac_fn_cxx_try_link "$LINENO"; then :
28039
28040else
28041  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28042$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28043if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28044  $as_echo_n "(cached) " >&6
28045else
28046  ac_check_lib_save_LIBS=$LIBS
28047LIBS="-ldnet  $LIBS"
28048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28049/* end confdefs.h.  */
28050
28051/* Override any GCC internal prototype to avoid an error.
28052   Use char because int might match the return type of a GCC
28053   builtin and then its argument prototype would still apply.  */
28054#ifdef __cplusplus
28055extern "C"
28056#endif
28057char dnet_ntoa ();
28058int
28059main ()
28060{
28061return dnet_ntoa ();
28062  ;
28063  return 0;
28064}
28065_ACEOF
28066if ac_fn_cxx_try_link "$LINENO"; then :
28067  ac_cv_lib_dnet_dnet_ntoa=yes
28068else
28069  ac_cv_lib_dnet_dnet_ntoa=no
28070fi
28071rm -f core conftest.err conftest.$ac_objext \
28072    conftest$ac_exeext conftest.$ac_ext
28073LIBS=$ac_check_lib_save_LIBS
28074fi
28075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28076$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28077if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28078  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28079fi
28080
28081    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28082      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28083$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28084if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28085  $as_echo_n "(cached) " >&6
28086else
28087  ac_check_lib_save_LIBS=$LIBS
28088LIBS="-ldnet_stub  $LIBS"
28089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28090/* end confdefs.h.  */
28091
28092/* Override any GCC internal prototype to avoid an error.
28093   Use char because int might match the return type of a GCC
28094   builtin and then its argument prototype would still apply.  */
28095#ifdef __cplusplus
28096extern "C"
28097#endif
28098char dnet_ntoa ();
28099int
28100main ()
28101{
28102return dnet_ntoa ();
28103  ;
28104  return 0;
28105}
28106_ACEOF
28107if ac_fn_cxx_try_link "$LINENO"; then :
28108  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28109else
28110  ac_cv_lib_dnet_stub_dnet_ntoa=no
28111fi
28112rm -f core conftest.err conftest.$ac_objext \
28113    conftest$ac_exeext conftest.$ac_ext
28114LIBS=$ac_check_lib_save_LIBS
28115fi
28116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28117$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28118if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28119  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28120fi
28121
28122    fi
28123fi
28124rm -f core conftest.err conftest.$ac_objext \
28125    conftest$ac_exeext conftest.$ac_ext
28126    LIBS="$ac_xsave_LIBS"
28127
28128    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28129    # to get the SysV transport functions.
28130    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28131    # needs -lnsl.
28132    # The nsl library prevents programs from opening the X display
28133    # on Irix 5.2, according to T.E. Dickey.
28134    # The functions gethostbyname, getservbyname, and inet_addr are
28135    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28136    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28137if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28138
28139fi
28140
28141    if test $ac_cv_func_gethostbyname = no; then
28142      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28143$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28144if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28145  $as_echo_n "(cached) " >&6
28146else
28147  ac_check_lib_save_LIBS=$LIBS
28148LIBS="-lnsl  $LIBS"
28149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28150/* end confdefs.h.  */
28151
28152/* Override any GCC internal prototype to avoid an error.
28153   Use char because int might match the return type of a GCC
28154   builtin and then its argument prototype would still apply.  */
28155#ifdef __cplusplus
28156extern "C"
28157#endif
28158char gethostbyname ();
28159int
28160main ()
28161{
28162return gethostbyname ();
28163  ;
28164  return 0;
28165}
28166_ACEOF
28167if ac_fn_cxx_try_link "$LINENO"; then :
28168  ac_cv_lib_nsl_gethostbyname=yes
28169else
28170  ac_cv_lib_nsl_gethostbyname=no
28171fi
28172rm -f core conftest.err conftest.$ac_objext \
28173    conftest$ac_exeext conftest.$ac_ext
28174LIBS=$ac_check_lib_save_LIBS
28175fi
28176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
28177$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
28178if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
28179  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
28180fi
28181
28182      if test $ac_cv_lib_nsl_gethostbyname = no; then
28183	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
28184$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
28185if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
28186  $as_echo_n "(cached) " >&6
28187else
28188  ac_check_lib_save_LIBS=$LIBS
28189LIBS="-lbsd  $LIBS"
28190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28191/* end confdefs.h.  */
28192
28193/* Override any GCC internal prototype to avoid an error.
28194   Use char because int might match the return type of a GCC
28195   builtin and then its argument prototype would still apply.  */
28196#ifdef __cplusplus
28197extern "C"
28198#endif
28199char gethostbyname ();
28200int
28201main ()
28202{
28203return gethostbyname ();
28204  ;
28205  return 0;
28206}
28207_ACEOF
28208if ac_fn_cxx_try_link "$LINENO"; then :
28209  ac_cv_lib_bsd_gethostbyname=yes
28210else
28211  ac_cv_lib_bsd_gethostbyname=no
28212fi
28213rm -f core conftest.err conftest.$ac_objext \
28214    conftest$ac_exeext conftest.$ac_ext
28215LIBS=$ac_check_lib_save_LIBS
28216fi
28217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
28218$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
28219if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
28220  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
28221fi
28222
28223      fi
28224    fi
28225
28226    # lieder@skyler.mavd.honeywell.com says without -lsocket,
28227    # socket/setsockopt and other routines are undefined under SCO ODT
28228    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
28229    # on later versions), says Simon Leinen: it contains gethostby*
28230    # variants that don't use the name server (or something).  -lsocket
28231    # must be given before -lnsl if both are needed.  We assume that
28232    # if connect needs -lnsl, so does gethostbyname.
28233    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
28234if test "x$ac_cv_func_connect" = x""yes; then :
28235
28236fi
28237
28238    if test $ac_cv_func_connect = no; then
28239      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
28240$as_echo_n "checking for connect in -lsocket... " >&6; }
28241if test "${ac_cv_lib_socket_connect+set}" = set; then :
28242  $as_echo_n "(cached) " >&6
28243else
28244  ac_check_lib_save_LIBS=$LIBS
28245LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
28246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28247/* end confdefs.h.  */
28248
28249/* Override any GCC internal prototype to avoid an error.
28250   Use char because int might match the return type of a GCC
28251   builtin and then its argument prototype would still apply.  */
28252#ifdef __cplusplus
28253extern "C"
28254#endif
28255char connect ();
28256int
28257main ()
28258{
28259return connect ();
28260  ;
28261  return 0;
28262}
28263_ACEOF
28264if ac_fn_cxx_try_link "$LINENO"; then :
28265  ac_cv_lib_socket_connect=yes
28266else
28267  ac_cv_lib_socket_connect=no
28268fi
28269rm -f core conftest.err conftest.$ac_objext \
28270    conftest$ac_exeext conftest.$ac_ext
28271LIBS=$ac_check_lib_save_LIBS
28272fi
28273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
28274$as_echo "$ac_cv_lib_socket_connect" >&6; }
28275if test "x$ac_cv_lib_socket_connect" = x""yes; then :
28276  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
28277fi
28278
28279    fi
28280
28281    # Guillermo Gomez says -lposix is necessary on A/UX.
28282    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
28283if test "x$ac_cv_func_remove" = x""yes; then :
28284
28285fi
28286
28287    if test $ac_cv_func_remove = no; then
28288      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
28289$as_echo_n "checking for remove in -lposix... " >&6; }
28290if test "${ac_cv_lib_posix_remove+set}" = set; then :
28291  $as_echo_n "(cached) " >&6
28292else
28293  ac_check_lib_save_LIBS=$LIBS
28294LIBS="-lposix  $LIBS"
28295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28296/* end confdefs.h.  */
28297
28298/* Override any GCC internal prototype to avoid an error.
28299   Use char because int might match the return type of a GCC
28300   builtin and then its argument prototype would still apply.  */
28301#ifdef __cplusplus
28302extern "C"
28303#endif
28304char remove ();
28305int
28306main ()
28307{
28308return remove ();
28309  ;
28310  return 0;
28311}
28312_ACEOF
28313if ac_fn_cxx_try_link "$LINENO"; then :
28314  ac_cv_lib_posix_remove=yes
28315else
28316  ac_cv_lib_posix_remove=no
28317fi
28318rm -f core conftest.err conftest.$ac_objext \
28319    conftest$ac_exeext conftest.$ac_ext
28320LIBS=$ac_check_lib_save_LIBS
28321fi
28322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
28323$as_echo "$ac_cv_lib_posix_remove" >&6; }
28324if test "x$ac_cv_lib_posix_remove" = x""yes; then :
28325  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
28326fi
28327
28328    fi
28329
28330    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
28331    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
28332if test "x$ac_cv_func_shmat" = x""yes; then :
28333
28334fi
28335
28336    if test $ac_cv_func_shmat = no; then
28337      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
28338$as_echo_n "checking for shmat in -lipc... " >&6; }
28339if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
28340  $as_echo_n "(cached) " >&6
28341else
28342  ac_check_lib_save_LIBS=$LIBS
28343LIBS="-lipc  $LIBS"
28344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28345/* end confdefs.h.  */
28346
28347/* Override any GCC internal prototype to avoid an error.
28348   Use char because int might match the return type of a GCC
28349   builtin and then its argument prototype would still apply.  */
28350#ifdef __cplusplus
28351extern "C"
28352#endif
28353char shmat ();
28354int
28355main ()
28356{
28357return shmat ();
28358  ;
28359  return 0;
28360}
28361_ACEOF
28362if ac_fn_cxx_try_link "$LINENO"; then :
28363  ac_cv_lib_ipc_shmat=yes
28364else
28365  ac_cv_lib_ipc_shmat=no
28366fi
28367rm -f core conftest.err conftest.$ac_objext \
28368    conftest$ac_exeext conftest.$ac_ext
28369LIBS=$ac_check_lib_save_LIBS
28370fi
28371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
28372$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
28373if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
28374  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
28375fi
28376
28377    fi
28378  fi
28379
28380  # Check for libraries that X11R6 Xt/Xaw programs need.
28381  ac_save_LDFLAGS=$LDFLAGS
28382  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
28383  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
28384  # check for ICE first), but we must link in the order -lSM -lICE or
28385  # we get undefined symbols.  So assume we have SM if we have ICE.
28386  # These have to be linked with before -lX11, unlike the other
28387  # libraries we check for below, so use a different variable.
28388  # John Interrante, Karl Berry
28389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
28390$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
28391if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
28392  $as_echo_n "(cached) " >&6
28393else
28394  ac_check_lib_save_LIBS=$LIBS
28395LIBS="-lICE $X_EXTRA_LIBS $LIBS"
28396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28397/* end confdefs.h.  */
28398
28399/* Override any GCC internal prototype to avoid an error.
28400   Use char because int might match the return type of a GCC
28401   builtin and then its argument prototype would still apply.  */
28402#ifdef __cplusplus
28403extern "C"
28404#endif
28405char IceConnectionNumber ();
28406int
28407main ()
28408{
28409return IceConnectionNumber ();
28410  ;
28411  return 0;
28412}
28413_ACEOF
28414if ac_fn_cxx_try_link "$LINENO"; then :
28415  ac_cv_lib_ICE_IceConnectionNumber=yes
28416else
28417  ac_cv_lib_ICE_IceConnectionNumber=no
28418fi
28419rm -f core conftest.err conftest.$ac_objext \
28420    conftest$ac_exeext conftest.$ac_ext
28421LIBS=$ac_check_lib_save_LIBS
28422fi
28423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
28424$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
28425if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
28426  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
28427fi
28428
28429  LDFLAGS=$ac_save_LDFLAGS
28430
28431fi
28432
28433
28434if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
28435
28436    # Print a helpful message on how to acquire the necessary build dependency.
28437    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
28438    MISSING_DEPENDENCY=x11
28439    PKGHANDLER_COMMAND=
28440
28441    case $PKGHANDLER in
28442	apt-get)
28443                apt_help     $MISSING_DEPENDENCY ;;
28444    yum)
28445                yum_help     $MISSING_DEPENDENCY ;;
28446	port)
28447                port_help    $MISSING_DEPENDENCY ;;
28448	pkgutil)
28449                pkgutil_help $MISSING_DEPENDENCY ;;
28450	pkgadd)
28451                pkgadd_help  $MISSING_DEPENDENCY ;;
28452    * )
28453      break ;;
28454    esac
28455
28456    if test "x$PKGHANDLER_COMMAND" != x; then
28457        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28458    fi
28459
28460    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
28461fi
28462
28463# Some of the old makefiles require a setting of OPENWIN_HOME
28464# Since the X11R6 directory has disappeared on later Linuxes,
28465# we need to probe for it.
28466if test "x$OPENJDK_TARGET_OS" = xlinux; then
28467    if test -d "$SYS_ROOT/usr/X11R6"; then
28468        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
28469    fi
28470    if test -d "$SYS_ROOT/usr/include/X11"; then
28471        OPENWIN_HOME="$SYS_ROOT/usr"
28472    fi
28473fi
28474if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28475    OPENWIN_HOME="/usr/openwin"
28476fi
28477
28478
28479
28480#
28481# Weird Sol10 something check...TODO change to try compile
28482#
28483if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
28484  if test "`uname -r`" = "5.10"; then
28485     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
28486     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
28487     fi
28488  fi
28489fi
28490
28491ac_ext=c
28492ac_cpp='$CPP $CPPFLAGS'
28493ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28494ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28495ac_compiler_gnu=$ac_cv_c_compiler_gnu
28496
28497OLD_CFLAGS="$CFLAGS"
28498CFLAGS="$CFLAGS $X_CFLAGS"
28499
28500# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
28501for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
28502do :
28503  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28504ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
28505                   # include <X11/Xutil.h>
28506
28507"
28508if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28509  cat >>confdefs.h <<_ACEOF
28510#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28511_ACEOF
28512 X11_A_OK=yes
28513else
28514  X11_A_OK=no
28515fi
28516
28517done
28518
28519
28520CFLAGS="$OLD_CFLAGS"
28521ac_ext=cpp
28522ac_cpp='$CXXCPP $CPPFLAGS'
28523ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28524ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28525ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
28526
28527
28528if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
28529
28530    # Print a helpful message on how to acquire the necessary build dependency.
28531    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
28532    MISSING_DEPENDENCY=x11
28533    PKGHANDLER_COMMAND=
28534
28535    case $PKGHANDLER in
28536	apt-get)
28537                apt_help     $MISSING_DEPENDENCY ;;
28538    yum)
28539                yum_help     $MISSING_DEPENDENCY ;;
28540	port)
28541                port_help    $MISSING_DEPENDENCY ;;
28542	pkgutil)
28543                pkgutil_help $MISSING_DEPENDENCY ;;
28544	pkgadd)
28545                pkgadd_help  $MISSING_DEPENDENCY ;;
28546    * )
28547      break ;;
28548    esac
28549
28550    if test "x$PKGHANDLER_COMMAND" != x; then
28551        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28552    fi
28553
28554    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
28555fi
28556
28557
28558
28559
28560
28561
28562###############################################################################
28563#
28564# The common unix printing system cups is used to print from java.
28565#
28566
28567# Check whether --with-cups was given.
28568if test "${with_cups+set}" = set; then :
28569  withval=$with_cups;
28570fi
28571
28572
28573# Check whether --with-cups-include was given.
28574if test "${with_cups_include+set}" = set; then :
28575  withval=$with_cups_include;
28576fi
28577
28578
28579if test "x$CUPS_NOT_NEEDED" = xyes; then
28580	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
28581		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
28582$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
28583	fi
28584	CUPS_CFLAGS=
28585else
28586	CUPS_FOUND=no
28587
28588	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
28589	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
28590	fi
28591
28592	if test "x${with_cups}" != x; then
28593	    CUPS_CFLAGS="-I${with_cups}/include"
28594	    CUPS_FOUND=yes
28595	fi
28596	if test "x${with_cups_include}" != x; then
28597	    CUPS_CFLAGS="-I${with_cups_include}"
28598	    CUPS_FOUND=yes
28599	fi
28600	if test "x$CUPS_FOUND" = xno; then
28601
28602
28603    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
28604        # Source the builddeps file again, to make sure it uses the latest variables!
28605        . $builddepsfile
28606        # Look for a target and build machine specific resource!
28607        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
28608        if test "x$resource" = x; then
28609            # Ok, lets instead look for a target specific resource
28610            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
28611        fi
28612        if test "x$resource" = x; then
28613            # Ok, lets instead look for a build specific resource
28614            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
28615        fi
28616        if test "x$resource" = x; then
28617            # Ok, lets instead look for a generic resource
28618            # (The cups comes from M4 and not the shell, thus no need for eval here.)
28619            resource=${builddep_cups}
28620        fi
28621        if test "x$resource" != x; then
28622            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
28623$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
28624	    # If the resource in the builddeps.conf file is an existing directory,
28625	    # for example /java/linux/cups
28626	    if test -d ${resource}; then
28627	       depdir=${resource}
28628	    else
28629
28630# cups is for example mymodule
28631# $resource is for example libs/general/libmymod_1_2_3.zip
28632# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
28633# $with_builddeps_dir is for example /localhome/builddeps
28634# depdir is the name of the variable into which we store the depdir, eg MYMOD
28635# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
28636# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
28637    filename=`basename $resource`
28638    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
28639    filebase=${filename%%.*}
28640    extension=${filename#*.}
28641    installdir=$with_builddeps_dir/$filebase
28642    if test ! -f $installdir/$filename.unpacked; then
28643        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
28644$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
28645        if test ! -d $installdir; then
28646            mkdir -p $installdir
28647        fi
28648        if test ! -d $installdir; then
28649            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
28650        fi
28651        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
28652        touch $tmpfile
28653        if test ! -f $tmpfile; then
28654            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
28655        fi
28656
28657    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
28658    # $tmpfile is the local file name for the downloaded file.
28659    VALID_TOOL=no
28660    if test "x$BDEPS_FTP" = xwget; then
28661       VALID_TOOL=yes
28662       wget -O $tmpfile $with_builddeps_server/$resource
28663    fi
28664    if test "x$BDEPS_FTP" = xlftp; then
28665       VALID_TOOL=yes
28666       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
28667    fi
28668    if test "x$BDEPS_FTP" = xftp; then
28669        VALID_TOOL=yes
28670        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
28671        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
28672        FTPUSERPWD=${FTPSERVER%%@*}
28673        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
28674            FTPUSER=${userpwd%%:*}
28675            FTPPWD=${userpwd#*@}
28676            FTPSERVER=${FTPSERVER#*@}
28677        else
28678            FTPUSER=ftp
28679            FTPPWD=ftp
28680        fi
28681        # the "pass" command does not work on some
28682        # ftp clients (read ftp.exe) but if it works,
28683        # passive mode is better!
28684        (\
28685            echo "user $FTPUSER $FTPPWD"        ;\
28686            echo "pass"                         ;\
28687            echo "bin"                          ;\
28688            echo "get $FTPPATH $tmpfile"              ;\
28689        ) | ftp -in $FTPSERVER
28690    fi
28691    if test "x$VALID_TOOL" != xyes; then
28692       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
28693    fi
28694
28695        mv $tmpfile $installdir/$filename
28696        if test ! -s $installdir/$filename; then
28697            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
28698        fi
28699        case "$extension" in
28700            zip)  echo "Unzipping $installdir/$filename..."
28701               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
28702            ;;
28703            tar.gz) echo "Untaring $installdir/$filename..."
28704               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28705            ;;
28706            tgz) echo "Untaring $installdir/$filename..."
28707               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28708            ;;
28709            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
28710            ;;
28711        esac
28712    fi
28713    if test -f $installdir/$filename.unpacked; then
28714        depdir=$installdir
28715    fi
28716
28717	    fi
28718            # Source the builddeps file again, because in the previous command, the depdir
28719            # was updated to point at the current build dependency install directory.
28720            . $builddepsfile
28721            # Now extract variables from the builddeps.conf files.
28722            theroot=${builddep_cups_ROOT}
28723            thecflags=${builddep_cups_CFLAGS}
28724            thelibs=${builddep_cups_LIBS}
28725            if test "x$depdir" = x; then
28726                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
28727            fi
28728            CUPS=$depdir
28729            if test "x$theroot" != x; then
28730               CUPS="$theroot"
28731            fi
28732            if test "x$thecflags" != x; then
28733               CUPS_CFLAGS="$thecflags"
28734            fi
28735            if test "x$thelibs" != x; then
28736               CUPS_LIBS="$thelibs"
28737            fi
28738            CUPS_FOUND=yes
28739
28740        fi
28741
28742    fi
28743
28744	fi
28745	if test "x$CUPS_FOUND" = xno; then
28746	    # Are the cups headers installed in the default /usr/include location?
28747	    for ac_header in cups/cups.h cups/ppd.h
28748do :
28749  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28750ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
28751if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28752  cat >>confdefs.h <<_ACEOF
28753#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28754_ACEOF
28755 CUPS_FOUND=yes
28756	                      CUPS_CFLAGS=
28757	                      DEFAULT_CUPS=yes
28758fi
28759
28760done
28761
28762	fi
28763	if test "x$CUPS_FOUND" = xno; then
28764	    # Getting nervous now? Lets poke around for standard Solaris third-party
28765	    # package installation locations.
28766	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
28767$as_echo_n "checking for cups headers... " >&6; }
28768	    if test -s /opt/sfw/cups/include/cups/cups.h; then
28769	       # An SFW package seems to be installed!
28770	       CUPS_FOUND=yes
28771	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
28772	    elif test -s /opt/csw/include/cups/cups.h; then
28773	       # A CSW package seems to be installed!
28774	       CUPS_FOUND=yes
28775	       CUPS_CFLAGS="-I/opt/csw/include"
28776	    fi
28777	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
28778$as_echo "$CUPS_FOUND" >&6; }
28779	fi
28780	if test "x$CUPS_FOUND" = xno; then
28781
28782    # Print a helpful message on how to acquire the necessary build dependency.
28783    # cups is the help tag: freetyp2, cups, pulse, alsa etc
28784    MISSING_DEPENDENCY=cups
28785    PKGHANDLER_COMMAND=
28786
28787    case $PKGHANDLER in
28788	apt-get)
28789                apt_help     $MISSING_DEPENDENCY ;;
28790    yum)
28791                yum_help     $MISSING_DEPENDENCY ;;
28792	port)
28793                port_help    $MISSING_DEPENDENCY ;;
28794	pkgutil)
28795                pkgutil_help $MISSING_DEPENDENCY ;;
28796	pkgadd)
28797                pkgadd_help  $MISSING_DEPENDENCY ;;
28798    * )
28799      break ;;
28800    esac
28801
28802    if test "x$PKGHANDLER_COMMAND" != x; then
28803        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28804    fi
28805
28806	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
28807	fi
28808fi
28809
28810
28811
28812
28813
28814
28815###############################################################################
28816#
28817# The ubiquitous freetype2 library is used to render fonts.
28818#
28819
28820# Check whether --with-freetype was given.
28821if test "${with_freetype+set}" = set; then :
28822  withval=$with_freetype;
28823fi
28824
28825
28826# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
28827USING_SYSTEM_FT_LIB=false
28828
28829if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
28830	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
28831		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
28832$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
28833	fi
28834	FREETYPE2_CFLAGS=
28835	FREETYPE2_LIBS=
28836        FREETYPE2_LIB_PATH=
28837else
28838	FREETYPE2_FOUND=no
28839
28840	if test "x$with_freetype" != x; then
28841
28842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28843
28844  # Input might be given as Windows format, start by converting to
28845  # unix format.
28846  path="$with_freetype"
28847  new_path=`$CYGPATH -u "$path"`
28848
28849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28852  # "foo.exe" is OK but "foo" is an error.
28853  #
28854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28855  # It is also a way to make sure we got the proper file name for the real test later on.
28856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28857  if test "x$test_shortpath" = x; then
28858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
28859$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
28860    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
28861  fi
28862
28863  # Call helper function which possibly converts this using DOS-style short mode.
28864  # If so, the updated path is stored in $new_path.
28865
28866  input_path="$new_path"
28867  # Check if we need to convert this using DOS-style short mode. If the path
28868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28869  # take no chances and rewrite it.
28870  # Note: m4 eats our [], so we need to use [ and ] instead.
28871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28872  if test "x$has_forbidden_chars" != x; then
28873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28877      # Going to short mode and back again did indeed matter. Since short mode is
28878      # case insensitive, let's make it lowercase to improve readability.
28879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28880      # Now convert it back to Unix-stile (cygpath)
28881      input_path=`$CYGPATH -u "$shortmode_path"`
28882      new_path="$input_path"
28883    fi
28884  fi
28885
28886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28887  if test "x$test_cygdrive_prefix" = x; then
28888    # As a simple fix, exclude /usr/bin since it's not a real path.
28889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28891      # a path prefixed by /cygdrive for fixpath to work.
28892      new_path="$CYGWIN_ROOT_PATH$input_path"
28893    fi
28894  fi
28895
28896
28897  if test "x$path" != "x$new_path"; then
28898    with_freetype="$new_path"
28899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
28900$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
28901  fi
28902
28903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28904
28905  path="$with_freetype"
28906  has_colon=`$ECHO $path | $GREP ^.:`
28907  new_path="$path"
28908  if test "x$has_colon" = x; then
28909    # Not in mixed or Windows style, start by that.
28910    new_path=`cmd //c echo $path`
28911  fi
28912
28913
28914  input_path="$new_path"
28915  # Check if we need to convert this using DOS-style short mode. If the path
28916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28917  # take no chances and rewrite it.
28918  # Note: m4 eats our [], so we need to use [ and ] instead.
28919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28920  if test "x$has_forbidden_chars" != x; then
28921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28923  fi
28924
28925
28926  windows_path="$new_path"
28927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28928    unix_path=`$CYGPATH -u "$windows_path"`
28929    new_path="$unix_path"
28930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28932    new_path="$unix_path"
28933  fi
28934
28935  if test "x$path" != "x$new_path"; then
28936    with_freetype="$new_path"
28937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
28938$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
28939  fi
28940
28941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28943
28944  else
28945    # We're on a posix platform. Hooray! :)
28946    path="$with_freetype"
28947
28948    if test ! -f "$path" && test ! -d "$path"; then
28949      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
28950    fi
28951
28952    has_space=`$ECHO "$path" | $GREP " "`
28953    if test "x$has_space" != x; then
28954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
28955$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
28956      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28957    fi
28958  fi
28959
28960	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
28961            FREETYPE2_LIB_PATH="$with_freetype/lib"
28962            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
28963                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
28964                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
28965            fi
28966            if test "x$OPENJDK_TARGET_OS" = xwindows; then
28967                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
28968            fi
28969	    FREETYPE2_CFLAGS="-I$with_freetype/include"
28970            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
28971                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
28972            fi
28973 	    FREETYPE2_FOUND=yes
28974   	    if test "x$FREETYPE2_FOUND" = xyes; then
28975	        # Verify that the directories exist
28976                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
28977		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
28978		fi
28979	        # List the contents of the lib.
28980		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
28981                if test "x$FREETYPELIB" = x; then
28982		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
28983		fi
28984	        # Check one h-file
28985                if ! test -s "$with_freetype/include/ft2build.h"; then
28986		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
28987		fi
28988            fi
28989        fi
28990	if test "x$FREETYPE2_FOUND" = xno; then
28991
28992
28993    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
28994        # Source the builddeps file again, to make sure it uses the latest variables!
28995        . $builddepsfile
28996        # Look for a target and build machine specific resource!
28997        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
28998        if test "x$resource" = x; then
28999            # Ok, lets instead look for a target specific resource
29000            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29001        fi
29002        if test "x$resource" = x; then
29003            # Ok, lets instead look for a build specific resource
29004            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29005        fi
29006        if test "x$resource" = x; then
29007            # Ok, lets instead look for a generic resource
29008            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29009            resource=${builddep_freetype2}
29010        fi
29011        if test "x$resource" != x; then
29012            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29013$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29014	    # If the resource in the builddeps.conf file is an existing directory,
29015	    # for example /java/linux/cups
29016	    if test -d ${resource}; then
29017	       depdir=${resource}
29018	    else
29019
29020# freetype2 is for example mymodule
29021# $resource is for example libs/general/libmymod_1_2_3.zip
29022# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29023# $with_builddeps_dir is for example /localhome/builddeps
29024# depdir is the name of the variable into which we store the depdir, eg MYMOD
29025# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29026# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29027    filename=`basename $resource`
29028    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29029    filebase=${filename%%.*}
29030    extension=${filename#*.}
29031    installdir=$with_builddeps_dir/$filebase
29032    if test ! -f $installdir/$filename.unpacked; then
29033        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29034$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29035        if test ! -d $installdir; then
29036            mkdir -p $installdir
29037        fi
29038        if test ! -d $installdir; then
29039            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29040        fi
29041        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29042        touch $tmpfile
29043        if test ! -f $tmpfile; then
29044            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29045        fi
29046
29047    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29048    # $tmpfile is the local file name for the downloaded file.
29049    VALID_TOOL=no
29050    if test "x$BDEPS_FTP" = xwget; then
29051       VALID_TOOL=yes
29052       wget -O $tmpfile $with_builddeps_server/$resource
29053    fi
29054    if test "x$BDEPS_FTP" = xlftp; then
29055       VALID_TOOL=yes
29056       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29057    fi
29058    if test "x$BDEPS_FTP" = xftp; then
29059        VALID_TOOL=yes
29060        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29061        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29062        FTPUSERPWD=${FTPSERVER%%@*}
29063        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29064            FTPUSER=${userpwd%%:*}
29065            FTPPWD=${userpwd#*@}
29066            FTPSERVER=${FTPSERVER#*@}
29067        else
29068            FTPUSER=ftp
29069            FTPPWD=ftp
29070        fi
29071        # the "pass" command does not work on some
29072        # ftp clients (read ftp.exe) but if it works,
29073        # passive mode is better!
29074        (\
29075            echo "user $FTPUSER $FTPPWD"        ;\
29076            echo "pass"                         ;\
29077            echo "bin"                          ;\
29078            echo "get $FTPPATH $tmpfile"              ;\
29079        ) | ftp -in $FTPSERVER
29080    fi
29081    if test "x$VALID_TOOL" != xyes; then
29082       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29083    fi
29084
29085        mv $tmpfile $installdir/$filename
29086        if test ! -s $installdir/$filename; then
29087            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29088        fi
29089        case "$extension" in
29090            zip)  echo "Unzipping $installdir/$filename..."
29091               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29092            ;;
29093            tar.gz) echo "Untaring $installdir/$filename..."
29094               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29095            ;;
29096            tgz) echo "Untaring $installdir/$filename..."
29097               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29098            ;;
29099            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29100            ;;
29101        esac
29102    fi
29103    if test -f $installdir/$filename.unpacked; then
29104        depdir=$installdir
29105    fi
29106
29107	    fi
29108            # Source the builddeps file again, because in the previous command, the depdir
29109            # was updated to point at the current build dependency install directory.
29110            . $builddepsfile
29111            # Now extract variables from the builddeps.conf files.
29112            theroot=${builddep_freetype2_ROOT}
29113            thecflags=${builddep_freetype2_CFLAGS}
29114            thelibs=${builddep_freetype2_LIBS}
29115            if test "x$depdir" = x; then
29116                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29117            fi
29118            FREETYPE2=$depdir
29119            if test "x$theroot" != x; then
29120               FREETYPE2="$theroot"
29121            fi
29122            if test "x$thecflags" != x; then
29123               FREETYPE2_CFLAGS="$thecflags"
29124            fi
29125            if test "x$thelibs" != x; then
29126               FREETYPE2_LIBS="$thelibs"
29127            fi
29128            FREETYPE2_FOUND=yes
29129            else FREETYPE2_FOUND=no
29130
29131        fi
29132        else FREETYPE2_FOUND=no
29133
29134    fi
29135
29136            USING_SYSTEM_FT_LIB=true
29137	fi
29138	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29139            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29140
29141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29142
29143  # Input might be given as Windows format, start by converting to
29144  # unix format.
29145  path="$FREETYPELOCATION"
29146  new_path=`$CYGPATH -u "$path"`
29147
29148  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29149  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29150  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29151  # "foo.exe" is OK but "foo" is an error.
29152  #
29153  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29154  # It is also a way to make sure we got the proper file name for the real test later on.
29155  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29156  if test "x$test_shortpath" = x; then
29157    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29158$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29159    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29160  fi
29161
29162  # Call helper function which possibly converts this using DOS-style short mode.
29163  # If so, the updated path is stored in $new_path.
29164
29165  input_path="$new_path"
29166  # Check if we need to convert this using DOS-style short mode. If the path
29167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29168  # take no chances and rewrite it.
29169  # Note: m4 eats our [], so we need to use [ and ] instead.
29170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29171  if test "x$has_forbidden_chars" != x; then
29172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29176      # Going to short mode and back again did indeed matter. Since short mode is
29177      # case insensitive, let's make it lowercase to improve readability.
29178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29179      # Now convert it back to Unix-stile (cygpath)
29180      input_path=`$CYGPATH -u "$shortmode_path"`
29181      new_path="$input_path"
29182    fi
29183  fi
29184
29185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29186  if test "x$test_cygdrive_prefix" = x; then
29187    # As a simple fix, exclude /usr/bin since it's not a real path.
29188    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29190      # a path prefixed by /cygdrive for fixpath to work.
29191      new_path="$CYGWIN_ROOT_PATH$input_path"
29192    fi
29193  fi
29194
29195
29196  if test "x$path" != "x$new_path"; then
29197    FREETYPELOCATION="$new_path"
29198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29199$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29200  fi
29201
29202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29203
29204  path="$FREETYPELOCATION"
29205  has_colon=`$ECHO $path | $GREP ^.:`
29206  new_path="$path"
29207  if test "x$has_colon" = x; then
29208    # Not in mixed or Windows style, start by that.
29209    new_path=`cmd //c echo $path`
29210  fi
29211
29212
29213  input_path="$new_path"
29214  # Check if we need to convert this using DOS-style short mode. If the path
29215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29216  # take no chances and rewrite it.
29217  # Note: m4 eats our [], so we need to use [ and ] instead.
29218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29219  if test "x$has_forbidden_chars" != x; then
29220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29222  fi
29223
29224
29225  windows_path="$new_path"
29226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29227    unix_path=`$CYGPATH -u "$windows_path"`
29228    new_path="$unix_path"
29229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29231    new_path="$unix_path"
29232  fi
29233
29234  if test "x$path" != "x$new_path"; then
29235    FREETYPELOCATION="$new_path"
29236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29237$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29238  fi
29239
29240  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29241  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29242
29243  else
29244    # We're on a posix platform. Hooray! :)
29245    path="$FREETYPELOCATION"
29246
29247    if test ! -f "$path" && test ! -d "$path"; then
29248      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
29249    fi
29250
29251    has_space=`$ECHO "$path" | $GREP " "`
29252    if test "x$has_space" != x; then
29253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29254$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29255      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29256    fi
29257  fi
29258
29259	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
29260$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
29261	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
29262	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
29263	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
29264 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
29265                if ! test -s "$FREETYPE2_LIBS"; then
29266		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
29267		fi
29268                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
29269		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
29270		fi
29271                USING_SYSTEM_FT_LIB=true
29272                FREETYPE2_FOUND=yes
29273	    fi
29274	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
29275$as_echo "$FREETYPE2_FOUND" >&6; }
29276        fi
29277	if test "x$FREETYPE2_FOUND" = xno; then
29278
29279pkg_failed=no
29280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
29281$as_echo_n "checking for FREETYPE2... " >&6; }
29282
29283if test -n "$FREETYPE2_CFLAGS"; then
29284    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
29285 elif test -n "$PKG_CONFIG"; then
29286    if test -n "$PKG_CONFIG" && \
29287    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29288  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29289  ac_status=$?
29290  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29291  test $ac_status = 0; }; then
29292  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
29293else
29294  pkg_failed=yes
29295fi
29296 else
29297    pkg_failed=untried
29298fi
29299if test -n "$FREETYPE2_LIBS"; then
29300    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
29301 elif test -n "$PKG_CONFIG"; then
29302    if test -n "$PKG_CONFIG" && \
29303    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29304  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29305  ac_status=$?
29306  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29307  test $ac_status = 0; }; then
29308  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
29309else
29310  pkg_failed=yes
29311fi
29312 else
29313    pkg_failed=untried
29314fi
29315
29316
29317
29318if test $pkg_failed = yes; then
29319
29320if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29321        _pkg_short_errors_supported=yes
29322else
29323        _pkg_short_errors_supported=no
29324fi
29325        if test $_pkg_short_errors_supported = yes; then
29326	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
29327        else
29328	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
29329        fi
29330	# Put the nasty error message in config.log where it belongs
29331	echo "$FREETYPE2_PKG_ERRORS" >&5
29332
29333	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29334$as_echo "no" >&6; }
29335                FREETYPE2_FOUND=no
29336elif test $pkg_failed = untried; then
29337	FREETYPE2_FOUND=no
29338else
29339	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
29340	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
29341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29342$as_echo "yes" >&6; }
29343	FREETYPE2_FOUND=yes
29344fi
29345            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
29346            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
29347            USING_SYSTEM_FT_LIB=true
29348            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
29349            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
29350              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
29351            fi
29352	fi
29353	if test "x$FREETYPE2_FOUND" = xno; then
29354	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
29355$as_echo_n "checking for freetype in some standard locations... " >&6; }
29356
29357	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
29358	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
29359	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
29360	    fi
29361	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
29362	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
29363	        DEFAULT_FREETYPE_LIBS="-lfreetype"
29364	    fi
29365
29366	    PREV_CXXCFLAGS="$CXXFLAGS"
29367	    PREV_LDFLAGS="$LDFLAGS"
29368	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
29369	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
29370	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29371/* end confdefs.h.  */
29372#include<ft2build.h>
29373	                    #include FT_FREETYPE_H
29374	                   int main() { return 0; }
29375
29376_ACEOF
29377if ac_fn_cxx_try_link "$LINENO"; then :
29378
29379	                      # Yes, the default cflags and libs did the trick.
29380	                      FREETYPE2_FOUND=yes
29381	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
29382	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
29383
29384else
29385
29386	                      FREETYPE2_FOUND=no
29387
29388fi
29389rm -f core conftest.err conftest.$ac_objext \
29390    conftest$ac_exeext conftest.$ac_ext
29391            CXXCFLAGS="$PREV_CXXFLAGS"
29392	    LDFLAGS="$PREV_LDFLAGS"
29393	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
29394$as_echo "$FREETYPE2_FOUND" >&6; }
29395            USING_SYSTEM_FT_LIB=true
29396	fi
29397	if test "x$FREETYPE2_FOUND" = xno; then
29398
29399    # Print a helpful message on how to acquire the necessary build dependency.
29400    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
29401    MISSING_DEPENDENCY=freetype2
29402    PKGHANDLER_COMMAND=
29403
29404    case $PKGHANDLER in
29405	apt-get)
29406                apt_help     $MISSING_DEPENDENCY ;;
29407    yum)
29408                yum_help     $MISSING_DEPENDENCY ;;
29409	port)
29410                port_help    $MISSING_DEPENDENCY ;;
29411	pkgutil)
29412                pkgutil_help $MISSING_DEPENDENCY ;;
29413	pkgadd)
29414                pkgadd_help  $MISSING_DEPENDENCY ;;
29415    * )
29416      break ;;
29417    esac
29418
29419    if test "x$PKGHANDLER_COMMAND" != x; then
29420        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29421    fi
29422
29423		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
29424	fi
29425
29426        if test "x$OPENJDK_TARGET_OS" != xwindows; then
29427            # AC_CHECK_LIB does not support use of cl.exe
29428            PREV_LDFLAGS="$LDFLAGS"
29429            LDFLAGS="$FREETYPE2_LIBS"
29430            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
29431$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
29432if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
29433  $as_echo_n "(cached) " >&6
29434else
29435  ac_check_lib_save_LIBS=$LIBS
29436LIBS="-lfreetype  $LIBS"
29437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29438/* end confdefs.h.  */
29439
29440/* Override any GCC internal prototype to avoid an error.
29441   Use char because int might match the return type of a GCC
29442   builtin and then its argument prototype would still apply.  */
29443#ifdef __cplusplus
29444extern "C"
29445#endif
29446char FT_Init_FreeType ();
29447int
29448main ()
29449{
29450return FT_Init_FreeType ();
29451  ;
29452  return 0;
29453}
29454_ACEOF
29455if ac_fn_cxx_try_link "$LINENO"; then :
29456  ac_cv_lib_freetype_FT_Init_FreeType=yes
29457else
29458  ac_cv_lib_freetype_FT_Init_FreeType=no
29459fi
29460rm -f core conftest.err conftest.$ac_objext \
29461    conftest$ac_exeext conftest.$ac_ext
29462LIBS=$ac_check_lib_save_LIBS
29463fi
29464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
29465$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
29466if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
29467  FREETYPE2_FOUND=true
29468else
29469  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
29470fi
29471
29472            LDFLAGS="$PREV_LDFLAGS"
29473        fi
29474fi
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484###############################################################################
29485#
29486# Check for alsa headers and libraries. Used on Linux/GNU systems.
29487#
29488
29489# Check whether --with-alsa was given.
29490if test "${with_alsa+set}" = set; then :
29491  withval=$with_alsa;
29492fi
29493
29494
29495# Check whether --with-alsa-include was given.
29496if test "${with_alsa_include+set}" = set; then :
29497  withval=$with_alsa_include;
29498fi
29499
29500
29501# Check whether --with-alsa-lib was given.
29502if test "${with_alsa_lib+set}" = set; then :
29503  withval=$with_alsa_lib;
29504fi
29505
29506
29507if test "x$ALSA_NOT_NEEDED" = xyes; then
29508	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
29509		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
29510$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
29511	fi
29512	ALSA_CFLAGS=
29513	ALSA_LIBS=
29514else
29515	ALSA_FOUND=no
29516
29517	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
29518	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
29519	fi
29520
29521	if test "x${with_alsa}" != x; then
29522	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
29523	    ALSA_CFLAGS="-I${with_alsa}/include"
29524	    ALSA_FOUND=yes
29525	fi
29526	if test "x${with_alsa_include}" != x; then
29527	    ALSA_CFLAGS="-I${with_alsa_include}"
29528	    ALSA_FOUND=yes
29529	fi
29530	if test "x${with_alsa_lib}" != x; then
29531	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
29532	    ALSA_FOUND=yes
29533	fi
29534	if test "x$ALSA_FOUND" = xno; then
29535
29536
29537    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29538        # Source the builddeps file again, to make sure it uses the latest variables!
29539        . $builddepsfile
29540        # Look for a target and build machine specific resource!
29541        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29542        if test "x$resource" = x; then
29543            # Ok, lets instead look for a target specific resource
29544            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
29545        fi
29546        if test "x$resource" = x; then
29547            # Ok, lets instead look for a build specific resource
29548            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
29549        fi
29550        if test "x$resource" = x; then
29551            # Ok, lets instead look for a generic resource
29552            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
29553            resource=${builddep_alsa}
29554        fi
29555        if test "x$resource" != x; then
29556            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
29557$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
29558	    # If the resource in the builddeps.conf file is an existing directory,
29559	    # for example /java/linux/cups
29560	    if test -d ${resource}; then
29561	       depdir=${resource}
29562	    else
29563
29564# alsa is for example mymodule
29565# $resource is for example libs/general/libmymod_1_2_3.zip
29566# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29567# $with_builddeps_dir is for example /localhome/builddeps
29568# depdir is the name of the variable into which we store the depdir, eg MYMOD
29569# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29570# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29571    filename=`basename $resource`
29572    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29573    filebase=${filename%%.*}
29574    extension=${filename#*.}
29575    installdir=$with_builddeps_dir/$filebase
29576    if test ! -f $installdir/$filename.unpacked; then
29577        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
29578$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29579        if test ! -d $installdir; then
29580            mkdir -p $installdir
29581        fi
29582        if test ! -d $installdir; then
29583            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29584        fi
29585        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
29586        touch $tmpfile
29587        if test ! -f $tmpfile; then
29588            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29589        fi
29590
29591    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29592    # $tmpfile is the local file name for the downloaded file.
29593    VALID_TOOL=no
29594    if test "x$BDEPS_FTP" = xwget; then
29595       VALID_TOOL=yes
29596       wget -O $tmpfile $with_builddeps_server/$resource
29597    fi
29598    if test "x$BDEPS_FTP" = xlftp; then
29599       VALID_TOOL=yes
29600       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29601    fi
29602    if test "x$BDEPS_FTP" = xftp; then
29603        VALID_TOOL=yes
29604        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29605        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29606        FTPUSERPWD=${FTPSERVER%%@*}
29607        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29608            FTPUSER=${userpwd%%:*}
29609            FTPPWD=${userpwd#*@}
29610            FTPSERVER=${FTPSERVER#*@}
29611        else
29612            FTPUSER=ftp
29613            FTPPWD=ftp
29614        fi
29615        # the "pass" command does not work on some
29616        # ftp clients (read ftp.exe) but if it works,
29617        # passive mode is better!
29618        (\
29619            echo "user $FTPUSER $FTPPWD"        ;\
29620            echo "pass"                         ;\
29621            echo "bin"                          ;\
29622            echo "get $FTPPATH $tmpfile"              ;\
29623        ) | ftp -in $FTPSERVER
29624    fi
29625    if test "x$VALID_TOOL" != xyes; then
29626       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29627    fi
29628
29629        mv $tmpfile $installdir/$filename
29630        if test ! -s $installdir/$filename; then
29631            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29632        fi
29633        case "$extension" in
29634            zip)  echo "Unzipping $installdir/$filename..."
29635               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29636            ;;
29637            tar.gz) echo "Untaring $installdir/$filename..."
29638               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29639            ;;
29640            tgz) echo "Untaring $installdir/$filename..."
29641               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29642            ;;
29643            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29644            ;;
29645        esac
29646    fi
29647    if test -f $installdir/$filename.unpacked; then
29648        depdir=$installdir
29649    fi
29650
29651	    fi
29652            # Source the builddeps file again, because in the previous command, the depdir
29653            # was updated to point at the current build dependency install directory.
29654            . $builddepsfile
29655            # Now extract variables from the builddeps.conf files.
29656            theroot=${builddep_alsa_ROOT}
29657            thecflags=${builddep_alsa_CFLAGS}
29658            thelibs=${builddep_alsa_LIBS}
29659            if test "x$depdir" = x; then
29660                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
29661            fi
29662            ALSA=$depdir
29663            if test "x$theroot" != x; then
29664               ALSA="$theroot"
29665            fi
29666            if test "x$thecflags" != x; then
29667               ALSA_CFLAGS="$thecflags"
29668            fi
29669            if test "x$thelibs" != x; then
29670               ALSA_LIBS="$thelibs"
29671            fi
29672            ALSA_FOUND=yes
29673            else ALSA_FOUND=no
29674
29675        fi
29676        else ALSA_FOUND=no
29677
29678    fi
29679
29680	fi
29681	if test "x$ALSA_FOUND" = xno; then
29682
29683pkg_failed=no
29684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
29685$as_echo_n "checking for ALSA... " >&6; }
29686
29687if test -n "$ALSA_CFLAGS"; then
29688    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
29689 elif test -n "$PKG_CONFIG"; then
29690    if test -n "$PKG_CONFIG" && \
29691    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
29692  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
29693  ac_status=$?
29694  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29695  test $ac_status = 0; }; then
29696  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
29697else
29698  pkg_failed=yes
29699fi
29700 else
29701    pkg_failed=untried
29702fi
29703if test -n "$ALSA_LIBS"; then
29704    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
29705 elif test -n "$PKG_CONFIG"; then
29706    if test -n "$PKG_CONFIG" && \
29707    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
29708  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
29709  ac_status=$?
29710  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29711  test $ac_status = 0; }; then
29712  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
29713else
29714  pkg_failed=yes
29715fi
29716 else
29717    pkg_failed=untried
29718fi
29719
29720
29721
29722if test $pkg_failed = yes; then
29723
29724if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29725        _pkg_short_errors_supported=yes
29726else
29727        _pkg_short_errors_supported=no
29728fi
29729        if test $_pkg_short_errors_supported = yes; then
29730	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
29731        else
29732	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
29733        fi
29734	# Put the nasty error message in config.log where it belongs
29735	echo "$ALSA_PKG_ERRORS" >&5
29736
29737	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29738$as_echo "no" >&6; }
29739                ALSA_FOUND=no
29740elif test $pkg_failed = untried; then
29741	ALSA_FOUND=no
29742else
29743	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
29744	ALSA_LIBS=$pkg_cv_ALSA_LIBS
29745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29746$as_echo "yes" >&6; }
29747	ALSA_FOUND=yes
29748fi
29749	fi
29750	if test "x$ALSA_FOUND" = xno; then
29751	    for ac_header in alsa/asoundlib.h
29752do :
29753  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
29754if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
29755  cat >>confdefs.h <<_ACEOF
29756#define HAVE_ALSA_ASOUNDLIB_H 1
29757_ACEOF
29758 ALSA_FOUND=yes
29759	                      ALSA_CFLAGS=-Iignoreme
29760	                      ALSA_LIBS=-lasound
29761	                      DEFAULT_ALSA=yes
29762else
29763  ALSA_FOUND=no
29764fi
29765
29766done
29767
29768	fi
29769	if test "x$ALSA_FOUND" = xno; then
29770
29771    # Print a helpful message on how to acquire the necessary build dependency.
29772    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
29773    MISSING_DEPENDENCY=alsa
29774    PKGHANDLER_COMMAND=
29775
29776    case $PKGHANDLER in
29777	apt-get)
29778                apt_help     $MISSING_DEPENDENCY ;;
29779    yum)
29780                yum_help     $MISSING_DEPENDENCY ;;
29781	port)
29782                port_help    $MISSING_DEPENDENCY ;;
29783	pkgutil)
29784                pkgutil_help $MISSING_DEPENDENCY ;;
29785	pkgadd)
29786                pkgadd_help  $MISSING_DEPENDENCY ;;
29787    * )
29788      break ;;
29789    esac
29790
29791    if test "x$PKGHANDLER_COMMAND" != x; then
29792        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29793    fi
29794
29795	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
29796	fi
29797fi
29798
29799
29800
29801
29802
29803
29804
29805###############################################################################
29806#
29807# Check for the jpeg library
29808#
29809
29810USE_EXTERNAL_LIBJPEG=true
29811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
29812$as_echo_n "checking for main in -ljpeg... " >&6; }
29813if test "${ac_cv_lib_jpeg_main+set}" = set; then :
29814  $as_echo_n "(cached) " >&6
29815else
29816  ac_check_lib_save_LIBS=$LIBS
29817LIBS="-ljpeg  $LIBS"
29818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29819/* end confdefs.h.  */
29820
29821
29822int
29823main ()
29824{
29825return main ();
29826  ;
29827  return 0;
29828}
29829_ACEOF
29830if ac_fn_cxx_try_link "$LINENO"; then :
29831  ac_cv_lib_jpeg_main=yes
29832else
29833  ac_cv_lib_jpeg_main=no
29834fi
29835rm -f core conftest.err conftest.$ac_objext \
29836    conftest$ac_exeext conftest.$ac_ext
29837LIBS=$ac_check_lib_save_LIBS
29838fi
29839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
29840$as_echo "$ac_cv_lib_jpeg_main" >&6; }
29841if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
29842  cat >>confdefs.h <<_ACEOF
29843#define HAVE_LIBJPEG 1
29844_ACEOF
29845
29846  LIBS="-ljpeg $LIBS"
29847
29848else
29849   USE_EXTERNAL_LIBJPEG=false
29850               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
29851$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
29852
29853fi
29854
29855
29856
29857###############################################################################
29858#
29859# Check for the gif library
29860#
29861
29862USE_EXTERNAL_LIBJPEG=true
29863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
29864$as_echo_n "checking for main in -lgif... " >&6; }
29865if test "${ac_cv_lib_gif_main+set}" = set; then :
29866  $as_echo_n "(cached) " >&6
29867else
29868  ac_check_lib_save_LIBS=$LIBS
29869LIBS="-lgif  $LIBS"
29870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29871/* end confdefs.h.  */
29872
29873
29874int
29875main ()
29876{
29877return main ();
29878  ;
29879  return 0;
29880}
29881_ACEOF
29882if ac_fn_cxx_try_link "$LINENO"; then :
29883  ac_cv_lib_gif_main=yes
29884else
29885  ac_cv_lib_gif_main=no
29886fi
29887rm -f core conftest.err conftest.$ac_objext \
29888    conftest$ac_exeext conftest.$ac_ext
29889LIBS=$ac_check_lib_save_LIBS
29890fi
29891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
29892$as_echo "$ac_cv_lib_gif_main" >&6; }
29893if test "x$ac_cv_lib_gif_main" = x""yes; then :
29894  cat >>confdefs.h <<_ACEOF
29895#define HAVE_LIBGIF 1
29896_ACEOF
29897
29898  LIBS="-lgif $LIBS"
29899
29900else
29901   USE_EXTERNAL_LIBGIF=false
29902               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
29903$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
29904
29905fi
29906
29907
29908
29909###############################################################################
29910#
29911# Check for the zlib library
29912#
29913
29914
29915# Check whether --with-zlib was given.
29916if test "${with_zlib+set}" = set; then :
29917  withval=$with_zlib;
29918fi
29919
29920
29921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
29922$as_echo_n "checking for compress in -lz... " >&6; }
29923if test "${ac_cv_lib_z_compress+set}" = set; then :
29924  $as_echo_n "(cached) " >&6
29925else
29926  ac_check_lib_save_LIBS=$LIBS
29927LIBS="-lz  $LIBS"
29928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29929/* end confdefs.h.  */
29930
29931/* Override any GCC internal prototype to avoid an error.
29932   Use char because int might match the return type of a GCC
29933   builtin and then its argument prototype would still apply.  */
29934#ifdef __cplusplus
29935extern "C"
29936#endif
29937char compress ();
29938int
29939main ()
29940{
29941return compress ();
29942  ;
29943  return 0;
29944}
29945_ACEOF
29946if ac_fn_cxx_try_link "$LINENO"; then :
29947  ac_cv_lib_z_compress=yes
29948else
29949  ac_cv_lib_z_compress=no
29950fi
29951rm -f core conftest.err conftest.$ac_objext \
29952    conftest$ac_exeext conftest.$ac_ext
29953LIBS=$ac_check_lib_save_LIBS
29954fi
29955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
29956$as_echo "$ac_cv_lib_z_compress" >&6; }
29957if test "x$ac_cv_lib_z_compress" = x""yes; then :
29958   ZLIB_FOUND=yes
29959else
29960   ZLIB_FOUND=no
29961fi
29962
29963
29964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
29965$as_echo_n "checking for which zlib to use... " >&6; }
29966
29967DEFAULT_ZLIB=bundled
29968if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29969#
29970# On macosx default is system...on others default is
29971#
29972    DEFAULT_ZLIB=system
29973fi
29974
29975if test "x${ZLIB_FOUND}" != "xyes"; then
29976#
29977# If we don't find any system...set default to bundled
29978#
29979    DEFAULT_ZLIB=bundled
29980fi
29981
29982#
29983# If user didn't specify, use DEFAULT_ZLIB
29984#
29985if test "x${with_zlib}" = "x"; then
29986    with_zlib=${DEFAULT_ZLIB}
29987fi
29988
29989if test "x${with_zlib}" = "xbundled"; then
29990    USE_EXTERNAL_LIBZ=false
29991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
29992$as_echo "bundled" >&6; }
29993elif test "x${with_zlib}" = "xsystem"; then
29994    if test "x${ZLIB_FOUND}" = "xyes"; then
29995        USE_EXTERNAL_LIBZ=true
29996        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
29997$as_echo "system" >&6; }
29998    else
29999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30000$as_echo "system not found" >&6; }
30001        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30002    fi
30003else
30004    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30005fi
30006
30007
30008
30009###############################################################################
30010LIBZIP_CAN_USE_MMAP=true
30011
30012
30013
30014###############################################################################
30015#
30016# Check if altzone exists in time.h
30017#
30018
30019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30020/* end confdefs.h.  */
30021#include <time.h>
30022int
30023main ()
30024{
30025return (int)altzone;
30026  ;
30027  return 0;
30028}
30029_ACEOF
30030if ac_fn_cxx_try_link "$LINENO"; then :
30031  has_altzone=yes
30032else
30033  has_altzone=no
30034fi
30035rm -f core conftest.err conftest.$ac_objext \
30036    conftest$ac_exeext conftest.$ac_ext
30037if test "x$has_altzone" = xyes; then
30038
30039$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30040
30041fi
30042
30043###############################################################################
30044#
30045# Check the maths library
30046#
30047
30048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30049$as_echo_n "checking for cos in -lm... " >&6; }
30050if test "${ac_cv_lib_m_cos+set}" = set; then :
30051  $as_echo_n "(cached) " >&6
30052else
30053  ac_check_lib_save_LIBS=$LIBS
30054LIBS="-lm  $LIBS"
30055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30056/* end confdefs.h.  */
30057
30058/* Override any GCC internal prototype to avoid an error.
30059   Use char because int might match the return type of a GCC
30060   builtin and then its argument prototype would still apply.  */
30061#ifdef __cplusplus
30062extern "C"
30063#endif
30064char cos ();
30065int
30066main ()
30067{
30068return cos ();
30069  ;
30070  return 0;
30071}
30072_ACEOF
30073if ac_fn_cxx_try_link "$LINENO"; then :
30074  ac_cv_lib_m_cos=yes
30075else
30076  ac_cv_lib_m_cos=no
30077fi
30078rm -f core conftest.err conftest.$ac_objext \
30079    conftest$ac_exeext conftest.$ac_ext
30080LIBS=$ac_check_lib_save_LIBS
30081fi
30082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30083$as_echo "$ac_cv_lib_m_cos" >&6; }
30084if test "x$ac_cv_lib_m_cos" = x""yes; then :
30085  cat >>confdefs.h <<_ACEOF
30086#define HAVE_LIBM 1
30087_ACEOF
30088
30089  LIBS="-lm $LIBS"
30090
30091else
30092
30093                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30094$as_echo "$as_me: Maths library was not found" >&6;}
30095
30096fi
30097
30098
30099
30100###############################################################################
30101#
30102# Check for libdl.so
30103
30104save_LIBS="$LIBS"
30105LIBS=""
30106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30107$as_echo_n "checking for dlopen in -ldl... " >&6; }
30108if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30109  $as_echo_n "(cached) " >&6
30110else
30111  ac_check_lib_save_LIBS=$LIBS
30112LIBS="-ldl  $LIBS"
30113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30114/* end confdefs.h.  */
30115
30116/* Override any GCC internal prototype to avoid an error.
30117   Use char because int might match the return type of a GCC
30118   builtin and then its argument prototype would still apply.  */
30119#ifdef __cplusplus
30120extern "C"
30121#endif
30122char dlopen ();
30123int
30124main ()
30125{
30126return dlopen ();
30127  ;
30128  return 0;
30129}
30130_ACEOF
30131if ac_fn_cxx_try_link "$LINENO"; then :
30132  ac_cv_lib_dl_dlopen=yes
30133else
30134  ac_cv_lib_dl_dlopen=no
30135fi
30136rm -f core conftest.err conftest.$ac_objext \
30137    conftest$ac_exeext conftest.$ac_ext
30138LIBS=$ac_check_lib_save_LIBS
30139fi
30140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30141$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30142if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30143  cat >>confdefs.h <<_ACEOF
30144#define HAVE_LIBDL 1
30145_ACEOF
30146
30147  LIBS="-ldl $LIBS"
30148
30149fi
30150
30151LIBDL="$LIBS"
30152
30153LIBS="$save_LIBS"
30154
30155
30156
30157###############################################################################
30158#
30159# statically link libstdc++ before C++ ABI is stablized on Linux unless
30160# dynamic build is configured on command line.
30161#
30162# Check whether --enable-static-link-stdc++ was given.
30163if test "${enable_static_link_stdc__+set}" = set; then :
30164  enableval=$enable_static_link_stdc__;
30165else
30166
30167		enable_static_link_stdc__=yes
30168
30169fi
30170
30171
30172if test "x$OPENJDK_TARGET_OS" = xlinux; then
30173    # Test if -lstdc++ works.
30174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
30175$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
30176    ac_ext=cpp
30177ac_cpp='$CXXCPP $CPPFLAGS'
30178ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30179ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30180ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30181
30182    OLD_CXXFLAGS="$CXXFLAGS"
30183    CXXFLAGS="$CXXFLAGS -lstdc++"
30184    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30185/* end confdefs.h.  */
30186
30187int
30188main ()
30189{
30190return 0;
30191  ;
30192  return 0;
30193}
30194_ACEOF
30195if ac_fn_cxx_try_link "$LINENO"; then :
30196  has_dynamic_libstdcxx=yes
30197else
30198  has_dynamic_libstdcxx=no
30199fi
30200rm -f core conftest.err conftest.$ac_objext \
30201    conftest$ac_exeext conftest.$ac_ext
30202    CXXFLAGS="$OLD_CXXFLAGS"
30203    ac_ext=cpp
30204ac_cpp='$CXXCPP $CPPFLAGS'
30205ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30206ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30207ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30208
30209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
30210$as_echo "$has_dynamic_libstdcxx" >&6; }
30211
30212    # Test if stdc++ can be linked statically.
30213    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
30214$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
30215    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
30216    ac_ext=cpp
30217ac_cpp='$CXXCPP $CPPFLAGS'
30218ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30219ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30220ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30221
30222    OLD_LIBS="$LIBS"
30223    OLD_CXX="$CXX"
30224    LIBS="$STATIC_STDCXX_FLAGS"
30225    CXX="$CC"
30226    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30227/* end confdefs.h.  */
30228
30229int
30230main ()
30231{
30232return 0;
30233  ;
30234  return 0;
30235}
30236_ACEOF
30237if ac_fn_cxx_try_link "$LINENO"; then :
30238  has_static_libstdcxx=yes
30239else
30240  has_static_libstdcxx=no
30241fi
30242rm -f core conftest.err conftest.$ac_objext \
30243    conftest$ac_exeext conftest.$ac_ext
30244    LIBS="$OLD_LIBS"
30245    CXX="$OLD_CXX"
30246    ac_ext=cpp
30247ac_cpp='$CXXCPP $CPPFLAGS'
30248ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30249ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30250ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30251
30252    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
30253$as_echo "$has_static_libstdcxx" >&6; }
30254
30255    if test "x$has_static_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then
30256        as_fn_error $? "I cannot link to stdc++! Neither dynamically nor statically." "$LINENO" 5
30257    fi
30258
30259    if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then
30260        { $as_echo "$as_me:${as_lineno-$LINENO}: Static linking of libstdc++ was not possible reverting to dynamic linking." >&5
30261$as_echo "$as_me: Static linking of libstdc++ was not possible reverting to dynamic linking." >&6;}
30262        enable_static_link_stdc__=no
30263    fi
30264
30265    if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then
30266        { $as_echo "$as_me:${as_lineno-$LINENO}: Dynamic linking of libstdc++ was not possible reverting to static linking." >&5
30267$as_echo "$as_me: Dynamic linking of libstdc++ was not possible reverting to static linking." >&6;}
30268        enable_static_link_stdc__=yes
30269    fi
30270
30271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
30272$as_echo_n "checking how to link with libstdc++... " >&6; }
30273    if test "x$enable_static_link_stdc__" = xyes; then
30274        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
30275        LDCXX="$CC"
30276        STATIC_CXX_SETTING="STATIC_CXX=true"
30277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
30278$as_echo "static" >&6; }
30279    else
30280        LIBCXX="$LIBCXX -lstdc++"
30281        LDCXX="$CXX"
30282        STATIC_CXX_SETTING="STATIC_CXX=false"
30283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
30284$as_echo "dynamic" >&6; }
30285    fi
30286fi
30287
30288
30289# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
30290if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
30291    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
30292fi
30293
30294# TODO better (platform agnostic) test
30295if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
30296    LIBCXX="-lstdc++"
30297fi
30298
30299
30300
30301
30302
30303# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
30304
30305# When using cygwin or msys, we need a wrapper binary that renames
30306# /cygdrive/c/ arguments into c:/ arguments and peeks into
30307# @files and rewrites these too! This wrapper binary is
30308# called fixpath.
30309FIXPATH=
30310if test "x$OPENJDK_BUILD_OS" = xwindows; then
30311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30312$as_echo_n "checking if fixpath can be created... " >&6; }
30313    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30314    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30315    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30316      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30317      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30318      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30319      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30320    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30321      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30322      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30323
30324      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30325      # @ was chosen as separator to minimize risk of other tools messing around with it
30326      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30327      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30328
30329      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30330    fi
30331    rm -f $OUTPUT_ROOT/fixpath*
30332    cd $OUTPUT_ROOT
30333    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30334    cd $CURDIR
30335
30336    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30338$as_echo "no" >&6; }
30339        cat $OUTPUT_ROOT/fixpath1.log
30340        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30341    fi
30342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30343$as_echo "yes" >&6; }
30344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30345$as_echo_n "checking if fixpath.exe works... " >&6; }
30346    cd $OUTPUT_ROOT
30347    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30348    cd $CURDIR
30349    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30350        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30351$as_echo "no" >&6; }
30352        cat $OUTPUT_ROOT/fixpath2.log
30353        as_fn_error $? "fixpath did not work!" "$LINENO" 5
30354    fi
30355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30356$as_echo "yes" >&6; }
30357    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30358fi
30359
30360
30361
30362
30363###############################################################################
30364#
30365# We need to do some final tweaking, when everything else is done.
30366#
30367###############################################################################
30368
30369
30370HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
30371
30372
30373# The name of the Service Agent jar.
30374SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
30375if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
30376    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
30377fi
30378
30379
30380
30381
30382###############################################################################
30383#
30384# Configure parts of the build that only affect the build performance,
30385# not the result.
30386#
30387###############################################################################
30388
30389
30390# How many cores do we have on this build system?
30391
30392# Check whether --with-num-cores was given.
30393if test "${with_num_cores+set}" = set; then :
30394  withval=$with_num_cores;
30395fi
30396
30397if test "x$with_num_cores" = x; then
30398    # The number of cores were not specified, try to probe them.
30399
30400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
30401$as_echo_n "checking for number of cores... " >&6; }
30402    NUM_CORES=1
30403    FOUND_CORES=no
30404
30405    if test -f /proc/cpuinfo; then
30406        # Looks like a Linux (or cygwin) system
30407        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
30408        FOUND_CORES=yes
30409    elif test -x /usr/sbin/psrinfo; then
30410        # Looks like a Solaris system
30411        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
30412        FOUND_CORES=yes
30413    elif test -x /usr/sbin/system_profiler; then
30414        # Looks like a MacOSX system
30415        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
30416        FOUND_CORES=yes
30417    elif test -n "$NUMBER_OF_PROCESSORS"; then
30418        # On windows, look in the env
30419        NUM_CORES=$NUMBER_OF_PROCESSORS
30420        FOUND_CORES=yes
30421    fi
30422
30423    # For c/c++ code we run twice as many concurrent build
30424    # jobs than we have cores, otherwise we will stall on io.
30425    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
30426
30427    if test "x$FOUND_CORES" = xyes; then
30428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
30429$as_echo "$NUM_CORES" >&6; }
30430    else
30431        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
30432$as_echo "could not detect number of cores, defaulting to 1" >&6; }
30433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
30434$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
30435    fi
30436
30437
30438else
30439    NUM_CORES=$with_num_cores
30440    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
30441fi
30442
30443
30444
30445
30446# How much memory do we have on this build system?
30447
30448# Check whether --with-memory-size was given.
30449if test "${with_memory_size+set}" = set; then :
30450  withval=$with_memory_size;
30451fi
30452
30453if test "x$with_memory_size" = x; then
30454    # The memory size was not specified, try to probe it.
30455
30456    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
30457$as_echo_n "checking for memory size... " >&6; }
30458    # Default to 1024 MB
30459    MEMORY_SIZE=1024
30460    FOUND_MEM=no
30461
30462    if test -f /proc/meminfo; then
30463        # Looks like a Linux (or cygwin) system
30464        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
30465        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
30466        FOUND_MEM=yes
30467    elif test -x /usr/sbin/prtconf; then
30468        # Looks like a Solaris system
30469        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
30470        FOUND_MEM=yes
30471    elif test -x /usr/sbin/system_profiler; then
30472        # Looks like a MacOSX system
30473        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
30474        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
30475        FOUND_MEM=yes
30476    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
30477        # Windows, but without cygwin
30478        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
30479        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
30480        FOUND_MEM=yes
30481    fi
30482
30483    if test "x$FOUND_MEM" = xyes; then
30484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
30485$as_echo "$MEMORY_SIZE MB" >&6; }
30486    else
30487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
30488$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
30489        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
30490$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
30491    fi
30492
30493else
30494    MEMORY_SIZE=$with_memory_size
30495fi
30496
30497
30498
30499# Setup smart javac (after cores and memory have been setup)
30500
30501
30502# Check whether --with-sjavac-server-java was given.
30503if test "${with_sjavac_server_java+set}" = set; then :
30504  withval=$with_sjavac_server_java;
30505fi
30506
30507
30508if test "x$with_sjavac_server_java" != x; then
30509    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
30510    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
30511    if test "x$FOUND_VERSION" = x; then
30512        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
30513    fi
30514else
30515    SJAVAC_SERVER_JAVA=""
30516    # Hotspot specific options.
30517
30518    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
30519    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
30520    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
30521    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
30522    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30523        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
30524    fi
30525
30526    # JRockit specific options.
30527
30528    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
30529    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
30530    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
30531    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
30532    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30533        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
30534    fi
30535
30536    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
30537fi
30538
30539
30540
30541# Check whether --with-sjavac-server-cores was given.
30542if test "${with_sjavac_server_cores+set}" = set; then :
30543  withval=$with_sjavac_server_cores;
30544fi
30545
30546if test "x$with_sjavac_server_cores" != x; then
30547    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
30548else
30549    if test "$NUM_CORES" -gt 16; then
30550        # We set this arbitrary limit because we want to limit the heap
30551        # size of the javac server.
30552        # In the future we will make the javac compilers in the server
30553        # share more and more state, thus enabling us to use more and
30554        # more concurrent threads in the server.
30555        SJAVAC_SERVER_CORES="16"
30556    else
30557        SJAVAC_SERVER_CORES="$NUM_CORES"
30558    fi
30559
30560    if test "$MEMORY_SIZE" -gt "17000"; then
30561        MAX_HEAP_MEM=10000
30562
30563    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30564    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30565    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30566    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30567    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30568        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30569    fi
30570
30571
30572    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30573    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
30574    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
30575    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
30576    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30577        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
30578    fi
30579
30580    elif test "$MEMORY_SIZE" -gt "10000"; then
30581        MAX_HEAP_MEM=6000
30582
30583    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30584    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30585    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30586    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30587    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30588        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30589    fi
30590
30591
30592    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30593    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
30594    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
30595    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
30596    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30597        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
30598    fi
30599
30600    elif test "$MEMORY_SIZE" -gt "5000"; then
30601        MAX_HEAP_MEM=3000
30602
30603    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30604    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30605    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30606    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30607    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30608        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30609    fi
30610
30611
30612    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30613    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
30614    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
30615    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
30616    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30617        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
30618    fi
30619
30620    elif test "$MEMORY_SIZE" -gt "3800"; then
30621        MAX_HEAP_MEM=2500
30622
30623    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30624    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
30625    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
30626    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
30627    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30628        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
30629    fi
30630
30631    elif test "$MEMORY_SIZE" -gt "1900"; then
30632        MAX_HEAP_MEM=1200
30633
30634    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30635    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
30636    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
30637    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
30638    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30639        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
30640    fi
30641
30642    elif test "$MEMORY_SIZE" -gt "1000"; then
30643        MAX_HEAP_MEM=900
30644
30645    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30646    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
30647    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
30648    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
30649    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30650        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
30651    fi
30652
30653    else
30654        MAX_HEAP_MEM=512
30655
30656    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30657    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
30658    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
30659    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
30660    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30661        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
30662    fi
30663
30664    fi
30665
30666
30667    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30668    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
30669    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
30670    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
30671    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30672        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
30673    fi
30674
30675
30676    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30677    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
30678    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
30679    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
30680    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30681        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
30682    fi
30683
30684
30685    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30686    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
30687    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
30688    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
30689    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30690        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
30691    fi
30692
30693
30694    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
30695    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
30696        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
30697$as_echo_n "checking if number of server cores must be reduced... " >&6; }
30698        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
30699        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
30700$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
30701    fi
30702fi
30703
30704
30705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
30706$as_echo_n "checking whether to use sjavac... " >&6; }
30707# Check whether --enable-sjavac was given.
30708if test "${enable_sjavac+set}" = set; then :
30709  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
30710else
30711  ENABLE_SJAVAC='no'
30712fi
30713
30714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
30715$as_echo "$ENABLE_SJAVAC" >&6; }
30716
30717
30718if test "x$ENABLE_SJAVAC" = xyes; then
30719    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
30720else
30721    SJAVAC_SERVER_DIR=
30722fi
30723
30724
30725
30726
30727# Can the C/C++ compiler use precompiled headers?
30728
30729
30730###############################################################################
30731#
30732# Can the C/C++ compiler use precompiled headers?
30733#
30734# Check whether --enable-precompiled-headers was given.
30735if test "${enable_precompiled_headers+set}" = set; then :
30736  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled-headers}
30737else
30738  ENABLE_PRECOMPH=yes
30739fi
30740
30741
30742USE_PRECOMPILED_HEADER=1
30743if test "x$ENABLE_PRECOMPH" = xno; then
30744    USE_PRECOMPILED_HEADER=0
30745fi
30746
30747if test "x$ENABLE_PRECOMPH" = xyes; then
30748    # Check that the compiler actually supports precomp headers.
30749    if test "x$GCC" = xyes; then
30750         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
30751$as_echo_n "checking that precompiled headers work... " >&6; }
30752         echo "int alfa();" > conftest.h
30753         $CXX -x c++-header conftest.h -o conftest.hpp.gch
30754         if test ! -f conftest.hpp.gch; then
30755             echo Precompiled header is not working!
30756             USE_PRECOMPILED_HEADER=0
30757             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30758$as_echo "no" >&6; }
30759         else
30760             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30761$as_echo "yes" >&6; }
30762         fi
30763         rm -f conftest.h
30764    fi
30765fi
30766
30767
30768
30769
30770# Setup use of ccache, if available
30771
30772    # Check whether --enable-ccache was given.
30773if test "${enable_ccache+set}" = set; then :
30774  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
30775else
30776  ENABLE_CCACHE=yes
30777fi
30778
30779    if test "x$ENABLE_CCACHE" = xyes; then
30780        # Extract the first word of "ccache", so it can be a program name with args.
30781set dummy ccache; ac_word=$2
30782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30783$as_echo_n "checking for $ac_word... " >&6; }
30784if test "${ac_cv_path_CCACHE+set}" = set; then :
30785  $as_echo_n "(cached) " >&6
30786else
30787  case $CCACHE in
30788  [\\/]* | ?:[\\/]*)
30789  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
30790  ;;
30791  *)
30792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30793for as_dir in $PATH
30794do
30795  IFS=$as_save_IFS
30796  test -z "$as_dir" && as_dir=.
30797    for ac_exec_ext in '' $ac_executable_extensions; do
30798  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
30799    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
30800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30801    break 2
30802  fi
30803done
30804  done
30805IFS=$as_save_IFS
30806
30807  ;;
30808esac
30809fi
30810CCACHE=$ac_cv_path_CCACHE
30811if test -n "$CCACHE"; then
30812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
30813$as_echo "$CCACHE" >&6; }
30814else
30815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30816$as_echo "no" >&6; }
30817fi
30818
30819
30820    else
30821        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
30822$as_echo_n "checking for ccache... " >&6; }
30823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
30824$as_echo "explicitly disabled" >&6; }
30825        CCACHE=
30826    fi
30827
30828
30829
30830# Check whether --with-ccache-dir was given.
30831if test "${with_ccache_dir+set}" = set; then :
30832  withval=$with_ccache_dir;
30833fi
30834
30835
30836    if test "x$with_ccache_dir" != x; then
30837        # When using a non home ccache directory, assume the use is to share ccache files
30838        # with other users. Thus change the umask.
30839        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
30840    fi
30841    CCACHE_FOUND=""
30842    if test "x$CCACHE" != x; then
30843
30844    if test "x$CCACHE" != x; then
30845        CCACHE_FOUND="true"
30846        # Only use ccache if it is 3.1.4 or later, which supports
30847        # precompiled headers.
30848        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
30849$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
30850        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
30851        if test "x$HAS_GOOD_CCACHE" = x; then
30852            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
30853$as_echo "no, disabling ccache" >&6; }
30854            CCACHE=
30855        else
30856            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30857$as_echo "yes" >&6; }
30858            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
30859$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
30860            PUSHED_FLAGS="$CXXFLAGS"
30861            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
30862            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30863/* end confdefs.h.  */
30864
30865int
30866main ()
30867{
30868
30869  ;
30870  return 0;
30871}
30872_ACEOF
30873if ac_fn_cxx_try_compile "$LINENO"; then :
30874  CC_KNOWS_CCACHE_TRICK=yes
30875else
30876  CC_KNOWS_CCACHE_TRICK=no
30877fi
30878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30879            CXXFLAGS="$PUSHED_FLAGS"
30880            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
30881                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30882$as_echo "yes" >&6; }
30883            else
30884                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
30885$as_echo "no, disabling ccaching of precompiled headers" >&6; }
30886                CCACHE=
30887            fi
30888        fi
30889    fi
30890
30891    if test "x$CCACHE" != x; then
30892        CCACHE_SLOPPINESS=time_macros
30893        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
30894        CCACHE_FLAGS=-fpch-preprocess
30895
30896        if test "x$SET_CCACHE_DIR" != x; then
30897            mkdir -p $CCACHE_DIR > /dev/null 2>&1
30898	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
30899        fi
30900    fi
30901
30902    fi
30903
30904
30905###############################################################################
30906#
30907# And now the finish...
30908#
30909###############################################################################
30910
30911# Check for some common pitfalls
30912
30913
30914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
30915$as_echo_n "checking if build directory is on local disk... " >&6; }
30916
30917	# df -l lists only local disks; if the given directory is not found then
30918	# a non-zero exit code is given
30919  if test "x$DF" = x; then
30920    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30921      # msys does not have df; use Windows "net use" instead.
30922      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
30923      if test "x$IS_NETWORK_DISK" = x; then
30924        OUTPUT_DIR_IS_LOCAL="yes"
30925      else
30926        OUTPUT_DIR_IS_LOCAL="no"
30927      fi
30928    else
30929      # No df here, say it's local
30930      OUTPUT_DIR_IS_LOCAL="yes"
30931    fi
30932  else
30933    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
30934      OUTPUT_DIR_IS_LOCAL="yes"
30935    else
30936      OUTPUT_DIR_IS_LOCAL="no"
30937    fi
30938  fi
30939
30940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
30941$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
30942
30943# Check if the user has any old-style ALT_ variables set.
30944FOUND_ALT_VARIABLES=`env | grep ^ALT_`
30945
30946# Before generating output files, test if they exist. If they do, this is a reconfigure.
30947# Since we can't properly handle the dependencies for this, warn the user about the situation
30948if test -e $OUTPUT_ROOT/spec.gmk; then
30949  IS_RECONFIGURE=yes
30950else
30951  IS_RECONFIGURE=no
30952fi
30953
30954if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
30955  HIDE_PERFORMANCE_HINTS=yes
30956else
30957  HIDE_PERFORMANCE_HINTS=no
30958  # Hide it the next time around...
30959  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
30960fi
30961
30962
30963
30964# At the end, call the custom hook. (Dummy macro if no custom sources available)
30965
30966
30967# We're messing a bit with internal autoconf variables to put the config.status
30968# in the output directory instead of the current directory.
30969CONFIG_STATUS="$OUTPUT_ROOT/config.status"
30970# Create the actual output files. Now the main work of configure is done.
30971cat >confcache <<\_ACEOF
30972# This file is a shell script that caches the results of configure
30973# tests run on this system so they can be shared between configure
30974# scripts and configure runs, see configure's option --config-cache.
30975# It is not useful on other systems.  If it contains results you don't
30976# want to keep, you may remove or edit it.
30977#
30978# config.status only pays attention to the cache file if you give it
30979# the --recheck option to rerun configure.
30980#
30981# `ac_cv_env_foo' variables (set or unset) will be overridden when
30982# loading this file, other *unset* `ac_cv_foo' will be assigned the
30983# following values.
30984
30985_ACEOF
30986
30987# The following way of writing the cache mishandles newlines in values,
30988# but we know of no workaround that is simple, portable, and efficient.
30989# So, we kill variables containing newlines.
30990# Ultrix sh set writes to stderr and can't be redirected directly,
30991# and sets the high bit in the cache file unless we assign to the vars.
30992(
30993  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
30994    eval ac_val=\$$ac_var
30995    case $ac_val in #(
30996    *${as_nl}*)
30997      case $ac_var in #(
30998      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
30999$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31000      esac
31001      case $ac_var in #(
31002      _ | IFS | as_nl) ;; #(
31003      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31004      *) { eval $ac_var=; unset $ac_var;} ;;
31005      esac ;;
31006    esac
31007  done
31008
31009  (set) 2>&1 |
31010    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31011    *${as_nl}ac_space=\ *)
31012      # `set' does not quote correctly, so add quotes: double-quote
31013      # substitution turns \\\\ into \\, and sed turns \\ into \.
31014      sed -n \
31015	"s/'/'\\\\''/g;
31016	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31017      ;; #(
31018    *)
31019      # `set' quotes correctly as required by POSIX, so do not add quotes.
31020      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31021      ;;
31022    esac |
31023    sort
31024) |
31025  sed '
31026     /^ac_cv_env_/b end
31027     t clear
31028     :clear
31029     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31030     t end
31031     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31032     :end' >>confcache
31033if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31034  if test -w "$cache_file"; then
31035    test "x$cache_file" != "x/dev/null" &&
31036      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31037$as_echo "$as_me: updating cache $cache_file" >&6;}
31038    cat confcache >$cache_file
31039  else
31040    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31041$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31042  fi
31043fi
31044rm -f confcache
31045
31046test "x$prefix" = xNONE && prefix=$ac_default_prefix
31047# Let make expand exec_prefix.
31048test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31049
31050DEFS=-DHAVE_CONFIG_H
31051
31052ac_libobjs=
31053ac_ltlibobjs=
31054U=
31055for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31056  # 1. Remove the extension, and $U if already installed.
31057  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31058  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31059  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31060  #    will be set to the directory where LIBOBJS objects are built.
31061  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31062  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31063done
31064LIBOBJS=$ac_libobjs
31065
31066LTLIBOBJS=$ac_ltlibobjs
31067
31068
31069
31070: ${CONFIG_STATUS=./config.status}
31071ac_write_fail=0
31072ac_clean_files_save=$ac_clean_files
31073ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31074{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31075$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31076as_write_fail=0
31077cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31078#! $SHELL
31079# Generated by $as_me.
31080# Run this file to recreate the current configuration.
31081# Compiler output produced by configure, useful for debugging
31082# configure, is in config.log if it exists.
31083
31084debug=false
31085ac_cs_recheck=false
31086ac_cs_silent=false
31087
31088SHELL=\${CONFIG_SHELL-$SHELL}
31089export SHELL
31090_ASEOF
31091cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31092## -------------------- ##
31093## M4sh Initialization. ##
31094## -------------------- ##
31095
31096# Be more Bourne compatible
31097DUALCASE=1; export DUALCASE # for MKS sh
31098if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31099  emulate sh
31100  NULLCMD=:
31101  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31102  # is contrary to our usage.  Disable this feature.
31103  alias -g '${1+"$@"}'='"$@"'
31104  setopt NO_GLOB_SUBST
31105else
31106  case `(set -o) 2>/dev/null` in #(
31107  *posix*) :
31108    set -o posix ;; #(
31109  *) :
31110     ;;
31111esac
31112fi
31113
31114
31115as_nl='
31116'
31117export as_nl
31118# Printing a long string crashes Solaris 7 /usr/bin/printf.
31119as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31120as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31121as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31122# Prefer a ksh shell builtin over an external printf program on Solaris,
31123# but without wasting forks for bash or zsh.
31124if test -z "$BASH_VERSION$ZSH_VERSION" \
31125    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31126  as_echo='print -r --'
31127  as_echo_n='print -rn --'
31128elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31129  as_echo='printf %s\n'
31130  as_echo_n='printf %s'
31131else
31132  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31133    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31134    as_echo_n='/usr/ucb/echo -n'
31135  else
31136    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31137    as_echo_n_body='eval
31138      arg=$1;
31139      case $arg in #(
31140      *"$as_nl"*)
31141	expr "X$arg" : "X\\(.*\\)$as_nl";
31142	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31143      esac;
31144      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31145    '
31146    export as_echo_n_body
31147    as_echo_n='sh -c $as_echo_n_body as_echo'
31148  fi
31149  export as_echo_body
31150  as_echo='sh -c $as_echo_body as_echo'
31151fi
31152
31153# The user is always right.
31154if test "${PATH_SEPARATOR+set}" != set; then
31155  PATH_SEPARATOR=:
31156  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31157    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31158      PATH_SEPARATOR=';'
31159  }
31160fi
31161
31162
31163# IFS
31164# We need space, tab and new line, in precisely that order.  Quoting is
31165# there to prevent editors from complaining about space-tab.
31166# (If _AS_PATH_WALK were called with IFS unset, it would disable word
31167# splitting by setting IFS to empty value.)
31168IFS=" ""	$as_nl"
31169
31170# Find who we are.  Look in the path if we contain no directory separator.
31171case $0 in #((
31172  *[\\/]* ) as_myself=$0 ;;
31173  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31174for as_dir in $PATH
31175do
31176  IFS=$as_save_IFS
31177  test -z "$as_dir" && as_dir=.
31178    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
31179  done
31180IFS=$as_save_IFS
31181
31182     ;;
31183esac
31184# We did not find ourselves, most probably we were run as `sh COMMAND'
31185# in which case we are not to be found in the path.
31186if test "x$as_myself" = x; then
31187  as_myself=$0
31188fi
31189if test ! -f "$as_myself"; then
31190  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
31191  exit 1
31192fi
31193
31194# Unset variables that we do not need and which cause bugs (e.g. in
31195# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
31196# suppresses any "Segmentation fault" message there.  '((' could
31197# trigger a bug in pdksh 5.2.14.
31198for as_var in BASH_ENV ENV MAIL MAILPATH
31199do eval test x\${$as_var+set} = xset \
31200  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
31201done
31202PS1='$ '
31203PS2='> '
31204PS4='+ '
31205
31206# NLS nuisances.
31207LC_ALL=C
31208export LC_ALL
31209LANGUAGE=C
31210export LANGUAGE
31211
31212# CDPATH.
31213(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31214
31215
31216# as_fn_error STATUS ERROR [LINENO LOG_FD]
31217# ----------------------------------------
31218# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
31219# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
31220# script with STATUS, using 1 if that was 0.
31221as_fn_error ()
31222{
31223  as_status=$1; test $as_status -eq 0 && as_status=1
31224  if test "$4"; then
31225    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
31226    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
31227  fi
31228  $as_echo "$as_me: error: $2" >&2
31229  as_fn_exit $as_status
31230} # as_fn_error
31231
31232
31233# as_fn_set_status STATUS
31234# -----------------------
31235# Set $? to STATUS, without forking.
31236as_fn_set_status ()
31237{
31238  return $1
31239} # as_fn_set_status
31240
31241# as_fn_exit STATUS
31242# -----------------
31243# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
31244as_fn_exit ()
31245{
31246  set +e
31247  as_fn_set_status $1
31248  exit $1
31249} # as_fn_exit
31250
31251# as_fn_unset VAR
31252# ---------------
31253# Portably unset VAR.
31254as_fn_unset ()
31255{
31256  { eval $1=; unset $1;}
31257}
31258as_unset=as_fn_unset
31259# as_fn_append VAR VALUE
31260# ----------------------
31261# Append the text in VALUE to the end of the definition contained in VAR. Take
31262# advantage of any shell optimizations that allow amortized linear growth over
31263# repeated appends, instead of the typical quadratic growth present in naive
31264# implementations.
31265if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
31266  eval 'as_fn_append ()
31267  {
31268    eval $1+=\$2
31269  }'
31270else
31271  as_fn_append ()
31272  {
31273    eval $1=\$$1\$2
31274  }
31275fi # as_fn_append
31276
31277# as_fn_arith ARG...
31278# ------------------
31279# Perform arithmetic evaluation on the ARGs, and store the result in the
31280# global $as_val. Take advantage of shells that can avoid forks. The arguments
31281# must be portable across $(()) and expr.
31282if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
31283  eval 'as_fn_arith ()
31284  {
31285    as_val=$(( $* ))
31286  }'
31287else
31288  as_fn_arith ()
31289  {
31290    as_val=`expr "$@" || test $? -eq 1`
31291  }
31292fi # as_fn_arith
31293
31294
31295if expr a : '\(a\)' >/dev/null 2>&1 &&
31296   test "X`expr 00001 : '.*\(...\)'`" = X001; then
31297  as_expr=expr
31298else
31299  as_expr=false
31300fi
31301
31302if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
31303  as_basename=basename
31304else
31305  as_basename=false
31306fi
31307
31308if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
31309  as_dirname=dirname
31310else
31311  as_dirname=false
31312fi
31313
31314as_me=`$as_basename -- "$0" ||
31315$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31316	 X"$0" : 'X\(//\)$' \| \
31317	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31318$as_echo X/"$0" |
31319    sed '/^.*\/\([^/][^/]*\)\/*$/{
31320	    s//\1/
31321	    q
31322	  }
31323	  /^X\/\(\/\/\)$/{
31324	    s//\1/
31325	    q
31326	  }
31327	  /^X\/\(\/\).*/{
31328	    s//\1/
31329	    q
31330	  }
31331	  s/.*/./; q'`
31332
31333# Avoid depending upon Character Ranges.
31334as_cr_letters='abcdefghijklmnopqrstuvwxyz'
31335as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
31336as_cr_Letters=$as_cr_letters$as_cr_LETTERS
31337as_cr_digits='0123456789'
31338as_cr_alnum=$as_cr_Letters$as_cr_digits
31339
31340ECHO_C= ECHO_N= ECHO_T=
31341case `echo -n x` in #(((((
31342-n*)
31343  case `echo 'xy\c'` in
31344  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
31345  xy)  ECHO_C='\c';;
31346  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
31347       ECHO_T='	';;
31348  esac;;
31349*)
31350  ECHO_N='-n';;
31351esac
31352
31353rm -f conf$$ conf$$.exe conf$$.file
31354if test -d conf$$.dir; then
31355  rm -f conf$$.dir/conf$$.file
31356else
31357  rm -f conf$$.dir
31358  mkdir conf$$.dir 2>/dev/null
31359fi
31360if (echo >conf$$.file) 2>/dev/null; then
31361  if ln -s conf$$.file conf$$ 2>/dev/null; then
31362    as_ln_s='ln -s'
31363    # ... but there are two gotchas:
31364    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
31365    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
31366    # In both cases, we have to default to `cp -p'.
31367    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
31368      as_ln_s='cp -p'
31369  elif ln conf$$.file conf$$ 2>/dev/null; then
31370    as_ln_s=ln
31371  else
31372    as_ln_s='cp -p'
31373  fi
31374else
31375  as_ln_s='cp -p'
31376fi
31377rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
31378rmdir conf$$.dir 2>/dev/null
31379
31380
31381# as_fn_mkdir_p
31382# -------------
31383# Create "$as_dir" as a directory, including parents if necessary.
31384as_fn_mkdir_p ()
31385{
31386
31387  case $as_dir in #(
31388  -*) as_dir=./$as_dir;;
31389  esac
31390  test -d "$as_dir" || eval $as_mkdir_p || {
31391    as_dirs=
31392    while :; do
31393      case $as_dir in #(
31394      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
31395      *) as_qdir=$as_dir;;
31396      esac
31397      as_dirs="'$as_qdir' $as_dirs"
31398      as_dir=`$as_dirname -- "$as_dir" ||
31399$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31400	 X"$as_dir" : 'X\(//\)[^/]' \| \
31401	 X"$as_dir" : 'X\(//\)$' \| \
31402	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31403$as_echo X"$as_dir" |
31404    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31405	    s//\1/
31406	    q
31407	  }
31408	  /^X\(\/\/\)[^/].*/{
31409	    s//\1/
31410	    q
31411	  }
31412	  /^X\(\/\/\)$/{
31413	    s//\1/
31414	    q
31415	  }
31416	  /^X\(\/\).*/{
31417	    s//\1/
31418	    q
31419	  }
31420	  s/.*/./; q'`
31421      test -d "$as_dir" && break
31422    done
31423    test -z "$as_dirs" || eval "mkdir $as_dirs"
31424  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
31425
31426
31427} # as_fn_mkdir_p
31428if mkdir -p . 2>/dev/null; then
31429  as_mkdir_p='mkdir -p "$as_dir"'
31430else
31431  test -d ./-p && rmdir ./-p
31432  as_mkdir_p=false
31433fi
31434
31435if test -x / >/dev/null 2>&1; then
31436  as_test_x='test -x'
31437else
31438  if ls -dL / >/dev/null 2>&1; then
31439    as_ls_L_option=L
31440  else
31441    as_ls_L_option=
31442  fi
31443  as_test_x='
31444    eval sh -c '\''
31445      if test -d "$1"; then
31446	test -d "$1/.";
31447      else
31448	case $1 in #(
31449	-*)set "./$1";;
31450	esac;
31451	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
31452	???[sx]*):;;*)false;;esac;fi
31453    '\'' sh
31454  '
31455fi
31456as_executable_p=$as_test_x
31457
31458# Sed expression to map a string onto a valid CPP name.
31459as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
31460
31461# Sed expression to map a string onto a valid variable name.
31462as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
31463
31464
31465exec 6>&1
31466## ----------------------------------- ##
31467## Main body of $CONFIG_STATUS script. ##
31468## ----------------------------------- ##
31469_ASEOF
31470test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
31471
31472cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31473# Save the log message, to keep $0 and so on meaningful, and to
31474# report actual input values of CONFIG_FILES etc. instead of their
31475# values after options handling.
31476ac_log="
31477This file was extended by OpenJDK $as_me jdk8, which was
31478generated by GNU Autoconf 2.67.  Invocation command line was
31479
31480  CONFIG_FILES    = $CONFIG_FILES
31481  CONFIG_HEADERS  = $CONFIG_HEADERS
31482  CONFIG_LINKS    = $CONFIG_LINKS
31483  CONFIG_COMMANDS = $CONFIG_COMMANDS
31484  $ $0 $@
31485
31486on `(hostname || uname -n) 2>/dev/null | sed 1q`
31487"
31488
31489_ACEOF
31490
31491case $ac_config_files in *"
31492"*) set x $ac_config_files; shift; ac_config_files=$*;;
31493esac
31494
31495case $ac_config_headers in *"
31496"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
31497esac
31498
31499
31500cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31501# Files that config.status was made for.
31502config_files="$ac_config_files"
31503config_headers="$ac_config_headers"
31504
31505_ACEOF
31506
31507cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31508ac_cs_usage="\
31509\`$as_me' instantiates files and other configuration actions
31510from templates according to the current configuration.  Unless the files
31511and actions are specified as TAGs, all are instantiated by default.
31512
31513Usage: $0 [OPTION]... [TAG]...
31514
31515  -h, --help       print this help, then exit
31516  -V, --version    print version number and configuration settings, then exit
31517      --config     print configuration, then exit
31518  -q, --quiet, --silent
31519                   do not print progress messages
31520  -d, --debug      don't remove temporary files
31521      --recheck    update $as_me by reconfiguring in the same conditions
31522      --file=FILE[:TEMPLATE]
31523                   instantiate the configuration file FILE
31524      --header=FILE[:TEMPLATE]
31525                   instantiate the configuration header FILE
31526
31527Configuration files:
31528$config_files
31529
31530Configuration headers:
31531$config_headers
31532
31533Report bugs to <build-dev@openjdk.java.net>.
31534OpenJDK home page: <http://openjdk.java.net>."
31535
31536_ACEOF
31537cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31538ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31539ac_cs_version="\\
31540OpenJDK config.status jdk8
31541configured by $0, generated by GNU Autoconf 2.67,
31542  with options \\"\$ac_cs_config\\"
31543
31544Copyright (C) 2010 Free Software Foundation, Inc.
31545This config.status script is free software; the Free Software Foundation
31546gives unlimited permission to copy, distribute and modify it."
31547
31548ac_pwd='$ac_pwd'
31549srcdir='$srcdir'
31550AWK='$AWK'
31551test -n "\$AWK" || AWK=awk
31552_ACEOF
31553
31554cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31555# The default lists apply if the user does not specify any file.
31556ac_need_defaults=:
31557while test $# != 0
31558do
31559  case $1 in
31560  --*=?*)
31561    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31562    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31563    ac_shift=:
31564    ;;
31565  --*=)
31566    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31567    ac_optarg=
31568    ac_shift=:
31569    ;;
31570  *)
31571    ac_option=$1
31572    ac_optarg=$2
31573    ac_shift=shift
31574    ;;
31575  esac
31576
31577  case $ac_option in
31578  # Handling of the options.
31579  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31580    ac_cs_recheck=: ;;
31581  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31582    $as_echo "$ac_cs_version"; exit ;;
31583  --config | --confi | --conf | --con | --co | --c )
31584    $as_echo "$ac_cs_config"; exit ;;
31585  --debug | --debu | --deb | --de | --d | -d )
31586    debug=: ;;
31587  --file | --fil | --fi | --f )
31588    $ac_shift
31589    case $ac_optarg in
31590    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31591    '') as_fn_error $? "missing file argument" ;;
31592    esac
31593    as_fn_append CONFIG_FILES " '$ac_optarg'"
31594    ac_need_defaults=false;;
31595  --header | --heade | --head | --hea )
31596    $ac_shift
31597    case $ac_optarg in
31598    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31599    esac
31600    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31601    ac_need_defaults=false;;
31602  --he | --h)
31603    # Conflict between --help and --header
31604    as_fn_error $? "ambiguous option: \`$1'
31605Try \`$0 --help' for more information.";;
31606  --help | --hel | -h )
31607    $as_echo "$ac_cs_usage"; exit ;;
31608  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31609  | -silent | --silent | --silen | --sile | --sil | --si | --s)
31610    ac_cs_silent=: ;;
31611
31612  # This is an error.
31613  -*) as_fn_error $? "unrecognized option: \`$1'
31614Try \`$0 --help' for more information." ;;
31615
31616  *) as_fn_append ac_config_targets " $1"
31617     ac_need_defaults=false ;;
31618
31619  esac
31620  shift
31621done
31622
31623ac_configure_extra_args=
31624
31625if $ac_cs_silent; then
31626  exec 6>/dev/null
31627  ac_configure_extra_args="$ac_configure_extra_args --silent"
31628fi
31629
31630_ACEOF
31631cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31632if \$ac_cs_recheck; then
31633  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31634  shift
31635  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
31636  CONFIG_SHELL='$SHELL'
31637  export CONFIG_SHELL
31638  exec "\$@"
31639fi
31640
31641_ACEOF
31642cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31643exec 5>>config.log
31644{
31645  echo
31646  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31647## Running $as_me. ##
31648_ASBOX
31649  $as_echo "$ac_log"
31650} >&5
31651
31652_ACEOF
31653cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31654_ACEOF
31655
31656cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31657
31658# Handling of arguments.
31659for ac_config_target in $ac_config_targets
31660do
31661  case $ac_config_target in
31662    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
31663    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
31664    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
31665    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
31666    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
31667    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
31668    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
31669
31670  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
31671  esac
31672done
31673
31674
31675# If the user did not use the arguments to specify the items to instantiate,
31676# then the envvar interface is used.  Set only those that are not.
31677# We use the long form for the default assignment because of an extremely
31678# bizarre bug on SunOS 4.1.3.
31679if $ac_need_defaults; then
31680  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
31681  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
31682fi
31683
31684# Have a temporary directory for convenience.  Make it in the build tree
31685# simply because there is no reason against having it here, and in addition,
31686# creating and moving files from /tmp can sometimes cause problems.
31687# Hook for its removal unless debugging.
31688# Note that there is a small window in which the directory will not be cleaned:
31689# after its creation but before its name has been assigned to `$tmp'.
31690$debug ||
31691{
31692  tmp=
31693  trap 'exit_status=$?
31694  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
31695' 0
31696  trap 'as_fn_exit 1' 1 2 13 15
31697}
31698# Create a (secure) tmp directory for tmp files.
31699
31700{
31701  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31702  test -n "$tmp" && test -d "$tmp"
31703}  ||
31704{
31705  tmp=./conf$$-$RANDOM
31706  (umask 077 && mkdir "$tmp")
31707} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31708
31709# Set up the scripts for CONFIG_FILES section.
31710# No need to generate them if there are no CONFIG_FILES.
31711# This happens for instance with `./config.status config.h'.
31712if test -n "$CONFIG_FILES"; then
31713
31714
31715ac_cr=`echo X | tr X '\015'`
31716# On cygwin, bash can eat \r inside `` if the user requested igncr.
31717# But we know of no other shell where ac_cr would be empty at this
31718# point, so we can use a bashism as a fallback.
31719if test "x$ac_cr" = x; then
31720  eval ac_cr=\$\'\\r\'
31721fi
31722ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31723if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31724  ac_cs_awk_cr='\\r'
31725else
31726  ac_cs_awk_cr=$ac_cr
31727fi
31728
31729echo 'BEGIN {' >"$tmp/subs1.awk" &&
31730_ACEOF
31731
31732
31733{
31734  echo "cat >conf$$subs.awk <<_ACEOF" &&
31735  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31736  echo "_ACEOF"
31737} >conf$$subs.sh ||
31738  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31739ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
31740ac_delim='%!_!# '
31741for ac_last_try in false false false false false :; do
31742  . ./conf$$subs.sh ||
31743    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31744
31745  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31746  if test $ac_delim_n = $ac_delim_num; then
31747    break
31748  elif $ac_last_try; then
31749    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31750  else
31751    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31752  fi
31753done
31754rm -f conf$$subs.sh
31755
31756cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31757cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
31758_ACEOF
31759sed -n '
31760h
31761s/^/S["/; s/!.*/"]=/
31762p
31763g
31764s/^[^!]*!//
31765:repl
31766t repl
31767s/'"$ac_delim"'$//
31768t delim
31769:nl
31770h
31771s/\(.\{148\}\)..*/\1/
31772t more1
31773s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31774p
31775n
31776b repl
31777:more1
31778s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31779p
31780g
31781s/.\{148\}//
31782t nl
31783:delim
31784h
31785s/\(.\{148\}\)..*/\1/
31786t more2
31787s/["\\]/\\&/g; s/^/"/; s/$/"/
31788p
31789b
31790:more2
31791s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31792p
31793g
31794s/.\{148\}//
31795t delim
31796' <conf$$subs.awk | sed '
31797/^[^""]/{
31798  N
31799  s/\n//
31800}
31801' >>$CONFIG_STATUS || ac_write_fail=1
31802rm -f conf$$subs.awk
31803cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31804_ACAWK
31805cat >>"\$tmp/subs1.awk" <<_ACAWK &&
31806  for (key in S) S_is_set[key] = 1
31807  FS = ""
31808
31809}
31810{
31811  line = $ 0
31812  nfields = split(line, field, "@")
31813  substed = 0
31814  len = length(field[1])
31815  for (i = 2; i < nfields; i++) {
31816    key = field[i]
31817    keylen = length(key)
31818    if (S_is_set[key]) {
31819      value = S[key]
31820      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31821      len += length(value) + length(field[++i])
31822      substed = 1
31823    } else
31824      len += 1 + keylen
31825  }
31826
31827  print line
31828}
31829
31830_ACAWK
31831_ACEOF
31832cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31833if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31834  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31835else
31836  cat
31837fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
31838  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
31839_ACEOF
31840
31841# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
31842# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
31843# trailing colons and then remove the whole line if VPATH becomes empty
31844# (actually we leave an empty line to preserve line numbers).
31845if test "x$srcdir" = x.; then
31846  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
31847h
31848s///
31849s/^/:/
31850s/[	 ]*$/:/
31851s/:\$(srcdir):/:/g
31852s/:\${srcdir}:/:/g
31853s/:@srcdir@:/:/g
31854s/^:*//
31855s/:*$//
31856x
31857s/\(=[	 ]*\).*/\1/
31858G
31859s/\n//
31860s/^[^=]*=[	 ]*$//
31861}'
31862fi
31863
31864cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31865fi # test -n "$CONFIG_FILES"
31866
31867# Set up the scripts for CONFIG_HEADERS section.
31868# No need to generate them if there are no CONFIG_HEADERS.
31869# This happens for instance with `./config.status Makefile'.
31870if test -n "$CONFIG_HEADERS"; then
31871cat >"$tmp/defines.awk" <<\_ACAWK ||
31872BEGIN {
31873_ACEOF
31874
31875# Transform confdefs.h into an awk script `defines.awk', embedded as
31876# here-document in config.status, that substitutes the proper values into
31877# config.h.in to produce config.h.
31878
31879# Create a delimiter string that does not exist in confdefs.h, to ease
31880# handling of long lines.
31881ac_delim='%!_!# '
31882for ac_last_try in false false :; do
31883  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
31884  if test -z "$ac_t"; then
31885    break
31886  elif $ac_last_try; then
31887    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
31888  else
31889    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31890  fi
31891done
31892
31893# For the awk script, D is an array of macro values keyed by name,
31894# likewise P contains macro parameters if any.  Preserve backslash
31895# newline sequences.
31896
31897ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31898sed -n '
31899s/.\{148\}/&'"$ac_delim"'/g
31900t rset
31901:rset
31902s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
31903t def
31904d
31905:def
31906s/\\$//
31907t bsnl
31908s/["\\]/\\&/g
31909s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
31910D["\1"]=" \3"/p
31911s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
31912d
31913:bsnl
31914s/["\\]/\\&/g
31915s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
31916D["\1"]=" \3\\\\\\n"\\/p
31917t cont
31918s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
31919t cont
31920d
31921:cont
31922n
31923s/.\{148\}/&'"$ac_delim"'/g
31924t clear
31925:clear
31926s/\\$//
31927t bsnlc
31928s/["\\]/\\&/g; s/^/"/; s/$/"/p
31929d
31930:bsnlc
31931s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
31932b cont
31933' <confdefs.h | sed '
31934s/'"$ac_delim"'/"\\\
31935"/g' >>$CONFIG_STATUS || ac_write_fail=1
31936
31937cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31938  for (key in D) D_is_set[key] = 1
31939  FS = ""
31940}
31941/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
31942  line = \$ 0
31943  split(line, arg, " ")
31944  if (arg[1] == "#") {
31945    defundef = arg[2]
31946    mac1 = arg[3]
31947  } else {
31948    defundef = substr(arg[1], 2)
31949    mac1 = arg[2]
31950  }
31951  split(mac1, mac2, "(") #)
31952  macro = mac2[1]
31953  prefix = substr(line, 1, index(line, defundef) - 1)
31954  if (D_is_set[macro]) {
31955    # Preserve the white space surrounding the "#".
31956    print prefix "define", macro P[macro] D[macro]
31957    next
31958  } else {
31959    # Replace #undef with comments.  This is necessary, for example,
31960    # in the case of _POSIX_SOURCE, which is predefined and required
31961    # on some systems where configure will not decide to define it.
31962    if (defundef == "undef") {
31963      print "/*", prefix defundef, macro, "*/"
31964      next
31965    }
31966  }
31967}
31968{ print }
31969_ACAWK
31970_ACEOF
31971cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31972  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
31973fi # test -n "$CONFIG_HEADERS"
31974
31975
31976eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
31977shift
31978for ac_tag
31979do
31980  case $ac_tag in
31981  :[FHLC]) ac_mode=$ac_tag; continue;;
31982  esac
31983  case $ac_mode$ac_tag in
31984  :[FHL]*:*);;
31985  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
31986  :[FH]-) ac_tag=-:-;;
31987  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
31988  esac
31989  ac_save_IFS=$IFS
31990  IFS=:
31991  set x $ac_tag
31992  IFS=$ac_save_IFS
31993  shift
31994  ac_file=$1
31995  shift
31996
31997  case $ac_mode in
31998  :L) ac_source=$1;;
31999  :[FH])
32000    ac_file_inputs=
32001    for ac_f
32002    do
32003      case $ac_f in
32004      -) ac_f="$tmp/stdin";;
32005      *) # Look for the file first in the build tree, then in the source tree
32006	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32007	 # because $ac_f cannot contain `:'.
32008	 test -f "$ac_f" ||
32009	   case $ac_f in
32010	   [\\/$]*) false;;
32011	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32012	   esac ||
32013	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32014      esac
32015      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32016      as_fn_append ac_file_inputs " '$ac_f'"
32017    done
32018
32019    # Let's still pretend it is `configure' which instantiates (i.e., don't
32020    # use $as_me), people would be surprised to read:
32021    #    /* config.h.  Generated by config.status.  */
32022    configure_input='Generated from '`
32023	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32024	`' by configure.'
32025    if test x"$ac_file" != x-; then
32026      configure_input="$ac_file.  $configure_input"
32027      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32028$as_echo "$as_me: creating $ac_file" >&6;}
32029    fi
32030    # Neutralize special characters interpreted by sed in replacement strings.
32031    case $configure_input in #(
32032    *\&* | *\|* | *\\* )
32033       ac_sed_conf_input=`$as_echo "$configure_input" |
32034       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32035    *) ac_sed_conf_input=$configure_input;;
32036    esac
32037
32038    case $ac_tag in
32039    *:-:* | *:-) cat >"$tmp/stdin" \
32040      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32041    esac
32042    ;;
32043  esac
32044
32045  ac_dir=`$as_dirname -- "$ac_file" ||
32046$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32047	 X"$ac_file" : 'X\(//\)[^/]' \| \
32048	 X"$ac_file" : 'X\(//\)$' \| \
32049	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32050$as_echo X"$ac_file" |
32051    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32052	    s//\1/
32053	    q
32054	  }
32055	  /^X\(\/\/\)[^/].*/{
32056	    s//\1/
32057	    q
32058	  }
32059	  /^X\(\/\/\)$/{
32060	    s//\1/
32061	    q
32062	  }
32063	  /^X\(\/\).*/{
32064	    s//\1/
32065	    q
32066	  }
32067	  s/.*/./; q'`
32068  as_dir="$ac_dir"; as_fn_mkdir_p
32069  ac_builddir=.
32070
32071case "$ac_dir" in
32072.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32073*)
32074  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32075  # A ".." for each directory in $ac_dir_suffix.
32076  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32077  case $ac_top_builddir_sub in
32078  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32079  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32080  esac ;;
32081esac
32082ac_abs_top_builddir=$ac_pwd
32083ac_abs_builddir=$ac_pwd$ac_dir_suffix
32084# for backward compatibility:
32085ac_top_builddir=$ac_top_build_prefix
32086
32087case $srcdir in
32088  .)  # We are building in place.
32089    ac_srcdir=.
32090    ac_top_srcdir=$ac_top_builddir_sub
32091    ac_abs_top_srcdir=$ac_pwd ;;
32092  [\\/]* | ?:[\\/]* )  # Absolute name.
32093    ac_srcdir=$srcdir$ac_dir_suffix;
32094    ac_top_srcdir=$srcdir
32095    ac_abs_top_srcdir=$srcdir ;;
32096  *) # Relative name.
32097    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32098    ac_top_srcdir=$ac_top_build_prefix$srcdir
32099    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32100esac
32101ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32102
32103
32104  case $ac_mode in
32105  :F)
32106  #
32107  # CONFIG_FILE
32108  #
32109
32110_ACEOF
32111
32112cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32113# If the template does not know about datarootdir, expand it.
32114# FIXME: This hack should be removed a few years after 2.60.
32115ac_datarootdir_hack=; ac_datarootdir_seen=
32116ac_sed_dataroot='
32117/datarootdir/ {
32118  p
32119  q
32120}
32121/@datadir@/p
32122/@docdir@/p
32123/@infodir@/p
32124/@localedir@/p
32125/@mandir@/p'
32126case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32127*datarootdir*) ac_datarootdir_seen=yes;;
32128*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32129  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32130$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32131_ACEOF
32132cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32133  ac_datarootdir_hack='
32134  s&@datadir@&$datadir&g
32135  s&@docdir@&$docdir&g
32136  s&@infodir@&$infodir&g
32137  s&@localedir@&$localedir&g
32138  s&@mandir@&$mandir&g
32139  s&\\\${datarootdir}&$datarootdir&g' ;;
32140esac
32141_ACEOF
32142
32143# Neutralize VPATH when `$srcdir' = `.'.
32144# Shell code in configure.ac might set extrasub.
32145# FIXME: do we really want to maintain this feature?
32146cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32147ac_sed_extra="$ac_vpsub
32148$extrasub
32149_ACEOF
32150cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32151:t
32152/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32153s|@configure_input@|$ac_sed_conf_input|;t t
32154s&@top_builddir@&$ac_top_builddir_sub&;t t
32155s&@top_build_prefix@&$ac_top_build_prefix&;t t
32156s&@srcdir@&$ac_srcdir&;t t
32157s&@abs_srcdir@&$ac_abs_srcdir&;t t
32158s&@top_srcdir@&$ac_top_srcdir&;t t
32159s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32160s&@builddir@&$ac_builddir&;t t
32161s&@abs_builddir@&$ac_abs_builddir&;t t
32162s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32163$ac_datarootdir_hack
32164"
32165eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
32166  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32167
32168test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32169  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
32170  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
32171  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32172which seems to be undefined.  Please make sure it is defined" >&5
32173$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32174which seems to be undefined.  Please make sure it is defined" >&2;}
32175
32176  rm -f "$tmp/stdin"
32177  case $ac_file in
32178  -) cat "$tmp/out" && rm -f "$tmp/out";;
32179  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
32180  esac \
32181  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32182 ;;
32183  :H)
32184  #
32185  # CONFIG_HEADER
32186  #
32187  if test x"$ac_file" != x-; then
32188    {
32189      $as_echo "/* $configure_input  */" \
32190      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
32191    } >"$tmp/config.h" \
32192      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32193    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
32194      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32195$as_echo "$as_me: $ac_file is unchanged" >&6;}
32196    else
32197      rm -f "$ac_file"
32198      mv "$tmp/config.h" "$ac_file" \
32199	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
32200    fi
32201  else
32202    $as_echo "/* $configure_input  */" \
32203      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
32204      || as_fn_error $? "could not create -" "$LINENO" 5
32205  fi
32206 ;;
32207
32208
32209  esac
32210
32211done # for ac_tag
32212
32213
32214as_fn_exit 0
32215_ACEOF
32216ac_clean_files=$ac_clean_files_save
32217
32218test $ac_write_fail = 0 ||
32219  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
32220
32221
32222# configure is writing to config.log, and then calls config.status.
32223# config.status does its own redirection, appending to config.log.
32224# Unfortunately, on DOS this fails, as config.log is still kept open
32225# by configure, so config.status won't be able to write to it; its
32226# output is simply discarded.  So we exec the FD to /dev/null,
32227# effectively closing config.log, so it can be properly (re)opened and
32228# appended to by config.status.  When coming back to configure, we
32229# need to make the FD available again.
32230if test "$no_create" != yes; then
32231  ac_cs_success=:
32232  ac_config_status_args=
32233  test "$silent" = yes &&
32234    ac_config_status_args="$ac_config_status_args --quiet"
32235  exec 5>/dev/null
32236  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
32237  exec 5>>config.log
32238  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
32239  # would make configure fail if this is the last instruction.
32240  $ac_cs_success || as_fn_exit 1
32241fi
32242if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
32243  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
32244$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
32245fi
32246
32247
32248# Make the compare script executable
32249$CHMOD +x $OUTPUT_ROOT/compare.sh
32250
32251# Finally output some useful information to the user
32252
32253# Finally output some useful information to the user
32254
32255if test "x$CCACHE_FOUND" != x; then
32256	if  test "x$HAS_GOOD_CCACHE" = x; then
32257		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
32258		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
32259	else
32260		CCACHE_STATUS="installed and in use"
32261	fi
32262else
32263	if test "x$GCC" = xyes; then
32264		CCACHE_STATUS="not installed (consider installing)"
32265		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
32266	else
32267		CCACHE_STATUS="not available for your system"
32268	fi
32269fi
32270
32271printf "\n"
32272printf "====================================================\n"
32273printf "A new configuration has been successfully created in\n"
32274printf "$OUTPUT_ROOT\n"
32275if test "x$CONFIGURE_COMMAND_LINE" != x; then
32276	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
32277else
32278	printf "using default settings.\n"
32279fi
32280
32281printf "\n"
32282printf "Configuration summary:\n"
32283printf "* Debug level:    $DEBUG_LEVEL\n"
32284printf "* JDK variant:    $JDK_VARIANT\n"
32285printf "* JVM variants:   $with_jvm_variants\n"
32286printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
32287
32288printf "\n"
32289printf "Tools summary:\n"
32290if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
32291  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
32292fi
32293printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
32294printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
32295printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
32296
32297printf "\n"
32298printf "Build performance summary:\n"
32299printf "* Cores to use:   $NUM_CORES\n"
32300printf "* Memory limit:   $MEMORY_SIZE MB\n"
32301printf "* ccache status:  $CCACHE_STATUS\n"
32302printf "\n"
32303
32304if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
32305	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
32306	printf "$CCACHE_HELP_MSG\n"
32307
32308    # Print a helpful message on how to acquire the necessary build dependency.
32309    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
32310    MISSING_DEPENDENCY=ccache
32311    PKGHANDLER_COMMAND=
32312
32313    case $PKGHANDLER in
32314	apt-get)
32315                apt_help     $MISSING_DEPENDENCY ;;
32316    yum)
32317                yum_help     $MISSING_DEPENDENCY ;;
32318	port)
32319                port_help    $MISSING_DEPENDENCY ;;
32320	pkgutil)
32321                pkgutil_help $MISSING_DEPENDENCY ;;
32322	pkgadd)
32323                pkgadd_help  $MISSING_DEPENDENCY ;;
32324    * )
32325      break ;;
32326    esac
32327
32328    if test "x$PKGHANDLER_COMMAND" != x; then
32329        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32330    fi
32331
32332	printf "$HELP_MSG\n"
32333	printf "\n"
32334fi
32335
32336if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
32337	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
32338	printf "will result in longer build times.\n"
32339	printf "\n"
32340fi
32341
32342if test "x$FOUND_ALT_VARIABLES" != "x"; then
32343	printf "WARNING: You have old-style ALT_ environment variables set.\n"
32344	printf "These are not respected, and will be ignored. It is recommended\n"
32345	printf "that you clean your environment. The following variables are set:\n"
32346	printf "$FOUND_ALT_VARIABLES\n"
32347	printf "\n"
32348fi
32349
32350if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
32351	printf "WARNING: Your build output directory is not on a local disk.\n"
32352	printf "This will severely degrade build performance!\n"
32353	printf "It is recommended that you create an output directory on a local disk,\n"
32354	printf "and run the configure script again from that directory.\n"
32355	printf "\n"
32356fi
32357
32358if test "x$IS_RECONFIGURE" = "xyes"; then
32359	printf "WARNING: The result of this configuration has overridden an older\n"
32360	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
32361	printf "proper build. Failure to do so might result in strange build problems.\n"
32362	printf "\n"
32363fi
32364
32365