generated-configure.sh revision 562:befbad2e4d87
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
711TOOLS_DIR_CXX
712OBJEXT
713EXEEXT
714ac_ct_CC
715CPPFLAGS
716LDFLAGS
717CFLAGS
718CC
719ac_ct_PROPER_COMPILER_CC
720PROPER_COMPILER_CC
721POTENTIAL_CC
722TOOLS_DIR_CC
723BUILD_LD
724BUILD_CXX
725BUILD_CC
726MSVCR_DLL
727VS_PATH
728VS_LIB
729VS_INCLUDE
730CYGWIN_LINK
731AR_OUT_OPTION
732LD_OUT_OPTION
733EXE_OUT_OPTION
734CC_OUT_OPTION
735BUILD_HOTSPOT
736HOTSPOT_DIST
737BUILD_OUTPUT
738OVERRIDE_SRC_ROOT
739ADD_SRC_ROOT
740JDK_TOPDIR
741HOTSPOT_TOPDIR
742JAXWS_TOPDIR
743JAXP_TOPDIR
744CORBA_TOPDIR
745LANGTOOLS_TOPDIR
746BOOT_JDK_JVMARGS
747JAVAC_FLAGS
748BOOT_JDK_SOURCETARGET
749BOOT_JDK
750BOOT_TOOLSJAR
751BOOT_RTJAR
752JAVA_CHECK
753JAVAC_CHECK
754COOKED_BUILD_NUMBER
755USER_RELEASE_SUFFIX
756JDK_VERSION
757COPYRIGHT_YEAR
758MACOSX_BUNDLE_ID_BASE
759MACOSX_BUNDLE_NAME_BASE
760COMPANY_NAME
761JDK_RC_PLATFORM_NAME
762PRODUCT_SUFFIX
763PRODUCT_NAME
764LAUNCHER_NAME
765MILESTONE
766JDK_BUILD_NUMBER
767JDK_UPDATE_VERSION
768JDK_MICRO_VERSION
769JDK_MINOR_VERSION
770JDK_MAJOR_VERSION
771COMPRESS_JARS
772UNLIMITED_CRYPTO
773CACERTS_FILE
774TEST_IN_BUILD
775BUILD_HEADLESS
776SUPPORT_HEADFUL
777SUPPORT_HEADLESS
778SET_OPENJDK
779BDEPS_FTP
780BDEPS_UNZIP
781OS_VERSION_MICRO
782OS_VERSION_MINOR
783OS_VERSION_MAJOR
784PKG_CONFIG
785TIME
786STAT
787HG
788READELF
789OTOOL
790LDD
791ZIP
792UNZIP
793FIND_DELETE
794MAKE
795CHECK_TOOLSDIR_MAKE
796CHECK_TOOLSDIR_GMAKE
797CHECK_MAKE
798CHECK_GMAKE
799PKGHANDLER
800OUTPUT_ROOT
801CONF_NAME
802SPEC
803BUILD_VARIANT_RELEASE
804DEBUG_CLASSFILES
805FASTDEBUG
806VARIANT
807DEBUG_LEVEL
808MACOSX_UNIVERSAL
809JVM_VARIANT_ZEROSHARK
810JVM_VARIANT_ZERO
811JVM_VARIANT_KERNEL
812JVM_VARIANT_MINIMAL1
813JVM_VARIANT_CLIENT
814JVM_VARIANT_SERVER
815JVM_VARIANTS
816JDK_VARIANT
817BUILD_LOG_WRAPPER
818BUILD_LOG_PREVIOUS
819BUILD_LOG
820SYS_ROOT
821PATH_SEP
822SRC_ROOT
823DEFINE_CROSS_COMPILE_ARCH
824LP64
825OPENJDK_TARGET_OS_API_DIR
826OPENJDK_TARGET_CPU_JLI_CFLAGS
827OPENJDK_TARGET_CPU_OSARCH
828OPENJDK_TARGET_CPU_ISADIR
829OPENJDK_TARGET_CPU_LIBDIR
830OPENJDK_TARGET_CPU_LEGACY_LIB
831OPENJDK_TARGET_CPU_LEGACY
832REQUIRED_OS_VERSION
833REQUIRED_OS_NAME
834COMPILE_TYPE
835OPENJDK_TARGET_CPU_ENDIAN
836OPENJDK_TARGET_CPU_BITS
837OPENJDK_TARGET_CPU_ARCH
838OPENJDK_TARGET_CPU
839OPENJDK_TARGET_OS_API
840OPENJDK_TARGET_OS
841OPENJDK_BUILD_CPU_ENDIAN
842OPENJDK_BUILD_CPU_BITS
843OPENJDK_BUILD_CPU_ARCH
844OPENJDK_BUILD_CPU
845OPENJDK_BUILD_OS_API
846OPENJDK_BUILD_OS
847OPENJDK_BUILD_AUTOCONF_NAME
848OPENJDK_TARGET_AUTOCONF_NAME
849target_os
850target_vendor
851target_cpu
852target
853host_os
854host_vendor
855host_cpu
856host
857build_os
858build_vendor
859build_cpu
860build
861SETFILE
862DF
863READLINK
864CYGPATH
865NAWK
866SED
867FGREP
868EGREP
869GREP
870AWK
871XARGS
872WHICH
873WC
874UNIQ
875UNAME
876TR
877TOUCH
878TEE
879TAR
880TAIL
881SORT
882SH
883RM
884THEPWDCMD
885PRINTF
886MV
887MKTEMP
888MKDIR
889LS
890LN
891HEAD
892FIND
893FILE
894EXPR
895ECHO
896DIRNAME
897DIFF
898DATE
899CUT
900CPIO
901CP
902COMM
903CMP
904CHMOD
905CAT
906BASH
907BASENAME
908DATE_WHEN_CONFIGURED
909CONFIGURE_COMMAND_LINE
910CUSTOM_MAKE_DIR
911target_alias
912host_alias
913build_alias
914LIBS
915ECHO_T
916ECHO_N
917ECHO_C
918DEFS
919mandir
920localedir
921libdir
922psdir
923pdfdir
924dvidir
925htmldir
926infodir
927docdir
928oldincludedir
929includedir
930localstatedir
931sharedstatedir
932sysconfdir
933datadir
934datarootdir
935libexecdir
936sbindir
937bindir
938program_transform_name
939prefix
940exec_prefix
941PACKAGE_URL
942PACKAGE_BUGREPORT
943PACKAGE_STRING
944PACKAGE_VERSION
945PACKAGE_TARNAME
946PACKAGE_NAME
947PATH_SEPARATOR
948SHELL'
949ac_subst_files=''
950ac_user_opts='
951enable_option_checking
952with_custom_make_dir
953with_target_bits
954with_sys_root
955with_tools_dir
956with_devkit
957with_jdk_variant
958with_jvm_variants
959enable_debug
960with_debug_level
961with_conf_name
962with_builddeps_conf
963with_builddeps_server
964with_builddeps_dir
965with_builddeps_group
966enable_openjdk_only
967enable_headful
968enable_hotspot_test_in_build
969with_cacerts_file
970enable_unlimited_crypto
971with_milestone
972with_build_number
973with_boot_jdk
974with_boot_jdk_jvmargs
975with_add_source_root
976with_override_source_root
977with_adds_and_overrides
978with_override_langtools
979with_override_corba
980with_override_jaxp
981with_override_jaxws
982with_override_hotspot
983with_override_jdk
984with_import_hotspot
985with_msvcr_dll
986with_extra_cflags
987with_extra_cxxflags
988with_extra_ldflags
989enable_debug_symbols
990enable_zip_debug_info
991enable_macosx_runtime_support
992with_x
993with_cups
994with_cups_include
995with_freetype
996with_alsa
997with_alsa_include
998with_alsa_lib
999with_zlib
1000with_stdc__lib
1001with_num_cores
1002with_memory_size
1003with_sjavac_server_java
1004with_sjavac_server_cores
1005enable_sjavac
1006enable_precompiled_headers
1007enable_ccache
1008with_ccache_dir
1009'
1010      ac_precious_vars='build_alias
1011host_alias
1012target_alias
1013PKG_CONFIG
1014CC
1015CFLAGS
1016LDFLAGS
1017LIBS
1018CPPFLAGS
1019CXX
1020CXXFLAGS
1021CCC
1022OBJC
1023OBJCFLAGS
1024CPP
1025CXXCPP
1026XMKMF
1027FREETYPE2_CFLAGS
1028FREETYPE2_LIBS
1029ALSA_CFLAGS
1030ALSA_LIBS'
1031
1032
1033# Initialize some variables set by options.
1034ac_init_help=
1035ac_init_version=false
1036ac_unrecognized_opts=
1037ac_unrecognized_sep=
1038# The variables have the same names as the options, with
1039# dashes changed to underlines.
1040cache_file=/dev/null
1041exec_prefix=NONE
1042no_create=
1043no_recursion=
1044prefix=NONE
1045program_prefix=NONE
1046program_suffix=NONE
1047program_transform_name=s,x,x,
1048silent=
1049site=
1050srcdir=
1051verbose=
1052x_includes=NONE
1053x_libraries=NONE
1054
1055# Installation directory options.
1056# These are left unexpanded so users can "make install exec_prefix=/foo"
1057# and all the variables that are supposed to be based on exec_prefix
1058# by default will actually change.
1059# Use braces instead of parens because sh, perl, etc. also accept them.
1060# (The list follows the same order as the GNU Coding Standards.)
1061bindir='${exec_prefix}/bin'
1062sbindir='${exec_prefix}/sbin'
1063libexecdir='${exec_prefix}/libexec'
1064datarootdir='${prefix}/share'
1065datadir='${datarootdir}'
1066sysconfdir='${prefix}/etc'
1067sharedstatedir='${prefix}/com'
1068localstatedir='${prefix}/var'
1069includedir='${prefix}/include'
1070oldincludedir='/usr/include'
1071docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1072infodir='${datarootdir}/info'
1073htmldir='${docdir}'
1074dvidir='${docdir}'
1075pdfdir='${docdir}'
1076psdir='${docdir}'
1077libdir='${exec_prefix}/lib'
1078localedir='${datarootdir}/locale'
1079mandir='${datarootdir}/man'
1080
1081ac_prev=
1082ac_dashdash=
1083for ac_option
1084do
1085  # If the previous option needs an argument, assign it.
1086  if test -n "$ac_prev"; then
1087    eval $ac_prev=\$ac_option
1088    ac_prev=
1089    continue
1090  fi
1091
1092  case $ac_option in
1093  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1094  *=)   ac_optarg= ;;
1095  *)    ac_optarg=yes ;;
1096  esac
1097
1098  # Accept the important Cygnus configure options, so we can diagnose typos.
1099
1100  case $ac_dashdash$ac_option in
1101  --)
1102    ac_dashdash=yes ;;
1103
1104  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1105    ac_prev=bindir ;;
1106  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1107    bindir=$ac_optarg ;;
1108
1109  -build | --build | --buil | --bui | --bu)
1110    ac_prev=build_alias ;;
1111  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1112    build_alias=$ac_optarg ;;
1113
1114  -cache-file | --cache-file | --cache-fil | --cache-fi \
1115  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1116    ac_prev=cache_file ;;
1117  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1118  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1119    cache_file=$ac_optarg ;;
1120
1121  --config-cache | -C)
1122    cache_file=config.cache ;;
1123
1124  -datadir | --datadir | --datadi | --datad)
1125    ac_prev=datadir ;;
1126  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1127    datadir=$ac_optarg ;;
1128
1129  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1130  | --dataroo | --dataro | --datar)
1131    ac_prev=datarootdir ;;
1132  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1133  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1134    datarootdir=$ac_optarg ;;
1135
1136  -disable-* | --disable-*)
1137    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1138    # Reject names that are not valid shell variable names.
1139    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1140      as_fn_error $? "invalid feature name: $ac_useropt"
1141    ac_useropt_orig=$ac_useropt
1142    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1143    case $ac_user_opts in
1144      *"
1145"enable_$ac_useropt"
1146"*) ;;
1147      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1148	 ac_unrecognized_sep=', ';;
1149    esac
1150    eval enable_$ac_useropt=no ;;
1151
1152  -docdir | --docdir | --docdi | --doc | --do)
1153    ac_prev=docdir ;;
1154  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1155    docdir=$ac_optarg ;;
1156
1157  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1158    ac_prev=dvidir ;;
1159  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1160    dvidir=$ac_optarg ;;
1161
1162  -enable-* | --enable-*)
1163    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1164    # Reject names that are not valid shell variable names.
1165    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1166      as_fn_error $? "invalid feature name: $ac_useropt"
1167    ac_useropt_orig=$ac_useropt
1168    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1169    case $ac_user_opts in
1170      *"
1171"enable_$ac_useropt"
1172"*) ;;
1173      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1174	 ac_unrecognized_sep=', ';;
1175    esac
1176    eval enable_$ac_useropt=\$ac_optarg ;;
1177
1178  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1179  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1180  | --exec | --exe | --ex)
1181    ac_prev=exec_prefix ;;
1182  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1183  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1184  | --exec=* | --exe=* | --ex=*)
1185    exec_prefix=$ac_optarg ;;
1186
1187  -gas | --gas | --ga | --g)
1188    # Obsolete; use --with-gas.
1189    with_gas=yes ;;
1190
1191  -help | --help | --hel | --he | -h)
1192    ac_init_help=long ;;
1193  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1194    ac_init_help=recursive ;;
1195  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1196    ac_init_help=short ;;
1197
1198  -host | --host | --hos | --ho)
1199    ac_prev=host_alias ;;
1200  -host=* | --host=* | --hos=* | --ho=*)
1201    host_alias=$ac_optarg ;;
1202
1203  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1204    ac_prev=htmldir ;;
1205  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1206  | --ht=*)
1207    htmldir=$ac_optarg ;;
1208
1209  -includedir | --includedir | --includedi | --included | --include \
1210  | --includ | --inclu | --incl | --inc)
1211    ac_prev=includedir ;;
1212  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1213  | --includ=* | --inclu=* | --incl=* | --inc=*)
1214    includedir=$ac_optarg ;;
1215
1216  -infodir | --infodir | --infodi | --infod | --info | --inf)
1217    ac_prev=infodir ;;
1218  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1219    infodir=$ac_optarg ;;
1220
1221  -libdir | --libdir | --libdi | --libd)
1222    ac_prev=libdir ;;
1223  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1224    libdir=$ac_optarg ;;
1225
1226  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1227  | --libexe | --libex | --libe)
1228    ac_prev=libexecdir ;;
1229  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1230  | --libexe=* | --libex=* | --libe=*)
1231    libexecdir=$ac_optarg ;;
1232
1233  -localedir | --localedir | --localedi | --localed | --locale)
1234    ac_prev=localedir ;;
1235  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1236    localedir=$ac_optarg ;;
1237
1238  -localstatedir | --localstatedir | --localstatedi | --localstated \
1239  | --localstate | --localstat | --localsta | --localst | --locals)
1240    ac_prev=localstatedir ;;
1241  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1242  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1243    localstatedir=$ac_optarg ;;
1244
1245  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1246    ac_prev=mandir ;;
1247  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1248    mandir=$ac_optarg ;;
1249
1250  -nfp | --nfp | --nf)
1251    # Obsolete; use --without-fp.
1252    with_fp=no ;;
1253
1254  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1255  | --no-cr | --no-c | -n)
1256    no_create=yes ;;
1257
1258  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1259  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1260    no_recursion=yes ;;
1261
1262  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1263  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1264  | --oldin | --oldi | --old | --ol | --o)
1265    ac_prev=oldincludedir ;;
1266  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1267  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1268  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1269    oldincludedir=$ac_optarg ;;
1270
1271  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1272    ac_prev=prefix ;;
1273  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1274    prefix=$ac_optarg ;;
1275
1276  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1277  | --program-pre | --program-pr | --program-p)
1278    ac_prev=program_prefix ;;
1279  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1280  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1281    program_prefix=$ac_optarg ;;
1282
1283  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1284  | --program-suf | --program-su | --program-s)
1285    ac_prev=program_suffix ;;
1286  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1287  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1288    program_suffix=$ac_optarg ;;
1289
1290  -program-transform-name | --program-transform-name \
1291  | --program-transform-nam | --program-transform-na \
1292  | --program-transform-n | --program-transform- \
1293  | --program-transform | --program-transfor \
1294  | --program-transfo | --program-transf \
1295  | --program-trans | --program-tran \
1296  | --progr-tra | --program-tr | --program-t)
1297    ac_prev=program_transform_name ;;
1298  -program-transform-name=* | --program-transform-name=* \
1299  | --program-transform-nam=* | --program-transform-na=* \
1300  | --program-transform-n=* | --program-transform-=* \
1301  | --program-transform=* | --program-transfor=* \
1302  | --program-transfo=* | --program-transf=* \
1303  | --program-trans=* | --program-tran=* \
1304  | --progr-tra=* | --program-tr=* | --program-t=*)
1305    program_transform_name=$ac_optarg ;;
1306
1307  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1308    ac_prev=pdfdir ;;
1309  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1310    pdfdir=$ac_optarg ;;
1311
1312  -psdir | --psdir | --psdi | --psd | --ps)
1313    ac_prev=psdir ;;
1314  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1315    psdir=$ac_optarg ;;
1316
1317  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1318  | -silent | --silent | --silen | --sile | --sil)
1319    silent=yes ;;
1320
1321  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1322    ac_prev=sbindir ;;
1323  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1324  | --sbi=* | --sb=*)
1325    sbindir=$ac_optarg ;;
1326
1327  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1328  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1329  | --sharedst | --shareds | --shared | --share | --shar \
1330  | --sha | --sh)
1331    ac_prev=sharedstatedir ;;
1332  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1333  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1334  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1335  | --sha=* | --sh=*)
1336    sharedstatedir=$ac_optarg ;;
1337
1338  -site | --site | --sit)
1339    ac_prev=site ;;
1340  -site=* | --site=* | --sit=*)
1341    site=$ac_optarg ;;
1342
1343  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1344    ac_prev=srcdir ;;
1345  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1346    srcdir=$ac_optarg ;;
1347
1348  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1349  | --syscon | --sysco | --sysc | --sys | --sy)
1350    ac_prev=sysconfdir ;;
1351  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1352  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1353    sysconfdir=$ac_optarg ;;
1354
1355  -target | --target | --targe | --targ | --tar | --ta | --t)
1356    ac_prev=target_alias ;;
1357  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1358    target_alias=$ac_optarg ;;
1359
1360  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1361    verbose=yes ;;
1362
1363  -version | --version | --versio | --versi | --vers | -V)
1364    ac_init_version=: ;;
1365
1366  -with-* | --with-*)
1367    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1368    # Reject names that are not valid shell variable names.
1369    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1370      as_fn_error $? "invalid package name: $ac_useropt"
1371    ac_useropt_orig=$ac_useropt
1372    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1373    case $ac_user_opts in
1374      *"
1375"with_$ac_useropt"
1376"*) ;;
1377      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1378	 ac_unrecognized_sep=', ';;
1379    esac
1380    eval with_$ac_useropt=\$ac_optarg ;;
1381
1382  -without-* | --without-*)
1383    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1384    # Reject names that are not valid shell variable names.
1385    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1386      as_fn_error $? "invalid package name: $ac_useropt"
1387    ac_useropt_orig=$ac_useropt
1388    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1389    case $ac_user_opts in
1390      *"
1391"with_$ac_useropt"
1392"*) ;;
1393      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1394	 ac_unrecognized_sep=', ';;
1395    esac
1396    eval with_$ac_useropt=no ;;
1397
1398  --x)
1399    # Obsolete; use --with-x.
1400    with_x=yes ;;
1401
1402  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1403  | --x-incl | --x-inc | --x-in | --x-i)
1404    ac_prev=x_includes ;;
1405  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1406  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1407    x_includes=$ac_optarg ;;
1408
1409  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1410  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1411    ac_prev=x_libraries ;;
1412  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1413  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1414    x_libraries=$ac_optarg ;;
1415
1416  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1417Try \`$0 --help' for more information"
1418    ;;
1419
1420  *=*)
1421    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1422    # Reject names that are not valid shell variable names.
1423    case $ac_envvar in #(
1424      '' | [0-9]* | *[!_$as_cr_alnum]* )
1425      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1426    esac
1427    eval $ac_envvar=\$ac_optarg
1428    export $ac_envvar ;;
1429
1430  *)
1431    # FIXME: should be removed in autoconf 3.0.
1432    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1433    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1434      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1435    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1436    ;;
1437
1438  esac
1439done
1440
1441if test -n "$ac_prev"; then
1442  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1443  as_fn_error $? "missing argument to $ac_option"
1444fi
1445
1446if test -n "$ac_unrecognized_opts"; then
1447  case $enable_option_checking in
1448    no) ;;
1449    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1450    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1451  esac
1452fi
1453
1454# Check all directory arguments for consistency.
1455for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1456		datadir sysconfdir sharedstatedir localstatedir includedir \
1457		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1458		libdir localedir mandir
1459do
1460  eval ac_val=\$$ac_var
1461  # Remove trailing slashes.
1462  case $ac_val in
1463    */ )
1464      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1465      eval $ac_var=\$ac_val;;
1466  esac
1467  # Be sure to have absolute directory names.
1468  case $ac_val in
1469    [\\/$]* | ?:[\\/]* )  continue;;
1470    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1471  esac
1472  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1473done
1474
1475# There might be people who depend on the old broken behavior: `$host'
1476# used to hold the argument of --host etc.
1477# FIXME: To remove some day.
1478build=$build_alias
1479host=$host_alias
1480target=$target_alias
1481
1482# FIXME: To remove some day.
1483if test "x$host_alias" != x; then
1484  if test "x$build_alias" = x; then
1485    cross_compiling=maybe
1486    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1487    If a cross compiler is detected then cross compile mode will be used" >&2
1488  elif test "x$build_alias" != "x$host_alias"; then
1489    cross_compiling=yes
1490  fi
1491fi
1492
1493ac_tool_prefix=
1494test -n "$host_alias" && ac_tool_prefix=$host_alias-
1495
1496test "$silent" = yes && exec 6>/dev/null
1497
1498
1499ac_pwd=`pwd` && test -n "$ac_pwd" &&
1500ac_ls_di=`ls -di .` &&
1501ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1502  as_fn_error $? "working directory cannot be determined"
1503test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1504  as_fn_error $? "pwd does not report name of working directory"
1505
1506
1507# Find the source files, if location was not specified.
1508if test -z "$srcdir"; then
1509  ac_srcdir_defaulted=yes
1510  # Try the directory containing this script, then the parent directory.
1511  ac_confdir=`$as_dirname -- "$as_myself" ||
1512$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1513	 X"$as_myself" : 'X\(//\)[^/]' \| \
1514	 X"$as_myself" : 'X\(//\)$' \| \
1515	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1516$as_echo X"$as_myself" |
1517    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1518	    s//\1/
1519	    q
1520	  }
1521	  /^X\(\/\/\)[^/].*/{
1522	    s//\1/
1523	    q
1524	  }
1525	  /^X\(\/\/\)$/{
1526	    s//\1/
1527	    q
1528	  }
1529	  /^X\(\/\).*/{
1530	    s//\1/
1531	    q
1532	  }
1533	  s/.*/./; q'`
1534  srcdir=$ac_confdir
1535  if test ! -r "$srcdir/$ac_unique_file"; then
1536    srcdir=..
1537  fi
1538else
1539  ac_srcdir_defaulted=no
1540fi
1541if test ! -r "$srcdir/$ac_unique_file"; then
1542  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1543  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1544fi
1545ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1546ac_abs_confdir=`(
1547	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1548	pwd)`
1549# When building in place, set srcdir=.
1550if test "$ac_abs_confdir" = "$ac_pwd"; then
1551  srcdir=.
1552fi
1553# Remove unnecessary trailing slashes from srcdir.
1554# Double slashes in file names in object file debugging info
1555# mess up M-x gdb in Emacs.
1556case $srcdir in
1557*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1558esac
1559for ac_var in $ac_precious_vars; do
1560  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1561  eval ac_env_${ac_var}_value=\$${ac_var}
1562  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1563  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1564done
1565
1566#
1567# Report the --help message.
1568#
1569if test "$ac_init_help" = "long"; then
1570  # Omit some internal or obsolete options to make the list less imposing.
1571  # This message is too long to be a string in the A/UX 3.1 sh.
1572  cat <<_ACEOF
1573\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1574
1575Usage: $0 [OPTION]... [VAR=VALUE]...
1576
1577To assign environment variables (e.g., CC, CFLAGS...), specify them as
1578VAR=VALUE.  See below for descriptions of some of the useful variables.
1579
1580Defaults for the options are specified in brackets.
1581
1582Configuration:
1583  -h, --help              display this help and exit
1584      --help=short        display options specific to this package
1585      --help=recursive    display the short help of all the included packages
1586  -V, --version           display version information and exit
1587  -q, --quiet, --silent   do not print \`checking ...' messages
1588      --cache-file=FILE   cache test results in FILE [disabled]
1589  -C, --config-cache      alias for \`--cache-file=config.cache'
1590  -n, --no-create         do not create output files
1591      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1592
1593Installation directories:
1594  --prefix=PREFIX         install architecture-independent files in PREFIX
1595                          [$ac_default_prefix]
1596  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1597                          [PREFIX]
1598
1599By default, \`make install' will install all the files in
1600\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1601an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1602for instance \`--prefix=\$HOME'.
1603
1604For better control, use the options below.
1605
1606Fine tuning of the installation directories:
1607  --bindir=DIR            user executables [EPREFIX/bin]
1608  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1609  --libexecdir=DIR        program executables [EPREFIX/libexec]
1610  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1611  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1612  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1613  --libdir=DIR            object code libraries [EPREFIX/lib]
1614  --includedir=DIR        C header files [PREFIX/include]
1615  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1616  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1617  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1618  --infodir=DIR           info documentation [DATAROOTDIR/info]
1619  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1620  --mandir=DIR            man documentation [DATAROOTDIR/man]
1621  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1622  --htmldir=DIR           html documentation [DOCDIR]
1623  --dvidir=DIR            dvi documentation [DOCDIR]
1624  --pdfdir=DIR            pdf documentation [DOCDIR]
1625  --psdir=DIR             ps documentation [DOCDIR]
1626_ACEOF
1627
1628  cat <<\_ACEOF
1629
1630X features:
1631  --x-includes=DIR    X include files are in DIR
1632  --x-libraries=DIR   X library files are in DIR
1633
1634System types:
1635  --build=BUILD     configure for building on BUILD [guessed]
1636  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1637  --target=TARGET   configure for building compilers for TARGET [HOST]
1638_ACEOF
1639fi
1640
1641if test -n "$ac_init_help"; then
1642  case $ac_init_help in
1643     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1644   esac
1645  cat <<\_ACEOF
1646
1647Optional Features:
1648  --disable-option-checking  ignore unrecognized --enable/--with options
1649  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1650  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1651  --enable-debug          set the debug level to fastdebug (shorthand for
1652                          --with-debug-level=fastdebug) [disabled]
1653  --enable-openjdk-only   supress building closed source even if present
1654                          [disabled]
1655  --disable-headful       disable building headful support (graphical UI
1656                          support) [enabled]
1657  --enable-hotspot-test-in-build
1658                          run the Queens test after Hotspot build [disabled]
1659  --enable-unlimited-crypto
1660                          Enable unlimited crypto policy [disabled]
1661  --disable-debug-symbols disable generation of debug symbols [enabled]
1662  --disable-zip-debug-info
1663                          disable zipping of debug-info files [enabled]
1664  --disable-macosx-runtime-support
1665                          disable the use of MacOSX Java runtime support
1666                          framework [enabled]
1667  --enable-sjavac         use sjavac to do fast incremental compiles
1668                          [disabled]
1669  --disable-precompiled-headers
1670                          disable using precompiled headers when compiling C++
1671                          [enabled]
1672  --disable-ccache        disable using ccache to speed up recompilations
1673                          [enabled]
1674
1675Optional Packages:
1676  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1677  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1678  --with-custom-make-dir  use this directory for custom build/make files
1679  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1680                          support it), e.g. --with-target-bits=32 [guessed]
1681  --with-sys-root         pass this sys-root to the compilers and tools (for
1682                          cross-compiling)
1683  --with-tools-dir        search this directory for compilers and tools (for
1684                          cross-compiling)
1685  --with-devkit           use this directory as base for tools-dir and
1686                          sys-root (for cross-compiling)
1687  --with-jdk-variant      JDK variant to build (normal) [normal]
1688  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1689                          client, minimal1, kernel, zero, zeroshark) [server]
1690  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1691                          [release]
1692  --with-conf-name        use this as the name of the configuration [generated
1693                          from important configuration options]
1694  --with-builddeps-conf   use this configuration file for the builddeps
1695  --with-builddeps-server download and use build dependencies from this server
1696                          url
1697  --with-builddeps-dir    store downloaded build dependencies here
1698                          [/localhome/builddeps]
1699  --with-builddeps-group  chgrp the downloaded build dependencies to this
1700                          group
1701  --with-cacerts-file     specify alternative cacerts file
1702  --with-milestone        Set milestone value for build [internal]
1703  --with-build-number     Set build number value for build [b00]
1704  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1705  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1706                          invocations of the Boot JDK, overriding the default
1707                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1708                          -enableassertions"
1709  --with-add-source-root  for each and every source directory, look in this
1710                          additional source root for the same directory; if it
1711                          exists and have files in it, include it in the build
1712  --with-override-source-root
1713                          for each and every source directory, look in this
1714                          override source root for the same directory; if it
1715                          exists, use that directory instead and ignore the
1716                          directory in the original source root
1717  --with-adds-and-overrides
1718                          use the subdirs 'adds' and 'overrides' in the
1719                          specified directory as add-source-root and
1720                          override-source-root
1721  --with-override-langtools
1722                          use this langtools dir for the build
1723  --with-override-corba   use this corba dir for the build
1724  --with-override-jaxp    use this jaxp dir for the build
1725  --with-override-jaxws   use this jaxws dir for the build
1726  --with-override-hotspot use this hotspot dir for the build
1727  --with-override-jdk     use this jdk dir for the build
1728  --with-import-hotspot   import hotspot binaries from this jdk image or
1729                          hotspot build dist dir instead of building from
1730                          source
1731  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1732                          only) [probed]
1733  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1734  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1735  --with-extra-ldflags    extra flags to be used when linking jdk
1736  --with-x                use the X Window System
1737  --with-cups             specify prefix directory for the cups package
1738                          (expecting the headers under PATH/include)
1739  --with-cups-include     specify directory for the cups include files
1740  --with-freetype         specify prefix directory for the freetype2 package
1741                          (expecting the libraries under PATH/lib and the
1742                          headers under PATH/include)
1743  --with-alsa             specify prefix directory for the alsa package
1744                          (expecting the libraries under PATH/lib and the
1745                          headers under PATH/include)
1746  --with-alsa-include     specify directory for the alsa include files
1747  --with-alsa-lib         specify directory for the alsa library
1748  --with-zlib             use zlib from build system or OpenJDK source
1749                          (system, bundled) [bundled]
1750  --with-stdc++lib=<static>,<dynamic>,<default>
1751                          force linking of the C++ runtime on Linux to either
1752                          static or dynamic, default is static with dynamic as
1753                          fallback
1754  --with-num-cores        number of cores in the build system, e.g.
1755                          --with-num-cores=8 [probed]
1756  --with-memory-size      memory (in MB) available in the build system, e.g.
1757                          --with-memory-size=1024 [probed]
1758  --with-sjavac-server-java
1759                          use this java binary for running the sjavac
1760                          background server [Boot JDK java]
1761  --with-sjavac-server-cores
1762                          use at most this number of concurrent threads on the
1763                          sjavac server [probed]
1764  --with-ccache-dir       where to store ccache files [~/.ccache]
1765
1766Some influential environment variables:
1767  PKG_CONFIG  path to pkg-config utility
1768  CC          C compiler command
1769  CFLAGS      C compiler flags
1770  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1771              nonstandard directory <lib dir>
1772  LIBS        libraries to pass to the linker, e.g. -l<library>
1773  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1774              you have headers in a nonstandard directory <include dir>
1775  CXX         C++ compiler command
1776  CXXFLAGS    C++ compiler flags
1777  OBJC        Objective C compiler command
1778  OBJCFLAGS   Objective C compiler flags
1779  CPP         C preprocessor
1780  CXXCPP      C++ preprocessor
1781  XMKMF       Path to xmkmf, Makefile generator for X Window System
1782  FREETYPE2_CFLAGS
1783              C compiler flags for FREETYPE2, overriding pkg-config
1784  FREETYPE2_LIBS
1785              linker flags for FREETYPE2, overriding pkg-config
1786  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1787  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1788
1789Use these variables to override the choices made by `configure' or to help
1790it to find libraries and programs with nonstandard names/locations.
1791
1792Report bugs to <build-dev@openjdk.java.net>.
1793OpenJDK home page: <http://openjdk.java.net>.
1794_ACEOF
1795ac_status=$?
1796fi
1797
1798if test "$ac_init_help" = "recursive"; then
1799  # If there are subdirs, report their specific --help.
1800  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1801    test -d "$ac_dir" ||
1802      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1803      continue
1804    ac_builddir=.
1805
1806case "$ac_dir" in
1807.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1808*)
1809  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1810  # A ".." for each directory in $ac_dir_suffix.
1811  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1812  case $ac_top_builddir_sub in
1813  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1814  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1815  esac ;;
1816esac
1817ac_abs_top_builddir=$ac_pwd
1818ac_abs_builddir=$ac_pwd$ac_dir_suffix
1819# for backward compatibility:
1820ac_top_builddir=$ac_top_build_prefix
1821
1822case $srcdir in
1823  .)  # We are building in place.
1824    ac_srcdir=.
1825    ac_top_srcdir=$ac_top_builddir_sub
1826    ac_abs_top_srcdir=$ac_pwd ;;
1827  [\\/]* | ?:[\\/]* )  # Absolute name.
1828    ac_srcdir=$srcdir$ac_dir_suffix;
1829    ac_top_srcdir=$srcdir
1830    ac_abs_top_srcdir=$srcdir ;;
1831  *) # Relative name.
1832    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1833    ac_top_srcdir=$ac_top_build_prefix$srcdir
1834    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1835esac
1836ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1837
1838    cd "$ac_dir" || { ac_status=$?; continue; }
1839    # Check for guested configure.
1840    if test -f "$ac_srcdir/configure.gnu"; then
1841      echo &&
1842      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1843    elif test -f "$ac_srcdir/configure"; then
1844      echo &&
1845      $SHELL "$ac_srcdir/configure" --help=recursive
1846    else
1847      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1848    fi || ac_status=$?
1849    cd "$ac_pwd" || { ac_status=$?; break; }
1850  done
1851fi
1852
1853test -n "$ac_init_help" && exit $ac_status
1854if $ac_init_version; then
1855  cat <<\_ACEOF
1856OpenJDK configure jdk8
1857generated by GNU Autoconf 2.67
1858
1859Copyright (C) 2010 Free Software Foundation, Inc.
1860This configure script is free software; the Free Software Foundation
1861gives unlimited permission to copy, distribute and modify it.
1862_ACEOF
1863  exit
1864fi
1865
1866## ------------------------ ##
1867## Autoconf initialization. ##
1868## ------------------------ ##
1869
1870# ac_fn_c_try_compile LINENO
1871# --------------------------
1872# Try to compile conftest.$ac_ext, and return whether this succeeded.
1873ac_fn_c_try_compile ()
1874{
1875  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1876  rm -f conftest.$ac_objext
1877  if { { ac_try="$ac_compile"
1878case "(($ac_try" in
1879  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1880  *) ac_try_echo=$ac_try;;
1881esac
1882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1883$as_echo "$ac_try_echo"; } >&5
1884  (eval "$ac_compile") 2>conftest.err
1885  ac_status=$?
1886  if test -s conftest.err; then
1887    grep -v '^ *+' conftest.err >conftest.er1
1888    cat conftest.er1 >&5
1889    mv -f conftest.er1 conftest.err
1890  fi
1891  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1892  test $ac_status = 0; } && {
1893	 test -z "$ac_c_werror_flag" ||
1894	 test ! -s conftest.err
1895       } && test -s conftest.$ac_objext; then :
1896  ac_retval=0
1897else
1898  $as_echo "$as_me: failed program was:" >&5
1899sed 's/^/| /' conftest.$ac_ext >&5
1900
1901	ac_retval=1
1902fi
1903  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1904  as_fn_set_status $ac_retval
1905
1906} # ac_fn_c_try_compile
1907
1908# ac_fn_cxx_try_compile LINENO
1909# ----------------------------
1910# Try to compile conftest.$ac_ext, and return whether this succeeded.
1911ac_fn_cxx_try_compile ()
1912{
1913  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914  rm -f conftest.$ac_objext
1915  if { { ac_try="$ac_compile"
1916case "(($ac_try" in
1917  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1918  *) ac_try_echo=$ac_try;;
1919esac
1920eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1921$as_echo "$ac_try_echo"; } >&5
1922  (eval "$ac_compile") 2>conftest.err
1923  ac_status=$?
1924  if test -s conftest.err; then
1925    grep -v '^ *+' conftest.err >conftest.er1
1926    cat conftest.er1 >&5
1927    mv -f conftest.er1 conftest.err
1928  fi
1929  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1930  test $ac_status = 0; } && {
1931	 test -z "$ac_cxx_werror_flag" ||
1932	 test ! -s conftest.err
1933       } && test -s conftest.$ac_objext; then :
1934  ac_retval=0
1935else
1936  $as_echo "$as_me: failed program was:" >&5
1937sed 's/^/| /' conftest.$ac_ext >&5
1938
1939	ac_retval=1
1940fi
1941  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1942  as_fn_set_status $ac_retval
1943
1944} # ac_fn_cxx_try_compile
1945
1946# ac_fn_objc_try_compile LINENO
1947# -----------------------------
1948# Try to compile conftest.$ac_ext, and return whether this succeeded.
1949ac_fn_objc_try_compile ()
1950{
1951  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1952  rm -f conftest.$ac_objext
1953  if { { ac_try="$ac_compile"
1954case "(($ac_try" in
1955  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1956  *) ac_try_echo=$ac_try;;
1957esac
1958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1959$as_echo "$ac_try_echo"; } >&5
1960  (eval "$ac_compile") 2>conftest.err
1961  ac_status=$?
1962  if test -s conftest.err; then
1963    grep -v '^ *+' conftest.err >conftest.er1
1964    cat conftest.er1 >&5
1965    mv -f conftest.er1 conftest.err
1966  fi
1967  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1968  test $ac_status = 0; } && {
1969	 test -z "$ac_objc_werror_flag" ||
1970	 test ! -s conftest.err
1971       } && test -s conftest.$ac_objext; then :
1972  ac_retval=0
1973else
1974  $as_echo "$as_me: failed program was:" >&5
1975sed 's/^/| /' conftest.$ac_ext >&5
1976
1977	ac_retval=1
1978fi
1979  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1980  as_fn_set_status $ac_retval
1981
1982} # ac_fn_objc_try_compile
1983
1984# ac_fn_c_try_cpp LINENO
1985# ----------------------
1986# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1987ac_fn_c_try_cpp ()
1988{
1989  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1990  if { { ac_try="$ac_cpp conftest.$ac_ext"
1991case "(($ac_try" in
1992  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1993  *) ac_try_echo=$ac_try;;
1994esac
1995eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1996$as_echo "$ac_try_echo"; } >&5
1997  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1998  ac_status=$?
1999  if test -s conftest.err; then
2000    grep -v '^ *+' conftest.err >conftest.er1
2001    cat conftest.er1 >&5
2002    mv -f conftest.er1 conftest.err
2003  fi
2004  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2005  test $ac_status = 0; } > conftest.i && {
2006	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2007	 test ! -s conftest.err
2008       }; then :
2009  ac_retval=0
2010else
2011  $as_echo "$as_me: failed program was:" >&5
2012sed 's/^/| /' conftest.$ac_ext >&5
2013
2014    ac_retval=1
2015fi
2016  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2017  as_fn_set_status $ac_retval
2018
2019} # ac_fn_c_try_cpp
2020
2021# ac_fn_cxx_try_cpp LINENO
2022# ------------------------
2023# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2024ac_fn_cxx_try_cpp ()
2025{
2026  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027  if { { ac_try="$ac_cpp conftest.$ac_ext"
2028case "(($ac_try" in
2029  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2030  *) ac_try_echo=$ac_try;;
2031esac
2032eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2033$as_echo "$ac_try_echo"; } >&5
2034  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2035  ac_status=$?
2036  if test -s conftest.err; then
2037    grep -v '^ *+' conftest.err >conftest.er1
2038    cat conftest.er1 >&5
2039    mv -f conftest.er1 conftest.err
2040  fi
2041  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2042  test $ac_status = 0; } > conftest.i && {
2043	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2044	 test ! -s conftest.err
2045       }; then :
2046  ac_retval=0
2047else
2048  $as_echo "$as_me: failed program was:" >&5
2049sed 's/^/| /' conftest.$ac_ext >&5
2050
2051    ac_retval=1
2052fi
2053  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2054  as_fn_set_status $ac_retval
2055
2056} # ac_fn_cxx_try_cpp
2057
2058# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2059# ---------------------------------------------------------
2060# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2061# the include files in INCLUDES and setting the cache variable VAR
2062# accordingly.
2063ac_fn_cxx_check_header_mongrel ()
2064{
2065  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2066  if eval "test \"\${$3+set}\"" = set; then :
2067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2068$as_echo_n "checking for $2... " >&6; }
2069if eval "test \"\${$3+set}\"" = set; then :
2070  $as_echo_n "(cached) " >&6
2071fi
2072eval ac_res=\$$3
2073	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2074$as_echo "$ac_res" >&6; }
2075else
2076  # Is the header compilable?
2077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2078$as_echo_n "checking $2 usability... " >&6; }
2079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2080/* end confdefs.h.  */
2081$4
2082#include <$2>
2083_ACEOF
2084if ac_fn_cxx_try_compile "$LINENO"; then :
2085  ac_header_compiler=yes
2086else
2087  ac_header_compiler=no
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2091$as_echo "$ac_header_compiler" >&6; }
2092
2093# Is the header present?
2094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2095$as_echo_n "checking $2 presence... " >&6; }
2096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2097/* end confdefs.h.  */
2098#include <$2>
2099_ACEOF
2100if ac_fn_cxx_try_cpp "$LINENO"; then :
2101  ac_header_preproc=yes
2102else
2103  ac_header_preproc=no
2104fi
2105rm -f conftest.err conftest.i conftest.$ac_ext
2106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2107$as_echo "$ac_header_preproc" >&6; }
2108
2109# So?  What about this header?
2110case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2111  yes:no: )
2112    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2113$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2114    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2115$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2116    ;;
2117  no:yes:* )
2118    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2119$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2120    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2121$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2122    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2123$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2124    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2125$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2126    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2127$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2128( $as_echo "## ----------------------------------------- ##
2129## Report this to build-dev@openjdk.java.net ##
2130## ----------------------------------------- ##"
2131     ) | sed "s/^/$as_me: WARNING:     /" >&2
2132    ;;
2133esac
2134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2135$as_echo_n "checking for $2... " >&6; }
2136if eval "test \"\${$3+set}\"" = set; then :
2137  $as_echo_n "(cached) " >&6
2138else
2139  eval "$3=\$ac_header_compiler"
2140fi
2141eval ac_res=\$$3
2142	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2143$as_echo "$ac_res" >&6; }
2144fi
2145  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2146
2147} # ac_fn_cxx_check_header_mongrel
2148
2149# ac_fn_cxx_try_run LINENO
2150# ------------------------
2151# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2152# that executables *can* be run.
2153ac_fn_cxx_try_run ()
2154{
2155  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2156  if { { ac_try="$ac_link"
2157case "(($ac_try" in
2158  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2159  *) ac_try_echo=$ac_try;;
2160esac
2161eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2162$as_echo "$ac_try_echo"; } >&5
2163  (eval "$ac_link") 2>&5
2164  ac_status=$?
2165  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2166  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2167  { { case "(($ac_try" in
2168  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2169  *) ac_try_echo=$ac_try;;
2170esac
2171eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2172$as_echo "$ac_try_echo"; } >&5
2173  (eval "$ac_try") 2>&5
2174  ac_status=$?
2175  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2176  test $ac_status = 0; }; }; then :
2177  ac_retval=0
2178else
2179  $as_echo "$as_me: program exited with status $ac_status" >&5
2180       $as_echo "$as_me: failed program was:" >&5
2181sed 's/^/| /' conftest.$ac_ext >&5
2182
2183       ac_retval=$ac_status
2184fi
2185  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2186  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2187  as_fn_set_status $ac_retval
2188
2189} # ac_fn_cxx_try_run
2190
2191# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2192# ---------------------------------------------------------
2193# Tests whether HEADER exists and can be compiled using the include files in
2194# INCLUDES, setting the cache variable VAR accordingly.
2195ac_fn_cxx_check_header_compile ()
2196{
2197  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2198  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2199$as_echo_n "checking for $2... " >&6; }
2200if eval "test \"\${$3+set}\"" = set; then :
2201  $as_echo_n "(cached) " >&6
2202else
2203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2204/* end confdefs.h.  */
2205$4
2206#include <$2>
2207_ACEOF
2208if ac_fn_cxx_try_compile "$LINENO"; then :
2209  eval "$3=yes"
2210else
2211  eval "$3=no"
2212fi
2213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2214fi
2215eval ac_res=\$$3
2216	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2217$as_echo "$ac_res" >&6; }
2218  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2219
2220} # ac_fn_cxx_check_header_compile
2221
2222# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2223# ----------------------------------------------
2224# Tries to find the compile-time value of EXPR in a program that includes
2225# INCLUDES, setting VAR accordingly. Returns whether the value could be
2226# computed
2227ac_fn_cxx_compute_int ()
2228{
2229  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2230  if test "$cross_compiling" = yes; then
2231    # Depending upon the size, compute the lo and hi bounds.
2232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2233/* end confdefs.h.  */
2234$4
2235int
2236main ()
2237{
2238static int test_array [1 - 2 * !(($2) >= 0)];
2239test_array [0] = 0
2240
2241  ;
2242  return 0;
2243}
2244_ACEOF
2245if ac_fn_cxx_try_compile "$LINENO"; then :
2246  ac_lo=0 ac_mid=0
2247  while :; do
2248    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2249/* end confdefs.h.  */
2250$4
2251int
2252main ()
2253{
2254static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2255test_array [0] = 0
2256
2257  ;
2258  return 0;
2259}
2260_ACEOF
2261if ac_fn_cxx_try_compile "$LINENO"; then :
2262  ac_hi=$ac_mid; break
2263else
2264  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2265			if test $ac_lo -le $ac_mid; then
2266			  ac_lo= ac_hi=
2267			  break
2268			fi
2269			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2270fi
2271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2272  done
2273else
2274  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h.  */
2276$4
2277int
2278main ()
2279{
2280static int test_array [1 - 2 * !(($2) < 0)];
2281test_array [0] = 0
2282
2283  ;
2284  return 0;
2285}
2286_ACEOF
2287if ac_fn_cxx_try_compile "$LINENO"; then :
2288  ac_hi=-1 ac_mid=-1
2289  while :; do
2290    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h.  */
2292$4
2293int
2294main ()
2295{
2296static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2297test_array [0] = 0
2298
2299  ;
2300  return 0;
2301}
2302_ACEOF
2303if ac_fn_cxx_try_compile "$LINENO"; then :
2304  ac_lo=$ac_mid; break
2305else
2306  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2307			if test $ac_mid -le $ac_hi; then
2308			  ac_lo= ac_hi=
2309			  break
2310			fi
2311			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2312fi
2313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314  done
2315else
2316  ac_lo= ac_hi=
2317fi
2318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319fi
2320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2321# Binary search between lo and hi bounds.
2322while test "x$ac_lo" != "x$ac_hi"; do
2323  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2324  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2325/* end confdefs.h.  */
2326$4
2327int
2328main ()
2329{
2330static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2331test_array [0] = 0
2332
2333  ;
2334  return 0;
2335}
2336_ACEOF
2337if ac_fn_cxx_try_compile "$LINENO"; then :
2338  ac_hi=$ac_mid
2339else
2340  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2341fi
2342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2343done
2344case $ac_lo in #((
2345?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2346'') ac_retval=1 ;;
2347esac
2348  else
2349    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2350/* end confdefs.h.  */
2351$4
2352static long int longval () { return $2; }
2353static unsigned long int ulongval () { return $2; }
2354#include <stdio.h>
2355#include <stdlib.h>
2356int
2357main ()
2358{
2359
2360  FILE *f = fopen ("conftest.val", "w");
2361  if (! f)
2362    return 1;
2363  if (($2) < 0)
2364    {
2365      long int i = longval ();
2366      if (i != ($2))
2367	return 1;
2368      fprintf (f, "%ld", i);
2369    }
2370  else
2371    {
2372      unsigned long int i = ulongval ();
2373      if (i != ($2))
2374	return 1;
2375      fprintf (f, "%lu", i);
2376    }
2377  /* Do not output a trailing newline, as this causes \r\n confusion
2378     on some platforms.  */
2379  return ferror (f) || fclose (f) != 0;
2380
2381  ;
2382  return 0;
2383}
2384_ACEOF
2385if ac_fn_cxx_try_run "$LINENO"; then :
2386  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2387else
2388  ac_retval=1
2389fi
2390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2391  conftest.$ac_objext conftest.beam conftest.$ac_ext
2392rm -f conftest.val
2393
2394  fi
2395  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2396  as_fn_set_status $ac_retval
2397
2398} # ac_fn_cxx_compute_int
2399
2400# ac_fn_cxx_try_link LINENO
2401# -------------------------
2402# Try to link conftest.$ac_ext, and return whether this succeeded.
2403ac_fn_cxx_try_link ()
2404{
2405  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2406  rm -f conftest.$ac_objext conftest$ac_exeext
2407  if { { ac_try="$ac_link"
2408case "(($ac_try" in
2409  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2410  *) ac_try_echo=$ac_try;;
2411esac
2412eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2413$as_echo "$ac_try_echo"; } >&5
2414  (eval "$ac_link") 2>conftest.err
2415  ac_status=$?
2416  if test -s conftest.err; then
2417    grep -v '^ *+' conftest.err >conftest.er1
2418    cat conftest.er1 >&5
2419    mv -f conftest.er1 conftest.err
2420  fi
2421  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2422  test $ac_status = 0; } && {
2423	 test -z "$ac_cxx_werror_flag" ||
2424	 test ! -s conftest.err
2425       } && test -s conftest$ac_exeext && {
2426	 test "$cross_compiling" = yes ||
2427	 $as_test_x conftest$ac_exeext
2428       }; then :
2429  ac_retval=0
2430else
2431  $as_echo "$as_me: failed program was:" >&5
2432sed 's/^/| /' conftest.$ac_ext >&5
2433
2434	ac_retval=1
2435fi
2436  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2437  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2438  # interfere with the next link command; also delete a directory that is
2439  # left behind by Apple's compiler.  We do this before executing the actions.
2440  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2441  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2442  as_fn_set_status $ac_retval
2443
2444} # ac_fn_cxx_try_link
2445
2446# ac_fn_cxx_check_func LINENO FUNC VAR
2447# ------------------------------------
2448# Tests whether FUNC exists, setting the cache variable VAR accordingly
2449ac_fn_cxx_check_func ()
2450{
2451  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2453$as_echo_n "checking for $2... " >&6; }
2454if eval "test \"\${$3+set}\"" = set; then :
2455  $as_echo_n "(cached) " >&6
2456else
2457  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2458/* end confdefs.h.  */
2459/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2460   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2461#define $2 innocuous_$2
2462
2463/* System header to define __stub macros and hopefully few prototypes,
2464    which can conflict with char $2 (); below.
2465    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2466    <limits.h> exists even on freestanding compilers.  */
2467
2468#ifdef __STDC__
2469# include <limits.h>
2470#else
2471# include <assert.h>
2472#endif
2473
2474#undef $2
2475
2476/* Override any GCC internal prototype to avoid an error.
2477   Use char because int might match the return type of a GCC
2478   builtin and then its argument prototype would still apply.  */
2479#ifdef __cplusplus
2480extern "C"
2481#endif
2482char $2 ();
2483/* The GNU C library defines this for functions which it implements
2484    to always fail with ENOSYS.  Some functions are actually named
2485    something starting with __ and the normal name is an alias.  */
2486#if defined __stub_$2 || defined __stub___$2
2487choke me
2488#endif
2489
2490int
2491main ()
2492{
2493return $2 ();
2494  ;
2495  return 0;
2496}
2497_ACEOF
2498if ac_fn_cxx_try_link "$LINENO"; then :
2499  eval "$3=yes"
2500else
2501  eval "$3=no"
2502fi
2503rm -f core conftest.err conftest.$ac_objext \
2504    conftest$ac_exeext conftest.$ac_ext
2505fi
2506eval ac_res=\$$3
2507	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2508$as_echo "$ac_res" >&6; }
2509  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2510
2511} # ac_fn_cxx_check_func
2512
2513# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2514# -------------------------------------------------------
2515# Tests whether HEADER exists and can be compiled using the include files in
2516# INCLUDES, setting the cache variable VAR accordingly.
2517ac_fn_c_check_header_compile ()
2518{
2519  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2521$as_echo_n "checking for $2... " >&6; }
2522if eval "test \"\${$3+set}\"" = set; then :
2523  $as_echo_n "(cached) " >&6
2524else
2525  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2526/* end confdefs.h.  */
2527$4
2528#include <$2>
2529_ACEOF
2530if ac_fn_c_try_compile "$LINENO"; then :
2531  eval "$3=yes"
2532else
2533  eval "$3=no"
2534fi
2535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2536fi
2537eval ac_res=\$$3
2538	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2539$as_echo "$ac_res" >&6; }
2540  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2541
2542} # ac_fn_c_check_header_compile
2543cat >config.log <<_ACEOF
2544This file contains any messages produced by compilers while
2545running configure, to aid debugging if configure makes a mistake.
2546
2547It was created by OpenJDK $as_me jdk8, which was
2548generated by GNU Autoconf 2.67.  Invocation command line was
2549
2550  $ $0 $@
2551
2552_ACEOF
2553exec 5>>config.log
2554{
2555cat <<_ASUNAME
2556## --------- ##
2557## Platform. ##
2558## --------- ##
2559
2560hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2561uname -m = `(uname -m) 2>/dev/null || echo unknown`
2562uname -r = `(uname -r) 2>/dev/null || echo unknown`
2563uname -s = `(uname -s) 2>/dev/null || echo unknown`
2564uname -v = `(uname -v) 2>/dev/null || echo unknown`
2565
2566/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2567/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2568
2569/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2570/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2571/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2572/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2573/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2574/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2575/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2576
2577_ASUNAME
2578
2579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2580for as_dir in $PATH
2581do
2582  IFS=$as_save_IFS
2583  test -z "$as_dir" && as_dir=.
2584    $as_echo "PATH: $as_dir"
2585  done
2586IFS=$as_save_IFS
2587
2588} >&5
2589
2590cat >&5 <<_ACEOF
2591
2592
2593## ----------- ##
2594## Core tests. ##
2595## ----------- ##
2596
2597_ACEOF
2598
2599
2600# Keep a trace of the command line.
2601# Strip out --no-create and --no-recursion so they do not pile up.
2602# Strip out --silent because we don't want to record it for future runs.
2603# Also quote any args containing shell meta-characters.
2604# Make two passes to allow for proper duplicate-argument suppression.
2605ac_configure_args=
2606ac_configure_args0=
2607ac_configure_args1=
2608ac_must_keep_next=false
2609for ac_pass in 1 2
2610do
2611  for ac_arg
2612  do
2613    case $ac_arg in
2614    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2615    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2616    | -silent | --silent | --silen | --sile | --sil)
2617      continue ;;
2618    *\'*)
2619      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2620    esac
2621    case $ac_pass in
2622    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2623    2)
2624      as_fn_append ac_configure_args1 " '$ac_arg'"
2625      if test $ac_must_keep_next = true; then
2626	ac_must_keep_next=false # Got value, back to normal.
2627      else
2628	case $ac_arg in
2629	  *=* | --config-cache | -C | -disable-* | --disable-* \
2630	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2631	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2632	  | -with-* | --with-* | -without-* | --without-* | --x)
2633	    case "$ac_configure_args0 " in
2634	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2635	    esac
2636	    ;;
2637	  -* ) ac_must_keep_next=true ;;
2638	esac
2639      fi
2640      as_fn_append ac_configure_args " '$ac_arg'"
2641      ;;
2642    esac
2643  done
2644done
2645{ ac_configure_args0=; unset ac_configure_args0;}
2646{ ac_configure_args1=; unset ac_configure_args1;}
2647
2648# When interrupted or exit'd, cleanup temporary files, and complete
2649# config.log.  We remove comments because anyway the quotes in there
2650# would cause problems or look ugly.
2651# WARNING: Use '\'' to represent an apostrophe within the trap.
2652# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2653trap 'exit_status=$?
2654  # Save into config.log some information that might help in debugging.
2655  {
2656    echo
2657
2658    $as_echo "## ---------------- ##
2659## Cache variables. ##
2660## ---------------- ##"
2661    echo
2662    # The following way of writing the cache mishandles newlines in values,
2663(
2664  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2665    eval ac_val=\$$ac_var
2666    case $ac_val in #(
2667    *${as_nl}*)
2668      case $ac_var in #(
2669      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2670$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2671      esac
2672      case $ac_var in #(
2673      _ | IFS | as_nl) ;; #(
2674      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2675      *) { eval $ac_var=; unset $ac_var;} ;;
2676      esac ;;
2677    esac
2678  done
2679  (set) 2>&1 |
2680    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2681    *${as_nl}ac_space=\ *)
2682      sed -n \
2683	"s/'\''/'\''\\\\'\'''\''/g;
2684	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2685      ;; #(
2686    *)
2687      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2688      ;;
2689    esac |
2690    sort
2691)
2692    echo
2693
2694    $as_echo "## ----------------- ##
2695## Output variables. ##
2696## ----------------- ##"
2697    echo
2698    for ac_var in $ac_subst_vars
2699    do
2700      eval ac_val=\$$ac_var
2701      case $ac_val in
2702      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2703      esac
2704      $as_echo "$ac_var='\''$ac_val'\''"
2705    done | sort
2706    echo
2707
2708    if test -n "$ac_subst_files"; then
2709      $as_echo "## ------------------- ##
2710## File substitutions. ##
2711## ------------------- ##"
2712      echo
2713      for ac_var in $ac_subst_files
2714      do
2715	eval ac_val=\$$ac_var
2716	case $ac_val in
2717	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2718	esac
2719	$as_echo "$ac_var='\''$ac_val'\''"
2720      done | sort
2721      echo
2722    fi
2723
2724    if test -s confdefs.h; then
2725      $as_echo "## ----------- ##
2726## confdefs.h. ##
2727## ----------- ##"
2728      echo
2729      cat confdefs.h
2730      echo
2731    fi
2732    test "$ac_signal" != 0 &&
2733      $as_echo "$as_me: caught signal $ac_signal"
2734    $as_echo "$as_me: exit $exit_status"
2735  } >&5
2736  rm -f core *.core core.conftest.* &&
2737    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2738    exit $exit_status
2739' 0
2740for ac_signal in 1 2 13 15; do
2741  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2742done
2743ac_signal=0
2744
2745# confdefs.h avoids OS command line length limits that DEFS can exceed.
2746rm -f -r conftest* confdefs.h
2747
2748$as_echo "/* confdefs.h */" > confdefs.h
2749
2750# Predefined preprocessor variables.
2751
2752cat >>confdefs.h <<_ACEOF
2753#define PACKAGE_NAME "$PACKAGE_NAME"
2754_ACEOF
2755
2756cat >>confdefs.h <<_ACEOF
2757#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2758_ACEOF
2759
2760cat >>confdefs.h <<_ACEOF
2761#define PACKAGE_VERSION "$PACKAGE_VERSION"
2762_ACEOF
2763
2764cat >>confdefs.h <<_ACEOF
2765#define PACKAGE_STRING "$PACKAGE_STRING"
2766_ACEOF
2767
2768cat >>confdefs.h <<_ACEOF
2769#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2770_ACEOF
2771
2772cat >>confdefs.h <<_ACEOF
2773#define PACKAGE_URL "$PACKAGE_URL"
2774_ACEOF
2775
2776
2777# Let the site file select an alternate cache file if it wants to.
2778# Prefer an explicitly selected file to automatically selected ones.
2779ac_site_file1=NONE
2780ac_site_file2=NONE
2781if test -n "$CONFIG_SITE"; then
2782  # We do not want a PATH search for config.site.
2783  case $CONFIG_SITE in #((
2784    -*)  ac_site_file1=./$CONFIG_SITE;;
2785    */*) ac_site_file1=$CONFIG_SITE;;
2786    *)   ac_site_file1=./$CONFIG_SITE;;
2787  esac
2788elif test "x$prefix" != xNONE; then
2789  ac_site_file1=$prefix/share/config.site
2790  ac_site_file2=$prefix/etc/config.site
2791else
2792  ac_site_file1=$ac_default_prefix/share/config.site
2793  ac_site_file2=$ac_default_prefix/etc/config.site
2794fi
2795for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2796do
2797  test "x$ac_site_file" = xNONE && continue
2798  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2799    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2800$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2801    sed 's/^/| /' "$ac_site_file" >&5
2802    . "$ac_site_file" \
2803      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2804$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2805as_fn_error $? "failed to load site script $ac_site_file
2806See \`config.log' for more details" "$LINENO" 5 ; }
2807  fi
2808done
2809
2810if test -r "$cache_file"; then
2811  # Some versions of bash will fail to source /dev/null (special files
2812  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2813  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2814    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2815$as_echo "$as_me: loading cache $cache_file" >&6;}
2816    case $cache_file in
2817      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2818      *)                      . "./$cache_file";;
2819    esac
2820  fi
2821else
2822  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2823$as_echo "$as_me: creating cache $cache_file" >&6;}
2824  >$cache_file
2825fi
2826
2827# Check that the precious variables saved in the cache have kept the same
2828# value.
2829ac_cache_corrupted=false
2830for ac_var in $ac_precious_vars; do
2831  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2832  eval ac_new_set=\$ac_env_${ac_var}_set
2833  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2834  eval ac_new_val=\$ac_env_${ac_var}_value
2835  case $ac_old_set,$ac_new_set in
2836    set,)
2837      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2838$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2839      ac_cache_corrupted=: ;;
2840    ,set)
2841      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2842$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2843      ac_cache_corrupted=: ;;
2844    ,);;
2845    *)
2846      if test "x$ac_old_val" != "x$ac_new_val"; then
2847	# differences in whitespace do not lead to failure.
2848	ac_old_val_w=`echo x $ac_old_val`
2849	ac_new_val_w=`echo x $ac_new_val`
2850	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2851	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2852$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2853	  ac_cache_corrupted=:
2854	else
2855	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2856$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2857	  eval $ac_var=\$ac_old_val
2858	fi
2859	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2860$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2861	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2862$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2863      fi;;
2864  esac
2865  # Pass precious variables to config.status.
2866  if test "$ac_new_set" = set; then
2867    case $ac_new_val in
2868    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2869    *) ac_arg=$ac_var=$ac_new_val ;;
2870    esac
2871    case " $ac_configure_args " in
2872      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2873      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2874    esac
2875  fi
2876done
2877if $ac_cache_corrupted; then
2878  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2880  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2881$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2882  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2883fi
2884## -------------------- ##
2885## Main body of script. ##
2886## -------------------- ##
2887
2888ac_ext=c
2889ac_cpp='$CPP $CPPFLAGS'
2890ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2891ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2892ac_compiler_gnu=$ac_cv_c_compiler_gnu
2893
2894
2895
2896ac_aux_dir=
2897for ac_dir in build-aux "$srcdir"/build-aux; do
2898  if test -f "$ac_dir/install-sh"; then
2899    ac_aux_dir=$ac_dir
2900    ac_install_sh="$ac_aux_dir/install-sh -c"
2901    break
2902  elif test -f "$ac_dir/install.sh"; then
2903    ac_aux_dir=$ac_dir
2904    ac_install_sh="$ac_aux_dir/install.sh -c"
2905    break
2906  elif test -f "$ac_dir/shtool"; then
2907    ac_aux_dir=$ac_dir
2908    ac_install_sh="$ac_aux_dir/shtool install -c"
2909    break
2910  fi
2911done
2912if test -z "$ac_aux_dir"; then
2913  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2914fi
2915
2916# These three variables are undocumented and unsupported,
2917# and are intended to be withdrawn in a future Autoconf release.
2918# They can cause serious problems if a builder's source tree is in a directory
2919# whose full name contains unusual characters.
2920ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2921ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2922ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2923
2924
2925# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2926#
2927# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2928#
2929# This program is free software; you can redistribute it and/or modify
2930# it under the terms of the GNU General Public License as published by
2931# the Free Software Foundation; either version 2 of the License, or
2932# (at your option) any later version.
2933#
2934# This program is distributed in the hope that it will be useful, but
2935# WITHOUT ANY WARRANTY; without even the implied warranty of
2936# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2937# General Public License for more details.
2938#
2939# You should have received a copy of the GNU General Public License
2940# along with this program; if not, write to the Free Software
2941# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2942#
2943# As a special exception to the GNU General Public License, if you
2944# distribute this file as part of a program that contains a
2945# configuration script generated by Autoconf, you may include it under
2946# the same distribution terms that you use for the rest of that program.
2947
2948# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2949# ----------------------------------
2950# PKG_PROG_PKG_CONFIG
2951
2952# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2953#
2954# Check to see whether a particular set of modules exists.  Similar
2955# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2956#
2957#
2958# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2959# this or PKG_CHECK_MODULES is called, or make sure to call
2960# PKG_CHECK_EXISTS manually
2961# --------------------------------------------------------------
2962
2963
2964
2965# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2966# ---------------------------------------------
2967# _PKG_CONFIG
2968
2969# _PKG_SHORT_ERRORS_SUPPORTED
2970# -----------------------------
2971# _PKG_SHORT_ERRORS_SUPPORTED
2972
2973
2974# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2975# [ACTION-IF-NOT-FOUND])
2976#
2977#
2978# Note that if there is a possibility the first call to
2979# PKG_CHECK_MODULES might not happen, you should be sure to include an
2980# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2981#
2982#
2983# --------------------------------------------------------------
2984# PKG_CHECK_MODULES
2985
2986
2987# Include these first...
2988#
2989# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
2990# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2991#
2992# This code is free software; you can redistribute it and/or modify it
2993# under the terms of the GNU General Public License version 2 only, as
2994# published by the Free Software Foundation.  Oracle designates this
2995# particular file as subject to the "Classpath" exception as provided
2996# by Oracle in the LICENSE file that accompanied this code.
2997#
2998# This code is distributed in the hope that it will be useful, but WITHOUT
2999# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3000# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3001# version 2 for more details (a copy is included in the LICENSE file that
3002# accompanied this code).
3003#
3004# You should have received a copy of the GNU General Public License version
3005# 2 along with this work; if not, write to the Free Software Foundation,
3006# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3007#
3008# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3009# or visit www.oracle.com if you need additional information or have any
3010# questions.
3011#
3012
3013
3014
3015# This will make sure the given variable points to a full and proper
3016# path. This means:
3017# 1) There will be no spaces in the path. On posix platforms,
3018#    spaces in the path will result in an error. On Windows,
3019#    the path will be rewritten using short-style to be space-free.
3020# 2) The path will be absolute, and it will be in unix-style (on
3021#     cygwin).
3022# $1: The name of the variable to fix
3023
3024
3025# This will make sure the given variable points to a executable
3026# with a full and proper path. This means:
3027# 1) There will be no spaces in the path. On posix platforms,
3028#    spaces in the path will result in an error. On Windows,
3029#    the path will be rewritten using short-style to be space-free.
3030# 2) The path will be absolute, and it will be in unix-style (on
3031#     cygwin).
3032# Any arguments given to the executable is preserved.
3033# If the input variable does not have a directory specification, then
3034# it need to be in the PATH.
3035# $1: The name of the variable to fix
3036
3037
3038
3039
3040
3041
3042# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3043# $1: variable to check
3044# $2: executable name to print in warning (optional)
3045
3046
3047# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3048# Arguments as AC_PATH_PROG:
3049# $1: variable to set
3050# $2: executable name to look for
3051
3052
3053# Setup the most fundamental tools that relies on not much else to set up,
3054# but is used by much of the early bootstrap code.
3055
3056
3057# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3058
3059
3060
3061
3062
3063
3064
3065#%%% Simple tools %%%
3066
3067# Check if we have found a usable version of make
3068# $1: the path to a potential make binary (or empty)
3069# $2: the description on how we found this
3070
3071
3072# Goes looking for a usable version of GNU make.
3073
3074
3075
3076
3077
3078
3079# Check if build directory is on local disk. If not possible to determine,
3080# we prefer to claim it's local.
3081# Argument 1: directory to test
3082# Argument 2: what to do if it is on local disk
3083# Argument 3: what to do otherwise (remote disk or failure)
3084
3085
3086# Check that source files have basic read permissions set. This might
3087# not be the case in cygwin in certain conditions.
3088
3089
3090
3091
3092#
3093# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3094# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3095#
3096# This code is free software; you can redistribute it and/or modify it
3097# under the terms of the GNU General Public License version 2 only, as
3098# published by the Free Software Foundation.  Oracle designates this
3099# particular file as subject to the "Classpath" exception as provided
3100# by Oracle in the LICENSE file that accompanied this code.
3101#
3102# This code is distributed in the hope that it will be useful, but WITHOUT
3103# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3104# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3105# version 2 for more details (a copy is included in the LICENSE file that
3106# accompanied this code).
3107#
3108# You should have received a copy of the GNU General Public License version
3109# 2 along with this work; if not, write to the Free Software Foundation,
3110# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3111#
3112# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3113# or visit www.oracle.com if you need additional information or have any
3114# questions.
3115#
3116
3117
3118
3119
3120
3121# Helper function which possibly converts a path using DOS-style short mode.
3122# If so, the updated path is stored in $new_path.
3123# $1: The path to check
3124
3125
3126# Helper function which possibly converts a path using DOS-style short mode.
3127# If so, the updated path is stored in $new_path.
3128# $1: The path to check
3129
3130
3131# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3132# and could probably be heavily simplified. However, all changes in this
3133# area tend to need lot of testing in different scenarios, and in lack of
3134# proper unit testing, cleaning this up has not been deemed worth the effort
3135# at the moment.
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3146
3147
3148
3149
3150#
3151# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3152# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3153#
3154# This code is free software; you can redistribute it and/or modify it
3155# under the terms of the GNU General Public License version 2 only, as
3156# published by the Free Software Foundation.  Oracle designates this
3157# particular file as subject to the "Classpath" exception as provided
3158# by Oracle in the LICENSE file that accompanied this code.
3159#
3160# This code is distributed in the hope that it will be useful, but WITHOUT
3161# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3162# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3163# version 2 for more details (a copy is included in the LICENSE file that
3164# accompanied this code).
3165#
3166# You should have received a copy of the GNU General Public License version
3167# 2 along with this work; if not, write to the Free Software Foundation,
3168# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3169#
3170# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3171# or visit www.oracle.com if you need additional information or have any
3172# questions.
3173#
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185# ... then the rest
3186#
3187# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3188# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3189#
3190# This code is free software; you can redistribute it and/or modify it
3191# under the terms of the GNU General Public License version 2 only, as
3192# published by the Free Software Foundation.  Oracle designates this
3193# particular file as subject to the "Classpath" exception as provided
3194# by Oracle in the LICENSE file that accompanied this code.
3195#
3196# This code is distributed in the hope that it will be useful, but WITHOUT
3197# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3198# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3199# version 2 for more details (a copy is included in the LICENSE file that
3200# accompanied this code).
3201#
3202# You should have received a copy of the GNU General Public License version
3203# 2 along with this work; if not, write to the Free Software Foundation,
3204# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3205#
3206# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3207# or visit www.oracle.com if you need additional information or have any
3208# questions.
3209#
3210
3211# Execute the check given as argument, and verify the result
3212# If the Boot JDK was previously found, do nothing
3213# $1 A command line (typically autoconf macro) to execute
3214
3215
3216# Test: Is bootjdk explicitely set by command line arguments?
3217
3218
3219# Test: Is bootjdk available from builddeps?
3220
3221
3222# Test: Is $JAVA_HOME set?
3223
3224
3225# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3226
3227
3228# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3229
3230
3231# Look for a jdk in the given path. If there are multiple, try to select the newest.
3232# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3233# $1 = Path to directory containing jdk installations.
3234# $2 = String to append to the found JDK directory to get the proper JDK home
3235
3236
3237# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3238# environmental variable as base for where to look.
3239# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3240
3241
3242# Test: Is there a JDK installed in default, well-known locations?
3243
3244
3245# Check that a command-line tool in the Boot JDK is correct
3246# $1 = name of variable to assign
3247# $2 = name of binary
3248
3249
3250###############################################################################
3251#
3252# We need a Boot JDK to bootstrap the build.
3253#
3254
3255
3256
3257
3258
3259#
3260# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3261# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3262#
3263# This code is free software; you can redistribute it and/or modify it
3264# under the terms of the GNU General Public License version 2 only, as
3265# published by the Free Software Foundation.  Oracle designates this
3266# particular file as subject to the "Classpath" exception as provided
3267# by Oracle in the LICENSE file that accompanied this code.
3268#
3269# This code is distributed in the hope that it will be useful, but WITHOUT
3270# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3271# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3272# version 2 for more details (a copy is included in the LICENSE file that
3273# accompanied this code).
3274#
3275# You should have received a copy of the GNU General Public License version
3276# 2 along with this work; if not, write to the Free Software Foundation,
3277# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3278#
3279# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3280# or visit www.oracle.com if you need additional information or have any
3281# questions.
3282#
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301#
3302# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3303# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3304#
3305# This code is free software; you can redistribute it and/or modify it
3306# under the terms of the GNU General Public License version 2 only, as
3307# published by the Free Software Foundation.  Oracle designates this
3308# particular file as subject to the "Classpath" exception as provided
3309# by Oracle in the LICENSE file that accompanied this code.
3310#
3311# This code is distributed in the hope that it will be useful, but WITHOUT
3312# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3313# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3314# version 2 for more details (a copy is included in the LICENSE file that
3315# accompanied this code).
3316#
3317# You should have received a copy of the GNU General Public License version
3318# 2 along with this work; if not, write to the Free Software Foundation,
3319# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3320#
3321# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3322# or visit www.oracle.com if you need additional information or have any
3323# questions.
3324#
3325
3326
3327
3328
3329
3330cygwin_help() {
3331    case $1 in
3332    unzip)
3333        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3334    zip)
3335        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3336    make)
3337        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3338    * )
3339       break ;;
3340    esac
3341}
3342
3343apt_help() {
3344    case $1 in
3345    devkit)
3346        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3347    openjdk)
3348        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3349    alsa)
3350        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3351    cups)
3352        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3353    freetype2)
3354        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3355    pulse)
3356        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3357    x11)
3358        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3359    ccache)
3360        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3361    * )
3362       break ;;
3363    esac
3364}
3365
3366yum_help() {
3367    case $1 in
3368    devkit)
3369        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3370    openjdk)
3371        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3372    alsa)
3373        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3374    cups)
3375        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3376    freetype2)
3377        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3378    pulse)
3379        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3380    x11)
3381        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3382    ccache)
3383        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3384    * )
3385       break ;;
3386    esac
3387}
3388
3389port_help() {
3390    PKGHANDLER_COMMAND=""
3391}
3392
3393pkgutil_help() {
3394    PKGHANDLER_COMMAND=""
3395}
3396
3397pkgadd_help() {
3398    PKGHANDLER_COMMAND=""
3399}
3400
3401
3402
3403#
3404# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3405# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3406#
3407# This code is free software; you can redistribute it and/or modify it
3408# under the terms of the GNU General Public License version 2 only, as
3409# published by the Free Software Foundation.  Oracle designates this
3410# particular file as subject to the "Classpath" exception as provided
3411# by Oracle in the LICENSE file that accompanied this code.
3412#
3413# This code is distributed in the hope that it will be useful, but WITHOUT
3414# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3415# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3416# version 2 for more details (a copy is included in the LICENSE file that
3417# accompanied this code).
3418#
3419# You should have received a copy of the GNU General Public License version
3420# 2 along with this work; if not, write to the Free Software Foundation,
3421# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3422#
3423# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3424# or visit www.oracle.com if you need additional information or have any
3425# questions.
3426#
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436###############################################################################
3437#
3438# Setup version numbers
3439#
3440
3441
3442
3443
3444
3445
3446# Support for customization of the build process. Some build files
3447# will include counterparts from this location, if they exist. This allows
3448# for a degree of customization of the build targets and the rules/recipes
3449# to create them
3450
3451# Check whether --with-custom-make-dir was given.
3452if test "${with_custom_make_dir+set}" = set; then :
3453  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3454fi
3455
3456
3457
3458#
3459# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3460# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3461#
3462# This code is free software; you can redistribute it and/or modify it
3463# under the terms of the GNU General Public License version 2 only, as
3464# published by the Free Software Foundation.  Oracle designates this
3465# particular file as subject to the "Classpath" exception as provided
3466# by Oracle in the LICENSE file that accompanied this code.
3467#
3468# This code is distributed in the hope that it will be useful, but WITHOUT
3469# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3470# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3471# version 2 for more details (a copy is included in the LICENSE file that
3472# accompanied this code).
3473#
3474# You should have received a copy of the GNU General Public License version
3475# 2 along with this work; if not, write to the Free Software Foundation,
3476# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3477#
3478# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3479# or visit www.oracle.com if you need additional information or have any
3480# questions.
3481#
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497#
3498# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3499# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3500#
3501# This code is free software; you can redistribute it and/or modify it
3502# under the terms of the GNU General Public License version 2 only, as
3503# published by the Free Software Foundation.  Oracle designates this
3504# particular file as subject to the "Classpath" exception as provided
3505# by Oracle in the LICENSE file that accompanied this code.
3506#
3507# This code is distributed in the hope that it will be useful, but WITHOUT
3508# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3509# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3510# version 2 for more details (a copy is included in the LICENSE file that
3511# accompanied this code).
3512#
3513# You should have received a copy of the GNU General Public License version
3514# 2 along with this work; if not, write to the Free Software Foundation,
3515# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3516#
3517# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3518# or visit www.oracle.com if you need additional information or have any
3519# questions.
3520#
3521
3522# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3523# Converts autoconf style CPU name to OpenJDK style, into
3524# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3525
3526
3527# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3528# Converts autoconf style OS name to OpenJDK style, into
3529# VAR_OS and VAR_OS_API.
3530
3531
3532# Expects $host_os $host_cpu $build_os and $build_cpu
3533# and $with_target_bits to have been setup!
3534#
3535# Translate the standard triplet(quadruplet) definition
3536# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3537# OPENJDK_BUILD_OS, etc.
3538
3539
3540# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3541# accordingly. Must be done after setting up build and target system, but before
3542# doing anything else with these values.
3543
3544
3545    # Setup the legacy variables, for controlling the old makefiles.
3546    #
3547
3548
3549
3550
3551#%%% Build and target systems %%%
3552
3553
3554
3555
3556# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3557# Add -mX to various FLAGS variables.
3558
3559
3560
3561
3562
3563
3564#
3565# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3566# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3567#
3568# This code is free software; you can redistribute it and/or modify it
3569# under the terms of the GNU General Public License version 2 only, as
3570# published by the Free Software Foundation.  Oracle designates this
3571# particular file as subject to the "Classpath" exception as provided
3572# by Oracle in the LICENSE file that accompanied this code.
3573#
3574# This code is distributed in the hope that it will be useful, but WITHOUT
3575# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3576# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3577# version 2 for more details (a copy is included in the LICENSE file that
3578# accompanied this code).
3579#
3580# You should have received a copy of the GNU General Public License version
3581# 2 along with this work; if not, write to the Free Software Foundation,
3582# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3583#
3584# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3585# or visit www.oracle.com if you need additional information or have any
3586# questions.
3587#
3588
3589
3590
3591
3592
3593
3594
3595
3596#
3597# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3598# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3599#
3600# This code is free software; you can redistribute it and/or modify it
3601# under the terms of the GNU General Public License version 2 only, as
3602# published by the Free Software Foundation.  Oracle designates this
3603# particular file as subject to the "Classpath" exception as provided
3604# by Oracle in the LICENSE file that accompanied this code.
3605#
3606# This code is distributed in the hope that it will be useful, but WITHOUT
3607# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3608# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3609# version 2 for more details (a copy is included in the LICENSE file that
3610# accompanied this code).
3611#
3612# You should have received a copy of the GNU General Public License version
3613# 2 along with this work; if not, write to the Free Software Foundation,
3614# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3615#
3616# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3617# or visit www.oracle.com if you need additional information or have any
3618# questions.
3619#
3620
3621# $1 = compiler to test (CC or CXX)
3622# $2 = human readable name of compiler (C or C++)
3623
3624
3625
3626
3627
3628# $1 = compiler to test (CC or CXX)
3629# $2 = human readable name of compiler (C or C++)
3630# $3 = list of compiler names to search for
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643#
3644# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3645# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3646#
3647# This code is free software; you can redistribute it and/or modify it
3648# under the terms of the GNU General Public License version 2 only, as
3649# published by the Free Software Foundation.  Oracle designates this
3650# particular file as subject to the "Classpath" exception as provided
3651# by Oracle in the LICENSE file that accompanied this code.
3652#
3653# This code is distributed in the hope that it will be useful, but WITHOUT
3654# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3655# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3656# version 2 for more details (a copy is included in the LICENSE file that
3657# accompanied this code).
3658#
3659# You should have received a copy of the GNU General Public License version
3660# 2 along with this work; if not, write to the Free Software Foundation,
3661# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3662#
3663# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3664# or visit www.oracle.com if you need additional information or have any
3665# questions.
3666#
3667
3668
3669
3670
3671
3672
3673
3674# Check if the VS env variables were setup prior to running configure.
3675# If not, then find vcvarsall.bat and run it automatically, and integrate
3676# the set env variables into the spec file.
3677
3678
3679
3680
3681
3682
3683# This line needs to be here, verbatim, after all includes and the dummy hook
3684# definitions. It is replaced with custom functionality when building
3685# custom sources.
3686#CUSTOM_AUTOCONF_INCLUDE
3687
3688# Do not change or remove the following line, it is needed for consistency checks:
3689DATE_WHEN_GENERATED=1357219413
3690
3691###############################################################################
3692#
3693# Initialization / Boot-strapping
3694#
3695# The bootstrapping process needs to solve the "chicken or the egg" problem,
3696# thus it jumps back and forth, each time gaining something needed later on.
3697#
3698###############################################################################
3699
3700# Basic initialization that must happen first of all
3701
3702# Save the original command line. This is passed to us by the wrapper configure script.
3703
3704DATE_WHEN_CONFIGURED=`LANG=C date`
3705
3706{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3707$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3708{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3709$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3710
3711
3712
3713# Start with tools that do not need have cross compilation support
3714# and can be expected to be found in the default PATH. These tools are
3715# used by configure. Nor are these tools expected to be found in the
3716# devkit from the builddeps server either, since they are
3717# needed to download the devkit.
3718
3719# First are all the simple required tools.
3720
3721    for ac_prog in basename
3722do
3723  # Extract the first word of "$ac_prog", so it can be a program name with args.
3724set dummy $ac_prog; ac_word=$2
3725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3726$as_echo_n "checking for $ac_word... " >&6; }
3727if test "${ac_cv_path_BASENAME+set}" = set; then :
3728  $as_echo_n "(cached) " >&6
3729else
3730  case $BASENAME in
3731  [\\/]* | ?:[\\/]*)
3732  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3733  ;;
3734  *)
3735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3736for as_dir in $PATH
3737do
3738  IFS=$as_save_IFS
3739  test -z "$as_dir" && as_dir=.
3740    for ac_exec_ext in '' $ac_executable_extensions; do
3741  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3742    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3744    break 2
3745  fi
3746done
3747  done
3748IFS=$as_save_IFS
3749
3750  ;;
3751esac
3752fi
3753BASENAME=$ac_cv_path_BASENAME
3754if test -n "$BASENAME"; then
3755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3756$as_echo "$BASENAME" >&6; }
3757else
3758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3759$as_echo "no" >&6; }
3760fi
3761
3762
3763  test -n "$BASENAME" && break
3764done
3765
3766
3767    if test "x$BASENAME" = x; then
3768        if test "xbasename" = x; then
3769          PROG_NAME=basename
3770        else
3771          PROG_NAME=basename
3772        fi
3773        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3774$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3775        as_fn_error $? "Cannot continue" "$LINENO" 5
3776    fi
3777
3778
3779
3780    for ac_prog in bash
3781do
3782  # Extract the first word of "$ac_prog", so it can be a program name with args.
3783set dummy $ac_prog; ac_word=$2
3784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3785$as_echo_n "checking for $ac_word... " >&6; }
3786if test "${ac_cv_path_BASH+set}" = set; then :
3787  $as_echo_n "(cached) " >&6
3788else
3789  case $BASH in
3790  [\\/]* | ?:[\\/]*)
3791  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3792  ;;
3793  *)
3794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3795for as_dir in $PATH
3796do
3797  IFS=$as_save_IFS
3798  test -z "$as_dir" && as_dir=.
3799    for ac_exec_ext in '' $ac_executable_extensions; do
3800  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3801    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3803    break 2
3804  fi
3805done
3806  done
3807IFS=$as_save_IFS
3808
3809  ;;
3810esac
3811fi
3812BASH=$ac_cv_path_BASH
3813if test -n "$BASH"; then
3814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3815$as_echo "$BASH" >&6; }
3816else
3817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3818$as_echo "no" >&6; }
3819fi
3820
3821
3822  test -n "$BASH" && break
3823done
3824
3825
3826    if test "x$BASH" = x; then
3827        if test "xbash" = x; then
3828          PROG_NAME=bash
3829        else
3830          PROG_NAME=bash
3831        fi
3832        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3833$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3834        as_fn_error $? "Cannot continue" "$LINENO" 5
3835    fi
3836
3837
3838
3839    for ac_prog in cat
3840do
3841  # Extract the first word of "$ac_prog", so it can be a program name with args.
3842set dummy $ac_prog; ac_word=$2
3843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3844$as_echo_n "checking for $ac_word... " >&6; }
3845if test "${ac_cv_path_CAT+set}" = set; then :
3846  $as_echo_n "(cached) " >&6
3847else
3848  case $CAT in
3849  [\\/]* | ?:[\\/]*)
3850  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3851  ;;
3852  *)
3853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3854for as_dir in $PATH
3855do
3856  IFS=$as_save_IFS
3857  test -z "$as_dir" && as_dir=.
3858    for ac_exec_ext in '' $ac_executable_extensions; do
3859  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3860    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3862    break 2
3863  fi
3864done
3865  done
3866IFS=$as_save_IFS
3867
3868  ;;
3869esac
3870fi
3871CAT=$ac_cv_path_CAT
3872if test -n "$CAT"; then
3873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3874$as_echo "$CAT" >&6; }
3875else
3876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3877$as_echo "no" >&6; }
3878fi
3879
3880
3881  test -n "$CAT" && break
3882done
3883
3884
3885    if test "x$CAT" = x; then
3886        if test "xcat" = x; then
3887          PROG_NAME=cat
3888        else
3889          PROG_NAME=cat
3890        fi
3891        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3892$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3893        as_fn_error $? "Cannot continue" "$LINENO" 5
3894    fi
3895
3896
3897
3898    for ac_prog in chmod
3899do
3900  # Extract the first word of "$ac_prog", so it can be a program name with args.
3901set dummy $ac_prog; ac_word=$2
3902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3903$as_echo_n "checking for $ac_word... " >&6; }
3904if test "${ac_cv_path_CHMOD+set}" = set; then :
3905  $as_echo_n "(cached) " >&6
3906else
3907  case $CHMOD in
3908  [\\/]* | ?:[\\/]*)
3909  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3910  ;;
3911  *)
3912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3913for as_dir in $PATH
3914do
3915  IFS=$as_save_IFS
3916  test -z "$as_dir" && as_dir=.
3917    for ac_exec_ext in '' $ac_executable_extensions; do
3918  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3919    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3921    break 2
3922  fi
3923done
3924  done
3925IFS=$as_save_IFS
3926
3927  ;;
3928esac
3929fi
3930CHMOD=$ac_cv_path_CHMOD
3931if test -n "$CHMOD"; then
3932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3933$as_echo "$CHMOD" >&6; }
3934else
3935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3936$as_echo "no" >&6; }
3937fi
3938
3939
3940  test -n "$CHMOD" && break
3941done
3942
3943
3944    if test "x$CHMOD" = x; then
3945        if test "xchmod" = x; then
3946          PROG_NAME=chmod
3947        else
3948          PROG_NAME=chmod
3949        fi
3950        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3951$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3952        as_fn_error $? "Cannot continue" "$LINENO" 5
3953    fi
3954
3955
3956
3957    for ac_prog in cmp
3958do
3959  # Extract the first word of "$ac_prog", so it can be a program name with args.
3960set dummy $ac_prog; ac_word=$2
3961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3962$as_echo_n "checking for $ac_word... " >&6; }
3963if test "${ac_cv_path_CMP+set}" = set; then :
3964  $as_echo_n "(cached) " >&6
3965else
3966  case $CMP in
3967  [\\/]* | ?:[\\/]*)
3968  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3969  ;;
3970  *)
3971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3972for as_dir in $PATH
3973do
3974  IFS=$as_save_IFS
3975  test -z "$as_dir" && as_dir=.
3976    for ac_exec_ext in '' $ac_executable_extensions; do
3977  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3978    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3980    break 2
3981  fi
3982done
3983  done
3984IFS=$as_save_IFS
3985
3986  ;;
3987esac
3988fi
3989CMP=$ac_cv_path_CMP
3990if test -n "$CMP"; then
3991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
3992$as_echo "$CMP" >&6; }
3993else
3994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3995$as_echo "no" >&6; }
3996fi
3997
3998
3999  test -n "$CMP" && break
4000done
4001
4002
4003    if test "x$CMP" = x; then
4004        if test "xcmp" = x; then
4005          PROG_NAME=cmp
4006        else
4007          PROG_NAME=cmp
4008        fi
4009        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4010$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4011        as_fn_error $? "Cannot continue" "$LINENO" 5
4012    fi
4013
4014
4015
4016    for ac_prog in comm
4017do
4018  # Extract the first word of "$ac_prog", so it can be a program name with args.
4019set dummy $ac_prog; ac_word=$2
4020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4021$as_echo_n "checking for $ac_word... " >&6; }
4022if test "${ac_cv_path_COMM+set}" = set; then :
4023  $as_echo_n "(cached) " >&6
4024else
4025  case $COMM in
4026  [\\/]* | ?:[\\/]*)
4027  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4028  ;;
4029  *)
4030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4031for as_dir in $PATH
4032do
4033  IFS=$as_save_IFS
4034  test -z "$as_dir" && as_dir=.
4035    for ac_exec_ext in '' $ac_executable_extensions; do
4036  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4037    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4039    break 2
4040  fi
4041done
4042  done
4043IFS=$as_save_IFS
4044
4045  ;;
4046esac
4047fi
4048COMM=$ac_cv_path_COMM
4049if test -n "$COMM"; then
4050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4051$as_echo "$COMM" >&6; }
4052else
4053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4054$as_echo "no" >&6; }
4055fi
4056
4057
4058  test -n "$COMM" && break
4059done
4060
4061
4062    if test "x$COMM" = x; then
4063        if test "xcomm" = x; then
4064          PROG_NAME=comm
4065        else
4066          PROG_NAME=comm
4067        fi
4068        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4069$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4070        as_fn_error $? "Cannot continue" "$LINENO" 5
4071    fi
4072
4073
4074
4075    for ac_prog in cp
4076do
4077  # Extract the first word of "$ac_prog", so it can be a program name with args.
4078set dummy $ac_prog; ac_word=$2
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4080$as_echo_n "checking for $ac_word... " >&6; }
4081if test "${ac_cv_path_CP+set}" = set; then :
4082  $as_echo_n "(cached) " >&6
4083else
4084  case $CP in
4085  [\\/]* | ?:[\\/]*)
4086  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4087  ;;
4088  *)
4089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4090for as_dir in $PATH
4091do
4092  IFS=$as_save_IFS
4093  test -z "$as_dir" && as_dir=.
4094    for ac_exec_ext in '' $ac_executable_extensions; do
4095  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4096    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4098    break 2
4099  fi
4100done
4101  done
4102IFS=$as_save_IFS
4103
4104  ;;
4105esac
4106fi
4107CP=$ac_cv_path_CP
4108if test -n "$CP"; then
4109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4110$as_echo "$CP" >&6; }
4111else
4112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4113$as_echo "no" >&6; }
4114fi
4115
4116
4117  test -n "$CP" && break
4118done
4119
4120
4121    if test "x$CP" = x; then
4122        if test "xcp" = x; then
4123          PROG_NAME=cp
4124        else
4125          PROG_NAME=cp
4126        fi
4127        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4128$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4129        as_fn_error $? "Cannot continue" "$LINENO" 5
4130    fi
4131
4132
4133
4134    for ac_prog in cpio
4135do
4136  # Extract the first word of "$ac_prog", so it can be a program name with args.
4137set dummy $ac_prog; ac_word=$2
4138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4139$as_echo_n "checking for $ac_word... " >&6; }
4140if test "${ac_cv_path_CPIO+set}" = set; then :
4141  $as_echo_n "(cached) " >&6
4142else
4143  case $CPIO in
4144  [\\/]* | ?:[\\/]*)
4145  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4146  ;;
4147  *)
4148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4149for as_dir in $PATH
4150do
4151  IFS=$as_save_IFS
4152  test -z "$as_dir" && as_dir=.
4153    for ac_exec_ext in '' $ac_executable_extensions; do
4154  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4155    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4157    break 2
4158  fi
4159done
4160  done
4161IFS=$as_save_IFS
4162
4163  ;;
4164esac
4165fi
4166CPIO=$ac_cv_path_CPIO
4167if test -n "$CPIO"; then
4168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4169$as_echo "$CPIO" >&6; }
4170else
4171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4172$as_echo "no" >&6; }
4173fi
4174
4175
4176  test -n "$CPIO" && break
4177done
4178
4179
4180    if test "x$CPIO" = x; then
4181        if test "xcpio" = x; then
4182          PROG_NAME=cpio
4183        else
4184          PROG_NAME=cpio
4185        fi
4186        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4187$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4188        as_fn_error $? "Cannot continue" "$LINENO" 5
4189    fi
4190
4191
4192
4193    for ac_prog in cut
4194do
4195  # Extract the first word of "$ac_prog", so it can be a program name with args.
4196set dummy $ac_prog; ac_word=$2
4197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4198$as_echo_n "checking for $ac_word... " >&6; }
4199if test "${ac_cv_path_CUT+set}" = set; then :
4200  $as_echo_n "(cached) " >&6
4201else
4202  case $CUT in
4203  [\\/]* | ?:[\\/]*)
4204  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4205  ;;
4206  *)
4207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4208for as_dir in $PATH
4209do
4210  IFS=$as_save_IFS
4211  test -z "$as_dir" && as_dir=.
4212    for ac_exec_ext in '' $ac_executable_extensions; do
4213  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4214    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4216    break 2
4217  fi
4218done
4219  done
4220IFS=$as_save_IFS
4221
4222  ;;
4223esac
4224fi
4225CUT=$ac_cv_path_CUT
4226if test -n "$CUT"; then
4227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4228$as_echo "$CUT" >&6; }
4229else
4230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4231$as_echo "no" >&6; }
4232fi
4233
4234
4235  test -n "$CUT" && break
4236done
4237
4238
4239    if test "x$CUT" = x; then
4240        if test "xcut" = x; then
4241          PROG_NAME=cut
4242        else
4243          PROG_NAME=cut
4244        fi
4245        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4246$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4247        as_fn_error $? "Cannot continue" "$LINENO" 5
4248    fi
4249
4250
4251
4252    for ac_prog in date
4253do
4254  # Extract the first word of "$ac_prog", so it can be a program name with args.
4255set dummy $ac_prog; ac_word=$2
4256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4257$as_echo_n "checking for $ac_word... " >&6; }
4258if test "${ac_cv_path_DATE+set}" = set; then :
4259  $as_echo_n "(cached) " >&6
4260else
4261  case $DATE in
4262  [\\/]* | ?:[\\/]*)
4263  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4264  ;;
4265  *)
4266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4267for as_dir in $PATH
4268do
4269  IFS=$as_save_IFS
4270  test -z "$as_dir" && as_dir=.
4271    for ac_exec_ext in '' $ac_executable_extensions; do
4272  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4273    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4275    break 2
4276  fi
4277done
4278  done
4279IFS=$as_save_IFS
4280
4281  ;;
4282esac
4283fi
4284DATE=$ac_cv_path_DATE
4285if test -n "$DATE"; then
4286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4287$as_echo "$DATE" >&6; }
4288else
4289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4290$as_echo "no" >&6; }
4291fi
4292
4293
4294  test -n "$DATE" && break
4295done
4296
4297
4298    if test "x$DATE" = x; then
4299        if test "xdate" = x; then
4300          PROG_NAME=date
4301        else
4302          PROG_NAME=date
4303        fi
4304        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4305$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4306        as_fn_error $? "Cannot continue" "$LINENO" 5
4307    fi
4308
4309
4310
4311    for ac_prog in gdiff diff
4312do
4313  # Extract the first word of "$ac_prog", so it can be a program name with args.
4314set dummy $ac_prog; ac_word=$2
4315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4316$as_echo_n "checking for $ac_word... " >&6; }
4317if test "${ac_cv_path_DIFF+set}" = set; then :
4318  $as_echo_n "(cached) " >&6
4319else
4320  case $DIFF in
4321  [\\/]* | ?:[\\/]*)
4322  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4323  ;;
4324  *)
4325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4326for as_dir in $PATH
4327do
4328  IFS=$as_save_IFS
4329  test -z "$as_dir" && as_dir=.
4330    for ac_exec_ext in '' $ac_executable_extensions; do
4331  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4332    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4334    break 2
4335  fi
4336done
4337  done
4338IFS=$as_save_IFS
4339
4340  ;;
4341esac
4342fi
4343DIFF=$ac_cv_path_DIFF
4344if test -n "$DIFF"; then
4345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4346$as_echo "$DIFF" >&6; }
4347else
4348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4349$as_echo "no" >&6; }
4350fi
4351
4352
4353  test -n "$DIFF" && break
4354done
4355
4356
4357    if test "x$DIFF" = x; then
4358        if test "xgdiff diff" = x; then
4359          PROG_NAME=diff
4360        else
4361          PROG_NAME=gdiff diff
4362        fi
4363        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4364$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4365        as_fn_error $? "Cannot continue" "$LINENO" 5
4366    fi
4367
4368
4369
4370    for ac_prog in dirname
4371do
4372  # Extract the first word of "$ac_prog", so it can be a program name with args.
4373set dummy $ac_prog; ac_word=$2
4374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4375$as_echo_n "checking for $ac_word... " >&6; }
4376if test "${ac_cv_path_DIRNAME+set}" = set; then :
4377  $as_echo_n "(cached) " >&6
4378else
4379  case $DIRNAME in
4380  [\\/]* | ?:[\\/]*)
4381  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4382  ;;
4383  *)
4384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4385for as_dir in $PATH
4386do
4387  IFS=$as_save_IFS
4388  test -z "$as_dir" && as_dir=.
4389    for ac_exec_ext in '' $ac_executable_extensions; do
4390  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4391    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4393    break 2
4394  fi
4395done
4396  done
4397IFS=$as_save_IFS
4398
4399  ;;
4400esac
4401fi
4402DIRNAME=$ac_cv_path_DIRNAME
4403if test -n "$DIRNAME"; then
4404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4405$as_echo "$DIRNAME" >&6; }
4406else
4407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4408$as_echo "no" >&6; }
4409fi
4410
4411
4412  test -n "$DIRNAME" && break
4413done
4414
4415
4416    if test "x$DIRNAME" = x; then
4417        if test "xdirname" = x; then
4418          PROG_NAME=dirname
4419        else
4420          PROG_NAME=dirname
4421        fi
4422        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4423$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4424        as_fn_error $? "Cannot continue" "$LINENO" 5
4425    fi
4426
4427
4428
4429    for ac_prog in echo
4430do
4431  # Extract the first word of "$ac_prog", so it can be a program name with args.
4432set dummy $ac_prog; ac_word=$2
4433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4434$as_echo_n "checking for $ac_word... " >&6; }
4435if test "${ac_cv_path_ECHO+set}" = set; then :
4436  $as_echo_n "(cached) " >&6
4437else
4438  case $ECHO in
4439  [\\/]* | ?:[\\/]*)
4440  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4441  ;;
4442  *)
4443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4444for as_dir in $PATH
4445do
4446  IFS=$as_save_IFS
4447  test -z "$as_dir" && as_dir=.
4448    for ac_exec_ext in '' $ac_executable_extensions; do
4449  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4450    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4452    break 2
4453  fi
4454done
4455  done
4456IFS=$as_save_IFS
4457
4458  ;;
4459esac
4460fi
4461ECHO=$ac_cv_path_ECHO
4462if test -n "$ECHO"; then
4463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4464$as_echo "$ECHO" >&6; }
4465else
4466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4467$as_echo "no" >&6; }
4468fi
4469
4470
4471  test -n "$ECHO" && break
4472done
4473
4474
4475    if test "x$ECHO" = x; then
4476        if test "xecho" = x; then
4477          PROG_NAME=echo
4478        else
4479          PROG_NAME=echo
4480        fi
4481        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4482$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4483        as_fn_error $? "Cannot continue" "$LINENO" 5
4484    fi
4485
4486
4487
4488    for ac_prog in expr
4489do
4490  # Extract the first word of "$ac_prog", so it can be a program name with args.
4491set dummy $ac_prog; ac_word=$2
4492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4493$as_echo_n "checking for $ac_word... " >&6; }
4494if test "${ac_cv_path_EXPR+set}" = set; then :
4495  $as_echo_n "(cached) " >&6
4496else
4497  case $EXPR in
4498  [\\/]* | ?:[\\/]*)
4499  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4500  ;;
4501  *)
4502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4503for as_dir in $PATH
4504do
4505  IFS=$as_save_IFS
4506  test -z "$as_dir" && as_dir=.
4507    for ac_exec_ext in '' $ac_executable_extensions; do
4508  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4509    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4511    break 2
4512  fi
4513done
4514  done
4515IFS=$as_save_IFS
4516
4517  ;;
4518esac
4519fi
4520EXPR=$ac_cv_path_EXPR
4521if test -n "$EXPR"; then
4522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4523$as_echo "$EXPR" >&6; }
4524else
4525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4526$as_echo "no" >&6; }
4527fi
4528
4529
4530  test -n "$EXPR" && break
4531done
4532
4533
4534    if test "x$EXPR" = x; then
4535        if test "xexpr" = x; then
4536          PROG_NAME=expr
4537        else
4538          PROG_NAME=expr
4539        fi
4540        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4541$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4542        as_fn_error $? "Cannot continue" "$LINENO" 5
4543    fi
4544
4545
4546
4547    for ac_prog in file
4548do
4549  # Extract the first word of "$ac_prog", so it can be a program name with args.
4550set dummy $ac_prog; ac_word=$2
4551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4552$as_echo_n "checking for $ac_word... " >&6; }
4553if test "${ac_cv_path_FILE+set}" = set; then :
4554  $as_echo_n "(cached) " >&6
4555else
4556  case $FILE in
4557  [\\/]* | ?:[\\/]*)
4558  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4559  ;;
4560  *)
4561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4562for as_dir in $PATH
4563do
4564  IFS=$as_save_IFS
4565  test -z "$as_dir" && as_dir=.
4566    for ac_exec_ext in '' $ac_executable_extensions; do
4567  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4568    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4570    break 2
4571  fi
4572done
4573  done
4574IFS=$as_save_IFS
4575
4576  ;;
4577esac
4578fi
4579FILE=$ac_cv_path_FILE
4580if test -n "$FILE"; then
4581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4582$as_echo "$FILE" >&6; }
4583else
4584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4585$as_echo "no" >&6; }
4586fi
4587
4588
4589  test -n "$FILE" && break
4590done
4591
4592
4593    if test "x$FILE" = x; then
4594        if test "xfile" = x; then
4595          PROG_NAME=file
4596        else
4597          PROG_NAME=file
4598        fi
4599        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4600$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4601        as_fn_error $? "Cannot continue" "$LINENO" 5
4602    fi
4603
4604
4605
4606    for ac_prog in find
4607do
4608  # Extract the first word of "$ac_prog", so it can be a program name with args.
4609set dummy $ac_prog; ac_word=$2
4610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4611$as_echo_n "checking for $ac_word... " >&6; }
4612if test "${ac_cv_path_FIND+set}" = set; then :
4613  $as_echo_n "(cached) " >&6
4614else
4615  case $FIND in
4616  [\\/]* | ?:[\\/]*)
4617  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4618  ;;
4619  *)
4620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4621for as_dir in $PATH
4622do
4623  IFS=$as_save_IFS
4624  test -z "$as_dir" && as_dir=.
4625    for ac_exec_ext in '' $ac_executable_extensions; do
4626  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4627    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4629    break 2
4630  fi
4631done
4632  done
4633IFS=$as_save_IFS
4634
4635  ;;
4636esac
4637fi
4638FIND=$ac_cv_path_FIND
4639if test -n "$FIND"; then
4640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4641$as_echo "$FIND" >&6; }
4642else
4643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4644$as_echo "no" >&6; }
4645fi
4646
4647
4648  test -n "$FIND" && break
4649done
4650
4651
4652    if test "x$FIND" = x; then
4653        if test "xfind" = x; then
4654          PROG_NAME=find
4655        else
4656          PROG_NAME=find
4657        fi
4658        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4659$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4660        as_fn_error $? "Cannot continue" "$LINENO" 5
4661    fi
4662
4663
4664
4665    for ac_prog in head
4666do
4667  # Extract the first word of "$ac_prog", so it can be a program name with args.
4668set dummy $ac_prog; ac_word=$2
4669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4670$as_echo_n "checking for $ac_word... " >&6; }
4671if test "${ac_cv_path_HEAD+set}" = set; then :
4672  $as_echo_n "(cached) " >&6
4673else
4674  case $HEAD in
4675  [\\/]* | ?:[\\/]*)
4676  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4677  ;;
4678  *)
4679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4680for as_dir in $PATH
4681do
4682  IFS=$as_save_IFS
4683  test -z "$as_dir" && as_dir=.
4684    for ac_exec_ext in '' $ac_executable_extensions; do
4685  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4686    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4688    break 2
4689  fi
4690done
4691  done
4692IFS=$as_save_IFS
4693
4694  ;;
4695esac
4696fi
4697HEAD=$ac_cv_path_HEAD
4698if test -n "$HEAD"; then
4699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4700$as_echo "$HEAD" >&6; }
4701else
4702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4703$as_echo "no" >&6; }
4704fi
4705
4706
4707  test -n "$HEAD" && break
4708done
4709
4710
4711    if test "x$HEAD" = x; then
4712        if test "xhead" = x; then
4713          PROG_NAME=head
4714        else
4715          PROG_NAME=head
4716        fi
4717        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4718$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4719        as_fn_error $? "Cannot continue" "$LINENO" 5
4720    fi
4721
4722
4723
4724    for ac_prog in ln
4725do
4726  # Extract the first word of "$ac_prog", so it can be a program name with args.
4727set dummy $ac_prog; ac_word=$2
4728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4729$as_echo_n "checking for $ac_word... " >&6; }
4730if test "${ac_cv_path_LN+set}" = set; then :
4731  $as_echo_n "(cached) " >&6
4732else
4733  case $LN in
4734  [\\/]* | ?:[\\/]*)
4735  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4736  ;;
4737  *)
4738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4739for as_dir in $PATH
4740do
4741  IFS=$as_save_IFS
4742  test -z "$as_dir" && as_dir=.
4743    for ac_exec_ext in '' $ac_executable_extensions; do
4744  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4745    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4747    break 2
4748  fi
4749done
4750  done
4751IFS=$as_save_IFS
4752
4753  ;;
4754esac
4755fi
4756LN=$ac_cv_path_LN
4757if test -n "$LN"; then
4758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4759$as_echo "$LN" >&6; }
4760else
4761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4762$as_echo "no" >&6; }
4763fi
4764
4765
4766  test -n "$LN" && break
4767done
4768
4769
4770    if test "x$LN" = x; then
4771        if test "xln" = x; then
4772          PROG_NAME=ln
4773        else
4774          PROG_NAME=ln
4775        fi
4776        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4777$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4778        as_fn_error $? "Cannot continue" "$LINENO" 5
4779    fi
4780
4781
4782
4783    for ac_prog in ls
4784do
4785  # Extract the first word of "$ac_prog", so it can be a program name with args.
4786set dummy $ac_prog; ac_word=$2
4787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4788$as_echo_n "checking for $ac_word... " >&6; }
4789if test "${ac_cv_path_LS+set}" = set; then :
4790  $as_echo_n "(cached) " >&6
4791else
4792  case $LS in
4793  [\\/]* | ?:[\\/]*)
4794  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4795  ;;
4796  *)
4797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4798for as_dir in $PATH
4799do
4800  IFS=$as_save_IFS
4801  test -z "$as_dir" && as_dir=.
4802    for ac_exec_ext in '' $ac_executable_extensions; do
4803  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4804    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4806    break 2
4807  fi
4808done
4809  done
4810IFS=$as_save_IFS
4811
4812  ;;
4813esac
4814fi
4815LS=$ac_cv_path_LS
4816if test -n "$LS"; then
4817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4818$as_echo "$LS" >&6; }
4819else
4820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4821$as_echo "no" >&6; }
4822fi
4823
4824
4825  test -n "$LS" && break
4826done
4827
4828
4829    if test "x$LS" = x; then
4830        if test "xls" = x; then
4831          PROG_NAME=ls
4832        else
4833          PROG_NAME=ls
4834        fi
4835        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4836$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4837        as_fn_error $? "Cannot continue" "$LINENO" 5
4838    fi
4839
4840
4841
4842    for ac_prog in mkdir
4843do
4844  # Extract the first word of "$ac_prog", so it can be a program name with args.
4845set dummy $ac_prog; ac_word=$2
4846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4847$as_echo_n "checking for $ac_word... " >&6; }
4848if test "${ac_cv_path_MKDIR+set}" = set; then :
4849  $as_echo_n "(cached) " >&6
4850else
4851  case $MKDIR in
4852  [\\/]* | ?:[\\/]*)
4853  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4854  ;;
4855  *)
4856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4857for as_dir in $PATH
4858do
4859  IFS=$as_save_IFS
4860  test -z "$as_dir" && as_dir=.
4861    for ac_exec_ext in '' $ac_executable_extensions; do
4862  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4863    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4865    break 2
4866  fi
4867done
4868  done
4869IFS=$as_save_IFS
4870
4871  ;;
4872esac
4873fi
4874MKDIR=$ac_cv_path_MKDIR
4875if test -n "$MKDIR"; then
4876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4877$as_echo "$MKDIR" >&6; }
4878else
4879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4880$as_echo "no" >&6; }
4881fi
4882
4883
4884  test -n "$MKDIR" && break
4885done
4886
4887
4888    if test "x$MKDIR" = x; then
4889        if test "xmkdir" = x; then
4890          PROG_NAME=mkdir
4891        else
4892          PROG_NAME=mkdir
4893        fi
4894        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4895$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4896        as_fn_error $? "Cannot continue" "$LINENO" 5
4897    fi
4898
4899
4900
4901    for ac_prog in mktemp
4902do
4903  # Extract the first word of "$ac_prog", so it can be a program name with args.
4904set dummy $ac_prog; ac_word=$2
4905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4906$as_echo_n "checking for $ac_word... " >&6; }
4907if test "${ac_cv_path_MKTEMP+set}" = set; then :
4908  $as_echo_n "(cached) " >&6
4909else
4910  case $MKTEMP in
4911  [\\/]* | ?:[\\/]*)
4912  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4913  ;;
4914  *)
4915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4916for as_dir in $PATH
4917do
4918  IFS=$as_save_IFS
4919  test -z "$as_dir" && as_dir=.
4920    for ac_exec_ext in '' $ac_executable_extensions; do
4921  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4922    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4924    break 2
4925  fi
4926done
4927  done
4928IFS=$as_save_IFS
4929
4930  ;;
4931esac
4932fi
4933MKTEMP=$ac_cv_path_MKTEMP
4934if test -n "$MKTEMP"; then
4935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4936$as_echo "$MKTEMP" >&6; }
4937else
4938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4939$as_echo "no" >&6; }
4940fi
4941
4942
4943  test -n "$MKTEMP" && break
4944done
4945
4946
4947    if test "x$MKTEMP" = x; then
4948        if test "xmktemp" = x; then
4949          PROG_NAME=mktemp
4950        else
4951          PROG_NAME=mktemp
4952        fi
4953        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4954$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4955        as_fn_error $? "Cannot continue" "$LINENO" 5
4956    fi
4957
4958
4959
4960    for ac_prog in mv
4961do
4962  # Extract the first word of "$ac_prog", so it can be a program name with args.
4963set dummy $ac_prog; ac_word=$2
4964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4965$as_echo_n "checking for $ac_word... " >&6; }
4966if test "${ac_cv_path_MV+set}" = set; then :
4967  $as_echo_n "(cached) " >&6
4968else
4969  case $MV in
4970  [\\/]* | ?:[\\/]*)
4971  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4972  ;;
4973  *)
4974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4975for as_dir in $PATH
4976do
4977  IFS=$as_save_IFS
4978  test -z "$as_dir" && as_dir=.
4979    for ac_exec_ext in '' $ac_executable_extensions; do
4980  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4981    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4983    break 2
4984  fi
4985done
4986  done
4987IFS=$as_save_IFS
4988
4989  ;;
4990esac
4991fi
4992MV=$ac_cv_path_MV
4993if test -n "$MV"; then
4994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
4995$as_echo "$MV" >&6; }
4996else
4997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4998$as_echo "no" >&6; }
4999fi
5000
5001
5002  test -n "$MV" && break
5003done
5004
5005
5006    if test "x$MV" = x; then
5007        if test "xmv" = x; then
5008          PROG_NAME=mv
5009        else
5010          PROG_NAME=mv
5011        fi
5012        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5013$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5014        as_fn_error $? "Cannot continue" "$LINENO" 5
5015    fi
5016
5017
5018
5019    for ac_prog in printf
5020do
5021  # Extract the first word of "$ac_prog", so it can be a program name with args.
5022set dummy $ac_prog; ac_word=$2
5023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5024$as_echo_n "checking for $ac_word... " >&6; }
5025if test "${ac_cv_path_PRINTF+set}" = set; then :
5026  $as_echo_n "(cached) " >&6
5027else
5028  case $PRINTF in
5029  [\\/]* | ?:[\\/]*)
5030  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5031  ;;
5032  *)
5033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5034for as_dir in $PATH
5035do
5036  IFS=$as_save_IFS
5037  test -z "$as_dir" && as_dir=.
5038    for ac_exec_ext in '' $ac_executable_extensions; do
5039  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5040    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5042    break 2
5043  fi
5044done
5045  done
5046IFS=$as_save_IFS
5047
5048  ;;
5049esac
5050fi
5051PRINTF=$ac_cv_path_PRINTF
5052if test -n "$PRINTF"; then
5053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5054$as_echo "$PRINTF" >&6; }
5055else
5056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5057$as_echo "no" >&6; }
5058fi
5059
5060
5061  test -n "$PRINTF" && break
5062done
5063
5064
5065    if test "x$PRINTF" = x; then
5066        if test "xprintf" = x; then
5067          PROG_NAME=printf
5068        else
5069          PROG_NAME=printf
5070        fi
5071        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5072$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5073        as_fn_error $? "Cannot continue" "$LINENO" 5
5074    fi
5075
5076
5077
5078    for ac_prog in pwd
5079do
5080  # Extract the first word of "$ac_prog", so it can be a program name with args.
5081set dummy $ac_prog; ac_word=$2
5082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5083$as_echo_n "checking for $ac_word... " >&6; }
5084if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5085  $as_echo_n "(cached) " >&6
5086else
5087  case $THEPWDCMD in
5088  [\\/]* | ?:[\\/]*)
5089  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5090  ;;
5091  *)
5092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5093for as_dir in $PATH
5094do
5095  IFS=$as_save_IFS
5096  test -z "$as_dir" && as_dir=.
5097    for ac_exec_ext in '' $ac_executable_extensions; do
5098  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5099    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5101    break 2
5102  fi
5103done
5104  done
5105IFS=$as_save_IFS
5106
5107  ;;
5108esac
5109fi
5110THEPWDCMD=$ac_cv_path_THEPWDCMD
5111if test -n "$THEPWDCMD"; then
5112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5113$as_echo "$THEPWDCMD" >&6; }
5114else
5115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5116$as_echo "no" >&6; }
5117fi
5118
5119
5120  test -n "$THEPWDCMD" && break
5121done
5122
5123
5124    if test "x$THEPWDCMD" = x; then
5125        if test "xpwd" = x; then
5126          PROG_NAME=thepwdcmd
5127        else
5128          PROG_NAME=pwd
5129        fi
5130        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5131$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5132        as_fn_error $? "Cannot continue" "$LINENO" 5
5133    fi
5134
5135
5136
5137    for ac_prog in rm
5138do
5139  # Extract the first word of "$ac_prog", so it can be a program name with args.
5140set dummy $ac_prog; ac_word=$2
5141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5142$as_echo_n "checking for $ac_word... " >&6; }
5143if test "${ac_cv_path_RM+set}" = set; then :
5144  $as_echo_n "(cached) " >&6
5145else
5146  case $RM in
5147  [\\/]* | ?:[\\/]*)
5148  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5149  ;;
5150  *)
5151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152for as_dir in $PATH
5153do
5154  IFS=$as_save_IFS
5155  test -z "$as_dir" && as_dir=.
5156    for ac_exec_ext in '' $ac_executable_extensions; do
5157  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5158    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5160    break 2
5161  fi
5162done
5163  done
5164IFS=$as_save_IFS
5165
5166  ;;
5167esac
5168fi
5169RM=$ac_cv_path_RM
5170if test -n "$RM"; then
5171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5172$as_echo "$RM" >&6; }
5173else
5174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5175$as_echo "no" >&6; }
5176fi
5177
5178
5179  test -n "$RM" && break
5180done
5181
5182
5183    if test "x$RM" = x; then
5184        if test "xrm" = x; then
5185          PROG_NAME=rm
5186        else
5187          PROG_NAME=rm
5188        fi
5189        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5190$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5191        as_fn_error $? "Cannot continue" "$LINENO" 5
5192    fi
5193
5194
5195
5196    for ac_prog in sh
5197do
5198  # Extract the first word of "$ac_prog", so it can be a program name with args.
5199set dummy $ac_prog; ac_word=$2
5200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5201$as_echo_n "checking for $ac_word... " >&6; }
5202if test "${ac_cv_path_SH+set}" = set; then :
5203  $as_echo_n "(cached) " >&6
5204else
5205  case $SH in
5206  [\\/]* | ?:[\\/]*)
5207  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5208  ;;
5209  *)
5210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5211for as_dir in $PATH
5212do
5213  IFS=$as_save_IFS
5214  test -z "$as_dir" && as_dir=.
5215    for ac_exec_ext in '' $ac_executable_extensions; do
5216  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5217    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5219    break 2
5220  fi
5221done
5222  done
5223IFS=$as_save_IFS
5224
5225  ;;
5226esac
5227fi
5228SH=$ac_cv_path_SH
5229if test -n "$SH"; then
5230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5231$as_echo "$SH" >&6; }
5232else
5233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5234$as_echo "no" >&6; }
5235fi
5236
5237
5238  test -n "$SH" && break
5239done
5240
5241
5242    if test "x$SH" = x; then
5243        if test "xsh" = x; then
5244          PROG_NAME=sh
5245        else
5246          PROG_NAME=sh
5247        fi
5248        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5249$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5250        as_fn_error $? "Cannot continue" "$LINENO" 5
5251    fi
5252
5253
5254
5255    for ac_prog in sort
5256do
5257  # Extract the first word of "$ac_prog", so it can be a program name with args.
5258set dummy $ac_prog; ac_word=$2
5259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5260$as_echo_n "checking for $ac_word... " >&6; }
5261if test "${ac_cv_path_SORT+set}" = set; then :
5262  $as_echo_n "(cached) " >&6
5263else
5264  case $SORT in
5265  [\\/]* | ?:[\\/]*)
5266  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5267  ;;
5268  *)
5269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5270for as_dir in $PATH
5271do
5272  IFS=$as_save_IFS
5273  test -z "$as_dir" && as_dir=.
5274    for ac_exec_ext in '' $ac_executable_extensions; do
5275  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5276    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5278    break 2
5279  fi
5280done
5281  done
5282IFS=$as_save_IFS
5283
5284  ;;
5285esac
5286fi
5287SORT=$ac_cv_path_SORT
5288if test -n "$SORT"; then
5289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5290$as_echo "$SORT" >&6; }
5291else
5292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5293$as_echo "no" >&6; }
5294fi
5295
5296
5297  test -n "$SORT" && break
5298done
5299
5300
5301    if test "x$SORT" = x; then
5302        if test "xsort" = x; then
5303          PROG_NAME=sort
5304        else
5305          PROG_NAME=sort
5306        fi
5307        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5308$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5309        as_fn_error $? "Cannot continue" "$LINENO" 5
5310    fi
5311
5312
5313
5314    for ac_prog in tail
5315do
5316  # Extract the first word of "$ac_prog", so it can be a program name with args.
5317set dummy $ac_prog; ac_word=$2
5318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5319$as_echo_n "checking for $ac_word... " >&6; }
5320if test "${ac_cv_path_TAIL+set}" = set; then :
5321  $as_echo_n "(cached) " >&6
5322else
5323  case $TAIL in
5324  [\\/]* | ?:[\\/]*)
5325  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5326  ;;
5327  *)
5328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5329for as_dir in $PATH
5330do
5331  IFS=$as_save_IFS
5332  test -z "$as_dir" && as_dir=.
5333    for ac_exec_ext in '' $ac_executable_extensions; do
5334  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5335    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5337    break 2
5338  fi
5339done
5340  done
5341IFS=$as_save_IFS
5342
5343  ;;
5344esac
5345fi
5346TAIL=$ac_cv_path_TAIL
5347if test -n "$TAIL"; then
5348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5349$as_echo "$TAIL" >&6; }
5350else
5351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5352$as_echo "no" >&6; }
5353fi
5354
5355
5356  test -n "$TAIL" && break
5357done
5358
5359
5360    if test "x$TAIL" = x; then
5361        if test "xtail" = x; then
5362          PROG_NAME=tail
5363        else
5364          PROG_NAME=tail
5365        fi
5366        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5367$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5368        as_fn_error $? "Cannot continue" "$LINENO" 5
5369    fi
5370
5371
5372
5373    for ac_prog in tar
5374do
5375  # Extract the first word of "$ac_prog", so it can be a program name with args.
5376set dummy $ac_prog; ac_word=$2
5377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5378$as_echo_n "checking for $ac_word... " >&6; }
5379if test "${ac_cv_path_TAR+set}" = set; then :
5380  $as_echo_n "(cached) " >&6
5381else
5382  case $TAR in
5383  [\\/]* | ?:[\\/]*)
5384  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5385  ;;
5386  *)
5387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5388for as_dir in $PATH
5389do
5390  IFS=$as_save_IFS
5391  test -z "$as_dir" && as_dir=.
5392    for ac_exec_ext in '' $ac_executable_extensions; do
5393  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5394    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5396    break 2
5397  fi
5398done
5399  done
5400IFS=$as_save_IFS
5401
5402  ;;
5403esac
5404fi
5405TAR=$ac_cv_path_TAR
5406if test -n "$TAR"; then
5407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5408$as_echo "$TAR" >&6; }
5409else
5410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5411$as_echo "no" >&6; }
5412fi
5413
5414
5415  test -n "$TAR" && break
5416done
5417
5418
5419    if test "x$TAR" = x; then
5420        if test "xtar" = x; then
5421          PROG_NAME=tar
5422        else
5423          PROG_NAME=tar
5424        fi
5425        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5426$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5427        as_fn_error $? "Cannot continue" "$LINENO" 5
5428    fi
5429
5430
5431
5432    for ac_prog in tee
5433do
5434  # Extract the first word of "$ac_prog", so it can be a program name with args.
5435set dummy $ac_prog; ac_word=$2
5436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5437$as_echo_n "checking for $ac_word... " >&6; }
5438if test "${ac_cv_path_TEE+set}" = set; then :
5439  $as_echo_n "(cached) " >&6
5440else
5441  case $TEE in
5442  [\\/]* | ?:[\\/]*)
5443  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5444  ;;
5445  *)
5446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5447for as_dir in $PATH
5448do
5449  IFS=$as_save_IFS
5450  test -z "$as_dir" && as_dir=.
5451    for ac_exec_ext in '' $ac_executable_extensions; do
5452  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5453    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5455    break 2
5456  fi
5457done
5458  done
5459IFS=$as_save_IFS
5460
5461  ;;
5462esac
5463fi
5464TEE=$ac_cv_path_TEE
5465if test -n "$TEE"; then
5466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5467$as_echo "$TEE" >&6; }
5468else
5469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5470$as_echo "no" >&6; }
5471fi
5472
5473
5474  test -n "$TEE" && break
5475done
5476
5477
5478    if test "x$TEE" = x; then
5479        if test "xtee" = x; then
5480          PROG_NAME=tee
5481        else
5482          PROG_NAME=tee
5483        fi
5484        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5485$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5486        as_fn_error $? "Cannot continue" "$LINENO" 5
5487    fi
5488
5489
5490
5491    for ac_prog in touch
5492do
5493  # Extract the first word of "$ac_prog", so it can be a program name with args.
5494set dummy $ac_prog; ac_word=$2
5495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5496$as_echo_n "checking for $ac_word... " >&6; }
5497if test "${ac_cv_path_TOUCH+set}" = set; then :
5498  $as_echo_n "(cached) " >&6
5499else
5500  case $TOUCH in
5501  [\\/]* | ?:[\\/]*)
5502  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5503  ;;
5504  *)
5505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5506for as_dir in $PATH
5507do
5508  IFS=$as_save_IFS
5509  test -z "$as_dir" && as_dir=.
5510    for ac_exec_ext in '' $ac_executable_extensions; do
5511  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5512    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5514    break 2
5515  fi
5516done
5517  done
5518IFS=$as_save_IFS
5519
5520  ;;
5521esac
5522fi
5523TOUCH=$ac_cv_path_TOUCH
5524if test -n "$TOUCH"; then
5525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5526$as_echo "$TOUCH" >&6; }
5527else
5528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5529$as_echo "no" >&6; }
5530fi
5531
5532
5533  test -n "$TOUCH" && break
5534done
5535
5536
5537    if test "x$TOUCH" = x; then
5538        if test "xtouch" = x; then
5539          PROG_NAME=touch
5540        else
5541          PROG_NAME=touch
5542        fi
5543        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5544$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5545        as_fn_error $? "Cannot continue" "$LINENO" 5
5546    fi
5547
5548
5549
5550    for ac_prog in tr
5551do
5552  # Extract the first word of "$ac_prog", so it can be a program name with args.
5553set dummy $ac_prog; ac_word=$2
5554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5555$as_echo_n "checking for $ac_word... " >&6; }
5556if test "${ac_cv_path_TR+set}" = set; then :
5557  $as_echo_n "(cached) " >&6
5558else
5559  case $TR in
5560  [\\/]* | ?:[\\/]*)
5561  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5562  ;;
5563  *)
5564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5565for as_dir in $PATH
5566do
5567  IFS=$as_save_IFS
5568  test -z "$as_dir" && as_dir=.
5569    for ac_exec_ext in '' $ac_executable_extensions; do
5570  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5571    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5573    break 2
5574  fi
5575done
5576  done
5577IFS=$as_save_IFS
5578
5579  ;;
5580esac
5581fi
5582TR=$ac_cv_path_TR
5583if test -n "$TR"; then
5584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5585$as_echo "$TR" >&6; }
5586else
5587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5588$as_echo "no" >&6; }
5589fi
5590
5591
5592  test -n "$TR" && break
5593done
5594
5595
5596    if test "x$TR" = x; then
5597        if test "xtr" = x; then
5598          PROG_NAME=tr
5599        else
5600          PROG_NAME=tr
5601        fi
5602        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5603$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5604        as_fn_error $? "Cannot continue" "$LINENO" 5
5605    fi
5606
5607
5608
5609    for ac_prog in uname
5610do
5611  # Extract the first word of "$ac_prog", so it can be a program name with args.
5612set dummy $ac_prog; ac_word=$2
5613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5614$as_echo_n "checking for $ac_word... " >&6; }
5615if test "${ac_cv_path_UNAME+set}" = set; then :
5616  $as_echo_n "(cached) " >&6
5617else
5618  case $UNAME in
5619  [\\/]* | ?:[\\/]*)
5620  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5621  ;;
5622  *)
5623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5624for as_dir in $PATH
5625do
5626  IFS=$as_save_IFS
5627  test -z "$as_dir" && as_dir=.
5628    for ac_exec_ext in '' $ac_executable_extensions; do
5629  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5630    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5632    break 2
5633  fi
5634done
5635  done
5636IFS=$as_save_IFS
5637
5638  ;;
5639esac
5640fi
5641UNAME=$ac_cv_path_UNAME
5642if test -n "$UNAME"; then
5643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5644$as_echo "$UNAME" >&6; }
5645else
5646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5647$as_echo "no" >&6; }
5648fi
5649
5650
5651  test -n "$UNAME" && break
5652done
5653
5654
5655    if test "x$UNAME" = x; then
5656        if test "xuname" = x; then
5657          PROG_NAME=uname
5658        else
5659          PROG_NAME=uname
5660        fi
5661        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5662$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5663        as_fn_error $? "Cannot continue" "$LINENO" 5
5664    fi
5665
5666
5667
5668    for ac_prog in uniq
5669do
5670  # Extract the first word of "$ac_prog", so it can be a program name with args.
5671set dummy $ac_prog; ac_word=$2
5672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5673$as_echo_n "checking for $ac_word... " >&6; }
5674if test "${ac_cv_path_UNIQ+set}" = set; then :
5675  $as_echo_n "(cached) " >&6
5676else
5677  case $UNIQ in
5678  [\\/]* | ?:[\\/]*)
5679  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5680  ;;
5681  *)
5682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5683for as_dir in $PATH
5684do
5685  IFS=$as_save_IFS
5686  test -z "$as_dir" && as_dir=.
5687    for ac_exec_ext in '' $ac_executable_extensions; do
5688  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5689    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5691    break 2
5692  fi
5693done
5694  done
5695IFS=$as_save_IFS
5696
5697  ;;
5698esac
5699fi
5700UNIQ=$ac_cv_path_UNIQ
5701if test -n "$UNIQ"; then
5702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5703$as_echo "$UNIQ" >&6; }
5704else
5705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5706$as_echo "no" >&6; }
5707fi
5708
5709
5710  test -n "$UNIQ" && break
5711done
5712
5713
5714    if test "x$UNIQ" = x; then
5715        if test "xuniq" = x; then
5716          PROG_NAME=uniq
5717        else
5718          PROG_NAME=uniq
5719        fi
5720        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5721$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5722        as_fn_error $? "Cannot continue" "$LINENO" 5
5723    fi
5724
5725
5726
5727    for ac_prog in wc
5728do
5729  # Extract the first word of "$ac_prog", so it can be a program name with args.
5730set dummy $ac_prog; ac_word=$2
5731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5732$as_echo_n "checking for $ac_word... " >&6; }
5733if test "${ac_cv_path_WC+set}" = set; then :
5734  $as_echo_n "(cached) " >&6
5735else
5736  case $WC in
5737  [\\/]* | ?:[\\/]*)
5738  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5739  ;;
5740  *)
5741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5742for as_dir in $PATH
5743do
5744  IFS=$as_save_IFS
5745  test -z "$as_dir" && as_dir=.
5746    for ac_exec_ext in '' $ac_executable_extensions; do
5747  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5748    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5750    break 2
5751  fi
5752done
5753  done
5754IFS=$as_save_IFS
5755
5756  ;;
5757esac
5758fi
5759WC=$ac_cv_path_WC
5760if test -n "$WC"; then
5761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5762$as_echo "$WC" >&6; }
5763else
5764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5765$as_echo "no" >&6; }
5766fi
5767
5768
5769  test -n "$WC" && break
5770done
5771
5772
5773    if test "x$WC" = x; then
5774        if test "xwc" = x; then
5775          PROG_NAME=wc
5776        else
5777          PROG_NAME=wc
5778        fi
5779        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5780$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5781        as_fn_error $? "Cannot continue" "$LINENO" 5
5782    fi
5783
5784
5785
5786    for ac_prog in which
5787do
5788  # Extract the first word of "$ac_prog", so it can be a program name with args.
5789set dummy $ac_prog; ac_word=$2
5790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5791$as_echo_n "checking for $ac_word... " >&6; }
5792if test "${ac_cv_path_WHICH+set}" = set; then :
5793  $as_echo_n "(cached) " >&6
5794else
5795  case $WHICH in
5796  [\\/]* | ?:[\\/]*)
5797  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5798  ;;
5799  *)
5800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5801for as_dir in $PATH
5802do
5803  IFS=$as_save_IFS
5804  test -z "$as_dir" && as_dir=.
5805    for ac_exec_ext in '' $ac_executable_extensions; do
5806  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5807    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5809    break 2
5810  fi
5811done
5812  done
5813IFS=$as_save_IFS
5814
5815  ;;
5816esac
5817fi
5818WHICH=$ac_cv_path_WHICH
5819if test -n "$WHICH"; then
5820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5821$as_echo "$WHICH" >&6; }
5822else
5823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5824$as_echo "no" >&6; }
5825fi
5826
5827
5828  test -n "$WHICH" && break
5829done
5830
5831
5832    if test "x$WHICH" = x; then
5833        if test "xwhich" = x; then
5834          PROG_NAME=which
5835        else
5836          PROG_NAME=which
5837        fi
5838        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5839$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5840        as_fn_error $? "Cannot continue" "$LINENO" 5
5841    fi
5842
5843
5844
5845    for ac_prog in xargs
5846do
5847  # Extract the first word of "$ac_prog", so it can be a program name with args.
5848set dummy $ac_prog; ac_word=$2
5849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5850$as_echo_n "checking for $ac_word... " >&6; }
5851if test "${ac_cv_path_XARGS+set}" = set; then :
5852  $as_echo_n "(cached) " >&6
5853else
5854  case $XARGS in
5855  [\\/]* | ?:[\\/]*)
5856  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5857  ;;
5858  *)
5859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5860for as_dir in $PATH
5861do
5862  IFS=$as_save_IFS
5863  test -z "$as_dir" && as_dir=.
5864    for ac_exec_ext in '' $ac_executable_extensions; do
5865  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5866    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5868    break 2
5869  fi
5870done
5871  done
5872IFS=$as_save_IFS
5873
5874  ;;
5875esac
5876fi
5877XARGS=$ac_cv_path_XARGS
5878if test -n "$XARGS"; then
5879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5880$as_echo "$XARGS" >&6; }
5881else
5882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5883$as_echo "no" >&6; }
5884fi
5885
5886
5887  test -n "$XARGS" && break
5888done
5889
5890
5891    if test "x$XARGS" = x; then
5892        if test "xxargs" = x; then
5893          PROG_NAME=xargs
5894        else
5895          PROG_NAME=xargs
5896        fi
5897        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5898$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5899        as_fn_error $? "Cannot continue" "$LINENO" 5
5900    fi
5901
5902
5903
5904# Then required tools that require some special treatment.
5905for ac_prog in gawk mawk nawk awk
5906do
5907  # Extract the first word of "$ac_prog", so it can be a program name with args.
5908set dummy $ac_prog; ac_word=$2
5909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5910$as_echo_n "checking for $ac_word... " >&6; }
5911if test "${ac_cv_prog_AWK+set}" = set; then :
5912  $as_echo_n "(cached) " >&6
5913else
5914  if test -n "$AWK"; then
5915  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5916else
5917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5918for as_dir in $PATH
5919do
5920  IFS=$as_save_IFS
5921  test -z "$as_dir" && as_dir=.
5922    for ac_exec_ext in '' $ac_executable_extensions; do
5923  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5924    ac_cv_prog_AWK="$ac_prog"
5925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5926    break 2
5927  fi
5928done
5929  done
5930IFS=$as_save_IFS
5931
5932fi
5933fi
5934AWK=$ac_cv_prog_AWK
5935if test -n "$AWK"; then
5936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5937$as_echo "$AWK" >&6; }
5938else
5939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5940$as_echo "no" >&6; }
5941fi
5942
5943
5944  test -n "$AWK" && break
5945done
5946
5947
5948    if test "x$AWK" = x; then
5949        if test "x" = x; then
5950          PROG_NAME=awk
5951        else
5952          PROG_NAME=
5953        fi
5954        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5955$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5956        as_fn_error $? "Cannot continue" "$LINENO" 5
5957    fi
5958
5959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5960$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5961if test "${ac_cv_path_GREP+set}" = set; then :
5962  $as_echo_n "(cached) " >&6
5963else
5964  if test -z "$GREP"; then
5965  ac_path_GREP_found=false
5966  # Loop through the user's path and test for each of PROGNAME-LIST
5967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5968for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5969do
5970  IFS=$as_save_IFS
5971  test -z "$as_dir" && as_dir=.
5972    for ac_prog in grep ggrep; do
5973    for ac_exec_ext in '' $ac_executable_extensions; do
5974      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5975      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5976# Check for GNU ac_path_GREP and select it if it is found.
5977  # Check for GNU $ac_path_GREP
5978case `"$ac_path_GREP" --version 2>&1` in
5979*GNU*)
5980  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5981*)
5982  ac_count=0
5983  $as_echo_n 0123456789 >"conftest.in"
5984  while :
5985  do
5986    cat "conftest.in" "conftest.in" >"conftest.tmp"
5987    mv "conftest.tmp" "conftest.in"
5988    cp "conftest.in" "conftest.nl"
5989    $as_echo 'GREP' >> "conftest.nl"
5990    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5991    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5992    as_fn_arith $ac_count + 1 && ac_count=$as_val
5993    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5994      # Best one so far, save it but keep looking for a better one
5995      ac_cv_path_GREP="$ac_path_GREP"
5996      ac_path_GREP_max=$ac_count
5997    fi
5998    # 10*(2^10) chars as input seems more than enough
5999    test $ac_count -gt 10 && break
6000  done
6001  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6002esac
6003
6004      $ac_path_GREP_found && break 3
6005    done
6006  done
6007  done
6008IFS=$as_save_IFS
6009  if test -z "$ac_cv_path_GREP"; then
6010    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6011  fi
6012else
6013  ac_cv_path_GREP=$GREP
6014fi
6015
6016fi
6017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6018$as_echo "$ac_cv_path_GREP" >&6; }
6019 GREP="$ac_cv_path_GREP"
6020
6021
6022
6023    if test "x$GREP" = x; then
6024        if test "x" = x; then
6025          PROG_NAME=grep
6026        else
6027          PROG_NAME=
6028        fi
6029        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6030$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6031        as_fn_error $? "Cannot continue" "$LINENO" 5
6032    fi
6033
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6035$as_echo_n "checking for egrep... " >&6; }
6036if test "${ac_cv_path_EGREP+set}" = set; then :
6037  $as_echo_n "(cached) " >&6
6038else
6039  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6040   then ac_cv_path_EGREP="$GREP -E"
6041   else
6042     if test -z "$EGREP"; then
6043  ac_path_EGREP_found=false
6044  # Loop through the user's path and test for each of PROGNAME-LIST
6045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6046for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6047do
6048  IFS=$as_save_IFS
6049  test -z "$as_dir" && as_dir=.
6050    for ac_prog in egrep; do
6051    for ac_exec_ext in '' $ac_executable_extensions; do
6052      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6053      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6054# Check for GNU ac_path_EGREP and select it if it is found.
6055  # Check for GNU $ac_path_EGREP
6056case `"$ac_path_EGREP" --version 2>&1` in
6057*GNU*)
6058  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6059*)
6060  ac_count=0
6061  $as_echo_n 0123456789 >"conftest.in"
6062  while :
6063  do
6064    cat "conftest.in" "conftest.in" >"conftest.tmp"
6065    mv "conftest.tmp" "conftest.in"
6066    cp "conftest.in" "conftest.nl"
6067    $as_echo 'EGREP' >> "conftest.nl"
6068    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6069    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6070    as_fn_arith $ac_count + 1 && ac_count=$as_val
6071    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6072      # Best one so far, save it but keep looking for a better one
6073      ac_cv_path_EGREP="$ac_path_EGREP"
6074      ac_path_EGREP_max=$ac_count
6075    fi
6076    # 10*(2^10) chars as input seems more than enough
6077    test $ac_count -gt 10 && break
6078  done
6079  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6080esac
6081
6082      $ac_path_EGREP_found && break 3
6083    done
6084  done
6085  done
6086IFS=$as_save_IFS
6087  if test -z "$ac_cv_path_EGREP"; then
6088    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6089  fi
6090else
6091  ac_cv_path_EGREP=$EGREP
6092fi
6093
6094   fi
6095fi
6096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6097$as_echo "$ac_cv_path_EGREP" >&6; }
6098 EGREP="$ac_cv_path_EGREP"
6099
6100
6101
6102    if test "x$EGREP" = x; then
6103        if test "x" = x; then
6104          PROG_NAME=egrep
6105        else
6106          PROG_NAME=
6107        fi
6108        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6109$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6110        as_fn_error $? "Cannot continue" "$LINENO" 5
6111    fi
6112
6113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6114$as_echo_n "checking for fgrep... " >&6; }
6115if test "${ac_cv_path_FGREP+set}" = set; then :
6116  $as_echo_n "(cached) " >&6
6117else
6118  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6119   then ac_cv_path_FGREP="$GREP -F"
6120   else
6121     if test -z "$FGREP"; then
6122  ac_path_FGREP_found=false
6123  # Loop through the user's path and test for each of PROGNAME-LIST
6124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6125for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6126do
6127  IFS=$as_save_IFS
6128  test -z "$as_dir" && as_dir=.
6129    for ac_prog in fgrep; do
6130    for ac_exec_ext in '' $ac_executable_extensions; do
6131      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6132      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6133# Check for GNU ac_path_FGREP and select it if it is found.
6134  # Check for GNU $ac_path_FGREP
6135case `"$ac_path_FGREP" --version 2>&1` in
6136*GNU*)
6137  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6138*)
6139  ac_count=0
6140  $as_echo_n 0123456789 >"conftest.in"
6141  while :
6142  do
6143    cat "conftest.in" "conftest.in" >"conftest.tmp"
6144    mv "conftest.tmp" "conftest.in"
6145    cp "conftest.in" "conftest.nl"
6146    $as_echo 'FGREP' >> "conftest.nl"
6147    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6148    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6149    as_fn_arith $ac_count + 1 && ac_count=$as_val
6150    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6151      # Best one so far, save it but keep looking for a better one
6152      ac_cv_path_FGREP="$ac_path_FGREP"
6153      ac_path_FGREP_max=$ac_count
6154    fi
6155    # 10*(2^10) chars as input seems more than enough
6156    test $ac_count -gt 10 && break
6157  done
6158  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6159esac
6160
6161      $ac_path_FGREP_found && break 3
6162    done
6163  done
6164  done
6165IFS=$as_save_IFS
6166  if test -z "$ac_cv_path_FGREP"; then
6167    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6168  fi
6169else
6170  ac_cv_path_FGREP=$FGREP
6171fi
6172
6173   fi
6174fi
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6176$as_echo "$ac_cv_path_FGREP" >&6; }
6177 FGREP="$ac_cv_path_FGREP"
6178
6179
6180
6181    if test "x$FGREP" = x; then
6182        if test "x" = x; then
6183          PROG_NAME=fgrep
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{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6193$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6194if test "${ac_cv_path_SED+set}" = set; then :
6195  $as_echo_n "(cached) " >&6
6196else
6197            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6198     for ac_i in 1 2 3 4 5 6 7; do
6199       ac_script="$ac_script$as_nl$ac_script"
6200     done
6201     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6202     { ac_script=; unset ac_script;}
6203     if test -z "$SED"; then
6204  ac_path_SED_found=false
6205  # Loop through the user's path and test for each of PROGNAME-LIST
6206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6207for as_dir in $PATH
6208do
6209  IFS=$as_save_IFS
6210  test -z "$as_dir" && as_dir=.
6211    for ac_prog in sed gsed; do
6212    for ac_exec_ext in '' $ac_executable_extensions; do
6213      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6214      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6215# Check for GNU ac_path_SED and select it if it is found.
6216  # Check for GNU $ac_path_SED
6217case `"$ac_path_SED" --version 2>&1` in
6218*GNU*)
6219  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6220*)
6221  ac_count=0
6222  $as_echo_n 0123456789 >"conftest.in"
6223  while :
6224  do
6225    cat "conftest.in" "conftest.in" >"conftest.tmp"
6226    mv "conftest.tmp" "conftest.in"
6227    cp "conftest.in" "conftest.nl"
6228    $as_echo '' >> "conftest.nl"
6229    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6230    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6231    as_fn_arith $ac_count + 1 && ac_count=$as_val
6232    if test $ac_count -gt ${ac_path_SED_max-0}; then
6233      # Best one so far, save it but keep looking for a better one
6234      ac_cv_path_SED="$ac_path_SED"
6235      ac_path_SED_max=$ac_count
6236    fi
6237    # 10*(2^10) chars as input seems more than enough
6238    test $ac_count -gt 10 && break
6239  done
6240  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6241esac
6242
6243      $ac_path_SED_found && break 3
6244    done
6245  done
6246  done
6247IFS=$as_save_IFS
6248  if test -z "$ac_cv_path_SED"; then
6249    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6250  fi
6251else
6252  ac_cv_path_SED=$SED
6253fi
6254
6255fi
6256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6257$as_echo "$ac_cv_path_SED" >&6; }
6258 SED="$ac_cv_path_SED"
6259  rm -f conftest.sed
6260
6261
6262    if test "x$SED" = x; then
6263        if test "x" = x; then
6264          PROG_NAME=sed
6265        else
6266          PROG_NAME=
6267        fi
6268        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6269$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6270        as_fn_error $? "Cannot continue" "$LINENO" 5
6271    fi
6272
6273
6274for ac_prog in nawk gawk awk
6275do
6276  # Extract the first word of "$ac_prog", so it can be a program name with args.
6277set dummy $ac_prog; ac_word=$2
6278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6279$as_echo_n "checking for $ac_word... " >&6; }
6280if test "${ac_cv_path_NAWK+set}" = set; then :
6281  $as_echo_n "(cached) " >&6
6282else
6283  case $NAWK in
6284  [\\/]* | ?:[\\/]*)
6285  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6286  ;;
6287  *)
6288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6289for as_dir in $PATH
6290do
6291  IFS=$as_save_IFS
6292  test -z "$as_dir" && as_dir=.
6293    for ac_exec_ext in '' $ac_executable_extensions; do
6294  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6295    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6297    break 2
6298  fi
6299done
6300  done
6301IFS=$as_save_IFS
6302
6303  ;;
6304esac
6305fi
6306NAWK=$ac_cv_path_NAWK
6307if test -n "$NAWK"; then
6308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6309$as_echo "$NAWK" >&6; }
6310else
6311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6312$as_echo "no" >&6; }
6313fi
6314
6315
6316  test -n "$NAWK" && break
6317done
6318
6319
6320    if test "x$NAWK" = x; then
6321        if test "x" = x; then
6322          PROG_NAME=nawk
6323        else
6324          PROG_NAME=
6325        fi
6326        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6327$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6328        as_fn_error $? "Cannot continue" "$LINENO" 5
6329    fi
6330
6331
6332# Always force rm.
6333RM="$RM -f"
6334
6335# These are not required on all platforms
6336# Extract the first word of "cygpath", so it can be a program name with args.
6337set dummy cygpath; ac_word=$2
6338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6339$as_echo_n "checking for $ac_word... " >&6; }
6340if test "${ac_cv_path_CYGPATH+set}" = set; then :
6341  $as_echo_n "(cached) " >&6
6342else
6343  case $CYGPATH in
6344  [\\/]* | ?:[\\/]*)
6345  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6346  ;;
6347  *)
6348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6349for as_dir in $PATH
6350do
6351  IFS=$as_save_IFS
6352  test -z "$as_dir" && as_dir=.
6353    for ac_exec_ext in '' $ac_executable_extensions; do
6354  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6355    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6357    break 2
6358  fi
6359done
6360  done
6361IFS=$as_save_IFS
6362
6363  ;;
6364esac
6365fi
6366CYGPATH=$ac_cv_path_CYGPATH
6367if test -n "$CYGPATH"; then
6368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6369$as_echo "$CYGPATH" >&6; }
6370else
6371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6372$as_echo "no" >&6; }
6373fi
6374
6375
6376# Extract the first word of "readlink", so it can be a program name with args.
6377set dummy readlink; ac_word=$2
6378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6379$as_echo_n "checking for $ac_word... " >&6; }
6380if test "${ac_cv_path_READLINK+set}" = set; then :
6381  $as_echo_n "(cached) " >&6
6382else
6383  case $READLINK in
6384  [\\/]* | ?:[\\/]*)
6385  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6386  ;;
6387  *)
6388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6389for as_dir in $PATH
6390do
6391  IFS=$as_save_IFS
6392  test -z "$as_dir" && as_dir=.
6393    for ac_exec_ext in '' $ac_executable_extensions; do
6394  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6395    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6397    break 2
6398  fi
6399done
6400  done
6401IFS=$as_save_IFS
6402
6403  ;;
6404esac
6405fi
6406READLINK=$ac_cv_path_READLINK
6407if test -n "$READLINK"; then
6408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6409$as_echo "$READLINK" >&6; }
6410else
6411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6412$as_echo "no" >&6; }
6413fi
6414
6415
6416# Extract the first word of "df", so it can be a program name with args.
6417set dummy df; ac_word=$2
6418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6419$as_echo_n "checking for $ac_word... " >&6; }
6420if test "${ac_cv_path_DF+set}" = set; then :
6421  $as_echo_n "(cached) " >&6
6422else
6423  case $DF in
6424  [\\/]* | ?:[\\/]*)
6425  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6426  ;;
6427  *)
6428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6429for as_dir in $PATH
6430do
6431  IFS=$as_save_IFS
6432  test -z "$as_dir" && as_dir=.
6433    for ac_exec_ext in '' $ac_executable_extensions; do
6434  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6435    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6437    break 2
6438  fi
6439done
6440  done
6441IFS=$as_save_IFS
6442
6443  ;;
6444esac
6445fi
6446DF=$ac_cv_path_DF
6447if test -n "$DF"; then
6448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6449$as_echo "$DF" >&6; }
6450else
6451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6452$as_echo "no" >&6; }
6453fi
6454
6455
6456# Extract the first word of "SetFile", so it can be a program name with args.
6457set dummy SetFile; ac_word=$2
6458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6459$as_echo_n "checking for $ac_word... " >&6; }
6460if test "${ac_cv_path_SETFILE+set}" = set; then :
6461  $as_echo_n "(cached) " >&6
6462else
6463  case $SETFILE in
6464  [\\/]* | ?:[\\/]*)
6465  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6466  ;;
6467  *)
6468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6469for as_dir in $PATH
6470do
6471  IFS=$as_save_IFS
6472  test -z "$as_dir" && as_dir=.
6473    for ac_exec_ext in '' $ac_executable_extensions; do
6474  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6475    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6477    break 2
6478  fi
6479done
6480  done
6481IFS=$as_save_IFS
6482
6483  ;;
6484esac
6485fi
6486SETFILE=$ac_cv_path_SETFILE
6487if test -n "$SETFILE"; then
6488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6489$as_echo "$SETFILE" >&6; }
6490else
6491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6492$as_echo "no" >&6; }
6493fi
6494
6495
6496
6497
6498# Now we can determine OpenJDK build and target platforms. This is required to
6499# have early on.
6500# Make sure we can run config.sub.
6501$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6502  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6503
6504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6505$as_echo_n "checking build system type... " >&6; }
6506if test "${ac_cv_build+set}" = set; then :
6507  $as_echo_n "(cached) " >&6
6508else
6509  ac_build_alias=$build_alias
6510test "x$ac_build_alias" = x &&
6511  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6512test "x$ac_build_alias" = x &&
6513  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6514ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6515  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6516
6517fi
6518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6519$as_echo "$ac_cv_build" >&6; }
6520case $ac_cv_build in
6521*-*-*) ;;
6522*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6523esac
6524build=$ac_cv_build
6525ac_save_IFS=$IFS; IFS='-'
6526set x $ac_cv_build
6527shift
6528build_cpu=$1
6529build_vendor=$2
6530shift; shift
6531# Remember, the first character of IFS is used to create $*,
6532# except with old shells:
6533build_os=$*
6534IFS=$ac_save_IFS
6535case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6536
6537
6538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6539$as_echo_n "checking host system type... " >&6; }
6540if test "${ac_cv_host+set}" = set; then :
6541  $as_echo_n "(cached) " >&6
6542else
6543  if test "x$host_alias" = x; then
6544  ac_cv_host=$ac_cv_build
6545else
6546  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6547    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6548fi
6549
6550fi
6551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6552$as_echo "$ac_cv_host" >&6; }
6553case $ac_cv_host in
6554*-*-*) ;;
6555*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6556esac
6557host=$ac_cv_host
6558ac_save_IFS=$IFS; IFS='-'
6559set x $ac_cv_host
6560shift
6561host_cpu=$1
6562host_vendor=$2
6563shift; shift
6564# Remember, the first character of IFS is used to create $*,
6565# except with old shells:
6566host_os=$*
6567IFS=$ac_save_IFS
6568case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6569
6570
6571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6572$as_echo_n "checking target system type... " >&6; }
6573if test "${ac_cv_target+set}" = set; then :
6574  $as_echo_n "(cached) " >&6
6575else
6576  if test "x$target_alias" = x; then
6577  ac_cv_target=$ac_cv_host
6578else
6579  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6580    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6581fi
6582
6583fi
6584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6585$as_echo "$ac_cv_target" >&6; }
6586case $ac_cv_target in
6587*-*-*) ;;
6588*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6589esac
6590target=$ac_cv_target
6591ac_save_IFS=$IFS; IFS='-'
6592set x $ac_cv_target
6593shift
6594target_cpu=$1
6595target_vendor=$2
6596shift; shift
6597# Remember, the first character of IFS is used to create $*,
6598# except with old shells:
6599target_os=$*
6600IFS=$ac_save_IFS
6601case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6602
6603
6604# The aliases save the names the user supplied, while $host etc.
6605# will get canonicalized.
6606test -n "$target_alias" &&
6607  test "$program_prefix$program_suffix$program_transform_name" = \
6608    NONENONEs,x,x, &&
6609  program_prefix=${target_alias}-
6610
6611# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6612# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6613# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6614# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6615# to use the configure naming style.
6616
6617
6618
6619
6620
6621    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6622    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6623    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6624    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6625    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6626    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6627
6628
6629
6630    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6631
6632  case "$build_os" in
6633    *linux*)
6634      VAR_OS=linux
6635      VAR_OS_API=posix
6636      VAR_OS_ENV=linux
6637      ;;
6638    *solaris*)
6639      VAR_OS=solaris
6640      VAR_OS_API=posix
6641      VAR_OS_ENV=solaris
6642      ;;
6643    *darwin*)
6644      VAR_OS=macosx
6645      VAR_OS_API=posix
6646      VAR_OS_ENV=macosx
6647      ;;
6648    *bsd*)
6649      VAR_OS=bsd
6650      VAR_OS_API=posix
6651      VAR_OS_ENV=bsd
6652      ;;
6653    *cygwin*)
6654      VAR_OS=windows
6655      VAR_OS_API=winapi
6656      VAR_OS_ENV=windows.cygwin
6657      ;;
6658    *mingw*)
6659      VAR_OS=windows
6660      VAR_OS_API=winapi
6661      VAR_OS_ENV=windows.msys
6662      ;;
6663    *)
6664      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6665      ;;
6666  esac
6667
6668
6669  # First argument is the cpu name from the trip/quad
6670  case "$build_cpu" in
6671    x86_64)
6672      VAR_CPU=x86_64
6673      VAR_CPU_ARCH=x86
6674      VAR_CPU_BITS=64
6675      VAR_CPU_ENDIAN=little
6676      ;;
6677    i?86)
6678      VAR_CPU=x86
6679      VAR_CPU_ARCH=x86
6680      VAR_CPU_BITS=32
6681      VAR_CPU_ENDIAN=little
6682      ;;
6683    arm*)
6684      VAR_CPU=arm
6685      VAR_CPU_ARCH=arm
6686      VAR_CPU_BITS=32
6687      VAR_CPU_ENDIAN=little
6688      ;;
6689    powerpc)
6690      VAR_CPU=ppc
6691      VAR_CPU_ARCH=ppc
6692      VAR_CPU_BITS=32
6693      VAR_CPU_ENDIAN=big
6694       ;;
6695    powerpc64)
6696      VAR_CPU=ppc64
6697      VAR_CPU_ARCH=ppc
6698      VAR_CPU_BITS=64
6699      VAR_CPU_ENDIAN=big
6700       ;;
6701    sparc)
6702      VAR_CPU=sparc
6703      VAR_CPU_ARCH=sparc
6704      VAR_CPU_BITS=32
6705      VAR_CPU_ENDIAN=big
6706       ;;
6707    sparcv9)
6708      VAR_CPU=sparcv9
6709      VAR_CPU_ARCH=sparc
6710      VAR_CPU_BITS=64
6711      VAR_CPU_ENDIAN=big
6712       ;;
6713    *)
6714      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6715      ;;
6716  esac
6717
6718    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6719    OPENJDK_BUILD_OS="$VAR_OS"
6720    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6721    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6722    OPENJDK_BUILD_CPU="$VAR_CPU"
6723    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6724    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6725    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6726
6727
6728
6729
6730
6731
6732
6733    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6734$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6735    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6736$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6737
6738    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6739
6740  case "$host_os" in
6741    *linux*)
6742      VAR_OS=linux
6743      VAR_OS_API=posix
6744      VAR_OS_ENV=linux
6745      ;;
6746    *solaris*)
6747      VAR_OS=solaris
6748      VAR_OS_API=posix
6749      VAR_OS_ENV=solaris
6750      ;;
6751    *darwin*)
6752      VAR_OS=macosx
6753      VAR_OS_API=posix
6754      VAR_OS_ENV=macosx
6755      ;;
6756    *bsd*)
6757      VAR_OS=bsd
6758      VAR_OS_API=posix
6759      VAR_OS_ENV=bsd
6760      ;;
6761    *cygwin*)
6762      VAR_OS=windows
6763      VAR_OS_API=winapi
6764      VAR_OS_ENV=windows.cygwin
6765      ;;
6766    *mingw*)
6767      VAR_OS=windows
6768      VAR_OS_API=winapi
6769      VAR_OS_ENV=windows.msys
6770      ;;
6771    *)
6772      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6773      ;;
6774  esac
6775
6776
6777  # First argument is the cpu name from the trip/quad
6778  case "$host_cpu" in
6779    x86_64)
6780      VAR_CPU=x86_64
6781      VAR_CPU_ARCH=x86
6782      VAR_CPU_BITS=64
6783      VAR_CPU_ENDIAN=little
6784      ;;
6785    i?86)
6786      VAR_CPU=x86
6787      VAR_CPU_ARCH=x86
6788      VAR_CPU_BITS=32
6789      VAR_CPU_ENDIAN=little
6790      ;;
6791    arm*)
6792      VAR_CPU=arm
6793      VAR_CPU_ARCH=arm
6794      VAR_CPU_BITS=32
6795      VAR_CPU_ENDIAN=little
6796      ;;
6797    powerpc)
6798      VAR_CPU=ppc
6799      VAR_CPU_ARCH=ppc
6800      VAR_CPU_BITS=32
6801      VAR_CPU_ENDIAN=big
6802       ;;
6803    powerpc64)
6804      VAR_CPU=ppc64
6805      VAR_CPU_ARCH=ppc
6806      VAR_CPU_BITS=64
6807      VAR_CPU_ENDIAN=big
6808       ;;
6809    sparc)
6810      VAR_CPU=sparc
6811      VAR_CPU_ARCH=sparc
6812      VAR_CPU_BITS=32
6813      VAR_CPU_ENDIAN=big
6814       ;;
6815    sparcv9)
6816      VAR_CPU=sparcv9
6817      VAR_CPU_ARCH=sparc
6818      VAR_CPU_BITS=64
6819      VAR_CPU_ENDIAN=big
6820       ;;
6821    *)
6822      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6823      ;;
6824  esac
6825
6826    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6827    OPENJDK_TARGET_OS="$VAR_OS"
6828    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6829    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6830    OPENJDK_TARGET_CPU="$VAR_CPU"
6831    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6832    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6833    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6834
6835
6836
6837
6838
6839
6840
6841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6842$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6844$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6845
6846
6847
6848# Check whether --with-target-bits was given.
6849if test "${with_target_bits+set}" = set; then :
6850  withval=$with_target_bits;
6851fi
6852
6853
6854  # We have three types of compiles:
6855  # native  == normal compilation, target system == build system
6856  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6857  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6858  #
6859  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6860    # We're doing a proper cross-compilation
6861    COMPILE_TYPE="cross"
6862  else
6863    COMPILE_TYPE="native"
6864  fi
6865
6866  if test "x$with_target_bits" != x; then
6867    if test "x$COMPILE_TYPE" = "xcross"; then
6868      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6869    fi
6870
6871    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6872      # A reduced build is requested
6873      COMPILE_TYPE="reduced"
6874      OPENJDK_TARGET_CPU_BITS=32
6875      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6876        OPENJDK_TARGET_CPU=x86
6877      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6878        OPENJDK_TARGET_CPU=sparc
6879      else
6880        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6881      fi
6882    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6883      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
6884    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6885      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6886$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6887    else
6888      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6889    fi
6890  fi
6891
6892
6893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6894$as_echo_n "checking compilation type... " >&6; }
6895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6896$as_echo "$COMPILE_TYPE" >&6; }
6897
6898
6899    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6900       REQUIRED_OS_NAME=SunOS
6901       REQUIRED_OS_VERSION=5.10
6902    fi
6903    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6904       REQUIRED_OS_NAME=Linux
6905       REQUIRED_OS_VERSION=2.6
6906    fi
6907    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6908        REQUIRED_OS_NAME=Windows
6909        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6910            REQUIRED_OS_VERSION=5.2
6911        else
6912            REQUIRED_OS_VERSION=5.1
6913        fi
6914    fi
6915    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6916        REQUIRED_OS_NAME=Darwin
6917        REQUIRED_OS_VERSION=11.2
6918    fi
6919
6920
6921
6922
6923
6924    # Also store the legacy naming of the cpu.
6925    # Ie i586 and amd64 instead of x86 and x86_64
6926    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6927    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6928      OPENJDK_TARGET_CPU_LEGACY="i586"
6929    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6930      # On all platforms except MacOSX replace x86_64 with amd64.
6931      OPENJDK_TARGET_CPU_LEGACY="amd64"
6932    fi
6933
6934
6935    # And the second legacy naming of the cpu.
6936    # Ie i386 and amd64 instead of x86 and x86_64.
6937    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6938    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6939      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6940    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6941      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6942    fi
6943
6944
6945    # This is the name of the cpu (but using i386 and amd64 instead of
6946    # x86 and x86_64, respectively), preceeded by a /, to be used when
6947    # locating libraries. On macosx, it's empty, though.
6948    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6949    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6950        OPENJDK_TARGET_CPU_LIBDIR=""
6951    fi
6952
6953
6954    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6955    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6956    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6957    OPENJDK_TARGET_CPU_ISADIR=""
6958    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6959      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6960          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6961      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6962          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6963      fi
6964    fi
6965
6966
6967    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6968    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6969    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6970      # On linux only, we replace x86 with i386.
6971      OPENJDK_TARGET_CPU_OSARCH="i386"
6972    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6973      # On all platforms except macosx, we replace x86_64 with amd64.
6974      OPENJDK_TARGET_CPU_OSARCH="amd64"
6975    fi
6976
6977
6978    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6979    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6980      OPENJDK_TARGET_CPU_JLI="i386"
6981    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6982      # On all platforms except macosx, we replace x86_64 with amd64.
6983      OPENJDK_TARGET_CPU_JLI="amd64"
6984    fi
6985    # Now setup the -D flags for building libjli.
6986    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6987    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6988      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
6989        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
6990      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
6991        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
6992      fi
6993    fi
6994
6995
6996    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
6997    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
6998        OPENJDK_TARGET_OS_API_DIR="solaris"
6999    fi
7000    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7001        OPENJDK_TARGET_OS_API_DIR="windows"
7002    fi
7003
7004
7005    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7006        A_LP64="LP64:="
7007        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7008        # unpack200.exe
7009        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7010            ADD_LP64="-D_LP64=1"
7011        fi
7012    fi
7013    LP64=$A_LP64
7014
7015
7016    if test "x$COMPILE_TYPE" = "xcross"; then
7017      # FIXME: ... or should this include reduced builds..?
7018      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7019    else
7020      DEFINE_CROSS_COMPILE_ARCH=""
7021    fi
7022
7023
7024
7025
7026# Continue setting up basic stuff. Most remaining code require fundamental tools.
7027
7028# Locate the directory of this script.
7029SCRIPT="$0"
7030
7031    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7032        # Follow a chain of symbolic links. Use readlink
7033        # where it exists, else fall back to horribly
7034        # complicated shell code.
7035        if test "x$READLINK_TESTED" != yes; then
7036            # On MacOSX there is a readlink tool with a different
7037            # purpose than the GNU readlink tool. Check the found readlink.
7038            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7039            if test "x$ISGNU" = x; then
7040                 # A readlink that we do not know how to use.
7041                 # Are there other non-GNU readlinks out there?
7042                 READLINK_TESTED=yes
7043                 READLINK=
7044            fi
7045        fi
7046
7047        if test "x$READLINK" != x; then
7048            SCRIPT=`$READLINK -f $SCRIPT`
7049        else
7050            # Save the current directory for restoring afterwards
7051            STARTDIR=$PWD
7052            COUNTER=0
7053            sym_link_dir=`$DIRNAME $SCRIPT`
7054            sym_link_file=`$BASENAME $SCRIPT`
7055            # Use the system pwd and not the shell builtin to resolve directory symlinks
7056            cd $sym_link_dir
7057            cd `$THEPWDCMD`
7058            sym_link_dir=`$THEPWDCMD`
7059            # Resolve file symlinks
7060            while test $COUNTER -lt 20; do
7061                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7062                if test "x$ISLINK" == x; then
7063                    # This is not a symbolic link! We are done!
7064                    break
7065                fi
7066                # Again resolve directory symlinks since the target of the just found
7067                # link could be in a different directory
7068                cd `$DIRNAME $ISLINK`
7069                sym_link_dir=`$THEPWDCMD`
7070                sym_link_file=`$BASENAME $ISLINK`
7071                let COUNTER=COUNTER+1
7072            done
7073            cd $STARTDIR
7074            SCRIPT=$sym_link_dir/$sym_link_file
7075        fi
7076    fi
7077
7078AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7079
7080# Where is the source? It is located two levels above the configure script.
7081CURDIR="$PWD"
7082cd "$AUTOCONF_DIR/../.."
7083SRC_ROOT="`$THEPWDCMD`"
7084
7085if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7086  PATH_SEP=";"
7087
7088  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7089  if test $SRC_ROOT_LENGTH -gt 100; then
7090      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7091  fi
7092
7093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7095$as_echo_n "checking cygwin release... " >&6; }
7096    CYGWIN_VERSION=`$UNAME -r`
7097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7098$as_echo "$CYGWIN_VERSION" >&6; }
7099    WINDOWS_ENV_VENDOR='cygwin'
7100    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7101
7102    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7103    if test "x$CYGWIN_VERSION_OK" = x; then
7104      { $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
7105$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;}
7106      as_fn_error $? "Cannot continue" "$LINENO" 5
7107    fi
7108    if test "x$CYGPATH" = x; then
7109        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7110    fi
7111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7112$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7113    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7114    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7115    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7116    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7118$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7119    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7120    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7121    if test "x$test_cygdrive_prefix" = x; then
7122        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7123    fi
7124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7125    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7126$as_echo_n "checking msys release... " >&6; }
7127    MSYS_VERSION=`$UNAME -r`
7128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7129$as_echo "$MSYS_VERSION" >&6; }
7130
7131    WINDOWS_ENV_VENDOR='msys'
7132    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7133
7134    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7135$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7136    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7137    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7138
7139  windows_path="$MSYS_ROOT_PATH"
7140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7141    unix_path=`$CYGPATH -u "$windows_path"`
7142    MSYS_ROOT_PATH="$unix_path"
7143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7145    MSYS_ROOT_PATH="$unix_path"
7146  fi
7147
7148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7149$as_echo "$MSYS_ROOT_PATH" >&6; }
7150    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7151  else
7152    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7153  fi
7154
7155  # Test if windows or unix (cygwin/msys) find is first in path.
7156  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7157$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7158  FIND_BINARY_OUTPUT=`find --version 2>&1`
7159  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7161$as_echo "unix style" >&6; }
7162  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7164$as_echo "Windows" >&6; }
7165    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7166$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7167    { $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
7168$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7169    as_fn_error $? "Cannot continue" "$LINENO" 5
7170  else
7171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7172$as_echo "unknown" >&6; }
7173    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7174$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7175  fi
7176
7177else
7178  PATH_SEP=":"
7179fi
7180
7181
7182
7183cd "$CURDIR"
7184
7185
7186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7187
7188  # Input might be given as Windows format, start by converting to
7189  # unix format.
7190  path="$SRC_ROOT"
7191  new_path=`$CYGPATH -u "$path"`
7192
7193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7196  # "foo.exe" is OK but "foo" is an error.
7197  #
7198  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7199  # It is also a way to make sure we got the proper file name for the real test later on.
7200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7201  if test "x$test_shortpath" = x; then
7202    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7203$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7204    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7205  fi
7206
7207  # Call helper function which possibly converts this using DOS-style short mode.
7208  # If so, the updated path is stored in $new_path.
7209
7210  input_path="$new_path"
7211  # Check if we need to convert this using DOS-style short mode. If the path
7212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7213  # take no chances and rewrite it.
7214  # Note: m4 eats our [], so we need to use [ and ] instead.
7215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7216  if test "x$has_forbidden_chars" != x; then
7217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7221      # Going to short mode and back again did indeed matter. Since short mode is
7222      # case insensitive, let's make it lowercase to improve readability.
7223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7224      # Now convert it back to Unix-stile (cygpath)
7225      input_path=`$CYGPATH -u "$shortmode_path"`
7226      new_path="$input_path"
7227    fi
7228  fi
7229
7230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7231  if test "x$test_cygdrive_prefix" = x; then
7232    # As a simple fix, exclude /usr/bin since it's not a real path.
7233    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7235      # a path prefixed by /cygdrive for fixpath to work.
7236      new_path="$CYGWIN_ROOT_PATH$input_path"
7237    fi
7238  fi
7239
7240
7241  if test "x$path" != "x$new_path"; then
7242    SRC_ROOT="$new_path"
7243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7244$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7245  fi
7246
7247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7248
7249  path="$SRC_ROOT"
7250  has_colon=`$ECHO $path | $GREP ^.:`
7251  new_path="$path"
7252  if test "x$has_colon" = x; then
7253    # Not in mixed or Windows style, start by that.
7254    new_path=`cmd //c echo $path`
7255  fi
7256
7257
7258  input_path="$new_path"
7259  # Check if we need to convert this using DOS-style short mode. If the path
7260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7261  # take no chances and rewrite it.
7262  # Note: m4 eats our [], so we need to use [ and ] instead.
7263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7264  if test "x$has_forbidden_chars" != x; then
7265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7267  fi
7268
7269
7270  windows_path="$new_path"
7271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7272    unix_path=`$CYGPATH -u "$windows_path"`
7273    new_path="$unix_path"
7274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7276    new_path="$unix_path"
7277  fi
7278
7279  if test "x$path" != "x$new_path"; then
7280    SRC_ROOT="$new_path"
7281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7282$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7283  fi
7284
7285  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7286  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7287
7288  else
7289    # We're on a posix platform. Hooray! :)
7290    path="$SRC_ROOT"
7291
7292    if test ! -f "$path" && test ! -d "$path"; then
7293      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7294    fi
7295
7296    has_space=`$ECHO "$path" | $GREP " "`
7297    if test "x$has_space" != x; then
7298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7299$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7300      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7301    fi
7302  fi
7303
7304
7305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7306
7307  # Input might be given as Windows format, start by converting to
7308  # unix format.
7309  path="$CURDIR"
7310  new_path=`$CYGPATH -u "$path"`
7311
7312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7315  # "foo.exe" is OK but "foo" is an error.
7316  #
7317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7318  # It is also a way to make sure we got the proper file name for the real test later on.
7319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7320  if test "x$test_shortpath" = x; then
7321    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7322$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7323    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7324  fi
7325
7326  # Call helper function which possibly converts this using DOS-style short mode.
7327  # If so, the updated path is stored in $new_path.
7328
7329  input_path="$new_path"
7330  # Check if we need to convert this using DOS-style short mode. If the path
7331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7332  # take no chances and rewrite it.
7333  # Note: m4 eats our [], so we need to use [ and ] instead.
7334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7335  if test "x$has_forbidden_chars" != x; then
7336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7340      # Going to short mode and back again did indeed matter. Since short mode is
7341      # case insensitive, let's make it lowercase to improve readability.
7342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7343      # Now convert it back to Unix-stile (cygpath)
7344      input_path=`$CYGPATH -u "$shortmode_path"`
7345      new_path="$input_path"
7346    fi
7347  fi
7348
7349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7350  if test "x$test_cygdrive_prefix" = x; then
7351    # As a simple fix, exclude /usr/bin since it's not a real path.
7352    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7354      # a path prefixed by /cygdrive for fixpath to work.
7355      new_path="$CYGWIN_ROOT_PATH$input_path"
7356    fi
7357  fi
7358
7359
7360  if test "x$path" != "x$new_path"; then
7361    CURDIR="$new_path"
7362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7363$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7364  fi
7365
7366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7367
7368  path="$CURDIR"
7369  has_colon=`$ECHO $path | $GREP ^.:`
7370  new_path="$path"
7371  if test "x$has_colon" = x; then
7372    # Not in mixed or Windows style, start by that.
7373    new_path=`cmd //c echo $path`
7374  fi
7375
7376
7377  input_path="$new_path"
7378  # Check if we need to convert this using DOS-style short mode. If the path
7379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7380  # take no chances and rewrite it.
7381  # Note: m4 eats our [], so we need to use [ and ] instead.
7382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7383  if test "x$has_forbidden_chars" != x; then
7384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7386  fi
7387
7388
7389  windows_path="$new_path"
7390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7391    unix_path=`$CYGPATH -u "$windows_path"`
7392    new_path="$unix_path"
7393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7395    new_path="$unix_path"
7396  fi
7397
7398  if test "x$path" != "x$new_path"; then
7399    CURDIR="$new_path"
7400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7401$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7402  fi
7403
7404  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7405  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7406
7407  else
7408    # We're on a posix platform. Hooray! :)
7409    path="$CURDIR"
7410
7411    if test ! -f "$path" && test ! -d "$path"; then
7412      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7413    fi
7414
7415    has_space=`$ECHO "$path" | $GREP " "`
7416    if test "x$has_space" != x; then
7417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7418$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7419      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7420    fi
7421  fi
7422
7423
7424if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7425    # Add extra search paths on solaris for utilities like ar and as etc...
7426    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7427fi
7428
7429# You can force the sys-root if the sys-root encoded into the cross compiler tools
7430# is not correct.
7431
7432# Check whether --with-sys-root was given.
7433if test "${with_sys_root+set}" = set; then :
7434  withval=$with_sys_root;
7435fi
7436
7437
7438if test "x$with_sys_root" != x; then
7439  SYS_ROOT=$with_sys_root
7440else
7441  SYS_ROOT=/
7442fi
7443
7444
7445
7446# Check whether --with-tools-dir was given.
7447if test "${with_tools_dir+set}" = set; then :
7448  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7449fi
7450
7451
7452
7453# Check whether --with-devkit was given.
7454if test "${with_devkit+set}" = set; then :
7455  withval=$with_devkit;
7456    if test "x$with_sys_root" != x; then
7457      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7458    fi
7459    if test "x$with_tools_dir" != x; then
7460      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7461    fi
7462    TOOLS_DIR=$with_devkit/bin
7463    SYS_ROOT=$with_devkit/$host_alias/libc
7464
7465fi
7466
7467
7468
7469
7470# Setup default logging of stdout and stderr to build.log in the output root.
7471BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7472BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7473BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7474
7475
7476
7477
7478
7479# These are needed to be able to create a configuration name (and thus the output directory)
7480
7481###############################################################################
7482#
7483# Check which variant of the JDK that we want to build.
7484# Currently we have:
7485#    normal:   standard edition
7486# but the custom make system may add other variants
7487#
7488# Effectively the JDK variant gives a name to a specific set of
7489# modules to compile into the JDK. In the future, these modules
7490# might even be Jigsaw modules.
7491#
7492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7493$as_echo_n "checking which variant of the JDK to build... " >&6; }
7494
7495# Check whether --with-jdk-variant was given.
7496if test "${with_jdk_variant+set}" = set; then :
7497  withval=$with_jdk_variant;
7498fi
7499
7500
7501if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7502    JDK_VARIANT="normal"
7503else
7504    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7505fi
7506
7507
7508
7509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7510$as_echo "$JDK_VARIANT" >&6; }
7511
7512
7513
7514###############################################################################
7515#
7516# Check which variants of the JVM that we want to build.
7517# Currently we have:
7518#    server: normal interpreter and a tiered C1/C2 compiler
7519#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7520#    minimal1: reduced form of client with optional VM services and features stripped out
7521#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7522#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7523#    zero: no machine code interpreter, no compiler
7524#    zeroshark: zero interpreter and shark/llvm compiler backend
7525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7526$as_echo_n "checking which variants of the JVM to build... " >&6; }
7527
7528# Check whether --with-jvm-variants was given.
7529if test "${with_jvm_variants+set}" = set; then :
7530  withval=$with_jvm_variants;
7531fi
7532
7533
7534if test "x$with_jvm_variants" = x; then
7535     with_jvm_variants="server"
7536fi
7537
7538JVM_VARIANTS=",$with_jvm_variants,"
7539TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7540
7541if test "x$TEST_VARIANTS" != "x,"; then
7542   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7543fi
7544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7545$as_echo "$with_jvm_variants" >&6; }
7546
7547JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7548JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7549JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7550JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7551JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7552JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7553
7554if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7555    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7556        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7557    fi
7558fi
7559if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7560    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7561        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7562    fi
7563fi
7564if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7565    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7566        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7567    fi
7568fi
7569
7570# Replace the commas with AND for use in the build directory name.
7571ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7572COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7573if test "x$COUNT_VARIANTS" != "x,1"; then
7574    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7575else
7576    BUILDING_MULTIPLE_JVM_VARIANTS=no
7577fi
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7588   MACOSX_UNIVERSAL="true"
7589fi
7590
7591
7592
7593
7594
7595###############################################################################
7596#
7597# Set the debug level
7598#    release: no debug information, all optimizations, no asserts.
7599#    fastdebug: debug information (-g), all optimizations, all asserts
7600#    slowdebug: debug information (-g), no optimizations, all asserts
7601#
7602DEBUG_LEVEL="release"
7603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7604$as_echo_n "checking which debug level to use... " >&6; }
7605# Check whether --enable-debug was given.
7606if test "${enable_debug+set}" = set; then :
7607  enableval=$enable_debug;
7608        ENABLE_DEBUG="${enableval}"
7609        DEBUG_LEVEL="fastdebug"
7610
7611else
7612  ENABLE_DEBUG="no"
7613fi
7614
7615
7616
7617# Check whether --with-debug-level was given.
7618if test "${with_debug_level+set}" = set; then :
7619  withval=$with_debug_level;
7620        DEBUG_LEVEL="${withval}"
7621        if test "x$ENABLE_DEBUG" = xyes; then
7622			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7623        fi
7624
7625fi
7626
7627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7628$as_echo "$DEBUG_LEVEL" >&6; }
7629
7630if test "x$DEBUG_LEVEL" != xrelease && \
7631   test "x$DEBUG_LEVEL" != xfastdebug && \
7632   test "x$DEBUG_LEVEL" != xslowdebug; then
7633   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7634fi
7635
7636
7637###############################################################################
7638#
7639# Setup legacy vars/targets and new vars to deal with different debug levels.
7640#
7641
7642case $DEBUG_LEVEL in
7643      release )
7644          VARIANT="OPT"
7645          FASTDEBUG="false"
7646          DEBUG_CLASSFILES="false"
7647          BUILD_VARIANT_RELEASE=""
7648          HOTSPOT_DEBUG_LEVEL="product"
7649          HOTSPOT_EXPORT="product"
7650           ;;
7651      fastdebug )
7652          VARIANT="DBG"
7653          FASTDEBUG="true"
7654          DEBUG_CLASSFILES="true"
7655          BUILD_VARIANT_RELEASE="-fastdebug"
7656          HOTSPOT_DEBUG_LEVEL="fastdebug"
7657          HOTSPOT_EXPORT="fastdebug"
7658           ;;
7659      slowdebug )
7660          VARIANT="DBG"
7661          FASTDEBUG="false"
7662          DEBUG_CLASSFILES="true"
7663          BUILD_VARIANT_RELEASE="-debug"
7664          HOTSPOT_DEBUG_LEVEL="jvmg"
7665          HOTSPOT_EXPORT="debug"
7666           ;;
7667esac
7668
7669#####
7670# Generate the legacy makefile targets for hotspot.
7671# The hotspot api for selecting the build artifacts, really, needs to be improved.
7672# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7673# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7674# But until then ...
7675HOTSPOT_TARGET=""
7676
7677if test "x$JVM_VARIANT_SERVER" = xtrue; then
7678    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7679fi
7680
7681if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7682    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7683fi
7684
7685if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7686    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7687fi
7688
7689if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7690    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7691fi
7692
7693if test "x$JVM_VARIANT_ZERO" = xtrue; then
7694    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7695fi
7696
7697if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7698    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7699fi
7700
7701HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7702
7703# On Macosx universal binaries are produced, but they only contain
7704# 64 bit intel. This invalidates control of which jvms are built
7705# from configure, but only server is valid anyway. Fix this
7706# when hotspot makefiles are rewritten.
7707if test "x$MACOSX_UNIVERSAL" = xtrue; then
7708    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7709fi
7710
7711#####
7712
7713
7714
7715
7716
7717
7718
7719
7720# With basic setup done, call the custom early hook.
7721
7722
7723# To properly create a configuration name, we need to have the OpenJDK target
7724# and options (variants and debug level) parsed.
7725
7726
7727
7728# Check whether --with-conf-name was given.
7729if test "${with_conf_name+set}" = set; then :
7730  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7731fi
7732
7733
7734# Test from where we are running configure, in or outside of src root.
7735# To enable comparison of directories, CURDIR needs to be symlink free
7736# just like SRC_ROOT already is
7737NOSYM_CURDIR="$CURDIR"
7738
7739    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7740        # Follow a chain of symbolic links. Use readlink
7741        # where it exists, else fall back to horribly
7742        # complicated shell code.
7743        if test "x$READLINK_TESTED" != yes; then
7744            # On MacOSX there is a readlink tool with a different
7745            # purpose than the GNU readlink tool. Check the found readlink.
7746            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7747            if test "x$ISGNU" = x; then
7748                 # A readlink that we do not know how to use.
7749                 # Are there other non-GNU readlinks out there?
7750                 READLINK_TESTED=yes
7751                 READLINK=
7752            fi
7753        fi
7754
7755        if test "x$READLINK" != x; then
7756            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7757        else
7758            # Save the current directory for restoring afterwards
7759            STARTDIR=$PWD
7760            COUNTER=0
7761            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7762            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7763            # Use the system pwd and not the shell builtin to resolve directory symlinks
7764            cd $sym_link_dir
7765            cd `$THEPWDCMD`
7766            sym_link_dir=`$THEPWDCMD`
7767            # Resolve file symlinks
7768            while test $COUNTER -lt 20; do
7769                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7770                if test "x$ISLINK" == x; then
7771                    # This is not a symbolic link! We are done!
7772                    break
7773                fi
7774                # Again resolve directory symlinks since the target of the just found
7775                # link could be in a different directory
7776                cd `$DIRNAME $ISLINK`
7777                sym_link_dir=`$THEPWDCMD`
7778                sym_link_file=`$BASENAME $ISLINK`
7779                let COUNTER=COUNTER+1
7780            done
7781            cd $STARTDIR
7782            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7783        fi
7784    fi
7785
7786if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7787        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7788        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7789    # We are running configure from the src root.
7790    # Create a default ./build/target-variant-debuglevel output root.
7791    if test "x${CONF_NAME}" = x; then
7792        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7793    fi
7794    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7795    $MKDIR -p "$OUTPUT_ROOT"
7796    if test ! -d "$OUTPUT_ROOT"; then
7797        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7798    fi
7799else
7800    # We are running configure from outside of the src dir.
7801    # Then use the current directory as output dir!
7802    # If configuration is situated in normal build directory, just use the build
7803    # directory name as configuration name, otherwise use the complete path.
7804    if test "x${CONF_NAME}" = x; then
7805        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7806    fi
7807    OUTPUT_ROOT="$CURDIR"
7808
7809    # WARNING: This might be a bad thing to do. You need to be sure you want to
7810    # have a configuration in this directory. Do some sanity checks!
7811
7812    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7813      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7814      # other files
7815      files_present=`$LS $OUTPUT_ROOT`
7816      # Configure has already touched config.log and confdefs.h in the current dir when this check
7817      # is performed.
7818      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7819                                             | $TR -d '\n'`
7820      if test "x$filtered_files" != x; then
7821        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7822$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7823        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7824$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7825        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7826$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7827        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7828$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7829        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7830$as_echo "$as_me: seriously mess up just about everything." >&6;}
7831        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7832$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7833        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7834$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7835        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7836      fi
7837    fi
7838fi
7839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7840$as_echo_n "checking what configuration name to use... " >&6; }
7841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7842$as_echo "$CONF_NAME" >&6; }
7843
7844
7845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7846
7847  # Input might be given as Windows format, start by converting to
7848  # unix format.
7849  path="$OUTPUT_ROOT"
7850  new_path=`$CYGPATH -u "$path"`
7851
7852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7855  # "foo.exe" is OK but "foo" is an error.
7856  #
7857  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7858  # It is also a way to make sure we got the proper file name for the real test later on.
7859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7860  if test "x$test_shortpath" = x; then
7861    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7862$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7863    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7864  fi
7865
7866  # Call helper function which possibly converts this using DOS-style short mode.
7867  # If so, the updated path is stored in $new_path.
7868
7869  input_path="$new_path"
7870  # Check if we need to convert this using DOS-style short mode. If the path
7871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7872  # take no chances and rewrite it.
7873  # Note: m4 eats our [], so we need to use [ and ] instead.
7874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7875  if test "x$has_forbidden_chars" != x; then
7876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7880      # Going to short mode and back again did indeed matter. Since short mode is
7881      # case insensitive, let's make it lowercase to improve readability.
7882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7883      # Now convert it back to Unix-stile (cygpath)
7884      input_path=`$CYGPATH -u "$shortmode_path"`
7885      new_path="$input_path"
7886    fi
7887  fi
7888
7889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7890  if test "x$test_cygdrive_prefix" = x; then
7891    # As a simple fix, exclude /usr/bin since it's not a real path.
7892    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7894      # a path prefixed by /cygdrive for fixpath to work.
7895      new_path="$CYGWIN_ROOT_PATH$input_path"
7896    fi
7897  fi
7898
7899
7900  if test "x$path" != "x$new_path"; then
7901    OUTPUT_ROOT="$new_path"
7902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7903$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7904  fi
7905
7906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7907
7908  path="$OUTPUT_ROOT"
7909  has_colon=`$ECHO $path | $GREP ^.:`
7910  new_path="$path"
7911  if test "x$has_colon" = x; then
7912    # Not in mixed or Windows style, start by that.
7913    new_path=`cmd //c echo $path`
7914  fi
7915
7916
7917  input_path="$new_path"
7918  # Check if we need to convert this using DOS-style short mode. If the path
7919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7920  # take no chances and rewrite it.
7921  # Note: m4 eats our [], so we need to use [ and ] instead.
7922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7923  if test "x$has_forbidden_chars" != x; then
7924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7926  fi
7927
7928
7929  windows_path="$new_path"
7930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7931    unix_path=`$CYGPATH -u "$windows_path"`
7932    new_path="$unix_path"
7933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7935    new_path="$unix_path"
7936  fi
7937
7938  if test "x$path" != "x$new_path"; then
7939    OUTPUT_ROOT="$new_path"
7940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7941$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7942  fi
7943
7944  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7945  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7946
7947  else
7948    # We're on a posix platform. Hooray! :)
7949    path="$OUTPUT_ROOT"
7950
7951    if test ! -f "$path" && test ! -d "$path"; then
7952      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7953    fi
7954
7955    has_space=`$ECHO "$path" | $GREP " "`
7956    if test "x$has_space" != x; then
7957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7958$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7959      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7960    fi
7961  fi
7962
7963
7964SPEC=$OUTPUT_ROOT/spec.gmk
7965
7966CONF_NAME=$CONF_NAME
7967
7968OUTPUT_ROOT=$OUTPUT_ROOT
7969
7970
7971# Most of the probed defines are put into config.h
7972ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7973
7974# The spec.gmk file contains all variables for the make system.
7975ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7976
7977# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7978ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7979
7980# The bootcycle-spec.gmk file contains support for boot cycle builds.
7981ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7982
7983# The compare.sh is used to compare the build output to other builds.
7984ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7985
7986# Spec.sh is currently used by compare-objects.sh
7987ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
7988
7989# The generated Makefile knows where the spec.gmk is and where the source is.
7990# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
7991# which will look for generated configurations
7992ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
7993
7994
7995# Save the arguments given to us
7996echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
7997
7998
7999# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8000
8001    for ac_prog in apt-get yum port pkgutil pkgadd
8002do
8003  # Extract the first word of "$ac_prog", so it can be a program name with args.
8004set dummy $ac_prog; ac_word=$2
8005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8006$as_echo_n "checking for $ac_word... " >&6; }
8007if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8008  $as_echo_n "(cached) " >&6
8009else
8010  if test -n "$PKGHANDLER"; then
8011  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8012else
8013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8014for as_dir in $PATH
8015do
8016  IFS=$as_save_IFS
8017  test -z "$as_dir" && as_dir=.
8018    for ac_exec_ext in '' $ac_executable_extensions; do
8019  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8020    ac_cv_prog_PKGHANDLER="$ac_prog"
8021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8022    break 2
8023  fi
8024done
8025  done
8026IFS=$as_save_IFS
8027
8028fi
8029fi
8030PKGHANDLER=$ac_cv_prog_PKGHANDLER
8031if test -n "$PKGHANDLER"; then
8032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8033$as_echo "$PKGHANDLER" >&6; }
8034else
8035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8036$as_echo "no" >&6; }
8037fi
8038
8039
8040  test -n "$PKGHANDLER" && break
8041done
8042
8043
8044
8045# Setup tools that requires more complex handling, or that is not needed by the configure script.
8046
8047
8048  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8049  if test "x$MAKE" != x; then
8050    # User has supplied a make, test it.
8051    if test ! -f "$MAKE"; then
8052      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8053    fi
8054
8055  MAKE_CANDIDATE=""$MAKE""
8056  DESCRIPTION="user supplied MAKE=$MAKE"
8057  if test "x$MAKE_CANDIDATE" != x; then
8058    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8059$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8060    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8061    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8062    if test "x$IS_GNU_MAKE" = x; then
8063      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8064$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8065    else
8066      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8067      if test "x$IS_MODERN_MAKE" = x; then
8068        { $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
8069$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;}
8070      else
8071        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8072          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8073            MAKE_EXPECTED_ENV='cygwin'
8074          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8075            MAKE_EXPECTED_ENV='msys'
8076          else
8077            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8078          fi
8079          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8080          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8081        else
8082          # Not relevant for non-Windows
8083          IS_MAKE_CORRECT_ENV=true
8084        fi
8085        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8086          { $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
8087$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;}
8088        else
8089          FOUND_MAKE=$MAKE_CANDIDATE
8090
8091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8092
8093  # First separate the path from the arguments. This will split at the first
8094  # space.
8095  complete="$FOUND_MAKE"
8096  path="${complete%% *}"
8097  tmp="$complete EOL"
8098  arguments="${tmp#* }"
8099
8100  # Input might be given as Windows format, start by converting to
8101  # unix format.
8102  new_path=`$CYGPATH -u "$path"`
8103
8104  # Now try to locate executable using which
8105  new_path=`$WHICH "$new_path" 2> /dev/null`
8106  # bat and cmd files are not always considered executable in cygwin causing which
8107  # to not find them
8108  if test "x$new_path" = x \
8109           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8110           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8111    new_path=`$CYGPATH -u "$path"`
8112  fi
8113  if test "x$new_path" = x; then
8114    # Oops. Which didn't find the executable.
8115    # The splitting of arguments from the executable at a space might have been incorrect,
8116    # since paths with space are more likely in Windows. Give it another try with the whole
8117    # argument.
8118    path="$complete"
8119    arguments="EOL"
8120    new_path=`$CYGPATH -u "$path"`
8121    new_path=`$WHICH "$new_path" 2> /dev/null`
8122    # bat and cmd files are not always considered executable in cygwin causing which
8123    # to not find them
8124    if test "x$new_path" = x \
8125             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8126             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8127      new_path=`$CYGPATH -u "$path"`
8128    fi
8129    if test "x$new_path" = x; then
8130      # It's still not found. Now this is an unrecoverable error.
8131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8132$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8133      has_space=`$ECHO "$complete" | $GREP " "`
8134      if test "x$has_space" != x; then
8135        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8136$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8137      fi
8138      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8139    fi
8140  fi
8141
8142  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8143  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8144  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8145  # "foo.exe" is OK but "foo" is an error.
8146  #
8147  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8148  # It is also a way to make sure we got the proper file name for the real test later on.
8149  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8150  if test "x$test_shortpath" = x; then
8151    # Short path failed, file does not exist as specified.
8152    # Try adding .exe or .cmd
8153    if test -f "${new_path}.exe"; then
8154       input_to_shortpath="${new_path}.exe"
8155    elif test -f "${new_path}.cmd"; then
8156       input_to_shortpath="${new_path}.cmd"
8157    else
8158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8159$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8160      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8161$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8162      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8163    fi
8164  else
8165    input_to_shortpath="$new_path"
8166  fi
8167
8168  # Call helper function which possibly converts this using DOS-style short mode.
8169  # If so, the updated path is stored in $new_path.
8170  new_path="$input_to_shortpath"
8171
8172  input_path="$input_to_shortpath"
8173  # Check if we need to convert this using DOS-style short mode. If the path
8174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8175  # take no chances and rewrite it.
8176  # Note: m4 eats our [], so we need to use [ and ] instead.
8177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8178  if test "x$has_forbidden_chars" != x; then
8179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8180    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8181    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8182    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8183      # Going to short mode and back again did indeed matter. Since short mode is
8184      # case insensitive, let's make it lowercase to improve readability.
8185      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8186      # Now convert it back to Unix-stile (cygpath)
8187      input_path=`$CYGPATH -u "$shortmode_path"`
8188      new_path="$input_path"
8189    fi
8190  fi
8191
8192  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8193  if test "x$test_cygdrive_prefix" = x; then
8194    # As a simple fix, exclude /usr/bin since it's not a real path.
8195    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8196      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8197      # a path prefixed by /cygdrive for fixpath to work.
8198      new_path="$CYGWIN_ROOT_PATH$input_path"
8199    fi
8200  fi
8201
8202  # remove trailing .exe if any
8203  new_path="${new_path/%.exe/}"
8204
8205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8206
8207  # First separate the path from the arguments. This will split at the first
8208  # space.
8209  complete="$FOUND_MAKE"
8210  path="${complete%% *}"
8211  tmp="$complete EOL"
8212  arguments="${tmp#* }"
8213
8214  # Input might be given as Windows format, start by converting to
8215  # unix format.
8216  new_path="$path"
8217
8218  windows_path="$new_path"
8219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8220    unix_path=`$CYGPATH -u "$windows_path"`
8221    new_path="$unix_path"
8222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8224    new_path="$unix_path"
8225  fi
8226
8227
8228  # Now try to locate executable using which
8229  new_path=`$WHICH "$new_path" 2> /dev/null`
8230
8231  if test "x$new_path" = x; then
8232    # Oops. Which didn't find the executable.
8233    # The splitting of arguments from the executable at a space might have been incorrect,
8234    # since paths with space are more likely in Windows. Give it another try with the whole
8235    # argument.
8236    path="$complete"
8237    arguments="EOL"
8238    new_path="$path"
8239
8240  windows_path="$new_path"
8241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8242    unix_path=`$CYGPATH -u "$windows_path"`
8243    new_path="$unix_path"
8244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8246    new_path="$unix_path"
8247  fi
8248
8249
8250    new_path=`$WHICH "$new_path" 2> /dev/null`
8251
8252    if test "x$new_path" = x; then
8253      # It's still not found. Now this is an unrecoverable error.
8254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8255$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8256      has_space=`$ECHO "$complete" | $GREP " "`
8257      if test "x$has_space" != x; then
8258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8260      fi
8261      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8262    fi
8263  fi
8264
8265  # Now new_path has a complete unix path to the binary
8266  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8267    # Keep paths in /bin as-is, but remove trailing .exe if any
8268    new_path="${new_path/%.exe/}"
8269    # Do not save /bin paths to all_fixpath_prefixes!
8270  else
8271    # Not in mixed or Windows style, start by that.
8272    new_path=`cmd //c echo $new_path`
8273
8274  input_path="$new_path"
8275  # Check if we need to convert this using DOS-style short mode. If the path
8276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8277  # take no chances and rewrite it.
8278  # Note: m4 eats our [], so we need to use [ and ] instead.
8279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8280  if test "x$has_forbidden_chars" != x; then
8281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8282    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8283  fi
8284
8285    # Output is in $new_path
8286
8287  windows_path="$new_path"
8288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8289    unix_path=`$CYGPATH -u "$windows_path"`
8290    new_path="$unix_path"
8291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8293    new_path="$unix_path"
8294  fi
8295
8296    # remove trailing .exe if any
8297    new_path="${new_path/%.exe/}"
8298
8299    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8300    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8301  fi
8302
8303  else
8304    # We're on a posix platform. Hooray! :)
8305    # First separate the path from the arguments. This will split at the first
8306    # space.
8307    complete="$FOUND_MAKE"
8308    path="${complete%% *}"
8309    tmp="$complete EOL"
8310    arguments="${tmp#* }"
8311
8312    # Cannot rely on the command "which" here since it doesn't always work.
8313    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8314    if test -z "$is_absolute_path"; then
8315      # Path to executable is not absolute. Find it.
8316      IFS_save="$IFS"
8317      IFS=:
8318      for p in $PATH; do
8319        if test -f "$p/$path" && test -x "$p/$path"; then
8320          new_path="$p/$path"
8321          break
8322        fi
8323      done
8324      IFS="$IFS_save"
8325    else
8326      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8327$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8328      new_path="$path"
8329    fi
8330
8331    if test "x$new_path" = x; then
8332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8333$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8334        has_space=`$ECHO "$complete" | $GREP " "`
8335        if test "x$has_space" != x; then
8336          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8337$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8338        fi
8339        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8340      fi
8341  fi
8342
8343      # Now join together the path and the arguments once again
8344      if test "x$arguments" != xEOL; then
8345        new_complete="$new_path ${arguments% *}"
8346      else
8347        new_complete="$new_path"
8348      fi
8349
8350  if test "x$complete" != "x$new_complete"; then
8351      FOUND_MAKE="$new_complete"
8352      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8353$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8354    fi
8355
8356        fi
8357      fi
8358    fi
8359  fi
8360
8361    if test "x$FOUND_MAKE" = x; then
8362      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8363    fi
8364  else
8365    # Try our hardest to locate a correct version of GNU make
8366    for ac_prog in gmake
8367do
8368  # Extract the first word of "$ac_prog", so it can be a program name with args.
8369set dummy $ac_prog; ac_word=$2
8370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8371$as_echo_n "checking for $ac_word... " >&6; }
8372if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8373  $as_echo_n "(cached) " >&6
8374else
8375  case $CHECK_GMAKE in
8376  [\\/]* | ?:[\\/]*)
8377  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8378  ;;
8379  *)
8380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8381for as_dir in $PATH
8382do
8383  IFS=$as_save_IFS
8384  test -z "$as_dir" && as_dir=.
8385    for ac_exec_ext in '' $ac_executable_extensions; do
8386  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8387    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8389    break 2
8390  fi
8391done
8392  done
8393IFS=$as_save_IFS
8394
8395  ;;
8396esac
8397fi
8398CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8399if test -n "$CHECK_GMAKE"; then
8400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8401$as_echo "$CHECK_GMAKE" >&6; }
8402else
8403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8404$as_echo "no" >&6; }
8405fi
8406
8407
8408  test -n "$CHECK_GMAKE" && break
8409done
8410
8411
8412  MAKE_CANDIDATE=""$CHECK_GMAKE""
8413  DESCRIPTION="gmake in PATH"
8414  if test "x$MAKE_CANDIDATE" != x; then
8415    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8416$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8417    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8418    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8419    if test "x$IS_GNU_MAKE" = x; then
8420      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8421$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8422    else
8423      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8424      if test "x$IS_MODERN_MAKE" = x; then
8425        { $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
8426$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;}
8427      else
8428        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8429          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8430            MAKE_EXPECTED_ENV='cygwin'
8431          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8432            MAKE_EXPECTED_ENV='msys'
8433          else
8434            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8435          fi
8436          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8437          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8438        else
8439          # Not relevant for non-Windows
8440          IS_MAKE_CORRECT_ENV=true
8441        fi
8442        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8443          { $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
8444$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;}
8445        else
8446          FOUND_MAKE=$MAKE_CANDIDATE
8447
8448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8449
8450  # First separate the path from the arguments. This will split at the first
8451  # space.
8452  complete="$FOUND_MAKE"
8453  path="${complete%% *}"
8454  tmp="$complete EOL"
8455  arguments="${tmp#* }"
8456
8457  # Input might be given as Windows format, start by converting to
8458  # unix format.
8459  new_path=`$CYGPATH -u "$path"`
8460
8461  # Now try to locate executable using which
8462  new_path=`$WHICH "$new_path" 2> /dev/null`
8463  # bat and cmd files are not always considered executable in cygwin causing which
8464  # to not find them
8465  if test "x$new_path" = x \
8466           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8467           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8468    new_path=`$CYGPATH -u "$path"`
8469  fi
8470  if test "x$new_path" = x; then
8471    # Oops. Which didn't find the executable.
8472    # The splitting of arguments from the executable at a space might have been incorrect,
8473    # since paths with space are more likely in Windows. Give it another try with the whole
8474    # argument.
8475    path="$complete"
8476    arguments="EOL"
8477    new_path=`$CYGPATH -u "$path"`
8478    new_path=`$WHICH "$new_path" 2> /dev/null`
8479    # bat and cmd files are not always considered executable in cygwin causing which
8480    # to not find them
8481    if test "x$new_path" = x \
8482             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8483             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8484      new_path=`$CYGPATH -u "$path"`
8485    fi
8486    if test "x$new_path" = x; then
8487      # It's still not found. Now this is an unrecoverable error.
8488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8489$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8490      has_space=`$ECHO "$complete" | $GREP " "`
8491      if test "x$has_space" != x; then
8492        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8493$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8494      fi
8495      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8496    fi
8497  fi
8498
8499  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8500  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8501  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8502  # "foo.exe" is OK but "foo" is an error.
8503  #
8504  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8505  # It is also a way to make sure we got the proper file name for the real test later on.
8506  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8507  if test "x$test_shortpath" = x; then
8508    # Short path failed, file does not exist as specified.
8509    # Try adding .exe or .cmd
8510    if test -f "${new_path}.exe"; then
8511       input_to_shortpath="${new_path}.exe"
8512    elif test -f "${new_path}.cmd"; then
8513       input_to_shortpath="${new_path}.cmd"
8514    else
8515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8516$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8517      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8518$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8519      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8520    fi
8521  else
8522    input_to_shortpath="$new_path"
8523  fi
8524
8525  # Call helper function which possibly converts this using DOS-style short mode.
8526  # If so, the updated path is stored in $new_path.
8527  new_path="$input_to_shortpath"
8528
8529  input_path="$input_to_shortpath"
8530  # Check if we need to convert this using DOS-style short mode. If the path
8531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8532  # take no chances and rewrite it.
8533  # Note: m4 eats our [], so we need to use [ and ] instead.
8534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8535  if test "x$has_forbidden_chars" != x; then
8536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8540      # Going to short mode and back again did indeed matter. Since short mode is
8541      # case insensitive, let's make it lowercase to improve readability.
8542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8543      # Now convert it back to Unix-stile (cygpath)
8544      input_path=`$CYGPATH -u "$shortmode_path"`
8545      new_path="$input_path"
8546    fi
8547  fi
8548
8549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8550  if test "x$test_cygdrive_prefix" = x; then
8551    # As a simple fix, exclude /usr/bin since it's not a real path.
8552    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8554      # a path prefixed by /cygdrive for fixpath to work.
8555      new_path="$CYGWIN_ROOT_PATH$input_path"
8556    fi
8557  fi
8558
8559  # remove trailing .exe if any
8560  new_path="${new_path/%.exe/}"
8561
8562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8563
8564  # First separate the path from the arguments. This will split at the first
8565  # space.
8566  complete="$FOUND_MAKE"
8567  path="${complete%% *}"
8568  tmp="$complete EOL"
8569  arguments="${tmp#* }"
8570
8571  # Input might be given as Windows format, start by converting to
8572  # unix format.
8573  new_path="$path"
8574
8575  windows_path="$new_path"
8576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8577    unix_path=`$CYGPATH -u "$windows_path"`
8578    new_path="$unix_path"
8579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8581    new_path="$unix_path"
8582  fi
8583
8584
8585  # Now try to locate executable using which
8586  new_path=`$WHICH "$new_path" 2> /dev/null`
8587
8588  if test "x$new_path" = x; then
8589    # Oops. Which didn't find the executable.
8590    # The splitting of arguments from the executable at a space might have been incorrect,
8591    # since paths with space are more likely in Windows. Give it another try with the whole
8592    # argument.
8593    path="$complete"
8594    arguments="EOL"
8595    new_path="$path"
8596
8597  windows_path="$new_path"
8598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8599    unix_path=`$CYGPATH -u "$windows_path"`
8600    new_path="$unix_path"
8601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8603    new_path="$unix_path"
8604  fi
8605
8606
8607    new_path=`$WHICH "$new_path" 2> /dev/null`
8608
8609    if test "x$new_path" = x; then
8610      # It's still not found. Now this is an unrecoverable error.
8611      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8612$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8613      has_space=`$ECHO "$complete" | $GREP " "`
8614      if test "x$has_space" != x; then
8615        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8616$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8617      fi
8618      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8619    fi
8620  fi
8621
8622  # Now new_path has a complete unix path to the binary
8623  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8624    # Keep paths in /bin as-is, but remove trailing .exe if any
8625    new_path="${new_path/%.exe/}"
8626    # Do not save /bin paths to all_fixpath_prefixes!
8627  else
8628    # Not in mixed or Windows style, start by that.
8629    new_path=`cmd //c echo $new_path`
8630
8631  input_path="$new_path"
8632  # Check if we need to convert this using DOS-style short mode. If the path
8633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8634  # take no chances and rewrite it.
8635  # Note: m4 eats our [], so we need to use [ and ] instead.
8636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8637  if test "x$has_forbidden_chars" != x; then
8638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8640  fi
8641
8642    # Output is in $new_path
8643
8644  windows_path="$new_path"
8645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8646    unix_path=`$CYGPATH -u "$windows_path"`
8647    new_path="$unix_path"
8648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8650    new_path="$unix_path"
8651  fi
8652
8653    # remove trailing .exe if any
8654    new_path="${new_path/%.exe/}"
8655
8656    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8657    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8658  fi
8659
8660  else
8661    # We're on a posix platform. Hooray! :)
8662    # First separate the path from the arguments. This will split at the first
8663    # space.
8664    complete="$FOUND_MAKE"
8665    path="${complete%% *}"
8666    tmp="$complete EOL"
8667    arguments="${tmp#* }"
8668
8669    # Cannot rely on the command "which" here since it doesn't always work.
8670    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8671    if test -z "$is_absolute_path"; then
8672      # Path to executable is not absolute. Find it.
8673      IFS_save="$IFS"
8674      IFS=:
8675      for p in $PATH; do
8676        if test -f "$p/$path" && test -x "$p/$path"; then
8677          new_path="$p/$path"
8678          break
8679        fi
8680      done
8681      IFS="$IFS_save"
8682    else
8683      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8684$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8685      new_path="$path"
8686    fi
8687
8688    if test "x$new_path" = x; then
8689        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8690$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8691        has_space=`$ECHO "$complete" | $GREP " "`
8692        if test "x$has_space" != x; then
8693          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8694$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8695        fi
8696        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8697      fi
8698  fi
8699
8700      # Now join together the path and the arguments once again
8701      if test "x$arguments" != xEOL; then
8702        new_complete="$new_path ${arguments% *}"
8703      else
8704        new_complete="$new_path"
8705      fi
8706
8707  if test "x$complete" != "x$new_complete"; then
8708      FOUND_MAKE="$new_complete"
8709      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8710$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8711    fi
8712
8713        fi
8714      fi
8715    fi
8716  fi
8717
8718
8719    if test "x$FOUND_MAKE" = x; then
8720      for ac_prog in make
8721do
8722  # Extract the first word of "$ac_prog", so it can be a program name with args.
8723set dummy $ac_prog; ac_word=$2
8724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8725$as_echo_n "checking for $ac_word... " >&6; }
8726if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8727  $as_echo_n "(cached) " >&6
8728else
8729  case $CHECK_MAKE in
8730  [\\/]* | ?:[\\/]*)
8731  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8732  ;;
8733  *)
8734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8735for as_dir in $PATH
8736do
8737  IFS=$as_save_IFS
8738  test -z "$as_dir" && as_dir=.
8739    for ac_exec_ext in '' $ac_executable_extensions; do
8740  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8741    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8743    break 2
8744  fi
8745done
8746  done
8747IFS=$as_save_IFS
8748
8749  ;;
8750esac
8751fi
8752CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8753if test -n "$CHECK_MAKE"; then
8754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8755$as_echo "$CHECK_MAKE" >&6; }
8756else
8757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8758$as_echo "no" >&6; }
8759fi
8760
8761
8762  test -n "$CHECK_MAKE" && break
8763done
8764
8765
8766  MAKE_CANDIDATE=""$CHECK_MAKE""
8767  DESCRIPTION="make in PATH"
8768  if test "x$MAKE_CANDIDATE" != x; then
8769    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8770$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8771    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8772    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8773    if test "x$IS_GNU_MAKE" = x; then
8774      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8775$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8776    else
8777      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8778      if test "x$IS_MODERN_MAKE" = x; then
8779        { $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
8780$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;}
8781      else
8782        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8783          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8784            MAKE_EXPECTED_ENV='cygwin'
8785          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8786            MAKE_EXPECTED_ENV='msys'
8787          else
8788            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8789          fi
8790          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8791          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8792        else
8793          # Not relevant for non-Windows
8794          IS_MAKE_CORRECT_ENV=true
8795        fi
8796        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8797          { $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
8798$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;}
8799        else
8800          FOUND_MAKE=$MAKE_CANDIDATE
8801
8802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8803
8804  # First separate the path from the arguments. This will split at the first
8805  # space.
8806  complete="$FOUND_MAKE"
8807  path="${complete%% *}"
8808  tmp="$complete EOL"
8809  arguments="${tmp#* }"
8810
8811  # Input might be given as Windows format, start by converting to
8812  # unix format.
8813  new_path=`$CYGPATH -u "$path"`
8814
8815  # Now try to locate executable using which
8816  new_path=`$WHICH "$new_path" 2> /dev/null`
8817  # bat and cmd files are not always considered executable in cygwin causing which
8818  # to not find them
8819  if test "x$new_path" = x \
8820           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8821           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8822    new_path=`$CYGPATH -u "$path"`
8823  fi
8824  if test "x$new_path" = x; then
8825    # Oops. Which didn't find the executable.
8826    # The splitting of arguments from the executable at a space might have been incorrect,
8827    # since paths with space are more likely in Windows. Give it another try with the whole
8828    # argument.
8829    path="$complete"
8830    arguments="EOL"
8831    new_path=`$CYGPATH -u "$path"`
8832    new_path=`$WHICH "$new_path" 2> /dev/null`
8833    # bat and cmd files are not always considered executable in cygwin causing which
8834    # to not find them
8835    if test "x$new_path" = x \
8836             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8837             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8838      new_path=`$CYGPATH -u "$path"`
8839    fi
8840    if test "x$new_path" = x; then
8841      # It's still not found. Now this is an unrecoverable error.
8842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8843$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8844      has_space=`$ECHO "$complete" | $GREP " "`
8845      if test "x$has_space" != x; then
8846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8848      fi
8849      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8850    fi
8851  fi
8852
8853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8856  # "foo.exe" is OK but "foo" is an error.
8857  #
8858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8859  # It is also a way to make sure we got the proper file name for the real test later on.
8860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8861  if test "x$test_shortpath" = x; then
8862    # Short path failed, file does not exist as specified.
8863    # Try adding .exe or .cmd
8864    if test -f "${new_path}.exe"; then
8865       input_to_shortpath="${new_path}.exe"
8866    elif test -f "${new_path}.cmd"; then
8867       input_to_shortpath="${new_path}.cmd"
8868    else
8869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8870$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8871      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8872$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8873      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8874    fi
8875  else
8876    input_to_shortpath="$new_path"
8877  fi
8878
8879  # Call helper function which possibly converts this using DOS-style short mode.
8880  # If so, the updated path is stored in $new_path.
8881  new_path="$input_to_shortpath"
8882
8883  input_path="$input_to_shortpath"
8884  # Check if we need to convert this using DOS-style short mode. If the path
8885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8886  # take no chances and rewrite it.
8887  # Note: m4 eats our [], so we need to use [ and ] instead.
8888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8889  if test "x$has_forbidden_chars" != x; then
8890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8894      # Going to short mode and back again did indeed matter. Since short mode is
8895      # case insensitive, let's make it lowercase to improve readability.
8896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8897      # Now convert it back to Unix-stile (cygpath)
8898      input_path=`$CYGPATH -u "$shortmode_path"`
8899      new_path="$input_path"
8900    fi
8901  fi
8902
8903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8904  if test "x$test_cygdrive_prefix" = x; then
8905    # As a simple fix, exclude /usr/bin since it's not a real path.
8906    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8908      # a path prefixed by /cygdrive for fixpath to work.
8909      new_path="$CYGWIN_ROOT_PATH$input_path"
8910    fi
8911  fi
8912
8913  # remove trailing .exe if any
8914  new_path="${new_path/%.exe/}"
8915
8916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8917
8918  # First separate the path from the arguments. This will split at the first
8919  # space.
8920  complete="$FOUND_MAKE"
8921  path="${complete%% *}"
8922  tmp="$complete EOL"
8923  arguments="${tmp#* }"
8924
8925  # Input might be given as Windows format, start by converting to
8926  # unix format.
8927  new_path="$path"
8928
8929  windows_path="$new_path"
8930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8931    unix_path=`$CYGPATH -u "$windows_path"`
8932    new_path="$unix_path"
8933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8935    new_path="$unix_path"
8936  fi
8937
8938
8939  # Now try to locate executable using which
8940  new_path=`$WHICH "$new_path" 2> /dev/null`
8941
8942  if test "x$new_path" = x; then
8943    # Oops. Which didn't find the executable.
8944    # The splitting of arguments from the executable at a space might have been incorrect,
8945    # since paths with space are more likely in Windows. Give it another try with the whole
8946    # argument.
8947    path="$complete"
8948    arguments="EOL"
8949    new_path="$path"
8950
8951  windows_path="$new_path"
8952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8953    unix_path=`$CYGPATH -u "$windows_path"`
8954    new_path="$unix_path"
8955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8957    new_path="$unix_path"
8958  fi
8959
8960
8961    new_path=`$WHICH "$new_path" 2> /dev/null`
8962
8963    if test "x$new_path" = x; then
8964      # It's still not found. Now this is an unrecoverable error.
8965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8966$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8967      has_space=`$ECHO "$complete" | $GREP " "`
8968      if test "x$has_space" != x; then
8969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8971      fi
8972      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8973    fi
8974  fi
8975
8976  # Now new_path has a complete unix path to the binary
8977  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8978    # Keep paths in /bin as-is, but remove trailing .exe if any
8979    new_path="${new_path/%.exe/}"
8980    # Do not save /bin paths to all_fixpath_prefixes!
8981  else
8982    # Not in mixed or Windows style, start by that.
8983    new_path=`cmd //c echo $new_path`
8984
8985  input_path="$new_path"
8986  # Check if we need to convert this using DOS-style short mode. If the path
8987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8988  # take no chances and rewrite it.
8989  # Note: m4 eats our [], so we need to use [ and ] instead.
8990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8991  if test "x$has_forbidden_chars" != x; then
8992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8994  fi
8995
8996    # Output is in $new_path
8997
8998  windows_path="$new_path"
8999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9000    unix_path=`$CYGPATH -u "$windows_path"`
9001    new_path="$unix_path"
9002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9004    new_path="$unix_path"
9005  fi
9006
9007    # remove trailing .exe if any
9008    new_path="${new_path/%.exe/}"
9009
9010    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9011    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9012  fi
9013
9014  else
9015    # We're on a posix platform. Hooray! :)
9016    # First separate the path from the arguments. This will split at the first
9017    # space.
9018    complete="$FOUND_MAKE"
9019    path="${complete%% *}"
9020    tmp="$complete EOL"
9021    arguments="${tmp#* }"
9022
9023    # Cannot rely on the command "which" here since it doesn't always work.
9024    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9025    if test -z "$is_absolute_path"; then
9026      # Path to executable is not absolute. Find it.
9027      IFS_save="$IFS"
9028      IFS=:
9029      for p in $PATH; do
9030        if test -f "$p/$path" && test -x "$p/$path"; then
9031          new_path="$p/$path"
9032          break
9033        fi
9034      done
9035      IFS="$IFS_save"
9036    else
9037      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9038$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9039      new_path="$path"
9040    fi
9041
9042    if test "x$new_path" = x; then
9043        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9044$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9045        has_space=`$ECHO "$complete" | $GREP " "`
9046        if test "x$has_space" != x; then
9047          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9048$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9049        fi
9050        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9051      fi
9052  fi
9053
9054      # Now join together the path and the arguments once again
9055      if test "x$arguments" != xEOL; then
9056        new_complete="$new_path ${arguments% *}"
9057      else
9058        new_complete="$new_path"
9059      fi
9060
9061  if test "x$complete" != "x$new_complete"; then
9062      FOUND_MAKE="$new_complete"
9063      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9064$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9065    fi
9066
9067        fi
9068      fi
9069    fi
9070  fi
9071
9072    fi
9073
9074    if test "x$FOUND_MAKE" = x; then
9075      if test "x$TOOLS_DIR" != x; then
9076        # We have a tools-dir, check that as well before giving up.
9077        OLD_PATH=$PATH
9078        PATH=$TOOLS_DIR:$PATH
9079        for ac_prog in gmake
9080do
9081  # Extract the first word of "$ac_prog", so it can be a program name with args.
9082set dummy $ac_prog; ac_word=$2
9083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9084$as_echo_n "checking for $ac_word... " >&6; }
9085if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9086  $as_echo_n "(cached) " >&6
9087else
9088  case $CHECK_TOOLSDIR_GMAKE in
9089  [\\/]* | ?:[\\/]*)
9090  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9091  ;;
9092  *)
9093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9094for as_dir in $PATH
9095do
9096  IFS=$as_save_IFS
9097  test -z "$as_dir" && as_dir=.
9098    for ac_exec_ext in '' $ac_executable_extensions; do
9099  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9100    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9102    break 2
9103  fi
9104done
9105  done
9106IFS=$as_save_IFS
9107
9108  ;;
9109esac
9110fi
9111CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9112if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9114$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9115else
9116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9117$as_echo "no" >&6; }
9118fi
9119
9120
9121  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9122done
9123
9124
9125  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9126  DESCRIPTION="gmake in tools-dir"
9127  if test "x$MAKE_CANDIDATE" != x; then
9128    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9129$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9130    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9131    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9132    if test "x$IS_GNU_MAKE" = x; then
9133      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9134$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9135    else
9136      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9137      if test "x$IS_MODERN_MAKE" = x; then
9138        { $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
9139$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;}
9140      else
9141        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9142          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9143            MAKE_EXPECTED_ENV='cygwin'
9144          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9145            MAKE_EXPECTED_ENV='msys'
9146          else
9147            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9148          fi
9149          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9150          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9151        else
9152          # Not relevant for non-Windows
9153          IS_MAKE_CORRECT_ENV=true
9154        fi
9155        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9156          { $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
9157$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;}
9158        else
9159          FOUND_MAKE=$MAKE_CANDIDATE
9160
9161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9162
9163  # First separate the path from the arguments. This will split at the first
9164  # space.
9165  complete="$FOUND_MAKE"
9166  path="${complete%% *}"
9167  tmp="$complete EOL"
9168  arguments="${tmp#* }"
9169
9170  # Input might be given as Windows format, start by converting to
9171  # unix format.
9172  new_path=`$CYGPATH -u "$path"`
9173
9174  # Now try to locate executable using which
9175  new_path=`$WHICH "$new_path" 2> /dev/null`
9176  # bat and cmd files are not always considered executable in cygwin causing which
9177  # to not find them
9178  if test "x$new_path" = x \
9179           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9180           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9181    new_path=`$CYGPATH -u "$path"`
9182  fi
9183  if test "x$new_path" = x; then
9184    # Oops. Which didn't find the executable.
9185    # The splitting of arguments from the executable at a space might have been incorrect,
9186    # since paths with space are more likely in Windows. Give it another try with the whole
9187    # argument.
9188    path="$complete"
9189    arguments="EOL"
9190    new_path=`$CYGPATH -u "$path"`
9191    new_path=`$WHICH "$new_path" 2> /dev/null`
9192    # bat and cmd files are not always considered executable in cygwin causing which
9193    # to not find them
9194    if test "x$new_path" = x \
9195             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9196             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9197      new_path=`$CYGPATH -u "$path"`
9198    fi
9199    if test "x$new_path" = x; then
9200      # It's still not found. Now this is an unrecoverable error.
9201      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9202$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9203      has_space=`$ECHO "$complete" | $GREP " "`
9204      if test "x$has_space" != x; then
9205        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9206$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9207      fi
9208      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9209    fi
9210  fi
9211
9212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9215  # "foo.exe" is OK but "foo" is an error.
9216  #
9217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9218  # It is also a way to make sure we got the proper file name for the real test later on.
9219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9220  if test "x$test_shortpath" = x; then
9221    # Short path failed, file does not exist as specified.
9222    # Try adding .exe or .cmd
9223    if test -f "${new_path}.exe"; then
9224       input_to_shortpath="${new_path}.exe"
9225    elif test -f "${new_path}.cmd"; then
9226       input_to_shortpath="${new_path}.cmd"
9227    else
9228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9229$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9230      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9231$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9232      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9233    fi
9234  else
9235    input_to_shortpath="$new_path"
9236  fi
9237
9238  # Call helper function which possibly converts this using DOS-style short mode.
9239  # If so, the updated path is stored in $new_path.
9240  new_path="$input_to_shortpath"
9241
9242  input_path="$input_to_shortpath"
9243  # Check if we need to convert this using DOS-style short mode. If the path
9244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9245  # take no chances and rewrite it.
9246  # Note: m4 eats our [], so we need to use [ and ] instead.
9247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9248  if test "x$has_forbidden_chars" != x; then
9249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9253      # Going to short mode and back again did indeed matter. Since short mode is
9254      # case insensitive, let's make it lowercase to improve readability.
9255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9256      # Now convert it back to Unix-stile (cygpath)
9257      input_path=`$CYGPATH -u "$shortmode_path"`
9258      new_path="$input_path"
9259    fi
9260  fi
9261
9262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9263  if test "x$test_cygdrive_prefix" = x; then
9264    # As a simple fix, exclude /usr/bin since it's not a real path.
9265    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9267      # a path prefixed by /cygdrive for fixpath to work.
9268      new_path="$CYGWIN_ROOT_PATH$input_path"
9269    fi
9270  fi
9271
9272  # remove trailing .exe if any
9273  new_path="${new_path/%.exe/}"
9274
9275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9276
9277  # First separate the path from the arguments. This will split at the first
9278  # space.
9279  complete="$FOUND_MAKE"
9280  path="${complete%% *}"
9281  tmp="$complete EOL"
9282  arguments="${tmp#* }"
9283
9284  # Input might be given as Windows format, start by converting to
9285  # unix format.
9286  new_path="$path"
9287
9288  windows_path="$new_path"
9289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9290    unix_path=`$CYGPATH -u "$windows_path"`
9291    new_path="$unix_path"
9292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9294    new_path="$unix_path"
9295  fi
9296
9297
9298  # Now try to locate executable using which
9299  new_path=`$WHICH "$new_path" 2> /dev/null`
9300
9301  if test "x$new_path" = x; then
9302    # Oops. Which didn't find the executable.
9303    # The splitting of arguments from the executable at a space might have been incorrect,
9304    # since paths with space are more likely in Windows. Give it another try with the whole
9305    # argument.
9306    path="$complete"
9307    arguments="EOL"
9308    new_path="$path"
9309
9310  windows_path="$new_path"
9311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9312    unix_path=`$CYGPATH -u "$windows_path"`
9313    new_path="$unix_path"
9314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9316    new_path="$unix_path"
9317  fi
9318
9319
9320    new_path=`$WHICH "$new_path" 2> /dev/null`
9321
9322    if test "x$new_path" = x; then
9323      # It's still not found. Now this is an unrecoverable error.
9324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9325$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9326      has_space=`$ECHO "$complete" | $GREP " "`
9327      if test "x$has_space" != x; then
9328        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9329$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9330      fi
9331      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9332    fi
9333  fi
9334
9335  # Now new_path has a complete unix path to the binary
9336  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9337    # Keep paths in /bin as-is, but remove trailing .exe if any
9338    new_path="${new_path/%.exe/}"
9339    # Do not save /bin paths to all_fixpath_prefixes!
9340  else
9341    # Not in mixed or Windows style, start by that.
9342    new_path=`cmd //c echo $new_path`
9343
9344  input_path="$new_path"
9345  # Check if we need to convert this using DOS-style short mode. If the path
9346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9347  # take no chances and rewrite it.
9348  # Note: m4 eats our [], so we need to use [ and ] instead.
9349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9350  if test "x$has_forbidden_chars" != x; then
9351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9353  fi
9354
9355    # Output is in $new_path
9356
9357  windows_path="$new_path"
9358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9359    unix_path=`$CYGPATH -u "$windows_path"`
9360    new_path="$unix_path"
9361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9363    new_path="$unix_path"
9364  fi
9365
9366    # remove trailing .exe if any
9367    new_path="${new_path/%.exe/}"
9368
9369    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9370    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9371  fi
9372
9373  else
9374    # We're on a posix platform. Hooray! :)
9375    # First separate the path from the arguments. This will split at the first
9376    # space.
9377    complete="$FOUND_MAKE"
9378    path="${complete%% *}"
9379    tmp="$complete EOL"
9380    arguments="${tmp#* }"
9381
9382    # Cannot rely on the command "which" here since it doesn't always work.
9383    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9384    if test -z "$is_absolute_path"; then
9385      # Path to executable is not absolute. Find it.
9386      IFS_save="$IFS"
9387      IFS=:
9388      for p in $PATH; do
9389        if test -f "$p/$path" && test -x "$p/$path"; then
9390          new_path="$p/$path"
9391          break
9392        fi
9393      done
9394      IFS="$IFS_save"
9395    else
9396      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9397$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9398      new_path="$path"
9399    fi
9400
9401    if test "x$new_path" = x; then
9402        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9403$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9404        has_space=`$ECHO "$complete" | $GREP " "`
9405        if test "x$has_space" != x; then
9406          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9407$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9408        fi
9409        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9410      fi
9411  fi
9412
9413      # Now join together the path and the arguments once again
9414      if test "x$arguments" != xEOL; then
9415        new_complete="$new_path ${arguments% *}"
9416      else
9417        new_complete="$new_path"
9418      fi
9419
9420  if test "x$complete" != "x$new_complete"; then
9421      FOUND_MAKE="$new_complete"
9422      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9423$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9424    fi
9425
9426        fi
9427      fi
9428    fi
9429  fi
9430
9431        if test "x$FOUND_MAKE" = x; then
9432          for ac_prog in make
9433do
9434  # Extract the first word of "$ac_prog", so it can be a program name with args.
9435set dummy $ac_prog; ac_word=$2
9436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9437$as_echo_n "checking for $ac_word... " >&6; }
9438if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9439  $as_echo_n "(cached) " >&6
9440else
9441  case $CHECK_TOOLSDIR_MAKE in
9442  [\\/]* | ?:[\\/]*)
9443  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9444  ;;
9445  *)
9446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9447for as_dir in $PATH
9448do
9449  IFS=$as_save_IFS
9450  test -z "$as_dir" && as_dir=.
9451    for ac_exec_ext in '' $ac_executable_extensions; do
9452  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9453    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9455    break 2
9456  fi
9457done
9458  done
9459IFS=$as_save_IFS
9460
9461  ;;
9462esac
9463fi
9464CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9465if test -n "$CHECK_TOOLSDIR_MAKE"; then
9466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9467$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9468else
9469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9470$as_echo "no" >&6; }
9471fi
9472
9473
9474  test -n "$CHECK_TOOLSDIR_MAKE" && break
9475done
9476
9477
9478  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9479  DESCRIPTION="make in tools-dir"
9480  if test "x$MAKE_CANDIDATE" != x; then
9481    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9482$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9483    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9484    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9485    if test "x$IS_GNU_MAKE" = x; then
9486      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9487$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9488    else
9489      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9490      if test "x$IS_MODERN_MAKE" = x; then
9491        { $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
9492$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;}
9493      else
9494        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9495          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9496            MAKE_EXPECTED_ENV='cygwin'
9497          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9498            MAKE_EXPECTED_ENV='msys'
9499          else
9500            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9501          fi
9502          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9503          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9504        else
9505          # Not relevant for non-Windows
9506          IS_MAKE_CORRECT_ENV=true
9507        fi
9508        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9509          { $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
9510$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;}
9511        else
9512          FOUND_MAKE=$MAKE_CANDIDATE
9513
9514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9515
9516  # First separate the path from the arguments. This will split at the first
9517  # space.
9518  complete="$FOUND_MAKE"
9519  path="${complete%% *}"
9520  tmp="$complete EOL"
9521  arguments="${tmp#* }"
9522
9523  # Input might be given as Windows format, start by converting to
9524  # unix format.
9525  new_path=`$CYGPATH -u "$path"`
9526
9527  # Now try to locate executable using which
9528  new_path=`$WHICH "$new_path" 2> /dev/null`
9529  # bat and cmd files are not always considered executable in cygwin causing which
9530  # to not find them
9531  if test "x$new_path" = x \
9532           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9533           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9534    new_path=`$CYGPATH -u "$path"`
9535  fi
9536  if test "x$new_path" = x; then
9537    # Oops. Which didn't find the executable.
9538    # The splitting of arguments from the executable at a space might have been incorrect,
9539    # since paths with space are more likely in Windows. Give it another try with the whole
9540    # argument.
9541    path="$complete"
9542    arguments="EOL"
9543    new_path=`$CYGPATH -u "$path"`
9544    new_path=`$WHICH "$new_path" 2> /dev/null`
9545    # bat and cmd files are not always considered executable in cygwin causing which
9546    # to not find them
9547    if test "x$new_path" = x \
9548             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9549             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9550      new_path=`$CYGPATH -u "$path"`
9551    fi
9552    if test "x$new_path" = x; then
9553      # It's still not found. Now this is an unrecoverable error.
9554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9555$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9556      has_space=`$ECHO "$complete" | $GREP " "`
9557      if test "x$has_space" != x; then
9558        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9559$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9560      fi
9561      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9562    fi
9563  fi
9564
9565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9568  # "foo.exe" is OK but "foo" is an error.
9569  #
9570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9571  # It is also a way to make sure we got the proper file name for the real test later on.
9572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9573  if test "x$test_shortpath" = x; then
9574    # Short path failed, file does not exist as specified.
9575    # Try adding .exe or .cmd
9576    if test -f "${new_path}.exe"; then
9577       input_to_shortpath="${new_path}.exe"
9578    elif test -f "${new_path}.cmd"; then
9579       input_to_shortpath="${new_path}.cmd"
9580    else
9581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9582$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9583      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9584$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9585      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9586    fi
9587  else
9588    input_to_shortpath="$new_path"
9589  fi
9590
9591  # Call helper function which possibly converts this using DOS-style short mode.
9592  # If so, the updated path is stored in $new_path.
9593  new_path="$input_to_shortpath"
9594
9595  input_path="$input_to_shortpath"
9596  # Check if we need to convert this using DOS-style short mode. If the path
9597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9598  # take no chances and rewrite it.
9599  # Note: m4 eats our [], so we need to use [ and ] instead.
9600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9601  if test "x$has_forbidden_chars" != x; then
9602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9603    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9604    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9605    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9606      # Going to short mode and back again did indeed matter. Since short mode is
9607      # case insensitive, let's make it lowercase to improve readability.
9608      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9609      # Now convert it back to Unix-stile (cygpath)
9610      input_path=`$CYGPATH -u "$shortmode_path"`
9611      new_path="$input_path"
9612    fi
9613  fi
9614
9615  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9616  if test "x$test_cygdrive_prefix" = x; then
9617    # As a simple fix, exclude /usr/bin since it's not a real path.
9618    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9619      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9620      # a path prefixed by /cygdrive for fixpath to work.
9621      new_path="$CYGWIN_ROOT_PATH$input_path"
9622    fi
9623  fi
9624
9625  # remove trailing .exe if any
9626  new_path="${new_path/%.exe/}"
9627
9628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9629
9630  # First separate the path from the arguments. This will split at the first
9631  # space.
9632  complete="$FOUND_MAKE"
9633  path="${complete%% *}"
9634  tmp="$complete EOL"
9635  arguments="${tmp#* }"
9636
9637  # Input might be given as Windows format, start by converting to
9638  # unix format.
9639  new_path="$path"
9640
9641  windows_path="$new_path"
9642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9643    unix_path=`$CYGPATH -u "$windows_path"`
9644    new_path="$unix_path"
9645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9647    new_path="$unix_path"
9648  fi
9649
9650
9651  # Now try to locate executable using which
9652  new_path=`$WHICH "$new_path" 2> /dev/null`
9653
9654  if test "x$new_path" = x; then
9655    # Oops. Which didn't find the executable.
9656    # The splitting of arguments from the executable at a space might have been incorrect,
9657    # since paths with space are more likely in Windows. Give it another try with the whole
9658    # argument.
9659    path="$complete"
9660    arguments="EOL"
9661    new_path="$path"
9662
9663  windows_path="$new_path"
9664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9665    unix_path=`$CYGPATH -u "$windows_path"`
9666    new_path="$unix_path"
9667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9669    new_path="$unix_path"
9670  fi
9671
9672
9673    new_path=`$WHICH "$new_path" 2> /dev/null`
9674
9675    if test "x$new_path" = x; then
9676      # It's still not found. Now this is an unrecoverable error.
9677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9678$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9679      has_space=`$ECHO "$complete" | $GREP " "`
9680      if test "x$has_space" != x; then
9681        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9682$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9683      fi
9684      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9685    fi
9686  fi
9687
9688  # Now new_path has a complete unix path to the binary
9689  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9690    # Keep paths in /bin as-is, but remove trailing .exe if any
9691    new_path="${new_path/%.exe/}"
9692    # Do not save /bin paths to all_fixpath_prefixes!
9693  else
9694    # Not in mixed or Windows style, start by that.
9695    new_path=`cmd //c echo $new_path`
9696
9697  input_path="$new_path"
9698  # Check if we need to convert this using DOS-style short mode. If the path
9699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9700  # take no chances and rewrite it.
9701  # Note: m4 eats our [], so we need to use [ and ] instead.
9702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9703  if test "x$has_forbidden_chars" != x; then
9704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9706  fi
9707
9708    # Output is in $new_path
9709
9710  windows_path="$new_path"
9711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9712    unix_path=`$CYGPATH -u "$windows_path"`
9713    new_path="$unix_path"
9714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9716    new_path="$unix_path"
9717  fi
9718
9719    # remove trailing .exe if any
9720    new_path="${new_path/%.exe/}"
9721
9722    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9723    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9724  fi
9725
9726  else
9727    # We're on a posix platform. Hooray! :)
9728    # First separate the path from the arguments. This will split at the first
9729    # space.
9730    complete="$FOUND_MAKE"
9731    path="${complete%% *}"
9732    tmp="$complete EOL"
9733    arguments="${tmp#* }"
9734
9735    # Cannot rely on the command "which" here since it doesn't always work.
9736    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9737    if test -z "$is_absolute_path"; then
9738      # Path to executable is not absolute. Find it.
9739      IFS_save="$IFS"
9740      IFS=:
9741      for p in $PATH; do
9742        if test -f "$p/$path" && test -x "$p/$path"; then
9743          new_path="$p/$path"
9744          break
9745        fi
9746      done
9747      IFS="$IFS_save"
9748    else
9749      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9750$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9751      new_path="$path"
9752    fi
9753
9754    if test "x$new_path" = x; then
9755        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9756$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9757        has_space=`$ECHO "$complete" | $GREP " "`
9758        if test "x$has_space" != x; then
9759          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9760$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9761        fi
9762        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9763      fi
9764  fi
9765
9766      # Now join together the path and the arguments once again
9767      if test "x$arguments" != xEOL; then
9768        new_complete="$new_path ${arguments% *}"
9769      else
9770        new_complete="$new_path"
9771      fi
9772
9773  if test "x$complete" != "x$new_complete"; then
9774      FOUND_MAKE="$new_complete"
9775      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9776$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9777    fi
9778
9779        fi
9780      fi
9781    fi
9782  fi
9783
9784        fi
9785        PATH=$OLD_PATH
9786      fi
9787    fi
9788
9789    if test "x$FOUND_MAKE" = x; then
9790      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
9791    fi
9792  fi
9793
9794  MAKE=$FOUND_MAKE
9795
9796  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9797$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9798
9799
9800
9801    # Test if find supports -delete
9802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9803$as_echo_n "checking if find supports -delete... " >&6; }
9804    FIND_DELETE="-delete"
9805
9806    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9807
9808    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9809
9810    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9811    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9812        # No, it does not.
9813        rm $DELETEDIR/TestIfFindSupportsDelete
9814        FIND_DELETE="-exec rm \{\} \+"
9815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9816$as_echo "no" >&6; }
9817    else
9818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9819$as_echo "yes" >&6; }
9820    fi
9821    rmdir $DELETEDIR
9822
9823
9824
9825# These tools might not be installed by default,
9826# need hint on how to install them.
9827
9828    for ac_prog in unzip
9829do
9830  # Extract the first word of "$ac_prog", so it can be a program name with args.
9831set dummy $ac_prog; ac_word=$2
9832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9833$as_echo_n "checking for $ac_word... " >&6; }
9834if test "${ac_cv_path_UNZIP+set}" = set; then :
9835  $as_echo_n "(cached) " >&6
9836else
9837  case $UNZIP in
9838  [\\/]* | ?:[\\/]*)
9839  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9840  ;;
9841  *)
9842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9843for as_dir in $PATH
9844do
9845  IFS=$as_save_IFS
9846  test -z "$as_dir" && as_dir=.
9847    for ac_exec_ext in '' $ac_executable_extensions; do
9848  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9849    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9851    break 2
9852  fi
9853done
9854  done
9855IFS=$as_save_IFS
9856
9857  ;;
9858esac
9859fi
9860UNZIP=$ac_cv_path_UNZIP
9861if test -n "$UNZIP"; then
9862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9863$as_echo "$UNZIP" >&6; }
9864else
9865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9866$as_echo "no" >&6; }
9867fi
9868
9869
9870  test -n "$UNZIP" && break
9871done
9872
9873
9874    if test "x$UNZIP" = x; then
9875        if test "xunzip" = x; then
9876          PROG_NAME=unzip
9877        else
9878          PROG_NAME=unzip
9879        fi
9880        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9881$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9882        as_fn_error $? "Cannot continue" "$LINENO" 5
9883    fi
9884
9885
9886
9887    for ac_prog in zip
9888do
9889  # Extract the first word of "$ac_prog", so it can be a program name with args.
9890set dummy $ac_prog; ac_word=$2
9891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9892$as_echo_n "checking for $ac_word... " >&6; }
9893if test "${ac_cv_path_ZIP+set}" = set; then :
9894  $as_echo_n "(cached) " >&6
9895else
9896  case $ZIP in
9897  [\\/]* | ?:[\\/]*)
9898  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9899  ;;
9900  *)
9901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9902for as_dir in $PATH
9903do
9904  IFS=$as_save_IFS
9905  test -z "$as_dir" && as_dir=.
9906    for ac_exec_ext in '' $ac_executable_extensions; do
9907  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9908    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9910    break 2
9911  fi
9912done
9913  done
9914IFS=$as_save_IFS
9915
9916  ;;
9917esac
9918fi
9919ZIP=$ac_cv_path_ZIP
9920if test -n "$ZIP"; then
9921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9922$as_echo "$ZIP" >&6; }
9923else
9924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9925$as_echo "no" >&6; }
9926fi
9927
9928
9929  test -n "$ZIP" && break
9930done
9931
9932
9933    if test "x$ZIP" = x; then
9934        if test "xzip" = x; then
9935          PROG_NAME=zip
9936        else
9937          PROG_NAME=zip
9938        fi
9939        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9940$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9941        as_fn_error $? "Cannot continue" "$LINENO" 5
9942    fi
9943
9944
9945
9946# Non-required basic tools
9947
9948# Extract the first word of "ldd", so it can be a program name with args.
9949set dummy ldd; ac_word=$2
9950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9951$as_echo_n "checking for $ac_word... " >&6; }
9952if test "${ac_cv_path_LDD+set}" = set; then :
9953  $as_echo_n "(cached) " >&6
9954else
9955  case $LDD in
9956  [\\/]* | ?:[\\/]*)
9957  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9958  ;;
9959  *)
9960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9961for as_dir in $PATH
9962do
9963  IFS=$as_save_IFS
9964  test -z "$as_dir" && as_dir=.
9965    for ac_exec_ext in '' $ac_executable_extensions; do
9966  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9967    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9969    break 2
9970  fi
9971done
9972  done
9973IFS=$as_save_IFS
9974
9975  ;;
9976esac
9977fi
9978LDD=$ac_cv_path_LDD
9979if test -n "$LDD"; then
9980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
9981$as_echo "$LDD" >&6; }
9982else
9983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9984$as_echo "no" >&6; }
9985fi
9986
9987
9988if test "x$LDD" = "x"; then
9989    # List shared lib dependencies is used for
9990    # debug output and checking for forbidden dependencies.
9991    # We can build without it.
9992    LDD="true"
9993fi
9994# Extract the first word of "otool", so it can be a program name with args.
9995set dummy otool; ac_word=$2
9996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9997$as_echo_n "checking for $ac_word... " >&6; }
9998if test "${ac_cv_path_OTOOL+set}" = set; then :
9999  $as_echo_n "(cached) " >&6
10000else
10001  case $OTOOL in
10002  [\\/]* | ?:[\\/]*)
10003  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10004  ;;
10005  *)
10006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10007for as_dir in $PATH
10008do
10009  IFS=$as_save_IFS
10010  test -z "$as_dir" && as_dir=.
10011    for ac_exec_ext in '' $ac_executable_extensions; do
10012  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10013    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10015    break 2
10016  fi
10017done
10018  done
10019IFS=$as_save_IFS
10020
10021  ;;
10022esac
10023fi
10024OTOOL=$ac_cv_path_OTOOL
10025if test -n "$OTOOL"; then
10026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10027$as_echo "$OTOOL" >&6; }
10028else
10029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10030$as_echo "no" >&6; }
10031fi
10032
10033
10034if test "x$OTOOL" = "x"; then
10035   OTOOL="true"
10036fi
10037for ac_prog in readelf greadelf
10038do
10039  # Extract the first word of "$ac_prog", so it can be a program name with args.
10040set dummy $ac_prog; ac_word=$2
10041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10042$as_echo_n "checking for $ac_word... " >&6; }
10043if test "${ac_cv_path_READELF+set}" = set; then :
10044  $as_echo_n "(cached) " >&6
10045else
10046  case $READELF in
10047  [\\/]* | ?:[\\/]*)
10048  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10049  ;;
10050  *)
10051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10052for as_dir in $PATH
10053do
10054  IFS=$as_save_IFS
10055  test -z "$as_dir" && as_dir=.
10056    for ac_exec_ext in '' $ac_executable_extensions; do
10057  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10058    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10060    break 2
10061  fi
10062done
10063  done
10064IFS=$as_save_IFS
10065
10066  ;;
10067esac
10068fi
10069READELF=$ac_cv_path_READELF
10070if test -n "$READELF"; then
10071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10072$as_echo "$READELF" >&6; }
10073else
10074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10075$as_echo "no" >&6; }
10076fi
10077
10078
10079  test -n "$READELF" && break
10080done
10081
10082# Extract the first word of "hg", so it can be a program name with args.
10083set dummy hg; ac_word=$2
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10085$as_echo_n "checking for $ac_word... " >&6; }
10086if test "${ac_cv_path_HG+set}" = set; then :
10087  $as_echo_n "(cached) " >&6
10088else
10089  case $HG in
10090  [\\/]* | ?:[\\/]*)
10091  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10092  ;;
10093  *)
10094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10095for as_dir in $PATH
10096do
10097  IFS=$as_save_IFS
10098  test -z "$as_dir" && as_dir=.
10099    for ac_exec_ext in '' $ac_executable_extensions; do
10100  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10101    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10103    break 2
10104  fi
10105done
10106  done
10107IFS=$as_save_IFS
10108
10109  ;;
10110esac
10111fi
10112HG=$ac_cv_path_HG
10113if test -n "$HG"; then
10114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10115$as_echo "$HG" >&6; }
10116else
10117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10118$as_echo "no" >&6; }
10119fi
10120
10121
10122# Extract the first word of "stat", so it can be a program name with args.
10123set dummy stat; ac_word=$2
10124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10125$as_echo_n "checking for $ac_word... " >&6; }
10126if test "${ac_cv_path_STAT+set}" = set; then :
10127  $as_echo_n "(cached) " >&6
10128else
10129  case $STAT in
10130  [\\/]* | ?:[\\/]*)
10131  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10132  ;;
10133  *)
10134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10135for as_dir in $PATH
10136do
10137  IFS=$as_save_IFS
10138  test -z "$as_dir" && as_dir=.
10139    for ac_exec_ext in '' $ac_executable_extensions; do
10140  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10141    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10143    break 2
10144  fi
10145done
10146  done
10147IFS=$as_save_IFS
10148
10149  ;;
10150esac
10151fi
10152STAT=$ac_cv_path_STAT
10153if test -n "$STAT"; then
10154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10155$as_echo "$STAT" >&6; }
10156else
10157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10158$as_echo "no" >&6; }
10159fi
10160
10161
10162# Extract the first word of "time", so it can be a program name with args.
10163set dummy time; ac_word=$2
10164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10165$as_echo_n "checking for $ac_word... " >&6; }
10166if test "${ac_cv_path_TIME+set}" = set; then :
10167  $as_echo_n "(cached) " >&6
10168else
10169  case $TIME in
10170  [\\/]* | ?:[\\/]*)
10171  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10172  ;;
10173  *)
10174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10175for as_dir in $PATH
10176do
10177  IFS=$as_save_IFS
10178  test -z "$as_dir" && as_dir=.
10179    for ac_exec_ext in '' $ac_executable_extensions; do
10180  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10181    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10183    break 2
10184  fi
10185done
10186  done
10187IFS=$as_save_IFS
10188
10189  ;;
10190esac
10191fi
10192TIME=$ac_cv_path_TIME
10193if test -n "$TIME"; then
10194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10195$as_echo "$TIME" >&6; }
10196else
10197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10198$as_echo "no" >&6; }
10199fi
10200
10201
10202
10203if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10204
10205    for ac_prog in comm
10206do
10207  # Extract the first word of "$ac_prog", so it can be a program name with args.
10208set dummy $ac_prog; ac_word=$2
10209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10210$as_echo_n "checking for $ac_word... " >&6; }
10211if test "${ac_cv_path_COMM+set}" = set; then :
10212  $as_echo_n "(cached) " >&6
10213else
10214  case $COMM in
10215  [\\/]* | ?:[\\/]*)
10216  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10217  ;;
10218  *)
10219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10220for as_dir in $PATH
10221do
10222  IFS=$as_save_IFS
10223  test -z "$as_dir" && as_dir=.
10224    for ac_exec_ext in '' $ac_executable_extensions; do
10225  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10226    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10228    break 2
10229  fi
10230done
10231  done
10232IFS=$as_save_IFS
10233
10234  ;;
10235esac
10236fi
10237COMM=$ac_cv_path_COMM
10238if test -n "$COMM"; then
10239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10240$as_echo "$COMM" >&6; }
10241else
10242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10243$as_echo "no" >&6; }
10244fi
10245
10246
10247  test -n "$COMM" && break
10248done
10249
10250
10251    if test "x$COMM" = x; then
10252        if test "xcomm" = x; then
10253          PROG_NAME=comm
10254        else
10255          PROG_NAME=comm
10256        fi
10257        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10258$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10259        as_fn_error $? "Cannot continue" "$LINENO" 5
10260    fi
10261
10262
10263fi
10264
10265
10266# Check if pkg-config is available.
10267
10268
10269if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10270	if test -n "$ac_tool_prefix"; then
10271  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10272set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10274$as_echo_n "checking for $ac_word... " >&6; }
10275if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10276  $as_echo_n "(cached) " >&6
10277else
10278  case $PKG_CONFIG in
10279  [\\/]* | ?:[\\/]*)
10280  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10281  ;;
10282  *)
10283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10284for as_dir in $PATH
10285do
10286  IFS=$as_save_IFS
10287  test -z "$as_dir" && as_dir=.
10288    for ac_exec_ext in '' $ac_executable_extensions; do
10289  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10290    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10292    break 2
10293  fi
10294done
10295  done
10296IFS=$as_save_IFS
10297
10298  ;;
10299esac
10300fi
10301PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10302if test -n "$PKG_CONFIG"; then
10303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10304$as_echo "$PKG_CONFIG" >&6; }
10305else
10306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10307$as_echo "no" >&6; }
10308fi
10309
10310
10311fi
10312if test -z "$ac_cv_path_PKG_CONFIG"; then
10313  ac_pt_PKG_CONFIG=$PKG_CONFIG
10314  # Extract the first word of "pkg-config", so it can be a program name with args.
10315set dummy pkg-config; ac_word=$2
10316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10317$as_echo_n "checking for $ac_word... " >&6; }
10318if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10319  $as_echo_n "(cached) " >&6
10320else
10321  case $ac_pt_PKG_CONFIG in
10322  [\\/]* | ?:[\\/]*)
10323  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10324  ;;
10325  *)
10326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10327for as_dir in $PATH
10328do
10329  IFS=$as_save_IFS
10330  test -z "$as_dir" && as_dir=.
10331    for ac_exec_ext in '' $ac_executable_extensions; do
10332  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10333    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10335    break 2
10336  fi
10337done
10338  done
10339IFS=$as_save_IFS
10340
10341  ;;
10342esac
10343fi
10344ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10345if test -n "$ac_pt_PKG_CONFIG"; then
10346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10347$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10348else
10349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10350$as_echo "no" >&6; }
10351fi
10352
10353  if test "x$ac_pt_PKG_CONFIG" = x; then
10354    PKG_CONFIG=""
10355  else
10356    case $cross_compiling:$ac_tool_warned in
10357yes:)
10358{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10359$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10360ac_tool_warned=yes ;;
10361esac
10362    PKG_CONFIG=$ac_pt_PKG_CONFIG
10363  fi
10364else
10365  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10366fi
10367
10368fi
10369if test -n "$PKG_CONFIG"; then
10370	_pkg_min_version=0.9.0
10371	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10372$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10373	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10374		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10375$as_echo "yes" >&6; }
10376	else
10377		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10378$as_echo "no" >&6; }
10379		PKG_CONFIG=""
10380	fi
10381
10382fi
10383
10384# After basic tools have been setup, we can check build os specific details.
10385
10386###############################################################################
10387
10388# Note that this is the build platform OS version!
10389
10390OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10391OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10392OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10393OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10394
10395
10396
10397
10398
10399# Setup builddeps, for automatic downloading of tools we need.
10400# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10401# boot-jdk setup, but we need to have basic tools setup first.
10402
10403
10404# Check whether --with-builddeps-conf was given.
10405if test "${with_builddeps_conf+set}" = set; then :
10406  withval=$with_builddeps_conf;
10407fi
10408
10409
10410
10411# Check whether --with-builddeps-server was given.
10412if test "${with_builddeps_server+set}" = set; then :
10413  withval=$with_builddeps_server;
10414fi
10415
10416
10417
10418# Check whether --with-builddeps-dir was given.
10419if test "${with_builddeps_dir+set}" = set; then :
10420  withval=$with_builddeps_dir;
10421else
10422  with_builddeps_dir=/localhome/builddeps
10423fi
10424
10425
10426
10427# Check whether --with-builddeps-group was given.
10428if test "${with_builddeps_group+set}" = set; then :
10429  withval=$with_builddeps_group;
10430fi
10431
10432
10433
10434
10435    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10436        if test "x$with_builddeps_conf" != x; then
10437            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10438$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10439            builddepsfile=$with_builddeps_conf
10440            if test -s $builddepsfile; then
10441                . $builddepsfile
10442                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10443$as_echo "loaded!" >&6; }
10444            else
10445               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10446           fi
10447        else
10448            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10449$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10450            builddepsfile=`mktemp`
10451            touch $builddepsfile
10452            # Put all found confs into a single file.
10453            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10454            # Source the file to acquire the variables
10455            if test -s $builddepsfile; then
10456                . $builddepsfile
10457                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10458$as_echo "found at least one!" >&6; }
10459            else
10460               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10461           fi
10462        fi
10463        # Create build and target names that use _ instead of "-" and ".".
10464        # This is necessary to use them in variable names.
10465        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10466        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10467        # Extract rewrite information for build and target
10468        eval rewritten_build=\${REWRITE_${build_var}}
10469        if test "x$rewritten_build" = x; then
10470            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10471            echo Build stays the same $rewritten_build
10472        else
10473            echo Rewriting build for builddeps into $rewritten_build
10474        fi
10475        eval rewritten_target=\${REWRITE_${target_var}}
10476        if test "x$rewritten_target" = x; then
10477            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10478            echo Target stays the same $rewritten_target
10479        else
10480            echo Rewriting target for builddeps into $rewritten_target
10481        fi
10482        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10483        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10484    fi
10485    for ac_prog in 7z unzip
10486do
10487  # Extract the first word of "$ac_prog", so it can be a program name with args.
10488set dummy $ac_prog; ac_word=$2
10489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10490$as_echo_n "checking for $ac_word... " >&6; }
10491if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10492  $as_echo_n "(cached) " >&6
10493else
10494  if test -n "$BDEPS_UNZIP"; then
10495  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10496else
10497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10498for as_dir in $PATH
10499do
10500  IFS=$as_save_IFS
10501  test -z "$as_dir" && as_dir=.
10502    for ac_exec_ext in '' $ac_executable_extensions; do
10503  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10504    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10506    break 2
10507  fi
10508done
10509  done
10510IFS=$as_save_IFS
10511
10512fi
10513fi
10514BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10515if test -n "$BDEPS_UNZIP"; then
10516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10517$as_echo "$BDEPS_UNZIP" >&6; }
10518else
10519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10520$as_echo "no" >&6; }
10521fi
10522
10523
10524  test -n "$BDEPS_UNZIP" && break
10525done
10526
10527    if test "x$BDEPS_UNZIP" = x7z; then
10528        BDEPS_UNZIP="7z x"
10529    fi
10530
10531    for ac_prog in wget lftp ftp
10532do
10533  # Extract the first word of "$ac_prog", so it can be a program name with args.
10534set dummy $ac_prog; ac_word=$2
10535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10536$as_echo_n "checking for $ac_word... " >&6; }
10537if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10538  $as_echo_n "(cached) " >&6
10539else
10540  if test -n "$BDEPS_FTP"; then
10541  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10542else
10543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10544for as_dir in $PATH
10545do
10546  IFS=$as_save_IFS
10547  test -z "$as_dir" && as_dir=.
10548    for ac_exec_ext in '' $ac_executable_extensions; do
10549  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10550    ac_cv_prog_BDEPS_FTP="$ac_prog"
10551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10552    break 2
10553  fi
10554done
10555  done
10556IFS=$as_save_IFS
10557
10558fi
10559fi
10560BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10561if test -n "$BDEPS_FTP"; then
10562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10563$as_echo "$BDEPS_FTP" >&6; }
10564else
10565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10566$as_echo "no" >&6; }
10567fi
10568
10569
10570  test -n "$BDEPS_FTP" && break
10571done
10572
10573
10574
10575###############################################################################
10576#
10577# Determine OpenJDK variants, options and version numbers.
10578#
10579###############################################################################
10580
10581# We need build & target for this.
10582
10583
10584###############################################################################
10585#
10586# Should we build only OpenJDK even if closed sources are present?
10587#
10588# Check whether --enable-openjdk-only was given.
10589if test "${enable_openjdk_only+set}" = set; then :
10590  enableval=$enable_openjdk_only;
10591else
10592  enable_openjdk_only="no"
10593fi
10594
10595
10596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
10597$as_echo_n "checking for presence of closed sources... " >&6; }
10598if test -d "$SRC_ROOT/jdk/src/closed"; then
10599    CLOSED_SOURCE_PRESENT=yes
10600else
10601    CLOSED_SOURCE_PRESENT=no
10602fi
10603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
10604$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
10605
10606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is supressed (openjdk-only)" >&5
10607$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
10608SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
10609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPRESS_CLOSED_SOURCE" >&5
10610$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
10611
10612if test "x$CLOSED_SOURCE_PRESENT" = xno; then
10613  OPENJDK=true
10614  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10615    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
10616$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
10617  fi
10618else
10619  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10620    OPENJDK=true
10621  else
10622    OPENJDK=false
10623  fi
10624fi
10625
10626if test "x$OPENJDK" = "xtrue"; then
10627    SET_OPENJDK="OPENJDK=true"
10628fi
10629
10630
10631
10632###############################################################################
10633#
10634# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10635# We always build headless support.
10636#
10637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10638$as_echo_n "checking headful support... " >&6; }
10639# Check whether --enable-headful was given.
10640if test "${enable_headful+set}" = set; then :
10641  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10642else
10643  SUPPORT_HEADFUL=yes
10644fi
10645
10646
10647SUPPORT_HEADLESS=yes
10648BUILD_HEADLESS="BUILD_HEADLESS:=true"
10649
10650if test "x$SUPPORT_HEADFUL" = xyes; then
10651    # We are building both headful and headless.
10652    headful_msg="inlude support for both headful and headless"
10653fi
10654
10655if test "x$SUPPORT_HEADFUL" = xno; then
10656    # Thus we are building headless only.
10657    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10658    headful_msg="headless only"
10659fi
10660
10661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10662$as_echo "$headful_msg" >&6; }
10663
10664
10665
10666
10667
10668# Control wether Hotspot runs Queens test after build.
10669# Check whether --enable-hotspot-test-in-build was given.
10670if test "${enable_hotspot_test_in_build+set}" = set; then :
10671  enableval=$enable_hotspot_test_in_build;
10672else
10673  enable_hotspot_test_in_build=no
10674fi
10675
10676if test "x$enable_hotspot_test_in_build" = "xyes"; then
10677    TEST_IN_BUILD=true
10678else
10679    TEST_IN_BUILD=false
10680fi
10681
10682
10683###############################################################################
10684#
10685# Choose cacerts source file
10686#
10687
10688# Check whether --with-cacerts-file was given.
10689if test "${with_cacerts_file+set}" = set; then :
10690  withval=$with_cacerts_file;
10691fi
10692
10693if test "x$with_cacerts_file" != x; then
10694    CACERTS_FILE=$with_cacerts_file
10695else
10696    if test "x$OPENJDK" = "xtrue"; then
10697        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10698    else
10699        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10700    fi
10701fi
10702
10703
10704###############################################################################
10705#
10706# Enable or disable unlimited crypto
10707#
10708# Check whether --enable-unlimited-crypto was given.
10709if test "${enable_unlimited_crypto+set}" = set; then :
10710  enableval=$enable_unlimited_crypto;
10711else
10712  enable_unlimited_crypto=no
10713fi
10714
10715if test "x$enable_unlimited_crypto" = "xyes"; then
10716    UNLIMITED_CRYPTO=true
10717else
10718    UNLIMITED_CRYPTO=false
10719fi
10720
10721
10722###############################################################################
10723#
10724# Compress jars
10725#
10726COMPRESS_JARS=false
10727
10728
10729
10730
10731# Source the version numbers
10732. $AUTOCONF_DIR/version-numbers
10733
10734# Get the settings from parameters
10735
10736# Check whether --with-milestone was given.
10737if test "${with_milestone+set}" = set; then :
10738  withval=$with_milestone;
10739fi
10740
10741if test "x$with_milestone" = xyes; then
10742    as_fn_error $? "Milestone must have a value" "$LINENO" 5
10743elif test "x$with_milestone" != x; then
10744    MILESTONE="$with_milestone"
10745else
10746    MILESTONE=internal
10747fi
10748
10749
10750# Check whether --with-build-number was given.
10751if test "${with_build_number+set}" = set; then :
10752  withval=$with_build_number;
10753fi
10754
10755if test "x$with_build_number" = xyes; then
10756    as_fn_error $? "Build number must have a value" "$LINENO" 5
10757elif test "x$with_build_number" != x; then
10758    JDK_BUILD_NUMBER="$with_build_number"
10759fi
10760if test "x$JDK_BUILD_NUMBER" = x; then
10761    JDK_BUILD_NUMBER=b00
10762fi
10763
10764# Now set the JDK version, milestone, build number etc.
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779COPYRIGHT_YEAR=`date +'%Y'`
10780
10781
10782if test "x$JDK_UPDATE_VERSION" != x; then
10783    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10784else
10785    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10786fi
10787
10788
10789BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10790# Avoid [:alnum:] since it depends on the locale.
10791CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10792USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10793
10794
10795COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10796
10797
10798
10799###############################################################################
10800#
10801# Setup BootJDK, used to bootstrap the build.
10802#
10803###############################################################################
10804
10805
10806BOOT_JDK_FOUND=no
10807
10808# Check whether --with-boot-jdk was given.
10809if test "${with_boot_jdk+set}" = set; then :
10810  withval=$with_boot_jdk;
10811fi
10812
10813
10814# We look for the Boot JDK through various means, going from more certain to
10815# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10816# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10817# must check if this is indeed valid; otherwise we'll continue looking.
10818
10819# Test: Is bootjdk explicitely set by command line arguments?
10820
10821  if test "x$BOOT_JDK_FOUND" = xno; then
10822    # Now execute the test
10823
10824if test "x$with_boot_jdk" != x; then
10825    BOOT_JDK=$with_boot_jdk
10826    BOOT_JDK_FOUND=maybe
10827    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10828$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10829fi
10830
10831
10832    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10833    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10834      # Do we have a bin/java?
10835      if test ! -x "$BOOT_JDK/bin/java"; then
10836        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10837$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10838        BOOT_JDK_FOUND=no
10839      else
10840        # Do we have a bin/javac?
10841        if test ! -x "$BOOT_JDK/bin/javac"; then
10842          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10843$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10844          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10845$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10846          BOOT_JDK_FOUND=no
10847        else
10848          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10849          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10850            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10852            BOOT_JDK_FOUND=no
10853          else
10854            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10855            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10856
10857            # Extra M4 quote needed to protect [] in grep expression.
10858            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10859            if test "x$FOUND_VERSION_78" = x; then
10860              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10861$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10862              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10863$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10864              BOOT_JDK_FOUND=no
10865            else
10866              # We're done! :-)
10867              BOOT_JDK_FOUND=yes
10868
10869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10870
10871  # Input might be given as Windows format, start by converting to
10872  # unix format.
10873  path="$BOOT_JDK"
10874  new_path=`$CYGPATH -u "$path"`
10875
10876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10879  # "foo.exe" is OK but "foo" is an error.
10880  #
10881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10882  # It is also a way to make sure we got the proper file name for the real test later on.
10883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10884  if test "x$test_shortpath" = x; then
10885    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10886$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10887    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10888  fi
10889
10890  # Call helper function which possibly converts this using DOS-style short mode.
10891  # If so, the updated path is stored in $new_path.
10892
10893  input_path="$new_path"
10894  # Check if we need to convert this using DOS-style short mode. If the path
10895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10896  # take no chances and rewrite it.
10897  # Note: m4 eats our [], so we need to use [ and ] instead.
10898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10899  if test "x$has_forbidden_chars" != x; then
10900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10904      # Going to short mode and back again did indeed matter. Since short mode is
10905      # case insensitive, let's make it lowercase to improve readability.
10906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10907      # Now convert it back to Unix-stile (cygpath)
10908      input_path=`$CYGPATH -u "$shortmode_path"`
10909      new_path="$input_path"
10910    fi
10911  fi
10912
10913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10914  if test "x$test_cygdrive_prefix" = x; then
10915    # As a simple fix, exclude /usr/bin since it's not a real path.
10916    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10918      # a path prefixed by /cygdrive for fixpath to work.
10919      new_path="$CYGWIN_ROOT_PATH$input_path"
10920    fi
10921  fi
10922
10923
10924  if test "x$path" != "x$new_path"; then
10925    BOOT_JDK="$new_path"
10926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10927$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10928  fi
10929
10930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10931
10932  path="$BOOT_JDK"
10933  has_colon=`$ECHO $path | $GREP ^.:`
10934  new_path="$path"
10935  if test "x$has_colon" = x; then
10936    # Not in mixed or Windows style, start by that.
10937    new_path=`cmd //c echo $path`
10938  fi
10939
10940
10941  input_path="$new_path"
10942  # Check if we need to convert this using DOS-style short mode. If the path
10943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10944  # take no chances and rewrite it.
10945  # Note: m4 eats our [], so we need to use [ and ] instead.
10946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10947  if test "x$has_forbidden_chars" != x; then
10948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10950  fi
10951
10952
10953  windows_path="$new_path"
10954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10955    unix_path=`$CYGPATH -u "$windows_path"`
10956    new_path="$unix_path"
10957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10959    new_path="$unix_path"
10960  fi
10961
10962  if test "x$path" != "x$new_path"; then
10963    BOOT_JDK="$new_path"
10964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10965$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10966  fi
10967
10968  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10969  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10970
10971  else
10972    # We're on a posix platform. Hooray! :)
10973    path="$BOOT_JDK"
10974
10975    if test ! -f "$path" && test ! -d "$path"; then
10976      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
10977    fi
10978
10979    has_space=`$ECHO "$path" | $GREP " "`
10980    if test "x$has_space" != x; then
10981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10982$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10983      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
10984    fi
10985  fi
10986
10987              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
10988$as_echo_n "checking for Boot JDK... " >&6; }
10989              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
10990$as_echo "$BOOT_JDK" >&6; }
10991              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
10992$as_echo_n "checking Boot JDK version... " >&6; }
10993              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10994              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
10995$as_echo "$BOOT_JDK_VERSION" >&6; }
10996            fi # end check jdk version
10997          fi # end check rt.jar
10998        fi # end check javac
10999      fi # end check java
11000    fi # end check boot jdk found
11001  fi
11002
11003if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11004  # Having specified an argument which is incorrect will produce an instant failure;
11005  # we should not go on looking
11006  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11007fi
11008
11009# Test: Is bootjdk available from builddeps?
11010
11011  if test "x$BOOT_JDK_FOUND" = xno; then
11012    # Now execute the test
11013
11014
11015
11016    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11017        # Source the builddeps file again, to make sure it uses the latest variables!
11018        . $builddepsfile
11019        # Look for a target and build machine specific resource!
11020        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11021        if test "x$resource" = x; then
11022            # Ok, lets instead look for a target specific resource
11023            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11024        fi
11025        if test "x$resource" = x; then
11026            # Ok, lets instead look for a build specific resource
11027            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11028        fi
11029        if test "x$resource" = x; then
11030            # Ok, lets instead look for a generic resource
11031            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11032            resource=${builddep_bootjdk}
11033        fi
11034        if test "x$resource" != x; then
11035            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11036$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11037	    # If the resource in the builddeps.conf file is an existing directory,
11038	    # for example /java/linux/cups
11039	    if test -d ${resource}; then
11040	       depdir=${resource}
11041	    else
11042
11043# bootjdk is for example mymodule
11044# $resource is for example libs/general/libmymod_1_2_3.zip
11045# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11046# $with_builddeps_dir is for example /localhome/builddeps
11047# depdir is the name of the variable into which we store the depdir, eg MYMOD
11048# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11049# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11050    filename=`basename $resource`
11051    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11052    filebase=${filename%%.*}
11053    extension=${filename#*.}
11054    installdir=$with_builddeps_dir/$filebase
11055    if test ! -f $installdir/$filename.unpacked; then
11056        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11057$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11058        if test ! -d $installdir; then
11059            mkdir -p $installdir
11060        fi
11061        if test ! -d $installdir; then
11062            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11063        fi
11064        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11065        touch $tmpfile
11066        if test ! -f $tmpfile; then
11067            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11068        fi
11069
11070    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11071    # $tmpfile is the local file name for the downloaded file.
11072    VALID_TOOL=no
11073    if test "x$BDEPS_FTP" = xwget; then
11074       VALID_TOOL=yes
11075       wget -O $tmpfile $with_builddeps_server/$resource
11076    fi
11077    if test "x$BDEPS_FTP" = xlftp; then
11078       VALID_TOOL=yes
11079       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11080    fi
11081    if test "x$BDEPS_FTP" = xftp; then
11082        VALID_TOOL=yes
11083        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11084        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11085        FTPUSERPWD=${FTPSERVER%%@*}
11086        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11087            FTPUSER=${userpwd%%:*}
11088            FTPPWD=${userpwd#*@}
11089            FTPSERVER=${FTPSERVER#*@}
11090        else
11091            FTPUSER=ftp
11092            FTPPWD=ftp
11093        fi
11094        # the "pass" command does not work on some
11095        # ftp clients (read ftp.exe) but if it works,
11096        # passive mode is better!
11097        (\
11098            echo "user $FTPUSER $FTPPWD"        ;\
11099            echo "pass"                         ;\
11100            echo "bin"                          ;\
11101            echo "get $FTPPATH $tmpfile"              ;\
11102        ) | ftp -in $FTPSERVER
11103    fi
11104    if test "x$VALID_TOOL" != xyes; then
11105       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11106    fi
11107
11108        mv $tmpfile $installdir/$filename
11109        if test ! -s $installdir/$filename; then
11110            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11111        fi
11112        case "$extension" in
11113            zip)  echo "Unzipping $installdir/$filename..."
11114               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11115            ;;
11116            tar.gz) echo "Untaring $installdir/$filename..."
11117               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11118            ;;
11119            tgz) echo "Untaring $installdir/$filename..."
11120               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11121            ;;
11122            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11123            ;;
11124        esac
11125    fi
11126    if test -f $installdir/$filename.unpacked; then
11127        depdir=$installdir
11128    fi
11129
11130	    fi
11131            # Source the builddeps file again, because in the previous command, the depdir
11132            # was updated to point at the current build dependency install directory.
11133            . $builddepsfile
11134            # Now extract variables from the builddeps.conf files.
11135            theroot=${builddep_bootjdk_ROOT}
11136            thecflags=${builddep_bootjdk_CFLAGS}
11137            thelibs=${builddep_bootjdk_LIBS}
11138            if test "x$depdir" = x; then
11139                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11140            fi
11141            BOOT_JDK=$depdir
11142            if test "x$theroot" != x; then
11143               BOOT_JDK="$theroot"
11144            fi
11145            if test "x$thecflags" != x; then
11146               BOOT_JDK_CFLAGS="$thecflags"
11147            fi
11148            if test "x$thelibs" != x; then
11149               BOOT_JDK_LIBS="$thelibs"
11150            fi
11151            BOOT_JDK_FOUND=maybe
11152            else BOOT_JDK_FOUND=no
11153
11154        fi
11155        else BOOT_JDK_FOUND=no
11156
11157    fi
11158
11159
11160
11161    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11162    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11163      # Do we have a bin/java?
11164      if test ! -x "$BOOT_JDK/bin/java"; then
11165        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11167        BOOT_JDK_FOUND=no
11168      else
11169        # Do we have a bin/javac?
11170        if test ! -x "$BOOT_JDK/bin/javac"; then
11171          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11173          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11174$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11175          BOOT_JDK_FOUND=no
11176        else
11177          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11178          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11179            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11181            BOOT_JDK_FOUND=no
11182          else
11183            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11184            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11185
11186            # Extra M4 quote needed to protect [] in grep expression.
11187            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11188            if test "x$FOUND_VERSION_78" = x; then
11189              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11191              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11192$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11193              BOOT_JDK_FOUND=no
11194            else
11195              # We're done! :-)
11196              BOOT_JDK_FOUND=yes
11197
11198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11199
11200  # Input might be given as Windows format, start by converting to
11201  # unix format.
11202  path="$BOOT_JDK"
11203  new_path=`$CYGPATH -u "$path"`
11204
11205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11208  # "foo.exe" is OK but "foo" is an error.
11209  #
11210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11211  # It is also a way to make sure we got the proper file name for the real test later on.
11212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11213  if test "x$test_shortpath" = x; then
11214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11216    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11217  fi
11218
11219  # Call helper function which possibly converts this using DOS-style short mode.
11220  # If so, the updated path is stored in $new_path.
11221
11222  input_path="$new_path"
11223  # Check if we need to convert this using DOS-style short mode. If the path
11224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11225  # take no chances and rewrite it.
11226  # Note: m4 eats our [], so we need to use [ and ] instead.
11227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11228  if test "x$has_forbidden_chars" != x; then
11229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11233      # Going to short mode and back again did indeed matter. Since short mode is
11234      # case insensitive, let's make it lowercase to improve readability.
11235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11236      # Now convert it back to Unix-stile (cygpath)
11237      input_path=`$CYGPATH -u "$shortmode_path"`
11238      new_path="$input_path"
11239    fi
11240  fi
11241
11242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11243  if test "x$test_cygdrive_prefix" = x; then
11244    # As a simple fix, exclude /usr/bin since it's not a real path.
11245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11247      # a path prefixed by /cygdrive for fixpath to work.
11248      new_path="$CYGWIN_ROOT_PATH$input_path"
11249    fi
11250  fi
11251
11252
11253  if test "x$path" != "x$new_path"; then
11254    BOOT_JDK="$new_path"
11255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11256$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11257  fi
11258
11259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11260
11261  path="$BOOT_JDK"
11262  has_colon=`$ECHO $path | $GREP ^.:`
11263  new_path="$path"
11264  if test "x$has_colon" = x; then
11265    # Not in mixed or Windows style, start by that.
11266    new_path=`cmd //c echo $path`
11267  fi
11268
11269
11270  input_path="$new_path"
11271  # Check if we need to convert this using DOS-style short mode. If the path
11272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11273  # take no chances and rewrite it.
11274  # Note: m4 eats our [], so we need to use [ and ] instead.
11275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11276  if test "x$has_forbidden_chars" != x; then
11277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11279  fi
11280
11281
11282  windows_path="$new_path"
11283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11284    unix_path=`$CYGPATH -u "$windows_path"`
11285    new_path="$unix_path"
11286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11288    new_path="$unix_path"
11289  fi
11290
11291  if test "x$path" != "x$new_path"; then
11292    BOOT_JDK="$new_path"
11293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11294$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11295  fi
11296
11297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11299
11300  else
11301    # We're on a posix platform. Hooray! :)
11302    path="$BOOT_JDK"
11303
11304    if test ! -f "$path" && test ! -d "$path"; then
11305      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11306    fi
11307
11308    has_space=`$ECHO "$path" | $GREP " "`
11309    if test "x$has_space" != x; then
11310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11311$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11312      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11313    fi
11314  fi
11315
11316              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11317$as_echo_n "checking for Boot JDK... " >&6; }
11318              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11319$as_echo "$BOOT_JDK" >&6; }
11320              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11321$as_echo_n "checking Boot JDK version... " >&6; }
11322              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11323              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11324$as_echo "$BOOT_JDK_VERSION" >&6; }
11325            fi # end check jdk version
11326          fi # end check rt.jar
11327        fi # end check javac
11328      fi # end check java
11329    fi # end check boot jdk found
11330  fi
11331
11332
11333# Test: Is $JAVA_HOME set?
11334
11335  if test "x$BOOT_JDK_FOUND" = xno; then
11336    # Now execute the test
11337
11338    if test "x$JAVA_HOME" != x; then
11339        JAVA_HOME_PROCESSED="$JAVA_HOME"
11340
11341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11342
11343  # Input might be given as Windows format, start by converting to
11344  # unix format.
11345  path="$JAVA_HOME_PROCESSED"
11346  new_path=`$CYGPATH -u "$path"`
11347
11348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11351  # "foo.exe" is OK but "foo" is an error.
11352  #
11353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11354  # It is also a way to make sure we got the proper file name for the real test later on.
11355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11356  if test "x$test_shortpath" = x; then
11357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11358$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11359    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11360  fi
11361
11362  # Call helper function which possibly converts this using DOS-style short mode.
11363  # If so, the updated path is stored in $new_path.
11364
11365  input_path="$new_path"
11366  # Check if we need to convert this using DOS-style short mode. If the path
11367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11368  # take no chances and rewrite it.
11369  # Note: m4 eats our [], so we need to use [ and ] instead.
11370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11371  if test "x$has_forbidden_chars" != x; then
11372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11376      # Going to short mode and back again did indeed matter. Since short mode is
11377      # case insensitive, let's make it lowercase to improve readability.
11378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11379      # Now convert it back to Unix-stile (cygpath)
11380      input_path=`$CYGPATH -u "$shortmode_path"`
11381      new_path="$input_path"
11382    fi
11383  fi
11384
11385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11386  if test "x$test_cygdrive_prefix" = x; then
11387    # As a simple fix, exclude /usr/bin since it's not a real path.
11388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11390      # a path prefixed by /cygdrive for fixpath to work.
11391      new_path="$CYGWIN_ROOT_PATH$input_path"
11392    fi
11393  fi
11394
11395
11396  if test "x$path" != "x$new_path"; then
11397    JAVA_HOME_PROCESSED="$new_path"
11398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11399$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11400  fi
11401
11402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11403
11404  path="$JAVA_HOME_PROCESSED"
11405  has_colon=`$ECHO $path | $GREP ^.:`
11406  new_path="$path"
11407  if test "x$has_colon" = x; then
11408    # Not in mixed or Windows style, start by that.
11409    new_path=`cmd //c echo $path`
11410  fi
11411
11412
11413  input_path="$new_path"
11414  # Check if we need to convert this using DOS-style short mode. If the path
11415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11416  # take no chances and rewrite it.
11417  # Note: m4 eats our [], so we need to use [ and ] instead.
11418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11419  if test "x$has_forbidden_chars" != x; then
11420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11422  fi
11423
11424
11425  windows_path="$new_path"
11426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11427    unix_path=`$CYGPATH -u "$windows_path"`
11428    new_path="$unix_path"
11429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11431    new_path="$unix_path"
11432  fi
11433
11434  if test "x$path" != "x$new_path"; then
11435    JAVA_HOME_PROCESSED="$new_path"
11436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11437$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11438  fi
11439
11440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11442
11443  else
11444    # We're on a posix platform. Hooray! :)
11445    path="$JAVA_HOME_PROCESSED"
11446
11447    if test ! -f "$path" && test ! -d "$path"; then
11448      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11449    fi
11450
11451    has_space=`$ECHO "$path" | $GREP " "`
11452    if test "x$has_space" != x; then
11453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11454$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11455      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11456    fi
11457  fi
11458
11459        if test ! -d "$JAVA_HOME_PROCESSED"; then
11460            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11461$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11462        else
11463          # Aha, the user has set a JAVA_HOME
11464          # let us use that as the Boot JDK.
11465          BOOT_JDK="$JAVA_HOME_PROCESSED"
11466          BOOT_JDK_FOUND=maybe
11467          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11468$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11469        fi
11470    fi
11471
11472
11473    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11474    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11475      # Do we have a bin/java?
11476      if test ! -x "$BOOT_JDK/bin/java"; then
11477        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11479        BOOT_JDK_FOUND=no
11480      else
11481        # Do we have a bin/javac?
11482        if test ! -x "$BOOT_JDK/bin/javac"; then
11483          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11485          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11486$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11487          BOOT_JDK_FOUND=no
11488        else
11489          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11490          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11491            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11493            BOOT_JDK_FOUND=no
11494          else
11495            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11496            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11497
11498            # Extra M4 quote needed to protect [] in grep expression.
11499            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11500            if test "x$FOUND_VERSION_78" = x; then
11501              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11503              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11504$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11505              BOOT_JDK_FOUND=no
11506            else
11507              # We're done! :-)
11508              BOOT_JDK_FOUND=yes
11509
11510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11511
11512  # Input might be given as Windows format, start by converting to
11513  # unix format.
11514  path="$BOOT_JDK"
11515  new_path=`$CYGPATH -u "$path"`
11516
11517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11520  # "foo.exe" is OK but "foo" is an error.
11521  #
11522  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11523  # It is also a way to make sure we got the proper file name for the real test later on.
11524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11525  if test "x$test_shortpath" = x; then
11526    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11527$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11528    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11529  fi
11530
11531  # Call helper function which possibly converts this using DOS-style short mode.
11532  # If so, the updated path is stored in $new_path.
11533
11534  input_path="$new_path"
11535  # Check if we need to convert this using DOS-style short mode. If the path
11536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11537  # take no chances and rewrite it.
11538  # Note: m4 eats our [], so we need to use [ and ] instead.
11539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11540  if test "x$has_forbidden_chars" != x; then
11541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11545      # Going to short mode and back again did indeed matter. Since short mode is
11546      # case insensitive, let's make it lowercase to improve readability.
11547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11548      # Now convert it back to Unix-stile (cygpath)
11549      input_path=`$CYGPATH -u "$shortmode_path"`
11550      new_path="$input_path"
11551    fi
11552  fi
11553
11554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11555  if test "x$test_cygdrive_prefix" = x; then
11556    # As a simple fix, exclude /usr/bin since it's not a real path.
11557    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11559      # a path prefixed by /cygdrive for fixpath to work.
11560      new_path="$CYGWIN_ROOT_PATH$input_path"
11561    fi
11562  fi
11563
11564
11565  if test "x$path" != "x$new_path"; then
11566    BOOT_JDK="$new_path"
11567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11568$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11569  fi
11570
11571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11572
11573  path="$BOOT_JDK"
11574  has_colon=`$ECHO $path | $GREP ^.:`
11575  new_path="$path"
11576  if test "x$has_colon" = x; then
11577    # Not in mixed or Windows style, start by that.
11578    new_path=`cmd //c echo $path`
11579  fi
11580
11581
11582  input_path="$new_path"
11583  # Check if we need to convert this using DOS-style short mode. If the path
11584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11585  # take no chances and rewrite it.
11586  # Note: m4 eats our [], so we need to use [ and ] instead.
11587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11588  if test "x$has_forbidden_chars" != x; then
11589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11591  fi
11592
11593
11594  windows_path="$new_path"
11595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11596    unix_path=`$CYGPATH -u "$windows_path"`
11597    new_path="$unix_path"
11598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11600    new_path="$unix_path"
11601  fi
11602
11603  if test "x$path" != "x$new_path"; then
11604    BOOT_JDK="$new_path"
11605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11606$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11607  fi
11608
11609  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11610  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11611
11612  else
11613    # We're on a posix platform. Hooray! :)
11614    path="$BOOT_JDK"
11615
11616    if test ! -f "$path" && test ! -d "$path"; then
11617      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11618    fi
11619
11620    has_space=`$ECHO "$path" | $GREP " "`
11621    if test "x$has_space" != x; then
11622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11623$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11624      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11625    fi
11626  fi
11627
11628              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11629$as_echo_n "checking for Boot JDK... " >&6; }
11630              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11631$as_echo "$BOOT_JDK" >&6; }
11632              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11633$as_echo_n "checking Boot JDK version... " >&6; }
11634              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11635              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11636$as_echo "$BOOT_JDK_VERSION" >&6; }
11637            fi # end check jdk version
11638          fi # end check rt.jar
11639        fi # end check javac
11640      fi # end check java
11641    fi # end check boot jdk found
11642  fi
11643
11644
11645# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11646
11647  if test "x$BOOT_JDK_FOUND" = xno; then
11648    # Now execute the test
11649
11650    if test -x /usr/libexec/java_home; then
11651        BOOT_JDK=`/usr/libexec/java_home`
11652        BOOT_JDK_FOUND=maybe
11653        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11654$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11655    fi
11656
11657
11658    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11659    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11660      # Do we have a bin/java?
11661      if test ! -x "$BOOT_JDK/bin/java"; then
11662        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11664        BOOT_JDK_FOUND=no
11665      else
11666        # Do we have a bin/javac?
11667        if test ! -x "$BOOT_JDK/bin/javac"; then
11668          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11669$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11670          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11671$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11672          BOOT_JDK_FOUND=no
11673        else
11674          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11675          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11676            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11678            BOOT_JDK_FOUND=no
11679          else
11680            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11681            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11682
11683            # Extra M4 quote needed to protect [] in grep expression.
11684            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11685            if test "x$FOUND_VERSION_78" = x; then
11686              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11688              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11689$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11690              BOOT_JDK_FOUND=no
11691            else
11692              # We're done! :-)
11693              BOOT_JDK_FOUND=yes
11694
11695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11696
11697  # Input might be given as Windows format, start by converting to
11698  # unix format.
11699  path="$BOOT_JDK"
11700  new_path=`$CYGPATH -u "$path"`
11701
11702  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11703  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11704  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11705  # "foo.exe" is OK but "foo" is an error.
11706  #
11707  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11708  # It is also a way to make sure we got the proper file name for the real test later on.
11709  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11710  if test "x$test_shortpath" = x; then
11711    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11712$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11713    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11714  fi
11715
11716  # Call helper function which possibly converts this using DOS-style short mode.
11717  # If so, the updated path is stored in $new_path.
11718
11719  input_path="$new_path"
11720  # Check if we need to convert this using DOS-style short mode. If the path
11721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11722  # take no chances and rewrite it.
11723  # Note: m4 eats our [], so we need to use [ and ] instead.
11724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11725  if test "x$has_forbidden_chars" != x; then
11726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11730      # Going to short mode and back again did indeed matter. Since short mode is
11731      # case insensitive, let's make it lowercase to improve readability.
11732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11733      # Now convert it back to Unix-stile (cygpath)
11734      input_path=`$CYGPATH -u "$shortmode_path"`
11735      new_path="$input_path"
11736    fi
11737  fi
11738
11739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11740  if test "x$test_cygdrive_prefix" = x; then
11741    # As a simple fix, exclude /usr/bin since it's not a real path.
11742    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11744      # a path prefixed by /cygdrive for fixpath to work.
11745      new_path="$CYGWIN_ROOT_PATH$input_path"
11746    fi
11747  fi
11748
11749
11750  if test "x$path" != "x$new_path"; then
11751    BOOT_JDK="$new_path"
11752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11753$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11754  fi
11755
11756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11757
11758  path="$BOOT_JDK"
11759  has_colon=`$ECHO $path | $GREP ^.:`
11760  new_path="$path"
11761  if test "x$has_colon" = x; then
11762    # Not in mixed or Windows style, start by that.
11763    new_path=`cmd //c echo $path`
11764  fi
11765
11766
11767  input_path="$new_path"
11768  # Check if we need to convert this using DOS-style short mode. If the path
11769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11770  # take no chances and rewrite it.
11771  # Note: m4 eats our [], so we need to use [ and ] instead.
11772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11773  if test "x$has_forbidden_chars" != x; then
11774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11776  fi
11777
11778
11779  windows_path="$new_path"
11780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11781    unix_path=`$CYGPATH -u "$windows_path"`
11782    new_path="$unix_path"
11783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11785    new_path="$unix_path"
11786  fi
11787
11788  if test "x$path" != "x$new_path"; then
11789    BOOT_JDK="$new_path"
11790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11791$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11792  fi
11793
11794  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11795  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11796
11797  else
11798    # We're on a posix platform. Hooray! :)
11799    path="$BOOT_JDK"
11800
11801    if test ! -f "$path" && test ! -d "$path"; then
11802      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11803    fi
11804
11805    has_space=`$ECHO "$path" | $GREP " "`
11806    if test "x$has_space" != x; then
11807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11808$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11809      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11810    fi
11811  fi
11812
11813              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11814$as_echo_n "checking for Boot JDK... " >&6; }
11815              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11816$as_echo "$BOOT_JDK" >&6; }
11817              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11818$as_echo_n "checking Boot JDK version... " >&6; }
11819              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11820              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11821$as_echo "$BOOT_JDK_VERSION" >&6; }
11822            fi # end check jdk version
11823          fi # end check rt.jar
11824        fi # end check javac
11825      fi # end check java
11826    fi # end check boot jdk found
11827  fi
11828
11829
11830# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11831
11832  if test "x$BOOT_JDK_FOUND" = xno; then
11833    # Now execute the test
11834
11835    # Extract the first word of "javac", so it can be a program name with args.
11836set dummy javac; ac_word=$2
11837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11838$as_echo_n "checking for $ac_word... " >&6; }
11839if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11840  $as_echo_n "(cached) " >&6
11841else
11842  case $JAVAC_CHECK in
11843  [\\/]* | ?:[\\/]*)
11844  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11845  ;;
11846  *)
11847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11848for as_dir in $PATH
11849do
11850  IFS=$as_save_IFS
11851  test -z "$as_dir" && as_dir=.
11852    for ac_exec_ext in '' $ac_executable_extensions; do
11853  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11854    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11856    break 2
11857  fi
11858done
11859  done
11860IFS=$as_save_IFS
11861
11862  ;;
11863esac
11864fi
11865JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11866if test -n "$JAVAC_CHECK"; then
11867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11868$as_echo "$JAVAC_CHECK" >&6; }
11869else
11870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11871$as_echo "no" >&6; }
11872fi
11873
11874
11875    # Extract the first word of "java", so it can be a program name with args.
11876set dummy java; ac_word=$2
11877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11878$as_echo_n "checking for $ac_word... " >&6; }
11879if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11880  $as_echo_n "(cached) " >&6
11881else
11882  case $JAVA_CHECK in
11883  [\\/]* | ?:[\\/]*)
11884  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11885  ;;
11886  *)
11887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11888for as_dir in $PATH
11889do
11890  IFS=$as_save_IFS
11891  test -z "$as_dir" && as_dir=.
11892    for ac_exec_ext in '' $ac_executable_extensions; do
11893  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11894    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11896    break 2
11897  fi
11898done
11899  done
11900IFS=$as_save_IFS
11901
11902  ;;
11903esac
11904fi
11905JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11906if test -n "$JAVA_CHECK"; then
11907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11908$as_echo "$JAVA_CHECK" >&6; }
11909else
11910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11911$as_echo "no" >&6; }
11912fi
11913
11914
11915    BINARY="$JAVAC_CHECK"
11916    if test "x$JAVAC_CHECK" = x; then
11917        BINARY="$JAVA_CHECK"
11918    fi
11919    if test "x$BINARY" != x; then
11920        # So there is a java(c) binary, it might be part of a JDK.
11921        # Lets find the JDK/JRE directory by following symbolic links.
11922        # Linux/GNU systems often have links from /usr/bin/java to
11923        # /etc/alternatives/java to the real JDK binary.
11924
11925    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11926        # Follow a chain of symbolic links. Use readlink
11927        # where it exists, else fall back to horribly
11928        # complicated shell code.
11929        if test "x$READLINK_TESTED" != yes; then
11930            # On MacOSX there is a readlink tool with a different
11931            # purpose than the GNU readlink tool. Check the found readlink.
11932            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11933            if test "x$ISGNU" = x; then
11934                 # A readlink that we do not know how to use.
11935                 # Are there other non-GNU readlinks out there?
11936                 READLINK_TESTED=yes
11937                 READLINK=
11938            fi
11939        fi
11940
11941        if test "x$READLINK" != x; then
11942            BINARY=`$READLINK -f $BINARY`
11943        else
11944            # Save the current directory for restoring afterwards
11945            STARTDIR=$PWD
11946            COUNTER=0
11947            sym_link_dir=`$DIRNAME $BINARY`
11948            sym_link_file=`$BASENAME $BINARY`
11949            # Use the system pwd and not the shell builtin to resolve directory symlinks
11950            cd $sym_link_dir
11951            cd `$THEPWDCMD`
11952            sym_link_dir=`$THEPWDCMD`
11953            # Resolve file symlinks
11954            while test $COUNTER -lt 20; do
11955                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11956                if test "x$ISLINK" == x; then
11957                    # This is not a symbolic link! We are done!
11958                    break
11959                fi
11960                # Again resolve directory symlinks since the target of the just found
11961                # link could be in a different directory
11962                cd `$DIRNAME $ISLINK`
11963                sym_link_dir=`$THEPWDCMD`
11964                sym_link_file=`$BASENAME $ISLINK`
11965                let COUNTER=COUNTER+1
11966            done
11967            cd $STARTDIR
11968            BINARY=$sym_link_dir/$sym_link_file
11969        fi
11970    fi
11971
11972        BOOT_JDK=`dirname "$BINARY"`
11973        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11974        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11975            # Looks like we found ourselves an JDK
11976            BOOT_JDK_FOUND=maybe
11977            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
11978$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
11979        fi
11980    fi
11981
11982
11983    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11984    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11985      # Do we have a bin/java?
11986      if test ! -x "$BOOT_JDK/bin/java"; then
11987        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11989        BOOT_JDK_FOUND=no
11990      else
11991        # Do we have a bin/javac?
11992        if test ! -x "$BOOT_JDK/bin/javac"; then
11993          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11995          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11996$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11997          BOOT_JDK_FOUND=no
11998        else
11999          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12000          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12001            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12003            BOOT_JDK_FOUND=no
12004          else
12005            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12006            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12007
12008            # Extra M4 quote needed to protect [] in grep expression.
12009            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12010            if test "x$FOUND_VERSION_78" = x; then
12011              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12013              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12014$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12015              BOOT_JDK_FOUND=no
12016            else
12017              # We're done! :-)
12018              BOOT_JDK_FOUND=yes
12019
12020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12021
12022  # Input might be given as Windows format, start by converting to
12023  # unix format.
12024  path="$BOOT_JDK"
12025  new_path=`$CYGPATH -u "$path"`
12026
12027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12030  # "foo.exe" is OK but "foo" is an error.
12031  #
12032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12033  # It is also a way to make sure we got the proper file name for the real test later on.
12034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12035  if test "x$test_shortpath" = x; then
12036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12037$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12038    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12039  fi
12040
12041  # Call helper function which possibly converts this using DOS-style short mode.
12042  # If so, the updated path is stored in $new_path.
12043
12044  input_path="$new_path"
12045  # Check if we need to convert this using DOS-style short mode. If the path
12046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12047  # take no chances and rewrite it.
12048  # Note: m4 eats our [], so we need to use [ and ] instead.
12049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12050  if test "x$has_forbidden_chars" != x; then
12051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12055      # Going to short mode and back again did indeed matter. Since short mode is
12056      # case insensitive, let's make it lowercase to improve readability.
12057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12058      # Now convert it back to Unix-stile (cygpath)
12059      input_path=`$CYGPATH -u "$shortmode_path"`
12060      new_path="$input_path"
12061    fi
12062  fi
12063
12064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12065  if test "x$test_cygdrive_prefix" = x; then
12066    # As a simple fix, exclude /usr/bin since it's not a real path.
12067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12069      # a path prefixed by /cygdrive for fixpath to work.
12070      new_path="$CYGWIN_ROOT_PATH$input_path"
12071    fi
12072  fi
12073
12074
12075  if test "x$path" != "x$new_path"; then
12076    BOOT_JDK="$new_path"
12077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12078$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12079  fi
12080
12081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12082
12083  path="$BOOT_JDK"
12084  has_colon=`$ECHO $path | $GREP ^.:`
12085  new_path="$path"
12086  if test "x$has_colon" = x; then
12087    # Not in mixed or Windows style, start by that.
12088    new_path=`cmd //c echo $path`
12089  fi
12090
12091
12092  input_path="$new_path"
12093  # Check if we need to convert this using DOS-style short mode. If the path
12094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12095  # take no chances and rewrite it.
12096  # Note: m4 eats our [], so we need to use [ and ] instead.
12097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12098  if test "x$has_forbidden_chars" != x; then
12099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12101  fi
12102
12103
12104  windows_path="$new_path"
12105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12106    unix_path=`$CYGPATH -u "$windows_path"`
12107    new_path="$unix_path"
12108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12110    new_path="$unix_path"
12111  fi
12112
12113  if test "x$path" != "x$new_path"; then
12114    BOOT_JDK="$new_path"
12115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12116$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12117  fi
12118
12119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12121
12122  else
12123    # We're on a posix platform. Hooray! :)
12124    path="$BOOT_JDK"
12125
12126    if test ! -f "$path" && test ! -d "$path"; then
12127      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12128    fi
12129
12130    has_space=`$ECHO "$path" | $GREP " "`
12131    if test "x$has_space" != x; then
12132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12133$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12134      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12135    fi
12136  fi
12137
12138              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12139$as_echo_n "checking for Boot JDK... " >&6; }
12140              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12141$as_echo "$BOOT_JDK" >&6; }
12142              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12143$as_echo_n "checking Boot JDK version... " >&6; }
12144              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12145              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12146$as_echo "$BOOT_JDK_VERSION" >&6; }
12147            fi # end check jdk version
12148          fi # end check rt.jar
12149        fi # end check javac
12150      fi # end check java
12151    fi # end check boot jdk found
12152  fi
12153
12154
12155# Test: Is there a JDK installed in default, well-known locations?
12156
12157  if test "x$BOOT_JDK_FOUND" = xno; then
12158    # Now execute the test
12159
12160  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12161
12162  if test "x$BOOT_JDK_FOUND" = xno; then
12163    # Now execute the test
12164
12165  if test "x$ProgramW6432" != x; then
12166    VIRTUAL_DIR="$ProgramW6432/Java"
12167
12168  windows_path="$VIRTUAL_DIR"
12169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12170    unix_path=`$CYGPATH -u "$windows_path"`
12171    VIRTUAL_DIR="$unix_path"
12172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12174    VIRTUAL_DIR="$unix_path"
12175  fi
12176
12177
12178  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12179  BOOT_JDK_SUFFIX=""
12180  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12181  if test "x$ALL_JDKS_FOUND" != x; then
12182    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12183
12184  if test "x$BOOT_JDK_FOUND" = xno; then
12185    # Now execute the test
12186
12187        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12188        if test -d "$BOOT_JDK"; then
12189          BOOT_JDK_FOUND=maybe
12190          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12191$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12192        fi
12193
12194
12195    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12196    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12197      # Do we have a bin/java?
12198      if test ! -x "$BOOT_JDK/bin/java"; then
12199        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12201        BOOT_JDK_FOUND=no
12202      else
12203        # Do we have a bin/javac?
12204        if test ! -x "$BOOT_JDK/bin/javac"; then
12205          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12207          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12208$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12209          BOOT_JDK_FOUND=no
12210        else
12211          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12212          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12213            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12215            BOOT_JDK_FOUND=no
12216          else
12217            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12218            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12219
12220            # Extra M4 quote needed to protect [] in grep expression.
12221            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12222            if test "x$FOUND_VERSION_78" = x; then
12223              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12225              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12226$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12227              BOOT_JDK_FOUND=no
12228            else
12229              # We're done! :-)
12230              BOOT_JDK_FOUND=yes
12231
12232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12233
12234  # Input might be given as Windows format, start by converting to
12235  # unix format.
12236  path="$BOOT_JDK"
12237  new_path=`$CYGPATH -u "$path"`
12238
12239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12242  # "foo.exe" is OK but "foo" is an error.
12243  #
12244  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12245  # It is also a way to make sure we got the proper file name for the real test later on.
12246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12247  if test "x$test_shortpath" = x; then
12248    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12249$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12250    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12251  fi
12252
12253  # Call helper function which possibly converts this using DOS-style short mode.
12254  # If so, the updated path is stored in $new_path.
12255
12256  input_path="$new_path"
12257  # Check if we need to convert this using DOS-style short mode. If the path
12258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12259  # take no chances and rewrite it.
12260  # Note: m4 eats our [], so we need to use [ and ] instead.
12261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12262  if test "x$has_forbidden_chars" != x; then
12263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12267      # Going to short mode and back again did indeed matter. Since short mode is
12268      # case insensitive, let's make it lowercase to improve readability.
12269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12270      # Now convert it back to Unix-stile (cygpath)
12271      input_path=`$CYGPATH -u "$shortmode_path"`
12272      new_path="$input_path"
12273    fi
12274  fi
12275
12276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12277  if test "x$test_cygdrive_prefix" = x; then
12278    # As a simple fix, exclude /usr/bin since it's not a real path.
12279    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12281      # a path prefixed by /cygdrive for fixpath to work.
12282      new_path="$CYGWIN_ROOT_PATH$input_path"
12283    fi
12284  fi
12285
12286
12287  if test "x$path" != "x$new_path"; then
12288    BOOT_JDK="$new_path"
12289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12290$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12291  fi
12292
12293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12294
12295  path="$BOOT_JDK"
12296  has_colon=`$ECHO $path | $GREP ^.:`
12297  new_path="$path"
12298  if test "x$has_colon" = x; then
12299    # Not in mixed or Windows style, start by that.
12300    new_path=`cmd //c echo $path`
12301  fi
12302
12303
12304  input_path="$new_path"
12305  # Check if we need to convert this using DOS-style short mode. If the path
12306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12307  # take no chances and rewrite it.
12308  # Note: m4 eats our [], so we need to use [ and ] instead.
12309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12310  if test "x$has_forbidden_chars" != x; then
12311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12313  fi
12314
12315
12316  windows_path="$new_path"
12317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12318    unix_path=`$CYGPATH -u "$windows_path"`
12319    new_path="$unix_path"
12320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12322    new_path="$unix_path"
12323  fi
12324
12325  if test "x$path" != "x$new_path"; then
12326    BOOT_JDK="$new_path"
12327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12328$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12329  fi
12330
12331  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12332  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12333
12334  else
12335    # We're on a posix platform. Hooray! :)
12336    path="$BOOT_JDK"
12337
12338    if test ! -f "$path" && test ! -d "$path"; then
12339      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12340    fi
12341
12342    has_space=`$ECHO "$path" | $GREP " "`
12343    if test "x$has_space" != x; then
12344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12345$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12346      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12347    fi
12348  fi
12349
12350              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12351$as_echo_n "checking for Boot JDK... " >&6; }
12352              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12353$as_echo "$BOOT_JDK" >&6; }
12354              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12355$as_echo_n "checking Boot JDK version... " >&6; }
12356              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12357              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12358$as_echo "$BOOT_JDK_VERSION" >&6; }
12359            fi # end check jdk version
12360          fi # end check rt.jar
12361        fi # end check javac
12362      fi # end check java
12363    fi # end check boot jdk found
12364  fi
12365
12366    done
12367  fi
12368
12369  fi
12370
12371
12372    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12373    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12374      # Do we have a bin/java?
12375      if test ! -x "$BOOT_JDK/bin/java"; then
12376        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12378        BOOT_JDK_FOUND=no
12379      else
12380        # Do we have a bin/javac?
12381        if test ! -x "$BOOT_JDK/bin/javac"; then
12382          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12384          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12385$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12386          BOOT_JDK_FOUND=no
12387        else
12388          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12389          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12390            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12392            BOOT_JDK_FOUND=no
12393          else
12394            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12395            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12396
12397            # Extra M4 quote needed to protect [] in grep expression.
12398            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12399            if test "x$FOUND_VERSION_78" = x; then
12400              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12402              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12403$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12404              BOOT_JDK_FOUND=no
12405            else
12406              # We're done! :-)
12407              BOOT_JDK_FOUND=yes
12408
12409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12410
12411  # Input might be given as Windows format, start by converting to
12412  # unix format.
12413  path="$BOOT_JDK"
12414  new_path=`$CYGPATH -u "$path"`
12415
12416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12419  # "foo.exe" is OK but "foo" is an error.
12420  #
12421  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12422  # It is also a way to make sure we got the proper file name for the real test later on.
12423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12424  if test "x$test_shortpath" = x; then
12425    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12426$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12427    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12428  fi
12429
12430  # Call helper function which possibly converts this using DOS-style short mode.
12431  # If so, the updated path is stored in $new_path.
12432
12433  input_path="$new_path"
12434  # Check if we need to convert this using DOS-style short mode. If the path
12435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12436  # take no chances and rewrite it.
12437  # Note: m4 eats our [], so we need to use [ and ] instead.
12438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12439  if test "x$has_forbidden_chars" != x; then
12440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12444      # Going to short mode and back again did indeed matter. Since short mode is
12445      # case insensitive, let's make it lowercase to improve readability.
12446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12447      # Now convert it back to Unix-stile (cygpath)
12448      input_path=`$CYGPATH -u "$shortmode_path"`
12449      new_path="$input_path"
12450    fi
12451  fi
12452
12453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12454  if test "x$test_cygdrive_prefix" = x; then
12455    # As a simple fix, exclude /usr/bin since it's not a real path.
12456    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12458      # a path prefixed by /cygdrive for fixpath to work.
12459      new_path="$CYGWIN_ROOT_PATH$input_path"
12460    fi
12461  fi
12462
12463
12464  if test "x$path" != "x$new_path"; then
12465    BOOT_JDK="$new_path"
12466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12467$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12468  fi
12469
12470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12471
12472  path="$BOOT_JDK"
12473  has_colon=`$ECHO $path | $GREP ^.:`
12474  new_path="$path"
12475  if test "x$has_colon" = x; then
12476    # Not in mixed or Windows style, start by that.
12477    new_path=`cmd //c echo $path`
12478  fi
12479
12480
12481  input_path="$new_path"
12482  # Check if we need to convert this using DOS-style short mode. If the path
12483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12484  # take no chances and rewrite it.
12485  # Note: m4 eats our [], so we need to use [ and ] instead.
12486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12487  if test "x$has_forbidden_chars" != x; then
12488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12490  fi
12491
12492
12493  windows_path="$new_path"
12494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12495    unix_path=`$CYGPATH -u "$windows_path"`
12496    new_path="$unix_path"
12497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12499    new_path="$unix_path"
12500  fi
12501
12502  if test "x$path" != "x$new_path"; then
12503    BOOT_JDK="$new_path"
12504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12505$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12506  fi
12507
12508  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12509  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12510
12511  else
12512    # We're on a posix platform. Hooray! :)
12513    path="$BOOT_JDK"
12514
12515    if test ! -f "$path" && test ! -d "$path"; then
12516      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12517    fi
12518
12519    has_space=`$ECHO "$path" | $GREP " "`
12520    if test "x$has_space" != x; then
12521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12522$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12523      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12524    fi
12525  fi
12526
12527              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12528$as_echo_n "checking for Boot JDK... " >&6; }
12529              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12530$as_echo "$BOOT_JDK" >&6; }
12531              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12532$as_echo_n "checking Boot JDK version... " >&6; }
12533              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12534              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12535$as_echo "$BOOT_JDK_VERSION" >&6; }
12536            fi # end check jdk version
12537          fi # end check rt.jar
12538        fi # end check javac
12539      fi # end check java
12540    fi # end check boot jdk found
12541  fi
12542
12543
12544  if test "x$BOOT_JDK_FOUND" = xno; then
12545    # Now execute the test
12546
12547  if test "x$PROGRAMW6432" != x; then
12548    VIRTUAL_DIR="$PROGRAMW6432/Java"
12549
12550  windows_path="$VIRTUAL_DIR"
12551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12552    unix_path=`$CYGPATH -u "$windows_path"`
12553    VIRTUAL_DIR="$unix_path"
12554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12556    VIRTUAL_DIR="$unix_path"
12557  fi
12558
12559
12560  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12561  BOOT_JDK_SUFFIX=""
12562  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12563  if test "x$ALL_JDKS_FOUND" != x; then
12564    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12565
12566  if test "x$BOOT_JDK_FOUND" = xno; then
12567    # Now execute the test
12568
12569        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12570        if test -d "$BOOT_JDK"; then
12571          BOOT_JDK_FOUND=maybe
12572          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12573$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12574        fi
12575
12576
12577    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12578    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12579      # Do we have a bin/java?
12580      if test ! -x "$BOOT_JDK/bin/java"; then
12581        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12583        BOOT_JDK_FOUND=no
12584      else
12585        # Do we have a bin/javac?
12586        if test ! -x "$BOOT_JDK/bin/javac"; then
12587          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12589          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12590$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12591          BOOT_JDK_FOUND=no
12592        else
12593          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12594          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12595            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12597            BOOT_JDK_FOUND=no
12598          else
12599            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12600            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12601
12602            # Extra M4 quote needed to protect [] in grep expression.
12603            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12604            if test "x$FOUND_VERSION_78" = x; then
12605              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12607              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12608$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12609              BOOT_JDK_FOUND=no
12610            else
12611              # We're done! :-)
12612              BOOT_JDK_FOUND=yes
12613
12614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12615
12616  # Input might be given as Windows format, start by converting to
12617  # unix format.
12618  path="$BOOT_JDK"
12619  new_path=`$CYGPATH -u "$path"`
12620
12621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12624  # "foo.exe" is OK but "foo" is an error.
12625  #
12626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12627  # It is also a way to make sure we got the proper file name for the real test later on.
12628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12629  if test "x$test_shortpath" = x; then
12630    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12632    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12633  fi
12634
12635  # Call helper function which possibly converts this using DOS-style short mode.
12636  # If so, the updated path is stored in $new_path.
12637
12638  input_path="$new_path"
12639  # Check if we need to convert this using DOS-style short mode. If the path
12640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12641  # take no chances and rewrite it.
12642  # Note: m4 eats our [], so we need to use [ and ] instead.
12643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12644  if test "x$has_forbidden_chars" != x; then
12645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12649      # Going to short mode and back again did indeed matter. Since short mode is
12650      # case insensitive, let's make it lowercase to improve readability.
12651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12652      # Now convert it back to Unix-stile (cygpath)
12653      input_path=`$CYGPATH -u "$shortmode_path"`
12654      new_path="$input_path"
12655    fi
12656  fi
12657
12658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12659  if test "x$test_cygdrive_prefix" = x; then
12660    # As a simple fix, exclude /usr/bin since it's not a real path.
12661    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12663      # a path prefixed by /cygdrive for fixpath to work.
12664      new_path="$CYGWIN_ROOT_PATH$input_path"
12665    fi
12666  fi
12667
12668
12669  if test "x$path" != "x$new_path"; then
12670    BOOT_JDK="$new_path"
12671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12672$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12673  fi
12674
12675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12676
12677  path="$BOOT_JDK"
12678  has_colon=`$ECHO $path | $GREP ^.:`
12679  new_path="$path"
12680  if test "x$has_colon" = x; then
12681    # Not in mixed or Windows style, start by that.
12682    new_path=`cmd //c echo $path`
12683  fi
12684
12685
12686  input_path="$new_path"
12687  # Check if we need to convert this using DOS-style short mode. If the path
12688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12689  # take no chances and rewrite it.
12690  # Note: m4 eats our [], so we need to use [ and ] instead.
12691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12692  if test "x$has_forbidden_chars" != x; then
12693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12695  fi
12696
12697
12698  windows_path="$new_path"
12699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12700    unix_path=`$CYGPATH -u "$windows_path"`
12701    new_path="$unix_path"
12702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12704    new_path="$unix_path"
12705  fi
12706
12707  if test "x$path" != "x$new_path"; then
12708    BOOT_JDK="$new_path"
12709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12710$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12711  fi
12712
12713  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12714  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12715
12716  else
12717    # We're on a posix platform. Hooray! :)
12718    path="$BOOT_JDK"
12719
12720    if test ! -f "$path" && test ! -d "$path"; then
12721      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12722    fi
12723
12724    has_space=`$ECHO "$path" | $GREP " "`
12725    if test "x$has_space" != x; then
12726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12727$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12728      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12729    fi
12730  fi
12731
12732              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12733$as_echo_n "checking for Boot JDK... " >&6; }
12734              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12735$as_echo "$BOOT_JDK" >&6; }
12736              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12737$as_echo_n "checking Boot JDK version... " >&6; }
12738              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12739              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12740$as_echo "$BOOT_JDK_VERSION" >&6; }
12741            fi # end check jdk version
12742          fi # end check rt.jar
12743        fi # end check javac
12744      fi # end check java
12745    fi # end check boot jdk found
12746  fi
12747
12748    done
12749  fi
12750
12751  fi
12752
12753
12754    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12755    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12756      # Do we have a bin/java?
12757      if test ! -x "$BOOT_JDK/bin/java"; then
12758        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12760        BOOT_JDK_FOUND=no
12761      else
12762        # Do we have a bin/javac?
12763        if test ! -x "$BOOT_JDK/bin/javac"; then
12764          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12766          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12767$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12768          BOOT_JDK_FOUND=no
12769        else
12770          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12771          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12772            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12773$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12774            BOOT_JDK_FOUND=no
12775          else
12776            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12777            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12778
12779            # Extra M4 quote needed to protect [] in grep expression.
12780            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12781            if test "x$FOUND_VERSION_78" = x; then
12782              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12784              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12785$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12786              BOOT_JDK_FOUND=no
12787            else
12788              # We're done! :-)
12789              BOOT_JDK_FOUND=yes
12790
12791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12792
12793  # Input might be given as Windows format, start by converting to
12794  # unix format.
12795  path="$BOOT_JDK"
12796  new_path=`$CYGPATH -u "$path"`
12797
12798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12801  # "foo.exe" is OK but "foo" is an error.
12802  #
12803  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12804  # It is also a way to make sure we got the proper file name for the real test later on.
12805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12806  if test "x$test_shortpath" = x; then
12807    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12808$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12809    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12810  fi
12811
12812  # Call helper function which possibly converts this using DOS-style short mode.
12813  # If so, the updated path is stored in $new_path.
12814
12815  input_path="$new_path"
12816  # Check if we need to convert this using DOS-style short mode. If the path
12817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12818  # take no chances and rewrite it.
12819  # Note: m4 eats our [], so we need to use [ and ] instead.
12820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12821  if test "x$has_forbidden_chars" != x; then
12822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12826      # Going to short mode and back again did indeed matter. Since short mode is
12827      # case insensitive, let's make it lowercase to improve readability.
12828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12829      # Now convert it back to Unix-stile (cygpath)
12830      input_path=`$CYGPATH -u "$shortmode_path"`
12831      new_path="$input_path"
12832    fi
12833  fi
12834
12835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12836  if test "x$test_cygdrive_prefix" = x; then
12837    # As a simple fix, exclude /usr/bin since it's not a real path.
12838    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12840      # a path prefixed by /cygdrive for fixpath to work.
12841      new_path="$CYGWIN_ROOT_PATH$input_path"
12842    fi
12843  fi
12844
12845
12846  if test "x$path" != "x$new_path"; then
12847    BOOT_JDK="$new_path"
12848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12849$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12850  fi
12851
12852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12853
12854  path="$BOOT_JDK"
12855  has_colon=`$ECHO $path | $GREP ^.:`
12856  new_path="$path"
12857  if test "x$has_colon" = x; then
12858    # Not in mixed or Windows style, start by that.
12859    new_path=`cmd //c echo $path`
12860  fi
12861
12862
12863  input_path="$new_path"
12864  # Check if we need to convert this using DOS-style short mode. If the path
12865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12866  # take no chances and rewrite it.
12867  # Note: m4 eats our [], so we need to use [ and ] instead.
12868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12869  if test "x$has_forbidden_chars" != x; then
12870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12872  fi
12873
12874
12875  windows_path="$new_path"
12876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12877    unix_path=`$CYGPATH -u "$windows_path"`
12878    new_path="$unix_path"
12879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12881    new_path="$unix_path"
12882  fi
12883
12884  if test "x$path" != "x$new_path"; then
12885    BOOT_JDK="$new_path"
12886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12887$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12888  fi
12889
12890  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12891  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12892
12893  else
12894    # We're on a posix platform. Hooray! :)
12895    path="$BOOT_JDK"
12896
12897    if test ! -f "$path" && test ! -d "$path"; then
12898      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12899    fi
12900
12901    has_space=`$ECHO "$path" | $GREP " "`
12902    if test "x$has_space" != x; then
12903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12904$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12905      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12906    fi
12907  fi
12908
12909              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12910$as_echo_n "checking for Boot JDK... " >&6; }
12911              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12912$as_echo "$BOOT_JDK" >&6; }
12913              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12914$as_echo_n "checking Boot JDK version... " >&6; }
12915              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12916              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12917$as_echo "$BOOT_JDK_VERSION" >&6; }
12918            fi # end check jdk version
12919          fi # end check rt.jar
12920        fi # end check javac
12921      fi # end check java
12922    fi # end check boot jdk found
12923  fi
12924
12925
12926  if test "x$BOOT_JDK_FOUND" = xno; then
12927    # Now execute the test
12928
12929  if test "x$PROGRAMFILES" != x; then
12930    VIRTUAL_DIR="$PROGRAMFILES/Java"
12931
12932  windows_path="$VIRTUAL_DIR"
12933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12934    unix_path=`$CYGPATH -u "$windows_path"`
12935    VIRTUAL_DIR="$unix_path"
12936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12938    VIRTUAL_DIR="$unix_path"
12939  fi
12940
12941
12942  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12943  BOOT_JDK_SUFFIX=""
12944  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12945  if test "x$ALL_JDKS_FOUND" != x; then
12946    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12947
12948  if test "x$BOOT_JDK_FOUND" = xno; then
12949    # Now execute the test
12950
12951        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12952        if test -d "$BOOT_JDK"; then
12953          BOOT_JDK_FOUND=maybe
12954          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12955$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12956        fi
12957
12958
12959    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12960    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12961      # Do we have a bin/java?
12962      if test ! -x "$BOOT_JDK/bin/java"; then
12963        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12964$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12965        BOOT_JDK_FOUND=no
12966      else
12967        # Do we have a bin/javac?
12968        if test ! -x "$BOOT_JDK/bin/javac"; then
12969          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12970$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12971          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12972$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12973          BOOT_JDK_FOUND=no
12974        else
12975          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12976          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12977            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12978$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12979            BOOT_JDK_FOUND=no
12980          else
12981            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12982            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12983
12984            # Extra M4 quote needed to protect [] in grep expression.
12985            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12986            if test "x$FOUND_VERSION_78" = x; then
12987              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12989              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12990$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12991              BOOT_JDK_FOUND=no
12992            else
12993              # We're done! :-)
12994              BOOT_JDK_FOUND=yes
12995
12996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12997
12998  # Input might be given as Windows format, start by converting to
12999  # unix format.
13000  path="$BOOT_JDK"
13001  new_path=`$CYGPATH -u "$path"`
13002
13003  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13004  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13005  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13006  # "foo.exe" is OK but "foo" is an error.
13007  #
13008  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13009  # It is also a way to make sure we got the proper file name for the real test later on.
13010  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13011  if test "x$test_shortpath" = x; then
13012    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13013$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13014    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13015  fi
13016
13017  # Call helper function which possibly converts this using DOS-style short mode.
13018  # If so, the updated path is stored in $new_path.
13019
13020  input_path="$new_path"
13021  # Check if we need to convert this using DOS-style short mode. If the path
13022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13023  # take no chances and rewrite it.
13024  # Note: m4 eats our [], so we need to use [ and ] instead.
13025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13026  if test "x$has_forbidden_chars" != x; then
13027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13028    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13031      # Going to short mode and back again did indeed matter. Since short mode is
13032      # case insensitive, let's make it lowercase to improve readability.
13033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13034      # Now convert it back to Unix-stile (cygpath)
13035      input_path=`$CYGPATH -u "$shortmode_path"`
13036      new_path="$input_path"
13037    fi
13038  fi
13039
13040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13041  if test "x$test_cygdrive_prefix" = x; then
13042    # As a simple fix, exclude /usr/bin since it's not a real path.
13043    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13045      # a path prefixed by /cygdrive for fixpath to work.
13046      new_path="$CYGWIN_ROOT_PATH$input_path"
13047    fi
13048  fi
13049
13050
13051  if test "x$path" != "x$new_path"; then
13052    BOOT_JDK="$new_path"
13053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13054$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13055  fi
13056
13057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13058
13059  path="$BOOT_JDK"
13060  has_colon=`$ECHO $path | $GREP ^.:`
13061  new_path="$path"
13062  if test "x$has_colon" = x; then
13063    # Not in mixed or Windows style, start by that.
13064    new_path=`cmd //c echo $path`
13065  fi
13066
13067
13068  input_path="$new_path"
13069  # Check if we need to convert this using DOS-style short mode. If the path
13070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13071  # take no chances and rewrite it.
13072  # Note: m4 eats our [], so we need to use [ and ] instead.
13073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13074  if test "x$has_forbidden_chars" != x; then
13075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13076    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13077  fi
13078
13079
13080  windows_path="$new_path"
13081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13082    unix_path=`$CYGPATH -u "$windows_path"`
13083    new_path="$unix_path"
13084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13086    new_path="$unix_path"
13087  fi
13088
13089  if test "x$path" != "x$new_path"; then
13090    BOOT_JDK="$new_path"
13091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13092$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13093  fi
13094
13095  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13096  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13097
13098  else
13099    # We're on a posix platform. Hooray! :)
13100    path="$BOOT_JDK"
13101
13102    if test ! -f "$path" && test ! -d "$path"; then
13103      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13104    fi
13105
13106    has_space=`$ECHO "$path" | $GREP " "`
13107    if test "x$has_space" != x; then
13108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13109$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13110      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13111    fi
13112  fi
13113
13114              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13115$as_echo_n "checking for Boot JDK... " >&6; }
13116              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13117$as_echo "$BOOT_JDK" >&6; }
13118              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13119$as_echo_n "checking Boot JDK version... " >&6; }
13120              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13121              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13122$as_echo "$BOOT_JDK_VERSION" >&6; }
13123            fi # end check jdk version
13124          fi # end check rt.jar
13125        fi # end check javac
13126      fi # end check java
13127    fi # end check boot jdk found
13128  fi
13129
13130    done
13131  fi
13132
13133  fi
13134
13135
13136    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13137    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13138      # Do we have a bin/java?
13139      if test ! -x "$BOOT_JDK/bin/java"; then
13140        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13142        BOOT_JDK_FOUND=no
13143      else
13144        # Do we have a bin/javac?
13145        if test ! -x "$BOOT_JDK/bin/javac"; then
13146          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13148          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13149$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13150          BOOT_JDK_FOUND=no
13151        else
13152          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13153          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13154            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13156            BOOT_JDK_FOUND=no
13157          else
13158            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13159            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13160
13161            # Extra M4 quote needed to protect [] in grep expression.
13162            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13163            if test "x$FOUND_VERSION_78" = x; then
13164              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13166              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13167$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13168              BOOT_JDK_FOUND=no
13169            else
13170              # We're done! :-)
13171              BOOT_JDK_FOUND=yes
13172
13173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13174
13175  # Input might be given as Windows format, start by converting to
13176  # unix format.
13177  path="$BOOT_JDK"
13178  new_path=`$CYGPATH -u "$path"`
13179
13180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13183  # "foo.exe" is OK but "foo" is an error.
13184  #
13185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13186  # It is also a way to make sure we got the proper file name for the real test later on.
13187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13188  if test "x$test_shortpath" = x; then
13189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13190$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13191    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13192  fi
13193
13194  # Call helper function which possibly converts this using DOS-style short mode.
13195  # If so, the updated path is stored in $new_path.
13196
13197  input_path="$new_path"
13198  # Check if we need to convert this using DOS-style short mode. If the path
13199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13200  # take no chances and rewrite it.
13201  # Note: m4 eats our [], so we need to use [ and ] instead.
13202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13203  if test "x$has_forbidden_chars" != x; then
13204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13208      # Going to short mode and back again did indeed matter. Since short mode is
13209      # case insensitive, let's make it lowercase to improve readability.
13210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13211      # Now convert it back to Unix-stile (cygpath)
13212      input_path=`$CYGPATH -u "$shortmode_path"`
13213      new_path="$input_path"
13214    fi
13215  fi
13216
13217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13218  if test "x$test_cygdrive_prefix" = x; then
13219    # As a simple fix, exclude /usr/bin since it's not a real path.
13220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13222      # a path prefixed by /cygdrive for fixpath to work.
13223      new_path="$CYGWIN_ROOT_PATH$input_path"
13224    fi
13225  fi
13226
13227
13228  if test "x$path" != "x$new_path"; then
13229    BOOT_JDK="$new_path"
13230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13231$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13232  fi
13233
13234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13235
13236  path="$BOOT_JDK"
13237  has_colon=`$ECHO $path | $GREP ^.:`
13238  new_path="$path"
13239  if test "x$has_colon" = x; then
13240    # Not in mixed or Windows style, start by that.
13241    new_path=`cmd //c echo $path`
13242  fi
13243
13244
13245  input_path="$new_path"
13246  # Check if we need to convert this using DOS-style short mode. If the path
13247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13248  # take no chances and rewrite it.
13249  # Note: m4 eats our [], so we need to use [ and ] instead.
13250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13251  if test "x$has_forbidden_chars" != x; then
13252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13254  fi
13255
13256
13257  windows_path="$new_path"
13258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13259    unix_path=`$CYGPATH -u "$windows_path"`
13260    new_path="$unix_path"
13261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13263    new_path="$unix_path"
13264  fi
13265
13266  if test "x$path" != "x$new_path"; then
13267    BOOT_JDK="$new_path"
13268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13269$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13270  fi
13271
13272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13274
13275  else
13276    # We're on a posix platform. Hooray! :)
13277    path="$BOOT_JDK"
13278
13279    if test ! -f "$path" && test ! -d "$path"; then
13280      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13281    fi
13282
13283    has_space=`$ECHO "$path" | $GREP " "`
13284    if test "x$has_space" != x; then
13285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13286$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13287      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13288    fi
13289  fi
13290
13291              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13292$as_echo_n "checking for Boot JDK... " >&6; }
13293              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13294$as_echo "$BOOT_JDK" >&6; }
13295              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13296$as_echo_n "checking Boot JDK version... " >&6; }
13297              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13298              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13299$as_echo "$BOOT_JDK_VERSION" >&6; }
13300            fi # end check jdk version
13301          fi # end check rt.jar
13302        fi # end check javac
13303      fi # end check java
13304    fi # end check boot jdk found
13305  fi
13306
13307
13308  if test "x$BOOT_JDK_FOUND" = xno; then
13309    # Now execute the test
13310
13311  if test "x$ProgramFiles" != x; then
13312    VIRTUAL_DIR="$ProgramFiles/Java"
13313
13314  windows_path="$VIRTUAL_DIR"
13315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13316    unix_path=`$CYGPATH -u "$windows_path"`
13317    VIRTUAL_DIR="$unix_path"
13318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13320    VIRTUAL_DIR="$unix_path"
13321  fi
13322
13323
13324  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13325  BOOT_JDK_SUFFIX=""
13326  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13327  if test "x$ALL_JDKS_FOUND" != x; then
13328    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13329
13330  if test "x$BOOT_JDK_FOUND" = xno; then
13331    # Now execute the test
13332
13333        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13334        if test -d "$BOOT_JDK"; then
13335          BOOT_JDK_FOUND=maybe
13336          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13337$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13338        fi
13339
13340
13341    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13342    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13343      # Do we have a bin/java?
13344      if test ! -x "$BOOT_JDK/bin/java"; then
13345        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13347        BOOT_JDK_FOUND=no
13348      else
13349        # Do we have a bin/javac?
13350        if test ! -x "$BOOT_JDK/bin/javac"; then
13351          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13353          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13354$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13355          BOOT_JDK_FOUND=no
13356        else
13357          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13358          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13359            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13360$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13361            BOOT_JDK_FOUND=no
13362          else
13363            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13364            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13365
13366            # Extra M4 quote needed to protect [] in grep expression.
13367            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13368            if test "x$FOUND_VERSION_78" = x; then
13369              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13371              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13372$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13373              BOOT_JDK_FOUND=no
13374            else
13375              # We're done! :-)
13376              BOOT_JDK_FOUND=yes
13377
13378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13379
13380  # Input might be given as Windows format, start by converting to
13381  # unix format.
13382  path="$BOOT_JDK"
13383  new_path=`$CYGPATH -u "$path"`
13384
13385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13388  # "foo.exe" is OK but "foo" is an error.
13389  #
13390  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13391  # It is also a way to make sure we got the proper file name for the real test later on.
13392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13393  if test "x$test_shortpath" = x; then
13394    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13395$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13396    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13397  fi
13398
13399  # Call helper function which possibly converts this using DOS-style short mode.
13400  # If so, the updated path is stored in $new_path.
13401
13402  input_path="$new_path"
13403  # Check if we need to convert this using DOS-style short mode. If the path
13404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13405  # take no chances and rewrite it.
13406  # Note: m4 eats our [], so we need to use [ and ] instead.
13407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13408  if test "x$has_forbidden_chars" != x; then
13409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13410    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13411    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13412    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13413      # Going to short mode and back again did indeed matter. Since short mode is
13414      # case insensitive, let's make it lowercase to improve readability.
13415      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13416      # Now convert it back to Unix-stile (cygpath)
13417      input_path=`$CYGPATH -u "$shortmode_path"`
13418      new_path="$input_path"
13419    fi
13420  fi
13421
13422  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13423  if test "x$test_cygdrive_prefix" = x; then
13424    # As a simple fix, exclude /usr/bin since it's not a real path.
13425    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13426      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13427      # a path prefixed by /cygdrive for fixpath to work.
13428      new_path="$CYGWIN_ROOT_PATH$input_path"
13429    fi
13430  fi
13431
13432
13433  if test "x$path" != "x$new_path"; then
13434    BOOT_JDK="$new_path"
13435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13436$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13437  fi
13438
13439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13440
13441  path="$BOOT_JDK"
13442  has_colon=`$ECHO $path | $GREP ^.:`
13443  new_path="$path"
13444  if test "x$has_colon" = x; then
13445    # Not in mixed or Windows style, start by that.
13446    new_path=`cmd //c echo $path`
13447  fi
13448
13449
13450  input_path="$new_path"
13451  # Check if we need to convert this using DOS-style short mode. If the path
13452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13453  # take no chances and rewrite it.
13454  # Note: m4 eats our [], so we need to use [ and ] instead.
13455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13456  if test "x$has_forbidden_chars" != x; then
13457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13459  fi
13460
13461
13462  windows_path="$new_path"
13463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13464    unix_path=`$CYGPATH -u "$windows_path"`
13465    new_path="$unix_path"
13466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13468    new_path="$unix_path"
13469  fi
13470
13471  if test "x$path" != "x$new_path"; then
13472    BOOT_JDK="$new_path"
13473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13474$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13475  fi
13476
13477  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13478  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13479
13480  else
13481    # We're on a posix platform. Hooray! :)
13482    path="$BOOT_JDK"
13483
13484    if test ! -f "$path" && test ! -d "$path"; then
13485      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13486    fi
13487
13488    has_space=`$ECHO "$path" | $GREP " "`
13489    if test "x$has_space" != x; then
13490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13491$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13492      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13493    fi
13494  fi
13495
13496              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13497$as_echo_n "checking for Boot JDK... " >&6; }
13498              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13499$as_echo "$BOOT_JDK" >&6; }
13500              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13501$as_echo_n "checking Boot JDK version... " >&6; }
13502              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13503              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13504$as_echo "$BOOT_JDK_VERSION" >&6; }
13505            fi # end check jdk version
13506          fi # end check rt.jar
13507        fi # end check javac
13508      fi # end check java
13509    fi # end check boot jdk found
13510  fi
13511
13512    done
13513  fi
13514
13515  fi
13516
13517
13518    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13519    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13520      # Do we have a bin/java?
13521      if test ! -x "$BOOT_JDK/bin/java"; then
13522        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13524        BOOT_JDK_FOUND=no
13525      else
13526        # Do we have a bin/javac?
13527        if test ! -x "$BOOT_JDK/bin/javac"; then
13528          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13530          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13531$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13532          BOOT_JDK_FOUND=no
13533        else
13534          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13535          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13536            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13537$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13538            BOOT_JDK_FOUND=no
13539          else
13540            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13541            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13542
13543            # Extra M4 quote needed to protect [] in grep expression.
13544            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13545            if test "x$FOUND_VERSION_78" = x; then
13546              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13548              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13549$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13550              BOOT_JDK_FOUND=no
13551            else
13552              # We're done! :-)
13553              BOOT_JDK_FOUND=yes
13554
13555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13556
13557  # Input might be given as Windows format, start by converting to
13558  # unix format.
13559  path="$BOOT_JDK"
13560  new_path=`$CYGPATH -u "$path"`
13561
13562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13565  # "foo.exe" is OK but "foo" is an error.
13566  #
13567  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13568  # It is also a way to make sure we got the proper file name for the real test later on.
13569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13570  if test "x$test_shortpath" = x; then
13571    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13572$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13573    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13574  fi
13575
13576  # Call helper function which possibly converts this using DOS-style short mode.
13577  # If so, the updated path is stored in $new_path.
13578
13579  input_path="$new_path"
13580  # Check if we need to convert this using DOS-style short mode. If the path
13581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13582  # take no chances and rewrite it.
13583  # Note: m4 eats our [], so we need to use [ and ] instead.
13584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13585  if test "x$has_forbidden_chars" != x; then
13586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13590      # Going to short mode and back again did indeed matter. Since short mode is
13591      # case insensitive, let's make it lowercase to improve readability.
13592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13593      # Now convert it back to Unix-stile (cygpath)
13594      input_path=`$CYGPATH -u "$shortmode_path"`
13595      new_path="$input_path"
13596    fi
13597  fi
13598
13599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13600  if test "x$test_cygdrive_prefix" = x; then
13601    # As a simple fix, exclude /usr/bin since it's not a real path.
13602    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13604      # a path prefixed by /cygdrive for fixpath to work.
13605      new_path="$CYGWIN_ROOT_PATH$input_path"
13606    fi
13607  fi
13608
13609
13610  if test "x$path" != "x$new_path"; then
13611    BOOT_JDK="$new_path"
13612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13613$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13614  fi
13615
13616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13617
13618  path="$BOOT_JDK"
13619  has_colon=`$ECHO $path | $GREP ^.:`
13620  new_path="$path"
13621  if test "x$has_colon" = x; then
13622    # Not in mixed or Windows style, start by that.
13623    new_path=`cmd //c echo $path`
13624  fi
13625
13626
13627  input_path="$new_path"
13628  # Check if we need to convert this using DOS-style short mode. If the path
13629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13630  # take no chances and rewrite it.
13631  # Note: m4 eats our [], so we need to use [ and ] instead.
13632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13633  if test "x$has_forbidden_chars" != x; then
13634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13636  fi
13637
13638
13639  windows_path="$new_path"
13640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13641    unix_path=`$CYGPATH -u "$windows_path"`
13642    new_path="$unix_path"
13643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13645    new_path="$unix_path"
13646  fi
13647
13648  if test "x$path" != "x$new_path"; then
13649    BOOT_JDK="$new_path"
13650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13651$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13652  fi
13653
13654  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13655  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13656
13657  else
13658    # We're on a posix platform. Hooray! :)
13659    path="$BOOT_JDK"
13660
13661    if test ! -f "$path" && test ! -d "$path"; then
13662      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13663    fi
13664
13665    has_space=`$ECHO "$path" | $GREP " "`
13666    if test "x$has_space" != x; then
13667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13668$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13669      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13670    fi
13671  fi
13672
13673              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13674$as_echo_n "checking for Boot JDK... " >&6; }
13675              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13676$as_echo "$BOOT_JDK" >&6; }
13677              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13678$as_echo_n "checking Boot JDK version... " >&6; }
13679              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13680              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13681$as_echo "$BOOT_JDK_VERSION" >&6; }
13682            fi # end check jdk version
13683          fi # end check rt.jar
13684        fi # end check javac
13685      fi # end check java
13686    fi # end check boot jdk found
13687  fi
13688
13689
13690  if test "x$BOOT_JDK_FOUND" = xno; then
13691    # Now execute the test
13692
13693  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13694  BOOT_JDK_SUFFIX=""
13695  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13696  if test "x$ALL_JDKS_FOUND" != x; then
13697    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13698
13699  if test "x$BOOT_JDK_FOUND" = xno; then
13700    # Now execute the test
13701
13702        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13703        if test -d "$BOOT_JDK"; then
13704          BOOT_JDK_FOUND=maybe
13705          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13706$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13707        fi
13708
13709
13710    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13711    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13712      # Do we have a bin/java?
13713      if test ! -x "$BOOT_JDK/bin/java"; then
13714        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13716        BOOT_JDK_FOUND=no
13717      else
13718        # Do we have a bin/javac?
13719        if test ! -x "$BOOT_JDK/bin/javac"; then
13720          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13721$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13722          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13723$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13724          BOOT_JDK_FOUND=no
13725        else
13726          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13727          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13728            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13730            BOOT_JDK_FOUND=no
13731          else
13732            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13733            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13734
13735            # Extra M4 quote needed to protect [] in grep expression.
13736            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13737            if test "x$FOUND_VERSION_78" = x; then
13738              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13739$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13740              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13741$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13742              BOOT_JDK_FOUND=no
13743            else
13744              # We're done! :-)
13745              BOOT_JDK_FOUND=yes
13746
13747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13748
13749  # Input might be given as Windows format, start by converting to
13750  # unix format.
13751  path="$BOOT_JDK"
13752  new_path=`$CYGPATH -u "$path"`
13753
13754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13757  # "foo.exe" is OK but "foo" is an error.
13758  #
13759  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13760  # It is also a way to make sure we got the proper file name for the real test later on.
13761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13762  if test "x$test_shortpath" = x; then
13763    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13764$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13765    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13766  fi
13767
13768  # Call helper function which possibly converts this using DOS-style short mode.
13769  # If so, the updated path is stored in $new_path.
13770
13771  input_path="$new_path"
13772  # Check if we need to convert this using DOS-style short mode. If the path
13773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13774  # take no chances and rewrite it.
13775  # Note: m4 eats our [], so we need to use [ and ] instead.
13776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13777  if test "x$has_forbidden_chars" != x; then
13778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13782      # Going to short mode and back again did indeed matter. Since short mode is
13783      # case insensitive, let's make it lowercase to improve readability.
13784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13785      # Now convert it back to Unix-stile (cygpath)
13786      input_path=`$CYGPATH -u "$shortmode_path"`
13787      new_path="$input_path"
13788    fi
13789  fi
13790
13791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13792  if test "x$test_cygdrive_prefix" = x; then
13793    # As a simple fix, exclude /usr/bin since it's not a real path.
13794    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13796      # a path prefixed by /cygdrive for fixpath to work.
13797      new_path="$CYGWIN_ROOT_PATH$input_path"
13798    fi
13799  fi
13800
13801
13802  if test "x$path" != "x$new_path"; then
13803    BOOT_JDK="$new_path"
13804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13805$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13806  fi
13807
13808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13809
13810  path="$BOOT_JDK"
13811  has_colon=`$ECHO $path | $GREP ^.:`
13812  new_path="$path"
13813  if test "x$has_colon" = x; then
13814    # Not in mixed or Windows style, start by that.
13815    new_path=`cmd //c echo $path`
13816  fi
13817
13818
13819  input_path="$new_path"
13820  # Check if we need to convert this using DOS-style short mode. If the path
13821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13822  # take no chances and rewrite it.
13823  # Note: m4 eats our [], so we need to use [ and ] instead.
13824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13825  if test "x$has_forbidden_chars" != x; then
13826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13828  fi
13829
13830
13831  windows_path="$new_path"
13832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13833    unix_path=`$CYGPATH -u "$windows_path"`
13834    new_path="$unix_path"
13835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13837    new_path="$unix_path"
13838  fi
13839
13840  if test "x$path" != "x$new_path"; then
13841    BOOT_JDK="$new_path"
13842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13843$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13844  fi
13845
13846  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13847  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13848
13849  else
13850    # We're on a posix platform. Hooray! :)
13851    path="$BOOT_JDK"
13852
13853    if test ! -f "$path" && test ! -d "$path"; then
13854      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13855    fi
13856
13857    has_space=`$ECHO "$path" | $GREP " "`
13858    if test "x$has_space" != x; then
13859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13860$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13861      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13862    fi
13863  fi
13864
13865              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13866$as_echo_n "checking for Boot JDK... " >&6; }
13867              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13868$as_echo "$BOOT_JDK" >&6; }
13869              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13870$as_echo_n "checking Boot JDK version... " >&6; }
13871              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13872              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13873$as_echo "$BOOT_JDK_VERSION" >&6; }
13874            fi # end check jdk version
13875          fi # end check rt.jar
13876        fi # end check javac
13877      fi # end check java
13878    fi # end check boot jdk found
13879  fi
13880
13881    done
13882  fi
13883
13884
13885    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13886    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13887      # Do we have a bin/java?
13888      if test ! -x "$BOOT_JDK/bin/java"; then
13889        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13890$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13891        BOOT_JDK_FOUND=no
13892      else
13893        # Do we have a bin/javac?
13894        if test ! -x "$BOOT_JDK/bin/javac"; then
13895          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13896$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13897          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13898$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13899          BOOT_JDK_FOUND=no
13900        else
13901          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13902          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13903            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13905            BOOT_JDK_FOUND=no
13906          else
13907            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13908            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13909
13910            # Extra M4 quote needed to protect [] in grep expression.
13911            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13912            if test "x$FOUND_VERSION_78" = x; then
13913              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13914$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13915              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13916$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13917              BOOT_JDK_FOUND=no
13918            else
13919              # We're done! :-)
13920              BOOT_JDK_FOUND=yes
13921
13922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13923
13924  # Input might be given as Windows format, start by converting to
13925  # unix format.
13926  path="$BOOT_JDK"
13927  new_path=`$CYGPATH -u "$path"`
13928
13929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13932  # "foo.exe" is OK but "foo" is an error.
13933  #
13934  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13935  # It is also a way to make sure we got the proper file name for the real test later on.
13936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13937  if test "x$test_shortpath" = x; then
13938    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13939$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13940    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13941  fi
13942
13943  # Call helper function which possibly converts this using DOS-style short mode.
13944  # If so, the updated path is stored in $new_path.
13945
13946  input_path="$new_path"
13947  # Check if we need to convert this using DOS-style short mode. If the path
13948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13949  # take no chances and rewrite it.
13950  # Note: m4 eats our [], so we need to use [ and ] instead.
13951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13952  if test "x$has_forbidden_chars" != x; then
13953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13957      # Going to short mode and back again did indeed matter. Since short mode is
13958      # case insensitive, let's make it lowercase to improve readability.
13959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13960      # Now convert it back to Unix-stile (cygpath)
13961      input_path=`$CYGPATH -u "$shortmode_path"`
13962      new_path="$input_path"
13963    fi
13964  fi
13965
13966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13967  if test "x$test_cygdrive_prefix" = x; then
13968    # As a simple fix, exclude /usr/bin since it's not a real path.
13969    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13971      # a path prefixed by /cygdrive for fixpath to work.
13972      new_path="$CYGWIN_ROOT_PATH$input_path"
13973    fi
13974  fi
13975
13976
13977  if test "x$path" != "x$new_path"; then
13978    BOOT_JDK="$new_path"
13979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13980$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13981  fi
13982
13983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13984
13985  path="$BOOT_JDK"
13986  has_colon=`$ECHO $path | $GREP ^.:`
13987  new_path="$path"
13988  if test "x$has_colon" = x; then
13989    # Not in mixed or Windows style, start by that.
13990    new_path=`cmd //c echo $path`
13991  fi
13992
13993
13994  input_path="$new_path"
13995  # Check if we need to convert this using DOS-style short mode. If the path
13996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13997  # take no chances and rewrite it.
13998  # Note: m4 eats our [], so we need to use [ and ] instead.
13999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14000  if test "x$has_forbidden_chars" != x; then
14001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14003  fi
14004
14005
14006  windows_path="$new_path"
14007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14008    unix_path=`$CYGPATH -u "$windows_path"`
14009    new_path="$unix_path"
14010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14012    new_path="$unix_path"
14013  fi
14014
14015  if test "x$path" != "x$new_path"; then
14016    BOOT_JDK="$new_path"
14017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14018$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14019  fi
14020
14021  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14022  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14023
14024  else
14025    # We're on a posix platform. Hooray! :)
14026    path="$BOOT_JDK"
14027
14028    if test ! -f "$path" && test ! -d "$path"; then
14029      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14030    fi
14031
14032    has_space=`$ECHO "$path" | $GREP " "`
14033    if test "x$has_space" != x; then
14034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14036      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14037    fi
14038  fi
14039
14040              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14041$as_echo_n "checking for Boot JDK... " >&6; }
14042              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14043$as_echo "$BOOT_JDK" >&6; }
14044              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14045$as_echo_n "checking Boot JDK version... " >&6; }
14046              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14047              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14048$as_echo "$BOOT_JDK_VERSION" >&6; }
14049            fi # end check jdk version
14050          fi # end check rt.jar
14051        fi # end check javac
14052      fi # end check java
14053    fi # end check boot jdk found
14054  fi
14055
14056  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14057
14058  if test "x$BOOT_JDK_FOUND" = xno; then
14059    # Now execute the test
14060
14061  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14062  BOOT_JDK_SUFFIX="/Contents/Home"
14063  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14064  if test "x$ALL_JDKS_FOUND" != x; then
14065    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14066
14067  if test "x$BOOT_JDK_FOUND" = xno; then
14068    # Now execute the test
14069
14070        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14071        if test -d "$BOOT_JDK"; then
14072          BOOT_JDK_FOUND=maybe
14073          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14074$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14075        fi
14076
14077
14078    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14079    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14080      # Do we have a bin/java?
14081      if test ! -x "$BOOT_JDK/bin/java"; then
14082        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14083$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14084        BOOT_JDK_FOUND=no
14085      else
14086        # Do we have a bin/javac?
14087        if test ! -x "$BOOT_JDK/bin/javac"; then
14088          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14089$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14090          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14091$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14092          BOOT_JDK_FOUND=no
14093        else
14094          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14095          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14096            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14097$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14098            BOOT_JDK_FOUND=no
14099          else
14100            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14101            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14102
14103            # Extra M4 quote needed to protect [] in grep expression.
14104            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14105            if test "x$FOUND_VERSION_78" = x; then
14106              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14107$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14108              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14109$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14110              BOOT_JDK_FOUND=no
14111            else
14112              # We're done! :-)
14113              BOOT_JDK_FOUND=yes
14114
14115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14116
14117  # Input might be given as Windows format, start by converting to
14118  # unix format.
14119  path="$BOOT_JDK"
14120  new_path=`$CYGPATH -u "$path"`
14121
14122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14125  # "foo.exe" is OK but "foo" is an error.
14126  #
14127  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14128  # It is also a way to make sure we got the proper file name for the real test later on.
14129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14130  if test "x$test_shortpath" = x; then
14131    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14132$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14133    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14134  fi
14135
14136  # Call helper function which possibly converts this using DOS-style short mode.
14137  # If so, the updated path is stored in $new_path.
14138
14139  input_path="$new_path"
14140  # Check if we need to convert this using DOS-style short mode. If the path
14141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14142  # take no chances and rewrite it.
14143  # Note: m4 eats our [], so we need to use [ and ] instead.
14144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14145  if test "x$has_forbidden_chars" != x; then
14146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14150      # Going to short mode and back again did indeed matter. Since short mode is
14151      # case insensitive, let's make it lowercase to improve readability.
14152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14153      # Now convert it back to Unix-stile (cygpath)
14154      input_path=`$CYGPATH -u "$shortmode_path"`
14155      new_path="$input_path"
14156    fi
14157  fi
14158
14159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14160  if test "x$test_cygdrive_prefix" = x; then
14161    # As a simple fix, exclude /usr/bin since it's not a real path.
14162    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14164      # a path prefixed by /cygdrive for fixpath to work.
14165      new_path="$CYGWIN_ROOT_PATH$input_path"
14166    fi
14167  fi
14168
14169
14170  if test "x$path" != "x$new_path"; then
14171    BOOT_JDK="$new_path"
14172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14173$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14174  fi
14175
14176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14177
14178  path="$BOOT_JDK"
14179  has_colon=`$ECHO $path | $GREP ^.:`
14180  new_path="$path"
14181  if test "x$has_colon" = x; then
14182    # Not in mixed or Windows style, start by that.
14183    new_path=`cmd //c echo $path`
14184  fi
14185
14186
14187  input_path="$new_path"
14188  # Check if we need to convert this using DOS-style short mode. If the path
14189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14190  # take no chances and rewrite it.
14191  # Note: m4 eats our [], so we need to use [ and ] instead.
14192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14193  if test "x$has_forbidden_chars" != x; then
14194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14195    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14196  fi
14197
14198
14199  windows_path="$new_path"
14200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14201    unix_path=`$CYGPATH -u "$windows_path"`
14202    new_path="$unix_path"
14203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14205    new_path="$unix_path"
14206  fi
14207
14208  if test "x$path" != "x$new_path"; then
14209    BOOT_JDK="$new_path"
14210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14211$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14212  fi
14213
14214  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14215  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14216
14217  else
14218    # We're on a posix platform. Hooray! :)
14219    path="$BOOT_JDK"
14220
14221    if test ! -f "$path" && test ! -d "$path"; then
14222      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14223    fi
14224
14225    has_space=`$ECHO "$path" | $GREP " "`
14226    if test "x$has_space" != x; then
14227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14228$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14229      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14230    fi
14231  fi
14232
14233              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14234$as_echo_n "checking for Boot JDK... " >&6; }
14235              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14236$as_echo "$BOOT_JDK" >&6; }
14237              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14238$as_echo_n "checking Boot JDK version... " >&6; }
14239              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14240              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14241$as_echo "$BOOT_JDK_VERSION" >&6; }
14242            fi # end check jdk version
14243          fi # end check rt.jar
14244        fi # end check javac
14245      fi # end check java
14246    fi # end check boot jdk found
14247  fi
14248
14249    done
14250  fi
14251
14252
14253    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14254    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14255      # Do we have a bin/java?
14256      if test ! -x "$BOOT_JDK/bin/java"; then
14257        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14259        BOOT_JDK_FOUND=no
14260      else
14261        # Do we have a bin/javac?
14262        if test ! -x "$BOOT_JDK/bin/javac"; then
14263          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14265          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14266$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14267          BOOT_JDK_FOUND=no
14268        else
14269          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14270          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14271            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14273            BOOT_JDK_FOUND=no
14274          else
14275            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14276            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14277
14278            # Extra M4 quote needed to protect [] in grep expression.
14279            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14280            if test "x$FOUND_VERSION_78" = x; then
14281              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14283              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14284$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14285              BOOT_JDK_FOUND=no
14286            else
14287              # We're done! :-)
14288              BOOT_JDK_FOUND=yes
14289
14290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14291
14292  # Input might be given as Windows format, start by converting to
14293  # unix format.
14294  path="$BOOT_JDK"
14295  new_path=`$CYGPATH -u "$path"`
14296
14297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14300  # "foo.exe" is OK but "foo" is an error.
14301  #
14302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14303  # It is also a way to make sure we got the proper file name for the real test later on.
14304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14305  if test "x$test_shortpath" = x; then
14306    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14308    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14309  fi
14310
14311  # Call helper function which possibly converts this using DOS-style short mode.
14312  # If so, the updated path is stored in $new_path.
14313
14314  input_path="$new_path"
14315  # Check if we need to convert this using DOS-style short mode. If the path
14316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14317  # take no chances and rewrite it.
14318  # Note: m4 eats our [], so we need to use [ and ] instead.
14319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14320  if test "x$has_forbidden_chars" != x; then
14321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14325      # Going to short mode and back again did indeed matter. Since short mode is
14326      # case insensitive, let's make it lowercase to improve readability.
14327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14328      # Now convert it back to Unix-stile (cygpath)
14329      input_path=`$CYGPATH -u "$shortmode_path"`
14330      new_path="$input_path"
14331    fi
14332  fi
14333
14334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14335  if test "x$test_cygdrive_prefix" = x; then
14336    # As a simple fix, exclude /usr/bin since it's not a real path.
14337    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14339      # a path prefixed by /cygdrive for fixpath to work.
14340      new_path="$CYGWIN_ROOT_PATH$input_path"
14341    fi
14342  fi
14343
14344
14345  if test "x$path" != "x$new_path"; then
14346    BOOT_JDK="$new_path"
14347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14348$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14349  fi
14350
14351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14352
14353  path="$BOOT_JDK"
14354  has_colon=`$ECHO $path | $GREP ^.:`
14355  new_path="$path"
14356  if test "x$has_colon" = x; then
14357    # Not in mixed or Windows style, start by that.
14358    new_path=`cmd //c echo $path`
14359  fi
14360
14361
14362  input_path="$new_path"
14363  # Check if we need to convert this using DOS-style short mode. If the path
14364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14365  # take no chances and rewrite it.
14366  # Note: m4 eats our [], so we need to use [ and ] instead.
14367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14368  if test "x$has_forbidden_chars" != x; then
14369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14371  fi
14372
14373
14374  windows_path="$new_path"
14375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14376    unix_path=`$CYGPATH -u "$windows_path"`
14377    new_path="$unix_path"
14378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14380    new_path="$unix_path"
14381  fi
14382
14383  if test "x$path" != "x$new_path"; then
14384    BOOT_JDK="$new_path"
14385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14386$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14387  fi
14388
14389  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14390  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14391
14392  else
14393    # We're on a posix platform. Hooray! :)
14394    path="$BOOT_JDK"
14395
14396    if test ! -f "$path" && test ! -d "$path"; then
14397      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14398    fi
14399
14400    has_space=`$ECHO "$path" | $GREP " "`
14401    if test "x$has_space" != x; then
14402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14403$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14404      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14405    fi
14406  fi
14407
14408              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14409$as_echo_n "checking for Boot JDK... " >&6; }
14410              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14411$as_echo "$BOOT_JDK" >&6; }
14412              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14413$as_echo_n "checking Boot JDK version... " >&6; }
14414              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14415              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14416$as_echo "$BOOT_JDK_VERSION" >&6; }
14417            fi # end check jdk version
14418          fi # end check rt.jar
14419        fi # end check javac
14420      fi # end check java
14421    fi # end check boot jdk found
14422  fi
14423
14424
14425  if test "x$BOOT_JDK_FOUND" = xno; then
14426    # Now execute the test
14427
14428  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14429  BOOT_JDK_SUFFIX="/Contents/Home"
14430  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14431  if test "x$ALL_JDKS_FOUND" != x; then
14432    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14433
14434  if test "x$BOOT_JDK_FOUND" = xno; then
14435    # Now execute the test
14436
14437        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14438        if test -d "$BOOT_JDK"; then
14439          BOOT_JDK_FOUND=maybe
14440          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14441$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14442        fi
14443
14444
14445    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14446    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14447      # Do we have a bin/java?
14448      if test ! -x "$BOOT_JDK/bin/java"; then
14449        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14451        BOOT_JDK_FOUND=no
14452      else
14453        # Do we have a bin/javac?
14454        if test ! -x "$BOOT_JDK/bin/javac"; then
14455          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14456$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14457          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14458$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14459          BOOT_JDK_FOUND=no
14460        else
14461          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14462          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14463            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14464$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14465            BOOT_JDK_FOUND=no
14466          else
14467            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14468            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14469
14470            # Extra M4 quote needed to protect [] in grep expression.
14471            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14472            if test "x$FOUND_VERSION_78" = x; then
14473              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14475              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14476$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14477              BOOT_JDK_FOUND=no
14478            else
14479              # We're done! :-)
14480              BOOT_JDK_FOUND=yes
14481
14482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14483
14484  # Input might be given as Windows format, start by converting to
14485  # unix format.
14486  path="$BOOT_JDK"
14487  new_path=`$CYGPATH -u "$path"`
14488
14489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14492  # "foo.exe" is OK but "foo" is an error.
14493  #
14494  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14495  # It is also a way to make sure we got the proper file name for the real test later on.
14496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14497  if test "x$test_shortpath" = x; then
14498    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14499$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14500    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14501  fi
14502
14503  # Call helper function which possibly converts this using DOS-style short mode.
14504  # If so, the updated path is stored in $new_path.
14505
14506  input_path="$new_path"
14507  # Check if we need to convert this using DOS-style short mode. If the path
14508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14509  # take no chances and rewrite it.
14510  # Note: m4 eats our [], so we need to use [ and ] instead.
14511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14512  if test "x$has_forbidden_chars" != x; then
14513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14517      # Going to short mode and back again did indeed matter. Since short mode is
14518      # case insensitive, let's make it lowercase to improve readability.
14519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14520      # Now convert it back to Unix-stile (cygpath)
14521      input_path=`$CYGPATH -u "$shortmode_path"`
14522      new_path="$input_path"
14523    fi
14524  fi
14525
14526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14527  if test "x$test_cygdrive_prefix" = x; then
14528    # As a simple fix, exclude /usr/bin since it's not a real path.
14529    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14531      # a path prefixed by /cygdrive for fixpath to work.
14532      new_path="$CYGWIN_ROOT_PATH$input_path"
14533    fi
14534  fi
14535
14536
14537  if test "x$path" != "x$new_path"; then
14538    BOOT_JDK="$new_path"
14539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14540$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14541  fi
14542
14543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14544
14545  path="$BOOT_JDK"
14546  has_colon=`$ECHO $path | $GREP ^.:`
14547  new_path="$path"
14548  if test "x$has_colon" = x; then
14549    # Not in mixed or Windows style, start by that.
14550    new_path=`cmd //c echo $path`
14551  fi
14552
14553
14554  input_path="$new_path"
14555  # Check if we need to convert this using DOS-style short mode. If the path
14556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14557  # take no chances and rewrite it.
14558  # Note: m4 eats our [], so we need to use [ and ] instead.
14559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14560  if test "x$has_forbidden_chars" != x; then
14561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14563  fi
14564
14565
14566  windows_path="$new_path"
14567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14568    unix_path=`$CYGPATH -u "$windows_path"`
14569    new_path="$unix_path"
14570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14572    new_path="$unix_path"
14573  fi
14574
14575  if test "x$path" != "x$new_path"; then
14576    BOOT_JDK="$new_path"
14577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14578$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14579  fi
14580
14581  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14582  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14583
14584  else
14585    # We're on a posix platform. Hooray! :)
14586    path="$BOOT_JDK"
14587
14588    if test ! -f "$path" && test ! -d "$path"; then
14589      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14590    fi
14591
14592    has_space=`$ECHO "$path" | $GREP " "`
14593    if test "x$has_space" != x; then
14594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14595$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14596      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14597    fi
14598  fi
14599
14600              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14601$as_echo_n "checking for Boot JDK... " >&6; }
14602              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14603$as_echo "$BOOT_JDK" >&6; }
14604              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14605$as_echo_n "checking Boot JDK version... " >&6; }
14606              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14607              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14608$as_echo "$BOOT_JDK_VERSION" >&6; }
14609            fi # end check jdk version
14610          fi # end check rt.jar
14611        fi # end check javac
14612      fi # end check java
14613    fi # end check boot jdk found
14614  fi
14615
14616    done
14617  fi
14618
14619
14620    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14621    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14622      # Do we have a bin/java?
14623      if test ! -x "$BOOT_JDK/bin/java"; then
14624        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14626        BOOT_JDK_FOUND=no
14627      else
14628        # Do we have a bin/javac?
14629        if test ! -x "$BOOT_JDK/bin/javac"; then
14630          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14632          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14633$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14634          BOOT_JDK_FOUND=no
14635        else
14636          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14637          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14638            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14640            BOOT_JDK_FOUND=no
14641          else
14642            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14643            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14644
14645            # Extra M4 quote needed to protect [] in grep expression.
14646            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14647            if test "x$FOUND_VERSION_78" = x; then
14648              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14650              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14651$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14652              BOOT_JDK_FOUND=no
14653            else
14654              # We're done! :-)
14655              BOOT_JDK_FOUND=yes
14656
14657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14658
14659  # Input might be given as Windows format, start by converting to
14660  # unix format.
14661  path="$BOOT_JDK"
14662  new_path=`$CYGPATH -u "$path"`
14663
14664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14667  # "foo.exe" is OK but "foo" is an error.
14668  #
14669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14670  # It is also a way to make sure we got the proper file name for the real test later on.
14671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14672  if test "x$test_shortpath" = x; then
14673    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14674$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14675    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14676  fi
14677
14678  # Call helper function which possibly converts this using DOS-style short mode.
14679  # If so, the updated path is stored in $new_path.
14680
14681  input_path="$new_path"
14682  # Check if we need to convert this using DOS-style short mode. If the path
14683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14684  # take no chances and rewrite it.
14685  # Note: m4 eats our [], so we need to use [ and ] instead.
14686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14687  if test "x$has_forbidden_chars" != x; then
14688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14692      # Going to short mode and back again did indeed matter. Since short mode is
14693      # case insensitive, let's make it lowercase to improve readability.
14694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14695      # Now convert it back to Unix-stile (cygpath)
14696      input_path=`$CYGPATH -u "$shortmode_path"`
14697      new_path="$input_path"
14698    fi
14699  fi
14700
14701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14702  if test "x$test_cygdrive_prefix" = x; then
14703    # As a simple fix, exclude /usr/bin since it's not a real path.
14704    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14706      # a path prefixed by /cygdrive for fixpath to work.
14707      new_path="$CYGWIN_ROOT_PATH$input_path"
14708    fi
14709  fi
14710
14711
14712  if test "x$path" != "x$new_path"; then
14713    BOOT_JDK="$new_path"
14714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14715$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14716  fi
14717
14718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14719
14720  path="$BOOT_JDK"
14721  has_colon=`$ECHO $path | $GREP ^.:`
14722  new_path="$path"
14723  if test "x$has_colon" = x; then
14724    # Not in mixed or Windows style, start by that.
14725    new_path=`cmd //c echo $path`
14726  fi
14727
14728
14729  input_path="$new_path"
14730  # Check if we need to convert this using DOS-style short mode. If the path
14731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14732  # take no chances and rewrite it.
14733  # Note: m4 eats our [], so we need to use [ and ] instead.
14734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14735  if test "x$has_forbidden_chars" != x; then
14736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14738  fi
14739
14740
14741  windows_path="$new_path"
14742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14743    unix_path=`$CYGPATH -u "$windows_path"`
14744    new_path="$unix_path"
14745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14747    new_path="$unix_path"
14748  fi
14749
14750  if test "x$path" != "x$new_path"; then
14751    BOOT_JDK="$new_path"
14752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14753$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14754  fi
14755
14756  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14757  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14758
14759  else
14760    # We're on a posix platform. Hooray! :)
14761    path="$BOOT_JDK"
14762
14763    if test ! -f "$path" && test ! -d "$path"; then
14764      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14765    fi
14766
14767    has_space=`$ECHO "$path" | $GREP " "`
14768    if test "x$has_space" != x; then
14769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14770$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14771      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14772    fi
14773  fi
14774
14775              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14776$as_echo_n "checking for Boot JDK... " >&6; }
14777              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14778$as_echo "$BOOT_JDK" >&6; }
14779              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14780$as_echo_n "checking Boot JDK version... " >&6; }
14781              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14782              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14783$as_echo "$BOOT_JDK_VERSION" >&6; }
14784            fi # end check jdk version
14785          fi # end check rt.jar
14786        fi # end check javac
14787      fi # end check java
14788    fi # end check boot jdk found
14789  fi
14790
14791  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14792
14793  if test "x$BOOT_JDK_FOUND" = xno; then
14794    # Now execute the test
14795
14796  BOOT_JDK_PREFIX="/usr/lib/jvm"
14797  BOOT_JDK_SUFFIX=""
14798  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14799  if test "x$ALL_JDKS_FOUND" != x; then
14800    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14801
14802  if test "x$BOOT_JDK_FOUND" = xno; then
14803    # Now execute the test
14804
14805        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14806        if test -d "$BOOT_JDK"; then
14807          BOOT_JDK_FOUND=maybe
14808          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14809$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14810        fi
14811
14812
14813    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14814    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14815      # Do we have a bin/java?
14816      if test ! -x "$BOOT_JDK/bin/java"; then
14817        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14819        BOOT_JDK_FOUND=no
14820      else
14821        # Do we have a bin/javac?
14822        if test ! -x "$BOOT_JDK/bin/javac"; then
14823          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14825          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14826$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14827          BOOT_JDK_FOUND=no
14828        else
14829          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14830          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14831            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14833            BOOT_JDK_FOUND=no
14834          else
14835            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14836            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14837
14838            # Extra M4 quote needed to protect [] in grep expression.
14839            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14840            if test "x$FOUND_VERSION_78" = x; then
14841              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14843              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14844$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14845              BOOT_JDK_FOUND=no
14846            else
14847              # We're done! :-)
14848              BOOT_JDK_FOUND=yes
14849
14850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14851
14852  # Input might be given as Windows format, start by converting to
14853  # unix format.
14854  path="$BOOT_JDK"
14855  new_path=`$CYGPATH -u "$path"`
14856
14857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14860  # "foo.exe" is OK but "foo" is an error.
14861  #
14862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14863  # It is also a way to make sure we got the proper file name for the real test later on.
14864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14865  if test "x$test_shortpath" = x; then
14866    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14867$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14868    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14869  fi
14870
14871  # Call helper function which possibly converts this using DOS-style short mode.
14872  # If so, the updated path is stored in $new_path.
14873
14874  input_path="$new_path"
14875  # Check if we need to convert this using DOS-style short mode. If the path
14876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14877  # take no chances and rewrite it.
14878  # Note: m4 eats our [], so we need to use [ and ] instead.
14879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14880  if test "x$has_forbidden_chars" != x; then
14881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14885      # Going to short mode and back again did indeed matter. Since short mode is
14886      # case insensitive, let's make it lowercase to improve readability.
14887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14888      # Now convert it back to Unix-stile (cygpath)
14889      input_path=`$CYGPATH -u "$shortmode_path"`
14890      new_path="$input_path"
14891    fi
14892  fi
14893
14894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14895  if test "x$test_cygdrive_prefix" = x; then
14896    # As a simple fix, exclude /usr/bin since it's not a real path.
14897    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14899      # a path prefixed by /cygdrive for fixpath to work.
14900      new_path="$CYGWIN_ROOT_PATH$input_path"
14901    fi
14902  fi
14903
14904
14905  if test "x$path" != "x$new_path"; then
14906    BOOT_JDK="$new_path"
14907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14908$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14909  fi
14910
14911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14912
14913  path="$BOOT_JDK"
14914  has_colon=`$ECHO $path | $GREP ^.:`
14915  new_path="$path"
14916  if test "x$has_colon" = x; then
14917    # Not in mixed or Windows style, start by that.
14918    new_path=`cmd //c echo $path`
14919  fi
14920
14921
14922  input_path="$new_path"
14923  # Check if we need to convert this using DOS-style short mode. If the path
14924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14925  # take no chances and rewrite it.
14926  # Note: m4 eats our [], so we need to use [ and ] instead.
14927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14928  if test "x$has_forbidden_chars" != x; then
14929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14931  fi
14932
14933
14934  windows_path="$new_path"
14935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14936    unix_path=`$CYGPATH -u "$windows_path"`
14937    new_path="$unix_path"
14938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14940    new_path="$unix_path"
14941  fi
14942
14943  if test "x$path" != "x$new_path"; then
14944    BOOT_JDK="$new_path"
14945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14946$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14947  fi
14948
14949  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14950  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14951
14952  else
14953    # We're on a posix platform. Hooray! :)
14954    path="$BOOT_JDK"
14955
14956    if test ! -f "$path" && test ! -d "$path"; then
14957      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14958    fi
14959
14960    has_space=`$ECHO "$path" | $GREP " "`
14961    if test "x$has_space" != x; then
14962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14963$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14964      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14965    fi
14966  fi
14967
14968              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14969$as_echo_n "checking for Boot JDK... " >&6; }
14970              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14971$as_echo "$BOOT_JDK" >&6; }
14972              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14973$as_echo_n "checking Boot JDK version... " >&6; }
14974              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14975              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14976$as_echo "$BOOT_JDK_VERSION" >&6; }
14977            fi # end check jdk version
14978          fi # end check rt.jar
14979        fi # end check javac
14980      fi # end check java
14981    fi # end check boot jdk found
14982  fi
14983
14984    done
14985  fi
14986
14987
14988    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14989    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14990      # Do we have a bin/java?
14991      if test ! -x "$BOOT_JDK/bin/java"; then
14992        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14994        BOOT_JDK_FOUND=no
14995      else
14996        # Do we have a bin/javac?
14997        if test ! -x "$BOOT_JDK/bin/javac"; then
14998          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15000          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15001$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15002          BOOT_JDK_FOUND=no
15003        else
15004          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15005          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15006            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15008            BOOT_JDK_FOUND=no
15009          else
15010            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15011            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15012
15013            # Extra M4 quote needed to protect [] in grep expression.
15014            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15015            if test "x$FOUND_VERSION_78" = x; then
15016              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15018              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15019$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15020              BOOT_JDK_FOUND=no
15021            else
15022              # We're done! :-)
15023              BOOT_JDK_FOUND=yes
15024
15025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15026
15027  # Input might be given as Windows format, start by converting to
15028  # unix format.
15029  path="$BOOT_JDK"
15030  new_path=`$CYGPATH -u "$path"`
15031
15032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15035  # "foo.exe" is OK but "foo" is an error.
15036  #
15037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15038  # It is also a way to make sure we got the proper file name for the real test later on.
15039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15040  if test "x$test_shortpath" = x; then
15041    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15042$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15043    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15044  fi
15045
15046  # Call helper function which possibly converts this using DOS-style short mode.
15047  # If so, the updated path is stored in $new_path.
15048
15049  input_path="$new_path"
15050  # Check if we need to convert this using DOS-style short mode. If the path
15051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15052  # take no chances and rewrite it.
15053  # Note: m4 eats our [], so we need to use [ and ] instead.
15054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15055  if test "x$has_forbidden_chars" != x; then
15056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15060      # Going to short mode and back again did indeed matter. Since short mode is
15061      # case insensitive, let's make it lowercase to improve readability.
15062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15063      # Now convert it back to Unix-stile (cygpath)
15064      input_path=`$CYGPATH -u "$shortmode_path"`
15065      new_path="$input_path"
15066    fi
15067  fi
15068
15069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15070  if test "x$test_cygdrive_prefix" = x; then
15071    # As a simple fix, exclude /usr/bin since it's not a real path.
15072    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15074      # a path prefixed by /cygdrive for fixpath to work.
15075      new_path="$CYGWIN_ROOT_PATH$input_path"
15076    fi
15077  fi
15078
15079
15080  if test "x$path" != "x$new_path"; then
15081    BOOT_JDK="$new_path"
15082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15083$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15084  fi
15085
15086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15087
15088  path="$BOOT_JDK"
15089  has_colon=`$ECHO $path | $GREP ^.:`
15090  new_path="$path"
15091  if test "x$has_colon" = x; then
15092    # Not in mixed or Windows style, start by that.
15093    new_path=`cmd //c echo $path`
15094  fi
15095
15096
15097  input_path="$new_path"
15098  # Check if we need to convert this using DOS-style short mode. If the path
15099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15100  # take no chances and rewrite it.
15101  # Note: m4 eats our [], so we need to use [ and ] instead.
15102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15103  if test "x$has_forbidden_chars" != x; then
15104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15106  fi
15107
15108
15109  windows_path="$new_path"
15110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15111    unix_path=`$CYGPATH -u "$windows_path"`
15112    new_path="$unix_path"
15113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15115    new_path="$unix_path"
15116  fi
15117
15118  if test "x$path" != "x$new_path"; then
15119    BOOT_JDK="$new_path"
15120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15121$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15122  fi
15123
15124  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15125  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15126
15127  else
15128    # We're on a posix platform. Hooray! :)
15129    path="$BOOT_JDK"
15130
15131    if test ! -f "$path" && test ! -d "$path"; then
15132      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15133    fi
15134
15135    has_space=`$ECHO "$path" | $GREP " "`
15136    if test "x$has_space" != x; then
15137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15138$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15139      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15140    fi
15141  fi
15142
15143              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15144$as_echo_n "checking for Boot JDK... " >&6; }
15145              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15146$as_echo "$BOOT_JDK" >&6; }
15147              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15148$as_echo_n "checking Boot JDK version... " >&6; }
15149              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15150              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15151$as_echo "$BOOT_JDK_VERSION" >&6; }
15152            fi # end check jdk version
15153          fi # end check rt.jar
15154        fi # end check javac
15155      fi # end check java
15156    fi # end check boot jdk found
15157  fi
15158
15159  fi
15160
15161
15162    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15163    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15164      # Do we have a bin/java?
15165      if test ! -x "$BOOT_JDK/bin/java"; then
15166        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15168        BOOT_JDK_FOUND=no
15169      else
15170        # Do we have a bin/javac?
15171        if test ! -x "$BOOT_JDK/bin/javac"; then
15172          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15174          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15175$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15176          BOOT_JDK_FOUND=no
15177        else
15178          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15179          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15180            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15182            BOOT_JDK_FOUND=no
15183          else
15184            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15185            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15186
15187            # Extra M4 quote needed to protect [] in grep expression.
15188            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15189            if test "x$FOUND_VERSION_78" = x; then
15190              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15192              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15193$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15194              BOOT_JDK_FOUND=no
15195            else
15196              # We're done! :-)
15197              BOOT_JDK_FOUND=yes
15198
15199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15200
15201  # Input might be given as Windows format, start by converting to
15202  # unix format.
15203  path="$BOOT_JDK"
15204  new_path=`$CYGPATH -u "$path"`
15205
15206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15209  # "foo.exe" is OK but "foo" is an error.
15210  #
15211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15212  # It is also a way to make sure we got the proper file name for the real test later on.
15213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15214  if test "x$test_shortpath" = x; then
15215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15217    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15218  fi
15219
15220  # Call helper function which possibly converts this using DOS-style short mode.
15221  # If so, the updated path is stored in $new_path.
15222
15223  input_path="$new_path"
15224  # Check if we need to convert this using DOS-style short mode. If the path
15225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15226  # take no chances and rewrite it.
15227  # Note: m4 eats our [], so we need to use [ and ] instead.
15228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15229  if test "x$has_forbidden_chars" != x; then
15230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15234      # Going to short mode and back again did indeed matter. Since short mode is
15235      # case insensitive, let's make it lowercase to improve readability.
15236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15237      # Now convert it back to Unix-stile (cygpath)
15238      input_path=`$CYGPATH -u "$shortmode_path"`
15239      new_path="$input_path"
15240    fi
15241  fi
15242
15243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15244  if test "x$test_cygdrive_prefix" = x; then
15245    # As a simple fix, exclude /usr/bin since it's not a real path.
15246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15248      # a path prefixed by /cygdrive for fixpath to work.
15249      new_path="$CYGWIN_ROOT_PATH$input_path"
15250    fi
15251  fi
15252
15253
15254  if test "x$path" != "x$new_path"; then
15255    BOOT_JDK="$new_path"
15256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15258  fi
15259
15260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15261
15262  path="$BOOT_JDK"
15263  has_colon=`$ECHO $path | $GREP ^.:`
15264  new_path="$path"
15265  if test "x$has_colon" = x; then
15266    # Not in mixed or Windows style, start by that.
15267    new_path=`cmd //c echo $path`
15268  fi
15269
15270
15271  input_path="$new_path"
15272  # Check if we need to convert this using DOS-style short mode. If the path
15273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15274  # take no chances and rewrite it.
15275  # Note: m4 eats our [], so we need to use [ and ] instead.
15276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15277  if test "x$has_forbidden_chars" != x; then
15278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15280  fi
15281
15282
15283  windows_path="$new_path"
15284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15285    unix_path=`$CYGPATH -u "$windows_path"`
15286    new_path="$unix_path"
15287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15289    new_path="$unix_path"
15290  fi
15291
15292  if test "x$path" != "x$new_path"; then
15293    BOOT_JDK="$new_path"
15294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15296  fi
15297
15298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15300
15301  else
15302    # We're on a posix platform. Hooray! :)
15303    path="$BOOT_JDK"
15304
15305    if test ! -f "$path" && test ! -d "$path"; then
15306      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15307    fi
15308
15309    has_space=`$ECHO "$path" | $GREP " "`
15310    if test "x$has_space" != x; then
15311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15312$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15313      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15314    fi
15315  fi
15316
15317              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15318$as_echo_n "checking for Boot JDK... " >&6; }
15319              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15320$as_echo "$BOOT_JDK" >&6; }
15321              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15322$as_echo_n "checking Boot JDK version... " >&6; }
15323              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15324              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15325$as_echo "$BOOT_JDK_VERSION" >&6; }
15326            fi # end check jdk version
15327          fi # end check rt.jar
15328        fi # end check javac
15329      fi # end check java
15330    fi # end check boot jdk found
15331  fi
15332
15333
15334# If we haven't found anything yet, we've truly lost. Give up.
15335if test "x$BOOT_JDK_FOUND" = xno; then
15336
15337    # Print a helpful message on how to acquire the necessary build dependency.
15338    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15339    MISSING_DEPENDENCY=openjdk
15340    PKGHANDLER_COMMAND=
15341
15342    case $PKGHANDLER in
15343	apt-get)
15344                apt_help     $MISSING_DEPENDENCY ;;
15345    yum)
15346                yum_help     $MISSING_DEPENDENCY ;;
15347	port)
15348                port_help    $MISSING_DEPENDENCY ;;
15349	pkgutil)
15350                pkgutil_help $MISSING_DEPENDENCY ;;
15351	pkgadd)
15352                pkgadd_help  $MISSING_DEPENDENCY ;;
15353    * )
15354      break ;;
15355    esac
15356
15357    if test "x$PKGHANDLER_COMMAND" != x; then
15358        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15359    fi
15360
15361  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15362$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15363  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15364$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15365  as_fn_error $? "Cannot continue" "$LINENO" 5
15366fi
15367
15368# Setup proper paths for what we found
15369BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15370if test ! -f "$BOOT_RTJAR"; then
15371    # On MacOSX it is called classes.jar
15372    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15373    if test -f "$BOOT_RTJAR"; then
15374      # Remove the ..
15375      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15376    fi
15377fi
15378BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15379BOOT_JDK="$BOOT_JDK"
15380
15381
15382
15383
15384# Setup tools from the Boot JDK.
15385
15386  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15387$as_echo_n "checking for java in Boot JDK... " >&6; }
15388  JAVA=$BOOT_JDK/bin/java
15389  if test ! -x $JAVA; then
15390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15391$as_echo "not found" >&6; }
15392      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15393$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15394      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15395  fi
15396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15397$as_echo "ok" >&6; }
15398
15399
15400  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15401$as_echo_n "checking for javac in Boot JDK... " >&6; }
15402  JAVAC=$BOOT_JDK/bin/javac
15403  if test ! -x $JAVAC; then
15404      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15405$as_echo "not found" >&6; }
15406      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15407$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15408      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15409  fi
15410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15411$as_echo "ok" >&6; }
15412
15413
15414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15415$as_echo_n "checking for javah in Boot JDK... " >&6; }
15416  JAVAH=$BOOT_JDK/bin/javah
15417  if test ! -x $JAVAH; then
15418      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15419$as_echo "not found" >&6; }
15420      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15421$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15422      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15423  fi
15424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15425$as_echo "ok" >&6; }
15426
15427
15428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15429$as_echo_n "checking for javap in Boot JDK... " >&6; }
15430  JAVAP=$BOOT_JDK/bin/javap
15431  if test ! -x $JAVAP; then
15432      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15433$as_echo "not found" >&6; }
15434      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15435$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15436      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15437  fi
15438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15439$as_echo "ok" >&6; }
15440
15441
15442  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15443$as_echo_n "checking for jar in Boot JDK... " >&6; }
15444  JAR=$BOOT_JDK/bin/jar
15445  if test ! -x $JAR; then
15446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15447$as_echo "not found" >&6; }
15448      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15449$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15450      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15451  fi
15452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15453$as_echo "ok" >&6; }
15454
15455
15456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15457$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15458  RMIC=$BOOT_JDK/bin/rmic
15459  if test ! -x $RMIC; then
15460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15461$as_echo "not found" >&6; }
15462      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15463$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15464      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15465  fi
15466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15467$as_echo "ok" >&6; }
15468
15469
15470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15471$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15472  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15473  if test ! -x $NATIVE2ASCII; then
15474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15475$as_echo "not found" >&6; }
15476      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15477$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15478      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15479  fi
15480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15481$as_echo "ok" >&6; }
15482
15483
15484# Finally, set some other options...
15485
15486# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15487BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15488
15489
15490
15491
15492##############################################################################
15493#
15494# Specify options for anything that is run with the Boot JDK.
15495#
15496
15497# Check whether --with-boot-jdk-jvmargs was given.
15498if test "${with_boot_jdk_jvmargs+set}" = set; then :
15499  withval=$with_boot_jdk_jvmargs;
15500fi
15501
15502
15503if test "x$with_boot_jdk_jvmargs" = x; then
15504    # Not all JVM:s accept the same arguments on the command line.
15505    # OpenJDK specific increase in thread stack for JDK build,
15506    # well more specifically, when running javac.
15507    if test "x$BUILD_NUM_BITS" = x32; then
15508       STACK_SIZE=768
15509    else
15510       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15511       # since 64-bit pointers are pushed on the stach. Apparently, we need
15512       # to increase the stack space when javacing the JDK....
15513       STACK_SIZE=1536
15514    fi
15515
15516    # Minimum amount of heap memory.
15517
15518    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15519    # If so, then append -Xms64M to boot_jdk_jvmargs
15520    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15521    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15522    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15523        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15524    fi
15525
15526    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15527        # Why does macosx need more heap? Its the huge JDK batch.
15528
15529    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15530    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15531    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15532    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15533    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15534        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15535    fi
15536
15537    else
15538
15539    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15540    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15541    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15542    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15543    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15544        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15545    fi
15546
15547    fi
15548    # When is adding -client something that speeds up the JVM?
15549    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15550
15551    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15552    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15553    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15554    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15555    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15556        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15557    fi
15558
15559
15560    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15561    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15562    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15563    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15564    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15565        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15566    fi
15567
15568
15569    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15570    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15571    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15572    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15573    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15574        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15575    fi
15576
15577    # Disable special log output when a debug build is used as Boot JDK...
15578
15579    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15580    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15581    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15582    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15583    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15584        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15585    fi
15586
15587fi
15588
15589BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15590
15591
15592
15593###############################################################################
15594#
15595# Configure the sources to use. We can add or override individual directories.
15596#
15597###############################################################################
15598
15599
15600
15601# Where are the sources. Any of these can be overridden
15602# using --with-override-corba and the likes.
15603LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15604CORBA_TOPDIR="$SRC_ROOT/corba"
15605JAXP_TOPDIR="$SRC_ROOT/jaxp"
15606JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15607HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15608JDK_TOPDIR="$SRC_ROOT/jdk"
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618###############################################################################
15619#
15620# Pickup additional source for a component from outside of the source root
15621# or override source for a component.
15622#
15623
15624# Check whether --with-add-source-root was given.
15625if test "${with_add_source_root+set}" = set; then :
15626  withval=$with_add_source_root;
15627fi
15628
15629
15630
15631# Check whether --with-override-source-root was given.
15632if test "${with_override_source_root+set}" = set; then :
15633  withval=$with_override_source_root;
15634fi
15635
15636
15637
15638# Check whether --with-adds-and-overrides was given.
15639if test "${with_adds_and_overrides+set}" = set; then :
15640  withval=$with_adds_and_overrides;
15641fi
15642
15643
15644if test "x$with_adds_and_overrides" != x; then
15645    with_add_source_root="$with_adds_and_overrides/adds"
15646    with_override_source_root="$with_adds_and_overrides/overrides"
15647fi
15648
15649if test "x$with_add_source_root" != x; then
15650    if ! test -d $with_add_source_root; then
15651       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15652    fi
15653    CURDIR="$PWD"
15654    cd "$with_add_source_root"
15655    ADD_SRC_ROOT="`pwd`"
15656    cd "$CURDIR"
15657    # Verify that the addon source root does not have any root makefiles.
15658    # If it does, then it is usually an error, prevent this.
15659    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15660       test -f $with_add_source_root/langtools/make/Makefile; then
15661        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
15662    fi
15663    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15664       test -f $with_add_source_root/corba/make/Makefile; then
15665        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
15666    fi
15667    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15668       test -f $with_add_source_root/jaxp/make/Makefile; then
15669        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
15670    fi
15671    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15672       test -f $with_add_source_root/jaxws/make/Makefile; then
15673        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
15674    fi
15675    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15676       test -f $with_add_source_root/hotspot/make/Makefile; then
15677        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
15678    fi
15679    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15680       test -f $with_add_source_root/jdk/make/Makefile; then
15681        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
15682    fi
15683fi
15684
15685
15686if test "x$with_override_source_root" != x; then
15687    if ! test -d $with_override_source_root; then
15688       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15689    fi
15690    CURDIR="$PWD"
15691    cd "$with_override_source_root"
15692    OVERRIDE_SRC_ROOT="`pwd`"
15693    cd "$CURDIR"
15694    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15695       test -f $with_override_source_root/langtools/make/Makefile; then
15696        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
15697    fi
15698    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15699       test -f $with_override_source_root/corba/make/Makefile; then
15700        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
15701    fi
15702    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15703       test -f $with_override_source_root/jaxp/make/Makefile; then
15704        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
15705    fi
15706    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15707       test -f $with_override_source_root/jaxws/make/Makefile; then
15708        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
15709    fi
15710    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15711       test -f $with_override_source_root/hotspot/make/Makefile; then
15712        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
15713    fi
15714    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15715       test -f $with_override_source_root/jdk/make/Makefile; then
15716        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
15717    fi
15718fi
15719
15720
15721###############################################################################
15722#
15723# Override a repo completely, this is used for example when you have 3 small
15724# development sandboxes of the langtools sources and want to avoid having 3 full
15725# OpenJDK sources checked out on disk.
15726#
15727# Assuming that the 3 langtools sandboxes are located here:
15728# /home/fredrik/sandbox1/langtools
15729# /home/fredrik/sandbox2/langtools
15730# /home/fredrik/sandbox3/langtools
15731#
15732# From the source root you create build subdirs manually:
15733#     mkdir -p build1 build2 build3
15734# in each build directory run:
15735#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15736#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15737#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15738#
15739
15740
15741# Check whether --with-override-langtools was given.
15742if test "${with_override_langtools+set}" = set; then :
15743  withval=$with_override_langtools;
15744fi
15745
15746
15747
15748# Check whether --with-override-corba was given.
15749if test "${with_override_corba+set}" = set; then :
15750  withval=$with_override_corba;
15751fi
15752
15753
15754
15755# Check whether --with-override-jaxp was given.
15756if test "${with_override_jaxp+set}" = set; then :
15757  withval=$with_override_jaxp;
15758fi
15759
15760
15761
15762# Check whether --with-override-jaxws was given.
15763if test "${with_override_jaxws+set}" = set; then :
15764  withval=$with_override_jaxws;
15765fi
15766
15767
15768
15769# Check whether --with-override-hotspot was given.
15770if test "${with_override_hotspot+set}" = set; then :
15771  withval=$with_override_hotspot;
15772fi
15773
15774
15775
15776# Check whether --with-override-jdk was given.
15777if test "${with_override_jdk+set}" = set; then :
15778  withval=$with_override_jdk;
15779fi
15780
15781
15782if test "x$with_override_langtools" != x; then
15783    CURDIR="$PWD"
15784    cd "$with_override_langtools"
15785    LANGTOOLS_TOPDIR="`pwd`"
15786    cd "$CURDIR"
15787    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15788        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15789    fi
15790    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15791$as_echo_n "checking if langtools should be overridden... " >&6; }
15792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15793$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15794fi
15795if test "x$with_override_corba" != x; then
15796    CURDIR="$PWD"
15797    cd "$with_override_corba"
15798    CORBA_TOPDIR="`pwd`"
15799    cd "$CURDIR"
15800    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15801        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15802    fi
15803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15804$as_echo_n "checking if corba should be overridden... " >&6; }
15805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15806$as_echo "yes with $CORBA_TOPDIR" >&6; }
15807fi
15808if test "x$with_override_jaxp" != x; then
15809    CURDIR="$PWD"
15810    cd "$with_override_jaxp"
15811    JAXP_TOPDIR="`pwd`"
15812    cd "$CURDIR"
15813    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15814        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15815    fi
15816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15817$as_echo_n "checking if jaxp should be overridden... " >&6; }
15818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15819$as_echo "yes with $JAXP_TOPDIR" >&6; }
15820fi
15821if test "x$with_override_jaxws" != x; then
15822    CURDIR="$PWD"
15823    cd "$with_override_jaxws"
15824    JAXWS_TOPDIR="`pwd`"
15825    cd "$CURDIR"
15826    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15827        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15828    fi
15829    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15830$as_echo_n "checking if jaxws should be overridden... " >&6; }
15831    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15832$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15833fi
15834if test "x$with_override_hotspot" != x; then
15835    CURDIR="$PWD"
15836    cd "$with_override_hotspot"
15837    HOTSPOT_TOPDIR="`pwd`"
15838    cd "$CURDIR"
15839    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15840       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15841        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15842    fi
15843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15844$as_echo_n "checking if hotspot should be overridden... " >&6; }
15845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15846$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15847fi
15848if test "x$with_override_jdk" != x; then
15849    CURDIR="$PWD"
15850    cd "$with_override_jdk"
15851    JDK_TOPDIR="`pwd`"
15852    cd "$CURDIR"
15853    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15854        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15855    fi
15856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15857$as_echo_n "checking if JDK should be overridden... " >&6; }
15858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15859$as_echo "yes with $JDK_TOPDIR" >&6; }
15860fi
15861
15862
15863
15864BUILD_OUTPUT="$OUTPUT_ROOT"
15865
15866
15867HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15868BUILD_HOTSPOT=true
15869
15870
15871
15872# Check whether --with-import-hotspot was given.
15873if test "${with_import_hotspot+set}" = set; then :
15874  withval=$with_import_hotspot;
15875fi
15876
15877if test "x$with_import_hotspot" != x; then
15878    CURDIR="$PWD"
15879    cd "$with_import_hotspot"
15880    HOTSPOT_DIST="`pwd`"
15881    cd "$CURDIR"
15882    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15883        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15884    fi
15885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15886$as_echo_n "checking if hotspot should be imported... " >&6; }
15887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15888$as_echo "yes from $HOTSPOT_DIST" >&6; }
15889    BUILD_HOTSPOT=false
15890fi
15891
15892JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15893
15894
15895###############################################################################
15896#
15897# Setup the toolchain (compilers etc), i.e. the tools that need to be
15898# cross-compilation aware.
15899#
15900###############################################################################
15901
15902
15903###############################################################################
15904#
15905# Configure the development tool paths and potential sysroot.
15906#
15907ac_ext=cpp
15908ac_cpp='$CXXCPP $CPPFLAGS'
15909ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15910ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15911ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15912
15913
15914# The option used to specify the target .o,.a or .so file.
15915# When compiling, how to specify the to be created object file.
15916CC_OUT_OPTION='-o$(SPACE)'
15917# When linking, how to specify the to be created executable.
15918EXE_OUT_OPTION='-o$(SPACE)'
15919# When linking, how to specify the to be created dynamically linkable library.
15920LD_OUT_OPTION='-o$(SPACE)'
15921# When archiving, how to specify the to be create static archive for object files.
15922AR_OUT_OPTION='rcs$(SPACE)'
15923
15924
15925
15926
15927
15928# Locate the actual tools
15929
15930if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15931
15932  # Store path to cygwin link.exe to help excluding it when searching for
15933  # VS linker. This must be done before changing the PATH when looking for VS.
15934  # Extract the first word of "link", so it can be a program name with args.
15935set dummy link; ac_word=$2
15936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15937$as_echo_n "checking for $ac_word... " >&6; }
15938if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15939  $as_echo_n "(cached) " >&6
15940else
15941  case $CYGWIN_LINK in
15942  [\\/]* | ?:[\\/]*)
15943  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15944  ;;
15945  *)
15946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15947for as_dir in $PATH
15948do
15949  IFS=$as_save_IFS
15950  test -z "$as_dir" && as_dir=.
15951    for ac_exec_ext in '' $ac_executable_extensions; do
15952  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15953    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15955    break 2
15956  fi
15957done
15958  done
15959IFS=$as_save_IFS
15960
15961  ;;
15962esac
15963fi
15964CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15965if test -n "$CYGWIN_LINK"; then
15966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
15967$as_echo "$CYGWIN_LINK" >&6; }
15968else
15969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15970$as_echo "no" >&6; }
15971fi
15972
15973
15974  if test "x$CYGWIN_LINK" != x; then
15975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
15976$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15977    "$CYGWIN_LINK" --version > /dev/null
15978    if test $? -eq 0 ; then
15979      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15980$as_echo "yes" >&6; }
15981    else
15982      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15983$as_echo "no" >&6; }
15984      # This might be the VS linker. Don't exclude it later on.
15985      CYGWIN_LINK=""
15986    fi
15987  fi
15988
15989  # First-hand choice is to locate and run the vsvars bat file.
15990
15991  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15992    VCVARSFILE="vc/bin/vcvars32.bat"
15993  else
15994    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
15995  fi
15996
15997  VS_ENV_CMD=""
15998  VS_ENV_ARGS=""
15999  if test "x$with_toolsdir" != x; then
16000
16001  if test "x$VS_ENV_CMD" = x; then
16002    VS100BASE="$with_toolsdir/../.."
16003    METHOD="--with-tools-dir"
16004
16005  windows_path="$VS100BASE"
16006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16007    unix_path=`$CYGPATH -u "$windows_path"`
16008    VS100BASE="$unix_path"
16009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16011    VS100BASE="$unix_path"
16012  fi
16013
16014    if test -d "$VS100BASE"; then
16015      if test -f "$VS100BASE/$VCVARSFILE"; then
16016        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16017$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16018        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16019      else
16020        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16021$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16022        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16023$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16024      fi
16025    fi
16026  fi
16027
16028  fi
16029
16030  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16031    # Having specified an argument which is incorrect will produce an instant failure;
16032    # we should not go on looking
16033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16034$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16035    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16036$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16037    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16038  fi
16039
16040  if test "x$ProgramW6432" != x; then
16041
16042  if test "x$VS_ENV_CMD" = x; then
16043    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16044    METHOD="well-known name"
16045
16046  windows_path="$WIN_SDK_BASE"
16047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16048    unix_path=`$CYGPATH -u "$windows_path"`
16049    WIN_SDK_BASE="$unix_path"
16050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16052    WIN_SDK_BASE="$unix_path"
16053  fi
16054
16055    if test -d "$WIN_SDK_BASE"; then
16056      # There have been cases of partial or broken SDK installations. A missing
16057      # lib dir is not going to work.
16058      if test ! -d "$WIN_SDK_BASE/../lib"; then
16059        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16060$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16061        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16062$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16063      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16064        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16065$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16066        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16067        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16068          VS_ENV_ARGS="/x86"
16069        else
16070          VS_ENV_ARGS="/x64"
16071        fi
16072      else
16073        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16074$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16075        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16076$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16077      fi
16078    fi
16079  fi
16080
16081  fi
16082  if test "x$PROGRAMW6432" != x; then
16083
16084  if test "x$VS_ENV_CMD" = x; then
16085    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16086    METHOD="well-known name"
16087
16088  windows_path="$WIN_SDK_BASE"
16089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16090    unix_path=`$CYGPATH -u "$windows_path"`
16091    WIN_SDK_BASE="$unix_path"
16092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16094    WIN_SDK_BASE="$unix_path"
16095  fi
16096
16097    if test -d "$WIN_SDK_BASE"; then
16098      # There have been cases of partial or broken SDK installations. A missing
16099      # lib dir is not going to work.
16100      if test ! -d "$WIN_SDK_BASE/../lib"; then
16101        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16102$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16103        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16104$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16105      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16106        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16107$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16108        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16109        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16110          VS_ENV_ARGS="/x86"
16111        else
16112          VS_ENV_ARGS="/x64"
16113        fi
16114      else
16115        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16116$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16117        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16118$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16119      fi
16120    fi
16121  fi
16122
16123  fi
16124  if test "x$PROGRAMFILES" != x; then
16125
16126  if test "x$VS_ENV_CMD" = x; then
16127    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16128    METHOD="well-known name"
16129
16130  windows_path="$WIN_SDK_BASE"
16131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16132    unix_path=`$CYGPATH -u "$windows_path"`
16133    WIN_SDK_BASE="$unix_path"
16134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16136    WIN_SDK_BASE="$unix_path"
16137  fi
16138
16139    if test -d "$WIN_SDK_BASE"; then
16140      # There have been cases of partial or broken SDK installations. A missing
16141      # lib dir is not going to work.
16142      if test ! -d "$WIN_SDK_BASE/../lib"; then
16143        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16144$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16145        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16146$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16147      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16148        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16149$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16150        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16151        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16152          VS_ENV_ARGS="/x86"
16153        else
16154          VS_ENV_ARGS="/x64"
16155        fi
16156      else
16157        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16158$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16159        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16160$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16161      fi
16162    fi
16163  fi
16164
16165  fi
16166
16167  if test "x$VS_ENV_CMD" = x; then
16168    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16169    METHOD="well-known name"
16170
16171  windows_path="$WIN_SDK_BASE"
16172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16173    unix_path=`$CYGPATH -u "$windows_path"`
16174    WIN_SDK_BASE="$unix_path"
16175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16177    WIN_SDK_BASE="$unix_path"
16178  fi
16179
16180    if test -d "$WIN_SDK_BASE"; then
16181      # There have been cases of partial or broken SDK installations. A missing
16182      # lib dir is not going to work.
16183      if test ! -d "$WIN_SDK_BASE/../lib"; then
16184        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16185$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16186        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16187$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16188      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16189        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16190$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16191        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16192        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16193          VS_ENV_ARGS="/x86"
16194        else
16195          VS_ENV_ARGS="/x64"
16196        fi
16197      else
16198        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16199$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16200        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16201$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16202      fi
16203    fi
16204  fi
16205
16206
16207  if test "x$VS_ENV_CMD" = x; then
16208    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16209    METHOD="well-known name"
16210
16211  windows_path="$WIN_SDK_BASE"
16212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16213    unix_path=`$CYGPATH -u "$windows_path"`
16214    WIN_SDK_BASE="$unix_path"
16215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16217    WIN_SDK_BASE="$unix_path"
16218  fi
16219
16220    if test -d "$WIN_SDK_BASE"; then
16221      # There have been cases of partial or broken SDK installations. A missing
16222      # lib dir is not going to work.
16223      if test ! -d "$WIN_SDK_BASE/../lib"; then
16224        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16225$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16226        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16227$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16228      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16229        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16230$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16231        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16232        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16233          VS_ENV_ARGS="/x86"
16234        else
16235          VS_ENV_ARGS="/x64"
16236        fi
16237      else
16238        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16239$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16240        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16241$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16242      fi
16243    fi
16244  fi
16245
16246
16247  if test "x$VS100COMNTOOLS" != x; then
16248
16249  if test "x$VS_ENV_CMD" = x; then
16250    VS100BASE="$VS100COMNTOOLS/../.."
16251    METHOD="VS100COMNTOOLS variable"
16252
16253  windows_path="$VS100BASE"
16254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16255    unix_path=`$CYGPATH -u "$windows_path"`
16256    VS100BASE="$unix_path"
16257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16259    VS100BASE="$unix_path"
16260  fi
16261
16262    if test -d "$VS100BASE"; then
16263      if test -f "$VS100BASE/$VCVARSFILE"; then
16264        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16265$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16266        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16267      else
16268        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16269$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16270        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16271$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16272      fi
16273    fi
16274  fi
16275
16276  fi
16277  if test "x$PROGRAMFILES" != x; then
16278
16279  if test "x$VS_ENV_CMD" = x; then
16280    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16281    METHOD="well-known name"
16282
16283  windows_path="$VS100BASE"
16284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16285    unix_path=`$CYGPATH -u "$windows_path"`
16286    VS100BASE="$unix_path"
16287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16289    VS100BASE="$unix_path"
16290  fi
16291
16292    if test -d "$VS100BASE"; then
16293      if test -f "$VS100BASE/$VCVARSFILE"; then
16294        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16295$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16296        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16297      else
16298        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16299$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16300        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16301$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16302      fi
16303    fi
16304  fi
16305
16306  fi
16307
16308  if test "x$VS_ENV_CMD" = x; then
16309    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16310    METHOD="well-known name"
16311
16312  windows_path="$VS100BASE"
16313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16314    unix_path=`$CYGPATH -u "$windows_path"`
16315    VS100BASE="$unix_path"
16316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16318    VS100BASE="$unix_path"
16319  fi
16320
16321    if test -d "$VS100BASE"; then
16322      if test -f "$VS100BASE/$VCVARSFILE"; then
16323        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16324$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16325        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16326      else
16327        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16328$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16329        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16330$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16331      fi
16332    fi
16333  fi
16334
16335
16336  if test "x$VS_ENV_CMD" = x; then
16337    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16338    METHOD="well-known name"
16339
16340  windows_path="$VS100BASE"
16341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16342    unix_path=`$CYGPATH -u "$windows_path"`
16343    VS100BASE="$unix_path"
16344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16346    VS100BASE="$unix_path"
16347  fi
16348
16349    if test -d "$VS100BASE"; then
16350      if test -f "$VS100BASE/$VCVARSFILE"; then
16351        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16352$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16353        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16354      else
16355        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16356$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16357        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16358$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16359      fi
16360    fi
16361  fi
16362
16363
16364  if test "x$VS_ENV_CMD" != x; then
16365    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16366
16367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16368
16369  # First separate the path from the arguments. This will split at the first
16370  # space.
16371  complete="$VS_ENV_CMD"
16372  path="${complete%% *}"
16373  tmp="$complete EOL"
16374  arguments="${tmp#* }"
16375
16376  # Input might be given as Windows format, start by converting to
16377  # unix format.
16378  new_path=`$CYGPATH -u "$path"`
16379
16380  # Now try to locate executable using which
16381  new_path=`$WHICH "$new_path" 2> /dev/null`
16382  # bat and cmd files are not always considered executable in cygwin causing which
16383  # to not find them
16384  if test "x$new_path" = x \
16385           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16386           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16387    new_path=`$CYGPATH -u "$path"`
16388  fi
16389  if test "x$new_path" = x; then
16390    # Oops. Which didn't find the executable.
16391    # The splitting of arguments from the executable at a space might have been incorrect,
16392    # since paths with space are more likely in Windows. Give it another try with the whole
16393    # argument.
16394    path="$complete"
16395    arguments="EOL"
16396    new_path=`$CYGPATH -u "$path"`
16397    new_path=`$WHICH "$new_path" 2> /dev/null`
16398    # bat and cmd files are not always considered executable in cygwin causing which
16399    # to not find them
16400    if test "x$new_path" = x \
16401             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16402             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16403      new_path=`$CYGPATH -u "$path"`
16404    fi
16405    if test "x$new_path" = x; then
16406      # It's still not found. Now this is an unrecoverable error.
16407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16408$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16409      has_space=`$ECHO "$complete" | $GREP " "`
16410      if test "x$has_space" != x; then
16411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16413      fi
16414      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16415    fi
16416  fi
16417
16418  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16419  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16420  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16421  # "foo.exe" is OK but "foo" is an error.
16422  #
16423  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16424  # It is also a way to make sure we got the proper file name for the real test later on.
16425  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16426  if test "x$test_shortpath" = x; then
16427    # Short path failed, file does not exist as specified.
16428    # Try adding .exe or .cmd
16429    if test -f "${new_path}.exe"; then
16430       input_to_shortpath="${new_path}.exe"
16431    elif test -f "${new_path}.cmd"; then
16432       input_to_shortpath="${new_path}.cmd"
16433    else
16434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16435$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16436      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16437$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16438      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16439    fi
16440  else
16441    input_to_shortpath="$new_path"
16442  fi
16443
16444  # Call helper function which possibly converts this using DOS-style short mode.
16445  # If so, the updated path is stored in $new_path.
16446  new_path="$input_to_shortpath"
16447
16448  input_path="$input_to_shortpath"
16449  # Check if we need to convert this using DOS-style short mode. If the path
16450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16451  # take no chances and rewrite it.
16452  # Note: m4 eats our [], so we need to use [ and ] instead.
16453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16454  if test "x$has_forbidden_chars" != x; then
16455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16459      # Going to short mode and back again did indeed matter. Since short mode is
16460      # case insensitive, let's make it lowercase to improve readability.
16461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16462      # Now convert it back to Unix-stile (cygpath)
16463      input_path=`$CYGPATH -u "$shortmode_path"`
16464      new_path="$input_path"
16465    fi
16466  fi
16467
16468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16469  if test "x$test_cygdrive_prefix" = x; then
16470    # As a simple fix, exclude /usr/bin since it's not a real path.
16471    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16473      # a path prefixed by /cygdrive for fixpath to work.
16474      new_path="$CYGWIN_ROOT_PATH$input_path"
16475    fi
16476  fi
16477
16478  # remove trailing .exe if any
16479  new_path="${new_path/%.exe/}"
16480
16481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16482
16483  # First separate the path from the arguments. This will split at the first
16484  # space.
16485  complete="$VS_ENV_CMD"
16486  path="${complete%% *}"
16487  tmp="$complete EOL"
16488  arguments="${tmp#* }"
16489
16490  # Input might be given as Windows format, start by converting to
16491  # unix format.
16492  new_path="$path"
16493
16494  windows_path="$new_path"
16495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16496    unix_path=`$CYGPATH -u "$windows_path"`
16497    new_path="$unix_path"
16498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16500    new_path="$unix_path"
16501  fi
16502
16503
16504  # Now try to locate executable using which
16505  new_path=`$WHICH "$new_path" 2> /dev/null`
16506
16507  if test "x$new_path" = x; then
16508    # Oops. Which didn't find the executable.
16509    # The splitting of arguments from the executable at a space might have been incorrect,
16510    # since paths with space are more likely in Windows. Give it another try with the whole
16511    # argument.
16512    path="$complete"
16513    arguments="EOL"
16514    new_path="$path"
16515
16516  windows_path="$new_path"
16517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16518    unix_path=`$CYGPATH -u "$windows_path"`
16519    new_path="$unix_path"
16520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16522    new_path="$unix_path"
16523  fi
16524
16525
16526    new_path=`$WHICH "$new_path" 2> /dev/null`
16527
16528    if test "x$new_path" = x; then
16529      # It's still not found. Now this is an unrecoverable error.
16530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16531$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16532      has_space=`$ECHO "$complete" | $GREP " "`
16533      if test "x$has_space" != x; then
16534        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16535$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16536      fi
16537      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16538    fi
16539  fi
16540
16541  # Now new_path has a complete unix path to the binary
16542  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16543    # Keep paths in /bin as-is, but remove trailing .exe if any
16544    new_path="${new_path/%.exe/}"
16545    # Do not save /bin paths to all_fixpath_prefixes!
16546  else
16547    # Not in mixed or Windows style, start by that.
16548    new_path=`cmd //c echo $new_path`
16549
16550  input_path="$new_path"
16551  # Check if we need to convert this using DOS-style short mode. If the path
16552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16553  # take no chances and rewrite it.
16554  # Note: m4 eats our [], so we need to use [ and ] instead.
16555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16556  if test "x$has_forbidden_chars" != x; then
16557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16559  fi
16560
16561    # Output is in $new_path
16562
16563  windows_path="$new_path"
16564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16565    unix_path=`$CYGPATH -u "$windows_path"`
16566    new_path="$unix_path"
16567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16569    new_path="$unix_path"
16570  fi
16571
16572    # remove trailing .exe if any
16573    new_path="${new_path/%.exe/}"
16574
16575    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16576    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16577  fi
16578
16579  else
16580    # We're on a posix platform. Hooray! :)
16581    # First separate the path from the arguments. This will split at the first
16582    # space.
16583    complete="$VS_ENV_CMD"
16584    path="${complete%% *}"
16585    tmp="$complete EOL"
16586    arguments="${tmp#* }"
16587
16588    # Cannot rely on the command "which" here since it doesn't always work.
16589    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16590    if test -z "$is_absolute_path"; then
16591      # Path to executable is not absolute. Find it.
16592      IFS_save="$IFS"
16593      IFS=:
16594      for p in $PATH; do
16595        if test -f "$p/$path" && test -x "$p/$path"; then
16596          new_path="$p/$path"
16597          break
16598        fi
16599      done
16600      IFS="$IFS_save"
16601    else
16602      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16603$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16604      new_path="$path"
16605    fi
16606
16607    if test "x$new_path" = x; then
16608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16609$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16610        has_space=`$ECHO "$complete" | $GREP " "`
16611        if test "x$has_space" != x; then
16612          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16613$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16614        fi
16615        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16616      fi
16617  fi
16618
16619      # Now join together the path and the arguments once again
16620      if test "x$arguments" != xEOL; then
16621        new_complete="$new_path ${arguments% *}"
16622      else
16623        new_complete="$new_path"
16624      fi
16625
16626  if test "x$complete" != "x$new_complete"; then
16627      VS_ENV_CMD="$new_complete"
16628      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16629$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16630    fi
16631
16632
16633    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16634    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16635$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16636    cd $OUTPUT_ROOT
16637    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16638    # to autoconf standards.
16639
16640    #----
16641
16642    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16643    # but calculate the difference in Cygwin environment before/after running it and then
16644    # apply the diff.
16645
16646    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16647      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16648      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16649      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16650    else
16651      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16652      _dosbash=`cmd //c echo \`which bash\``
16653    fi
16654
16655    # generate the set of exported vars before/after the vs10 setup
16656    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16657    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16658    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16659    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16660
16661    # Now execute the newly created bat file.
16662    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16663    cmd /c localdevenvtmp.bat | cat
16664
16665    # apply the diff (less some non-vs10 vars named by "!")
16666    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16667    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16668    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16669
16670    # cleanup
16671    $RM localdevenvtmp*
16672    #----
16673    cd $CURDIR
16674    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16675      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16676$as_echo "no" >&6; }
16677      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16678$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16679      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16680$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16681      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16682$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16683      as_fn_error $? "Cannot continue" "$LINENO" 5
16684    fi
16685
16686    # Now set all paths and other env variables. This will allow the rest of
16687    # the configure script to find and run the compiler in the proper way.
16688    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16689$as_echo "$as_me: Setting extracted environment variables" >&6;}
16690    . $OUTPUT_ROOT/localdevenv.sh
16691  else
16692    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16693    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16694$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16695  fi
16696
16697  # At this point, we should have corrent variables in the environment, or we can't continue.
16698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16699$as_echo_n "checking for Visual Studio variables... " >&6; }
16700
16701  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16702    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16704$as_echo "present but broken" >&6; }
16705      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16706    else
16707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16708$as_echo "ok" >&6; }
16709      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16710      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16711      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16712      VS_PATH="$PATH"
16713
16714
16715
16716    fi
16717  else
16718    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16719$as_echo "not found" >&6; }
16720
16721    if test "x$VS_ENV_CMD" = x; then
16722      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16723$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16724      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16725$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16726    else
16727      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16728$as_echo "$as_me: Running the extraction script failed." >&6;}
16729    fi
16730    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16731$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16732    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16733$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16734    as_fn_error $? "Cannot continue" "$LINENO" 5
16735  fi
16736
16737  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16738$as_echo_n "checking for msvcr100.dll... " >&6; }
16739
16740# Check whether --with-msvcr-dll was given.
16741if test "${with_msvcr_dll+set}" = set; then :
16742  withval=$with_msvcr_dll;
16743fi
16744
16745  if test "x$with_msvcr_dll" != x; then
16746    MSVCR_DLL="$with_msvcr_dll"
16747  else
16748    if test "x$VCINSTALLDIR" != x; then
16749      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16750        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16751      else
16752        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16753        if test "x$MSVCR_DLL" = x; then
16754          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16755        fi
16756      fi
16757      if test "x$MSVCR_DLL" != x; then
16758        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16759$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16760      else
16761        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16762$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16763      fi
16764    fi
16765    if test "x$MSVCR_DLL" = x; then
16766      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16767        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16768$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16769        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16770      fi
16771    fi
16772  fi
16773  if test "x$MSVCR_DLL" = x; then
16774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16775$as_echo "no" >&6; }
16776    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16777  fi
16778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16779$as_echo "$MSVCR_DLL" >&6; }
16780
16781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16782
16783  # Input might be given as Windows format, start by converting to
16784  # unix format.
16785  path="$MSVCR_DLL"
16786  new_path=`$CYGPATH -u "$path"`
16787
16788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16791  # "foo.exe" is OK but "foo" is an error.
16792  #
16793  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16794  # It is also a way to make sure we got the proper file name for the real test later on.
16795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16796  if test "x$test_shortpath" = x; then
16797    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16798$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16799    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16800  fi
16801
16802  # Call helper function which possibly converts this using DOS-style short mode.
16803  # If so, the updated path is stored in $new_path.
16804
16805  input_path="$new_path"
16806  # Check if we need to convert this using DOS-style short mode. If the path
16807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16808  # take no chances and rewrite it.
16809  # Note: m4 eats our [], so we need to use [ and ] instead.
16810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16811  if test "x$has_forbidden_chars" != x; then
16812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16816      # Going to short mode and back again did indeed matter. Since short mode is
16817      # case insensitive, let's make it lowercase to improve readability.
16818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16819      # Now convert it back to Unix-stile (cygpath)
16820      input_path=`$CYGPATH -u "$shortmode_path"`
16821      new_path="$input_path"
16822    fi
16823  fi
16824
16825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16826  if test "x$test_cygdrive_prefix" = x; then
16827    # As a simple fix, exclude /usr/bin since it's not a real path.
16828    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16830      # a path prefixed by /cygdrive for fixpath to work.
16831      new_path="$CYGWIN_ROOT_PATH$input_path"
16832    fi
16833  fi
16834
16835
16836  if test "x$path" != "x$new_path"; then
16837    MSVCR_DLL="$new_path"
16838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16839$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16840  fi
16841
16842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16843
16844  path="$MSVCR_DLL"
16845  has_colon=`$ECHO $path | $GREP ^.:`
16846  new_path="$path"
16847  if test "x$has_colon" = x; then
16848    # Not in mixed or Windows style, start by that.
16849    new_path=`cmd //c echo $path`
16850  fi
16851
16852
16853  input_path="$new_path"
16854  # Check if we need to convert this using DOS-style short mode. If the path
16855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16856  # take no chances and rewrite it.
16857  # Note: m4 eats our [], so we need to use [ and ] instead.
16858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16859  if test "x$has_forbidden_chars" != x; then
16860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16862  fi
16863
16864
16865  windows_path="$new_path"
16866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16867    unix_path=`$CYGPATH -u "$windows_path"`
16868    new_path="$unix_path"
16869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16871    new_path="$unix_path"
16872  fi
16873
16874  if test "x$path" != "x$new_path"; then
16875    MSVCR_DLL="$new_path"
16876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16877$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16878  fi
16879
16880  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16881  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16882
16883  else
16884    # We're on a posix platform. Hooray! :)
16885    path="$MSVCR_DLL"
16886
16887    if test ! -f "$path" && test ! -d "$path"; then
16888      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16889    fi
16890
16891    has_space=`$ECHO "$path" | $GREP " "`
16892    if test "x$has_space" != x; then
16893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16894$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16895      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16896    fi
16897  fi
16898
16899
16900fi
16901
16902
16903
16904# If --build AND --host is set, then the configure script will find any
16905# cross compilation tools in the PATH. Cross compilation tools
16906# follows the cross compilation standard where they are prefixed with ${host}.
16907# For example the binary i686-sun-solaris2.10-gcc
16908# will cross compile for i686-sun-solaris2.10
16909# If neither of build and host is not set, then build=host and the
16910# default compiler found in the path will be used.
16911# Setting only --host, does not seem to be really supported.
16912# Please set both --build and --host if you want to cross compile.
16913
16914if test "x$COMPILE_TYPE" = "xcross"; then
16915    # Now we to find a C/C++ compiler that can build executables for the build
16916    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16917    # once. Also, we need to do this before adding a tools dir to the path,
16918    # otherwise we might pick up cross-compilers which don't use standard naming.
16919    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16920    # to wait until they are properly discovered.
16921    for ac_prog in cl cc gcc
16922do
16923  # Extract the first word of "$ac_prog", so it can be a program name with args.
16924set dummy $ac_prog; ac_word=$2
16925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16926$as_echo_n "checking for $ac_word... " >&6; }
16927if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16928  $as_echo_n "(cached) " >&6
16929else
16930  case $BUILD_CC in
16931  [\\/]* | ?:[\\/]*)
16932  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16933  ;;
16934  *)
16935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16936for as_dir in $PATH
16937do
16938  IFS=$as_save_IFS
16939  test -z "$as_dir" && as_dir=.
16940    for ac_exec_ext in '' $ac_executable_extensions; do
16941  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16942    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16944    break 2
16945  fi
16946done
16947  done
16948IFS=$as_save_IFS
16949
16950  ;;
16951esac
16952fi
16953BUILD_CC=$ac_cv_path_BUILD_CC
16954if test -n "$BUILD_CC"; then
16955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
16956$as_echo "$BUILD_CC" >&6; }
16957else
16958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16959$as_echo "no" >&6; }
16960fi
16961
16962
16963  test -n "$BUILD_CC" && break
16964done
16965
16966
16967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16968
16969  # First separate the path from the arguments. This will split at the first
16970  # space.
16971  complete="$BUILD_CC"
16972  path="${complete%% *}"
16973  tmp="$complete EOL"
16974  arguments="${tmp#* }"
16975
16976  # Input might be given as Windows format, start by converting to
16977  # unix format.
16978  new_path=`$CYGPATH -u "$path"`
16979
16980  # Now try to locate executable using which
16981  new_path=`$WHICH "$new_path" 2> /dev/null`
16982  # bat and cmd files are not always considered executable in cygwin causing which
16983  # to not find them
16984  if test "x$new_path" = x \
16985           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16986           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16987    new_path=`$CYGPATH -u "$path"`
16988  fi
16989  if test "x$new_path" = x; then
16990    # Oops. Which didn't find the executable.
16991    # The splitting of arguments from the executable at a space might have been incorrect,
16992    # since paths with space are more likely in Windows. Give it another try with the whole
16993    # argument.
16994    path="$complete"
16995    arguments="EOL"
16996    new_path=`$CYGPATH -u "$path"`
16997    new_path=`$WHICH "$new_path" 2> /dev/null`
16998    # bat and cmd files are not always considered executable in cygwin causing which
16999    # to not find them
17000    if test "x$new_path" = x \
17001             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17002             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17003      new_path=`$CYGPATH -u "$path"`
17004    fi
17005    if test "x$new_path" = x; then
17006      # It's still not found. Now this is an unrecoverable error.
17007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17008$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17009      has_space=`$ECHO "$complete" | $GREP " "`
17010      if test "x$has_space" != x; then
17011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17013      fi
17014      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17015    fi
17016  fi
17017
17018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17021  # "foo.exe" is OK but "foo" is an error.
17022  #
17023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17024  # It is also a way to make sure we got the proper file name for the real test later on.
17025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17026  if test "x$test_shortpath" = x; then
17027    # Short path failed, file does not exist as specified.
17028    # Try adding .exe or .cmd
17029    if test -f "${new_path}.exe"; then
17030       input_to_shortpath="${new_path}.exe"
17031    elif test -f "${new_path}.cmd"; then
17032       input_to_shortpath="${new_path}.cmd"
17033    else
17034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17035$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17036      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17037$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17038      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17039    fi
17040  else
17041    input_to_shortpath="$new_path"
17042  fi
17043
17044  # Call helper function which possibly converts this using DOS-style short mode.
17045  # If so, the updated path is stored in $new_path.
17046  new_path="$input_to_shortpath"
17047
17048  input_path="$input_to_shortpath"
17049  # Check if we need to convert this using DOS-style short mode. If the path
17050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17051  # take no chances and rewrite it.
17052  # Note: m4 eats our [], so we need to use [ and ] instead.
17053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17054  if test "x$has_forbidden_chars" != x; then
17055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17059      # Going to short mode and back again did indeed matter. Since short mode is
17060      # case insensitive, let's make it lowercase to improve readability.
17061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17062      # Now convert it back to Unix-stile (cygpath)
17063      input_path=`$CYGPATH -u "$shortmode_path"`
17064      new_path="$input_path"
17065    fi
17066  fi
17067
17068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17069  if test "x$test_cygdrive_prefix" = x; then
17070    # As a simple fix, exclude /usr/bin since it's not a real path.
17071    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17073      # a path prefixed by /cygdrive for fixpath to work.
17074      new_path="$CYGWIN_ROOT_PATH$input_path"
17075    fi
17076  fi
17077
17078  # remove trailing .exe if any
17079  new_path="${new_path/%.exe/}"
17080
17081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17082
17083  # First separate the path from the arguments. This will split at the first
17084  # space.
17085  complete="$BUILD_CC"
17086  path="${complete%% *}"
17087  tmp="$complete EOL"
17088  arguments="${tmp#* }"
17089
17090  # Input might be given as Windows format, start by converting to
17091  # unix format.
17092  new_path="$path"
17093
17094  windows_path="$new_path"
17095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17096    unix_path=`$CYGPATH -u "$windows_path"`
17097    new_path="$unix_path"
17098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17100    new_path="$unix_path"
17101  fi
17102
17103
17104  # Now try to locate executable using which
17105  new_path=`$WHICH "$new_path" 2> /dev/null`
17106
17107  if test "x$new_path" = x; then
17108    # Oops. Which didn't find the executable.
17109    # The splitting of arguments from the executable at a space might have been incorrect,
17110    # since paths with space are more likely in Windows. Give it another try with the whole
17111    # argument.
17112    path="$complete"
17113    arguments="EOL"
17114    new_path="$path"
17115
17116  windows_path="$new_path"
17117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17118    unix_path=`$CYGPATH -u "$windows_path"`
17119    new_path="$unix_path"
17120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17122    new_path="$unix_path"
17123  fi
17124
17125
17126    new_path=`$WHICH "$new_path" 2> /dev/null`
17127
17128    if test "x$new_path" = x; then
17129      # It's still not found. Now this is an unrecoverable error.
17130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17131$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17132      has_space=`$ECHO "$complete" | $GREP " "`
17133      if test "x$has_space" != x; then
17134        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17135$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17136      fi
17137      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17138    fi
17139  fi
17140
17141  # Now new_path has a complete unix path to the binary
17142  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17143    # Keep paths in /bin as-is, but remove trailing .exe if any
17144    new_path="${new_path/%.exe/}"
17145    # Do not save /bin paths to all_fixpath_prefixes!
17146  else
17147    # Not in mixed or Windows style, start by that.
17148    new_path=`cmd //c echo $new_path`
17149
17150  input_path="$new_path"
17151  # Check if we need to convert this using DOS-style short mode. If the path
17152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17153  # take no chances and rewrite it.
17154  # Note: m4 eats our [], so we need to use [ and ] instead.
17155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17156  if test "x$has_forbidden_chars" != x; then
17157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17159  fi
17160
17161    # Output is in $new_path
17162
17163  windows_path="$new_path"
17164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17165    unix_path=`$CYGPATH -u "$windows_path"`
17166    new_path="$unix_path"
17167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17169    new_path="$unix_path"
17170  fi
17171
17172    # remove trailing .exe if any
17173    new_path="${new_path/%.exe/}"
17174
17175    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17176    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17177  fi
17178
17179  else
17180    # We're on a posix platform. Hooray! :)
17181    # First separate the path from the arguments. This will split at the first
17182    # space.
17183    complete="$BUILD_CC"
17184    path="${complete%% *}"
17185    tmp="$complete EOL"
17186    arguments="${tmp#* }"
17187
17188    # Cannot rely on the command "which" here since it doesn't always work.
17189    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17190    if test -z "$is_absolute_path"; then
17191      # Path to executable is not absolute. Find it.
17192      IFS_save="$IFS"
17193      IFS=:
17194      for p in $PATH; do
17195        if test -f "$p/$path" && test -x "$p/$path"; then
17196          new_path="$p/$path"
17197          break
17198        fi
17199      done
17200      IFS="$IFS_save"
17201    else
17202      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17203$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17204      new_path="$path"
17205    fi
17206
17207    if test "x$new_path" = x; then
17208        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17209$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17210        has_space=`$ECHO "$complete" | $GREP " "`
17211        if test "x$has_space" != x; then
17212          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17213$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17214        fi
17215        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17216      fi
17217  fi
17218
17219      # Now join together the path and the arguments once again
17220      if test "x$arguments" != xEOL; then
17221        new_complete="$new_path ${arguments% *}"
17222      else
17223        new_complete="$new_path"
17224      fi
17225
17226  if test "x$complete" != "x$new_complete"; then
17227      BUILD_CC="$new_complete"
17228      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17229$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17230    fi
17231
17232    for ac_prog in cl CC g++
17233do
17234  # Extract the first word of "$ac_prog", so it can be a program name with args.
17235set dummy $ac_prog; ac_word=$2
17236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17237$as_echo_n "checking for $ac_word... " >&6; }
17238if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17239  $as_echo_n "(cached) " >&6
17240else
17241  case $BUILD_CXX in
17242  [\\/]* | ?:[\\/]*)
17243  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17244  ;;
17245  *)
17246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17247for as_dir in $PATH
17248do
17249  IFS=$as_save_IFS
17250  test -z "$as_dir" && as_dir=.
17251    for ac_exec_ext in '' $ac_executable_extensions; do
17252  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17253    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17255    break 2
17256  fi
17257done
17258  done
17259IFS=$as_save_IFS
17260
17261  ;;
17262esac
17263fi
17264BUILD_CXX=$ac_cv_path_BUILD_CXX
17265if test -n "$BUILD_CXX"; then
17266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17267$as_echo "$BUILD_CXX" >&6; }
17268else
17269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17270$as_echo "no" >&6; }
17271fi
17272
17273
17274  test -n "$BUILD_CXX" && break
17275done
17276
17277
17278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17279
17280  # First separate the path from the arguments. This will split at the first
17281  # space.
17282  complete="$BUILD_CXX"
17283  path="${complete%% *}"
17284  tmp="$complete EOL"
17285  arguments="${tmp#* }"
17286
17287  # Input might be given as Windows format, start by converting to
17288  # unix format.
17289  new_path=`$CYGPATH -u "$path"`
17290
17291  # Now try to locate executable using which
17292  new_path=`$WHICH "$new_path" 2> /dev/null`
17293  # bat and cmd files are not always considered executable in cygwin causing which
17294  # to not find them
17295  if test "x$new_path" = x \
17296           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17297           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17298    new_path=`$CYGPATH -u "$path"`
17299  fi
17300  if test "x$new_path" = x; then
17301    # Oops. Which didn't find the executable.
17302    # The splitting of arguments from the executable at a space might have been incorrect,
17303    # since paths with space are more likely in Windows. Give it another try with the whole
17304    # argument.
17305    path="$complete"
17306    arguments="EOL"
17307    new_path=`$CYGPATH -u "$path"`
17308    new_path=`$WHICH "$new_path" 2> /dev/null`
17309    # bat and cmd files are not always considered executable in cygwin causing which
17310    # to not find them
17311    if test "x$new_path" = x \
17312             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17313             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17314      new_path=`$CYGPATH -u "$path"`
17315    fi
17316    if test "x$new_path" = x; then
17317      # It's still not found. Now this is an unrecoverable error.
17318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17319$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17320      has_space=`$ECHO "$complete" | $GREP " "`
17321      if test "x$has_space" != x; then
17322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17324      fi
17325      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17326    fi
17327  fi
17328
17329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17332  # "foo.exe" is OK but "foo" is an error.
17333  #
17334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17335  # It is also a way to make sure we got the proper file name for the real test later on.
17336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17337  if test "x$test_shortpath" = x; then
17338    # Short path failed, file does not exist as specified.
17339    # Try adding .exe or .cmd
17340    if test -f "${new_path}.exe"; then
17341       input_to_shortpath="${new_path}.exe"
17342    elif test -f "${new_path}.cmd"; then
17343       input_to_shortpath="${new_path}.cmd"
17344    else
17345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17346$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17347      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17348$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17349      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17350    fi
17351  else
17352    input_to_shortpath="$new_path"
17353  fi
17354
17355  # Call helper function which possibly converts this using DOS-style short mode.
17356  # If so, the updated path is stored in $new_path.
17357  new_path="$input_to_shortpath"
17358
17359  input_path="$input_to_shortpath"
17360  # Check if we need to convert this using DOS-style short mode. If the path
17361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17362  # take no chances and rewrite it.
17363  # Note: m4 eats our [], so we need to use [ and ] instead.
17364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17365  if test "x$has_forbidden_chars" != x; then
17366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17370      # Going to short mode and back again did indeed matter. Since short mode is
17371      # case insensitive, let's make it lowercase to improve readability.
17372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17373      # Now convert it back to Unix-stile (cygpath)
17374      input_path=`$CYGPATH -u "$shortmode_path"`
17375      new_path="$input_path"
17376    fi
17377  fi
17378
17379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17380  if test "x$test_cygdrive_prefix" = x; then
17381    # As a simple fix, exclude /usr/bin since it's not a real path.
17382    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17384      # a path prefixed by /cygdrive for fixpath to work.
17385      new_path="$CYGWIN_ROOT_PATH$input_path"
17386    fi
17387  fi
17388
17389  # remove trailing .exe if any
17390  new_path="${new_path/%.exe/}"
17391
17392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17393
17394  # First separate the path from the arguments. This will split at the first
17395  # space.
17396  complete="$BUILD_CXX"
17397  path="${complete%% *}"
17398  tmp="$complete EOL"
17399  arguments="${tmp#* }"
17400
17401  # Input might be given as Windows format, start by converting to
17402  # unix format.
17403  new_path="$path"
17404
17405  windows_path="$new_path"
17406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17407    unix_path=`$CYGPATH -u "$windows_path"`
17408    new_path="$unix_path"
17409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17411    new_path="$unix_path"
17412  fi
17413
17414
17415  # Now try to locate executable using which
17416  new_path=`$WHICH "$new_path" 2> /dev/null`
17417
17418  if test "x$new_path" = x; then
17419    # Oops. Which didn't find the executable.
17420    # The splitting of arguments from the executable at a space might have been incorrect,
17421    # since paths with space are more likely in Windows. Give it another try with the whole
17422    # argument.
17423    path="$complete"
17424    arguments="EOL"
17425    new_path="$path"
17426
17427  windows_path="$new_path"
17428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17429    unix_path=`$CYGPATH -u "$windows_path"`
17430    new_path="$unix_path"
17431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17433    new_path="$unix_path"
17434  fi
17435
17436
17437    new_path=`$WHICH "$new_path" 2> /dev/null`
17438
17439    if test "x$new_path" = x; then
17440      # It's still not found. Now this is an unrecoverable error.
17441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17442$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17443      has_space=`$ECHO "$complete" | $GREP " "`
17444      if test "x$has_space" != x; then
17445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17447      fi
17448      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17449    fi
17450  fi
17451
17452  # Now new_path has a complete unix path to the binary
17453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17454    # Keep paths in /bin as-is, but remove trailing .exe if any
17455    new_path="${new_path/%.exe/}"
17456    # Do not save /bin paths to all_fixpath_prefixes!
17457  else
17458    # Not in mixed or Windows style, start by that.
17459    new_path=`cmd //c echo $new_path`
17460
17461  input_path="$new_path"
17462  # Check if we need to convert this using DOS-style short mode. If the path
17463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17464  # take no chances and rewrite it.
17465  # Note: m4 eats our [], so we need to use [ and ] instead.
17466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17467  if test "x$has_forbidden_chars" != x; then
17468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17470  fi
17471
17472    # Output is in $new_path
17473
17474  windows_path="$new_path"
17475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17476    unix_path=`$CYGPATH -u "$windows_path"`
17477    new_path="$unix_path"
17478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17480    new_path="$unix_path"
17481  fi
17482
17483    # remove trailing .exe if any
17484    new_path="${new_path/%.exe/}"
17485
17486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17488  fi
17489
17490  else
17491    # We're on a posix platform. Hooray! :)
17492    # First separate the path from the arguments. This will split at the first
17493    # space.
17494    complete="$BUILD_CXX"
17495    path="${complete%% *}"
17496    tmp="$complete EOL"
17497    arguments="${tmp#* }"
17498
17499    # Cannot rely on the command "which" here since it doesn't always work.
17500    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17501    if test -z "$is_absolute_path"; then
17502      # Path to executable is not absolute. Find it.
17503      IFS_save="$IFS"
17504      IFS=:
17505      for p in $PATH; do
17506        if test -f "$p/$path" && test -x "$p/$path"; then
17507          new_path="$p/$path"
17508          break
17509        fi
17510      done
17511      IFS="$IFS_save"
17512    else
17513      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17514$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17515      new_path="$path"
17516    fi
17517
17518    if test "x$new_path" = x; then
17519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17520$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17521        has_space=`$ECHO "$complete" | $GREP " "`
17522        if test "x$has_space" != x; then
17523          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17525        fi
17526        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17527      fi
17528  fi
17529
17530      # Now join together the path and the arguments once again
17531      if test "x$arguments" != xEOL; then
17532        new_complete="$new_path ${arguments% *}"
17533      else
17534        new_complete="$new_path"
17535      fi
17536
17537  if test "x$complete" != "x$new_complete"; then
17538      BUILD_CXX="$new_complete"
17539      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17540$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17541    fi
17542
17543    # Extract the first word of "ld", so it can be a program name with args.
17544set dummy ld; ac_word=$2
17545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17546$as_echo_n "checking for $ac_word... " >&6; }
17547if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17548  $as_echo_n "(cached) " >&6
17549else
17550  case $BUILD_LD in
17551  [\\/]* | ?:[\\/]*)
17552  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17553  ;;
17554  *)
17555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17556for as_dir in $PATH
17557do
17558  IFS=$as_save_IFS
17559  test -z "$as_dir" && as_dir=.
17560    for ac_exec_ext in '' $ac_executable_extensions; do
17561  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17562    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17564    break 2
17565  fi
17566done
17567  done
17568IFS=$as_save_IFS
17569
17570  ;;
17571esac
17572fi
17573BUILD_LD=$ac_cv_path_BUILD_LD
17574if test -n "$BUILD_LD"; then
17575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17576$as_echo "$BUILD_LD" >&6; }
17577else
17578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17579$as_echo "no" >&6; }
17580fi
17581
17582
17583
17584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17585
17586  # First separate the path from the arguments. This will split at the first
17587  # space.
17588  complete="$BUILD_LD"
17589  path="${complete%% *}"
17590  tmp="$complete EOL"
17591  arguments="${tmp#* }"
17592
17593  # Input might be given as Windows format, start by converting to
17594  # unix format.
17595  new_path=`$CYGPATH -u "$path"`
17596
17597  # Now try to locate executable using which
17598  new_path=`$WHICH "$new_path" 2> /dev/null`
17599  # bat and cmd files are not always considered executable in cygwin causing which
17600  # to not find them
17601  if test "x$new_path" = x \
17602           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17603           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17604    new_path=`$CYGPATH -u "$path"`
17605  fi
17606  if test "x$new_path" = x; then
17607    # Oops. Which didn't find the executable.
17608    # The splitting of arguments from the executable at a space might have been incorrect,
17609    # since paths with space are more likely in Windows. Give it another try with the whole
17610    # argument.
17611    path="$complete"
17612    arguments="EOL"
17613    new_path=`$CYGPATH -u "$path"`
17614    new_path=`$WHICH "$new_path" 2> /dev/null`
17615    # bat and cmd files are not always considered executable in cygwin causing which
17616    # to not find them
17617    if test "x$new_path" = x \
17618             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17619             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17620      new_path=`$CYGPATH -u "$path"`
17621    fi
17622    if test "x$new_path" = x; then
17623      # It's still not found. Now this is an unrecoverable error.
17624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17625$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17626      has_space=`$ECHO "$complete" | $GREP " "`
17627      if test "x$has_space" != x; then
17628        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17629$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17630      fi
17631      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17632    fi
17633  fi
17634
17635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17638  # "foo.exe" is OK but "foo" is an error.
17639  #
17640  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17641  # It is also a way to make sure we got the proper file name for the real test later on.
17642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17643  if test "x$test_shortpath" = x; then
17644    # Short path failed, file does not exist as specified.
17645    # Try adding .exe or .cmd
17646    if test -f "${new_path}.exe"; then
17647       input_to_shortpath="${new_path}.exe"
17648    elif test -f "${new_path}.cmd"; then
17649       input_to_shortpath="${new_path}.cmd"
17650    else
17651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17652$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17653      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17654$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17655      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17656    fi
17657  else
17658    input_to_shortpath="$new_path"
17659  fi
17660
17661  # Call helper function which possibly converts this using DOS-style short mode.
17662  # If so, the updated path is stored in $new_path.
17663  new_path="$input_to_shortpath"
17664
17665  input_path="$input_to_shortpath"
17666  # Check if we need to convert this using DOS-style short mode. If the path
17667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17668  # take no chances and rewrite it.
17669  # Note: m4 eats our [], so we need to use [ and ] instead.
17670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17671  if test "x$has_forbidden_chars" != x; then
17672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17676      # Going to short mode and back again did indeed matter. Since short mode is
17677      # case insensitive, let's make it lowercase to improve readability.
17678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17679      # Now convert it back to Unix-stile (cygpath)
17680      input_path=`$CYGPATH -u "$shortmode_path"`
17681      new_path="$input_path"
17682    fi
17683  fi
17684
17685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17686  if test "x$test_cygdrive_prefix" = x; then
17687    # As a simple fix, exclude /usr/bin since it's not a real path.
17688    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17690      # a path prefixed by /cygdrive for fixpath to work.
17691      new_path="$CYGWIN_ROOT_PATH$input_path"
17692    fi
17693  fi
17694
17695  # remove trailing .exe if any
17696  new_path="${new_path/%.exe/}"
17697
17698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17699
17700  # First separate the path from the arguments. This will split at the first
17701  # space.
17702  complete="$BUILD_LD"
17703  path="${complete%% *}"
17704  tmp="$complete EOL"
17705  arguments="${tmp#* }"
17706
17707  # Input might be given as Windows format, start by converting to
17708  # unix format.
17709  new_path="$path"
17710
17711  windows_path="$new_path"
17712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17713    unix_path=`$CYGPATH -u "$windows_path"`
17714    new_path="$unix_path"
17715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17717    new_path="$unix_path"
17718  fi
17719
17720
17721  # Now try to locate executable using which
17722  new_path=`$WHICH "$new_path" 2> /dev/null`
17723
17724  if test "x$new_path" = x; then
17725    # Oops. Which didn't find the executable.
17726    # The splitting of arguments from the executable at a space might have been incorrect,
17727    # since paths with space are more likely in Windows. Give it another try with the whole
17728    # argument.
17729    path="$complete"
17730    arguments="EOL"
17731    new_path="$path"
17732
17733  windows_path="$new_path"
17734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17735    unix_path=`$CYGPATH -u "$windows_path"`
17736    new_path="$unix_path"
17737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17739    new_path="$unix_path"
17740  fi
17741
17742
17743    new_path=`$WHICH "$new_path" 2> /dev/null`
17744
17745    if test "x$new_path" = x; then
17746      # It's still not found. Now this is an unrecoverable error.
17747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17748$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17749      has_space=`$ECHO "$complete" | $GREP " "`
17750      if test "x$has_space" != x; then
17751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17753      fi
17754      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17755    fi
17756  fi
17757
17758  # Now new_path has a complete unix path to the binary
17759  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17760    # Keep paths in /bin as-is, but remove trailing .exe if any
17761    new_path="${new_path/%.exe/}"
17762    # Do not save /bin paths to all_fixpath_prefixes!
17763  else
17764    # Not in mixed or Windows style, start by that.
17765    new_path=`cmd //c echo $new_path`
17766
17767  input_path="$new_path"
17768  # Check if we need to convert this using DOS-style short mode. If the path
17769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17770  # take no chances and rewrite it.
17771  # Note: m4 eats our [], so we need to use [ and ] instead.
17772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17773  if test "x$has_forbidden_chars" != x; then
17774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17776  fi
17777
17778    # Output is in $new_path
17779
17780  windows_path="$new_path"
17781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17782    unix_path=`$CYGPATH -u "$windows_path"`
17783    new_path="$unix_path"
17784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17786    new_path="$unix_path"
17787  fi
17788
17789    # remove trailing .exe if any
17790    new_path="${new_path/%.exe/}"
17791
17792    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17793    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17794  fi
17795
17796  else
17797    # We're on a posix platform. Hooray! :)
17798    # First separate the path from the arguments. This will split at the first
17799    # space.
17800    complete="$BUILD_LD"
17801    path="${complete%% *}"
17802    tmp="$complete EOL"
17803    arguments="${tmp#* }"
17804
17805    # Cannot rely on the command "which" here since it doesn't always work.
17806    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17807    if test -z "$is_absolute_path"; then
17808      # Path to executable is not absolute. Find it.
17809      IFS_save="$IFS"
17810      IFS=:
17811      for p in $PATH; do
17812        if test -f "$p/$path" && test -x "$p/$path"; then
17813          new_path="$p/$path"
17814          break
17815        fi
17816      done
17817      IFS="$IFS_save"
17818    else
17819      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17820$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17821      new_path="$path"
17822    fi
17823
17824    if test "x$new_path" = x; then
17825        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17826$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17827        has_space=`$ECHO "$complete" | $GREP " "`
17828        if test "x$has_space" != x; then
17829          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17830$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17831        fi
17832        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17833      fi
17834  fi
17835
17836      # Now join together the path and the arguments once again
17837      if test "x$arguments" != xEOL; then
17838        new_complete="$new_path ${arguments% *}"
17839      else
17840        new_complete="$new_path"
17841      fi
17842
17843  if test "x$complete" != "x$new_complete"; then
17844      BUILD_LD="$new_complete"
17845      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17846$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17847    fi
17848
17849fi
17850
17851
17852
17853
17854# If a devkit is found on the builddeps server, then prepend its path to the
17855# PATH variable. If there are cross compilers available in the devkit, these
17856# will be found by AC_PROG_CC et al.
17857DEVKIT=
17858
17859
17860    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17861        # Source the builddeps file again, to make sure it uses the latest variables!
17862        . $builddepsfile
17863        # Look for a target and build machine specific resource!
17864        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17865        if test "x$resource" = x; then
17866            # Ok, lets instead look for a target specific resource
17867            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17868        fi
17869        if test "x$resource" = x; then
17870            # Ok, lets instead look for a build specific resource
17871            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17872        fi
17873        if test "x$resource" = x; then
17874            # Ok, lets instead look for a generic resource
17875            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17876            resource=${builddep_devkit}
17877        fi
17878        if test "x$resource" != x; then
17879            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17880$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17881	    # If the resource in the builddeps.conf file is an existing directory,
17882	    # for example /java/linux/cups
17883	    if test -d ${resource}; then
17884	       depdir=${resource}
17885	    else
17886
17887# devkit is for example mymodule
17888# $resource is for example libs/general/libmymod_1_2_3.zip
17889# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17890# $with_builddeps_dir is for example /localhome/builddeps
17891# depdir is the name of the variable into which we store the depdir, eg MYMOD
17892# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17893# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17894    filename=`basename $resource`
17895    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17896    filebase=${filename%%.*}
17897    extension=${filename#*.}
17898    installdir=$with_builddeps_dir/$filebase
17899    if test ! -f $installdir/$filename.unpacked; then
17900        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17901$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17902        if test ! -d $installdir; then
17903            mkdir -p $installdir
17904        fi
17905        if test ! -d $installdir; then
17906            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17907        fi
17908        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17909        touch $tmpfile
17910        if test ! -f $tmpfile; then
17911            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17912        fi
17913
17914    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17915    # $tmpfile is the local file name for the downloaded file.
17916    VALID_TOOL=no
17917    if test "x$BDEPS_FTP" = xwget; then
17918       VALID_TOOL=yes
17919       wget -O $tmpfile $with_builddeps_server/$resource
17920    fi
17921    if test "x$BDEPS_FTP" = xlftp; then
17922       VALID_TOOL=yes
17923       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17924    fi
17925    if test "x$BDEPS_FTP" = xftp; then
17926        VALID_TOOL=yes
17927        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17928        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17929        FTPUSERPWD=${FTPSERVER%%@*}
17930        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17931            FTPUSER=${userpwd%%:*}
17932            FTPPWD=${userpwd#*@}
17933            FTPSERVER=${FTPSERVER#*@}
17934        else
17935            FTPUSER=ftp
17936            FTPPWD=ftp
17937        fi
17938        # the "pass" command does not work on some
17939        # ftp clients (read ftp.exe) but if it works,
17940        # passive mode is better!
17941        (\
17942            echo "user $FTPUSER $FTPPWD"        ;\
17943            echo "pass"                         ;\
17944            echo "bin"                          ;\
17945            echo "get $FTPPATH $tmpfile"              ;\
17946        ) | ftp -in $FTPSERVER
17947    fi
17948    if test "x$VALID_TOOL" != xyes; then
17949       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17950    fi
17951
17952        mv $tmpfile $installdir/$filename
17953        if test ! -s $installdir/$filename; then
17954            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17955        fi
17956        case "$extension" in
17957            zip)  echo "Unzipping $installdir/$filename..."
17958               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17959            ;;
17960            tar.gz) echo "Untaring $installdir/$filename..."
17961               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17962            ;;
17963            tgz) echo "Untaring $installdir/$filename..."
17964               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17965            ;;
17966            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
17967            ;;
17968        esac
17969    fi
17970    if test -f $installdir/$filename.unpacked; then
17971        depdir=$installdir
17972    fi
17973
17974	    fi
17975            # Source the builddeps file again, because in the previous command, the depdir
17976            # was updated to point at the current build dependency install directory.
17977            . $builddepsfile
17978            # Now extract variables from the builddeps.conf files.
17979            theroot=${builddep_devkit_ROOT}
17980            thecflags=${builddep_devkit_CFLAGS}
17981            thelibs=${builddep_devkit_LIBS}
17982            if test "x$depdir" = x; then
17983                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
17984            fi
17985            DEVKIT=$depdir
17986            if test "x$theroot" != x; then
17987               DEVKIT="$theroot"
17988            fi
17989            if test "x$thecflags" != x; then
17990               DEVKIT_CFLAGS="$thecflags"
17991            fi
17992            if test "x$thelibs" != x; then
17993               DEVKIT_LIBS="$thelibs"
17994            fi
17995            # Found devkit
17996                     PATH="$DEVKIT/bin:$PATH"
17997                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
17998                     if test "x$x_includes" = "xNONE"; then
17999                         x_includes="$SYS_ROOT/usr/include/X11"
18000                     fi
18001                     if test "x$x_libraries" = "xNONE"; then
18002                         x_libraries="$SYS_ROOT/usr/lib"
18003                     fi
18004
18005
18006        fi
18007
18008    fi
18009
18010
18011if test "x$SYS_ROOT" != "x/" ; then
18012    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18013    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18014    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18015    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18016    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18017    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18018fi
18019
18020# Store the CFLAGS etal passed to the configure script.
18021ORG_CFLAGS="$CFLAGS"
18022ORG_CXXFLAGS="$CXXFLAGS"
18023ORG_OBJCFLAGS="$OBJCFLAGS"
18024
18025# autoconf magic only relies on PATH, so update it if tools dir is specified
18026OLD_PATH="$PATH"
18027if test "x$TOOLS_DIR" != x; then
18028  PATH=$TOOLS_DIR:$PATH
18029fi
18030
18031
18032### Locate C compiler (CC)
18033
18034# gcc is almost always present, but on Windows we
18035# prefer cl.exe and on Solaris we prefer CC.
18036# Thus test for them in this order.
18037if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18038  # Do not probe for cc on MacOSX.
18039  COMPILER_CHECK_LIST="cl gcc"
18040else
18041  COMPILER_CHECK_LIST="cl cc gcc"
18042fi
18043
18044
18045  COMPILER_NAME=C
18046
18047  CC=
18048  # If TOOLS_DIR is set, check for all compiler names in there first
18049  # before checking the rest of the PATH.
18050  if test -n "$TOOLS_DIR"; then
18051    PATH_save="$PATH"
18052    PATH="$TOOLS_DIR"
18053    for ac_prog in $COMPILER_CHECK_LIST
18054do
18055  # Extract the first word of "$ac_prog", so it can be a program name with args.
18056set dummy $ac_prog; ac_word=$2
18057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18058$as_echo_n "checking for $ac_word... " >&6; }
18059if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18060  $as_echo_n "(cached) " >&6
18061else
18062  case $TOOLS_DIR_CC in
18063  [\\/]* | ?:[\\/]*)
18064  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18065  ;;
18066  *)
18067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18068for as_dir in $PATH
18069do
18070  IFS=$as_save_IFS
18071  test -z "$as_dir" && as_dir=.
18072    for ac_exec_ext in '' $ac_executable_extensions; do
18073  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18074    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18076    break 2
18077  fi
18078done
18079  done
18080IFS=$as_save_IFS
18081
18082  ;;
18083esac
18084fi
18085TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18086if test -n "$TOOLS_DIR_CC"; then
18087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18088$as_echo "$TOOLS_DIR_CC" >&6; }
18089else
18090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18091$as_echo "no" >&6; }
18092fi
18093
18094
18095  test -n "$TOOLS_DIR_CC" && break
18096done
18097
18098    CC=$TOOLS_DIR_CC
18099    PATH="$PATH_save"
18100  fi
18101
18102  # AC_PATH_PROGS can't be run multiple times with the same variable,
18103  # so create a new name for this run.
18104  if test "x$CC" = x; then
18105    for ac_prog in $COMPILER_CHECK_LIST
18106do
18107  # Extract the first word of "$ac_prog", so it can be a program name with args.
18108set dummy $ac_prog; ac_word=$2
18109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18110$as_echo_n "checking for $ac_word... " >&6; }
18111if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18112  $as_echo_n "(cached) " >&6
18113else
18114  case $POTENTIAL_CC in
18115  [\\/]* | ?:[\\/]*)
18116  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18117  ;;
18118  *)
18119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18120for as_dir in $PATH
18121do
18122  IFS=$as_save_IFS
18123  test -z "$as_dir" && as_dir=.
18124    for ac_exec_ext in '' $ac_executable_extensions; do
18125  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18126    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18128    break 2
18129  fi
18130done
18131  done
18132IFS=$as_save_IFS
18133
18134  ;;
18135esac
18136fi
18137POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18138if test -n "$POTENTIAL_CC"; then
18139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18140$as_echo "$POTENTIAL_CC" >&6; }
18141else
18142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18143$as_echo "no" >&6; }
18144fi
18145
18146
18147  test -n "$POTENTIAL_CC" && break
18148done
18149
18150    CC=$POTENTIAL_CC
18151  fi
18152
18153  if test "x$CC" = x; then
18154
18155    # Print a helpful message on how to acquire the necessary build dependency.
18156    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18157    MISSING_DEPENDENCY=devkit
18158    PKGHANDLER_COMMAND=
18159
18160    case $PKGHANDLER in
18161	apt-get)
18162                apt_help     $MISSING_DEPENDENCY ;;
18163    yum)
18164                yum_help     $MISSING_DEPENDENCY ;;
18165	port)
18166                port_help    $MISSING_DEPENDENCY ;;
18167	pkgutil)
18168                pkgutil_help $MISSING_DEPENDENCY ;;
18169	pkgadd)
18170                pkgadd_help  $MISSING_DEPENDENCY ;;
18171    * )
18172      break ;;
18173    esac
18174
18175    if test "x$PKGHANDLER_COMMAND" != x; then
18176        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18177    fi
18178
18179      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18180  fi
18181
18182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18183
18184  # First separate the path from the arguments. This will split at the first
18185  # space.
18186  complete="$CC"
18187  path="${complete%% *}"
18188  tmp="$complete EOL"
18189  arguments="${tmp#* }"
18190
18191  # Input might be given as Windows format, start by converting to
18192  # unix format.
18193  new_path=`$CYGPATH -u "$path"`
18194
18195  # Now try to locate executable using which
18196  new_path=`$WHICH "$new_path" 2> /dev/null`
18197  # bat and cmd files are not always considered executable in cygwin causing which
18198  # to not find them
18199  if test "x$new_path" = x \
18200           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18201           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18202    new_path=`$CYGPATH -u "$path"`
18203  fi
18204  if test "x$new_path" = x; then
18205    # Oops. Which didn't find the executable.
18206    # The splitting of arguments from the executable at a space might have been incorrect,
18207    # since paths with space are more likely in Windows. Give it another try with the whole
18208    # argument.
18209    path="$complete"
18210    arguments="EOL"
18211    new_path=`$CYGPATH -u "$path"`
18212    new_path=`$WHICH "$new_path" 2> /dev/null`
18213    # bat and cmd files are not always considered executable in cygwin causing which
18214    # to not find them
18215    if test "x$new_path" = x \
18216             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18217             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18218      new_path=`$CYGPATH -u "$path"`
18219    fi
18220    if test "x$new_path" = x; then
18221      # It's still not found. Now this is an unrecoverable error.
18222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18223$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18224      has_space=`$ECHO "$complete" | $GREP " "`
18225      if test "x$has_space" != x; then
18226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18228      fi
18229      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18230    fi
18231  fi
18232
18233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18236  # "foo.exe" is OK but "foo" is an error.
18237  #
18238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18239  # It is also a way to make sure we got the proper file name for the real test later on.
18240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18241  if test "x$test_shortpath" = x; then
18242    # Short path failed, file does not exist as specified.
18243    # Try adding .exe or .cmd
18244    if test -f "${new_path}.exe"; then
18245       input_to_shortpath="${new_path}.exe"
18246    elif test -f "${new_path}.cmd"; then
18247       input_to_shortpath="${new_path}.cmd"
18248    else
18249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18250$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18251      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18252$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18253      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18254    fi
18255  else
18256    input_to_shortpath="$new_path"
18257  fi
18258
18259  # Call helper function which possibly converts this using DOS-style short mode.
18260  # If so, the updated path is stored in $new_path.
18261  new_path="$input_to_shortpath"
18262
18263  input_path="$input_to_shortpath"
18264  # Check if we need to convert this using DOS-style short mode. If the path
18265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18266  # take no chances and rewrite it.
18267  # Note: m4 eats our [], so we need to use [ and ] instead.
18268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18269  if test "x$has_forbidden_chars" != x; then
18270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18274      # Going to short mode and back again did indeed matter. Since short mode is
18275      # case insensitive, let's make it lowercase to improve readability.
18276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18277      # Now convert it back to Unix-stile (cygpath)
18278      input_path=`$CYGPATH -u "$shortmode_path"`
18279      new_path="$input_path"
18280    fi
18281  fi
18282
18283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18284  if test "x$test_cygdrive_prefix" = x; then
18285    # As a simple fix, exclude /usr/bin since it's not a real path.
18286    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18288      # a path prefixed by /cygdrive for fixpath to work.
18289      new_path="$CYGWIN_ROOT_PATH$input_path"
18290    fi
18291  fi
18292
18293  # remove trailing .exe if any
18294  new_path="${new_path/%.exe/}"
18295
18296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18297
18298  # First separate the path from the arguments. This will split at the first
18299  # space.
18300  complete="$CC"
18301  path="${complete%% *}"
18302  tmp="$complete EOL"
18303  arguments="${tmp#* }"
18304
18305  # Input might be given as Windows format, start by converting to
18306  # unix format.
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  # Now try to locate executable using which
18320  new_path=`$WHICH "$new_path" 2> /dev/null`
18321
18322  if test "x$new_path" = x; then
18323    # Oops. Which didn't find the executable.
18324    # The splitting of arguments from the executable at a space might have been incorrect,
18325    # since paths with space are more likely in Windows. Give it another try with the whole
18326    # argument.
18327    path="$complete"
18328    arguments="EOL"
18329    new_path="$path"
18330
18331  windows_path="$new_path"
18332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18333    unix_path=`$CYGPATH -u "$windows_path"`
18334    new_path="$unix_path"
18335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18337    new_path="$unix_path"
18338  fi
18339
18340
18341    new_path=`$WHICH "$new_path" 2> /dev/null`
18342
18343    if test "x$new_path" = x; then
18344      # It's still not found. Now this is an unrecoverable error.
18345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18346$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18347      has_space=`$ECHO "$complete" | $GREP " "`
18348      if test "x$has_space" != x; then
18349        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18350$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18351      fi
18352      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18353    fi
18354  fi
18355
18356  # Now new_path has a complete unix path to the binary
18357  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18358    # Keep paths in /bin as-is, but remove trailing .exe if any
18359    new_path="${new_path/%.exe/}"
18360    # Do not save /bin paths to all_fixpath_prefixes!
18361  else
18362    # Not in mixed or Windows style, start by that.
18363    new_path=`cmd //c echo $new_path`
18364
18365  input_path="$new_path"
18366  # Check if we need to convert this using DOS-style short mode. If the path
18367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18368  # take no chances and rewrite it.
18369  # Note: m4 eats our [], so we need to use [ and ] instead.
18370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18371  if test "x$has_forbidden_chars" != x; then
18372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18374  fi
18375
18376    # Output is in $new_path
18377
18378  windows_path="$new_path"
18379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18380    unix_path=`$CYGPATH -u "$windows_path"`
18381    new_path="$unix_path"
18382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18384    new_path="$unix_path"
18385  fi
18386
18387    # remove trailing .exe if any
18388    new_path="${new_path/%.exe/}"
18389
18390    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18391    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18392  fi
18393
18394  else
18395    # We're on a posix platform. Hooray! :)
18396    # First separate the path from the arguments. This will split at the first
18397    # space.
18398    complete="$CC"
18399    path="${complete%% *}"
18400    tmp="$complete EOL"
18401    arguments="${tmp#* }"
18402
18403    # Cannot rely on the command "which" here since it doesn't always work.
18404    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18405    if test -z "$is_absolute_path"; then
18406      # Path to executable is not absolute. Find it.
18407      IFS_save="$IFS"
18408      IFS=:
18409      for p in $PATH; do
18410        if test -f "$p/$path" && test -x "$p/$path"; then
18411          new_path="$p/$path"
18412          break
18413        fi
18414      done
18415      IFS="$IFS_save"
18416    else
18417      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18418$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18419      new_path="$path"
18420    fi
18421
18422    if test "x$new_path" = x; then
18423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18424$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18425        has_space=`$ECHO "$complete" | $GREP " "`
18426        if test "x$has_space" != x; then
18427          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18428$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18429        fi
18430        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18431      fi
18432  fi
18433
18434      # Now join together the path and the arguments once again
18435      if test "x$arguments" != xEOL; then
18436        new_complete="$new_path ${arguments% *}"
18437      else
18438        new_complete="$new_path"
18439      fi
18440
18441  if test "x$complete" != "x$new_complete"; then
18442      CC="$new_complete"
18443      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18444$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18445    fi
18446
18447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18448$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18449  TEST_COMPILER="$CC"
18450
18451    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18452        # Follow a chain of symbolic links. Use readlink
18453        # where it exists, else fall back to horribly
18454        # complicated shell code.
18455        if test "x$READLINK_TESTED" != yes; then
18456            # On MacOSX there is a readlink tool with a different
18457            # purpose than the GNU readlink tool. Check the found readlink.
18458            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18459            if test "x$ISGNU" = x; then
18460                 # A readlink that we do not know how to use.
18461                 # Are there other non-GNU readlinks out there?
18462                 READLINK_TESTED=yes
18463                 READLINK=
18464            fi
18465        fi
18466
18467        if test "x$READLINK" != x; then
18468            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18469        else
18470            # Save the current directory for restoring afterwards
18471            STARTDIR=$PWD
18472            COUNTER=0
18473            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18474            sym_link_file=`$BASENAME $TEST_COMPILER`
18475            # Use the system pwd and not the shell builtin to resolve directory symlinks
18476            cd $sym_link_dir
18477            cd `$THEPWDCMD`
18478            sym_link_dir=`$THEPWDCMD`
18479            # Resolve file symlinks
18480            while test $COUNTER -lt 20; do
18481                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18482                if test "x$ISLINK" == x; then
18483                    # This is not a symbolic link! We are done!
18484                    break
18485                fi
18486                # Again resolve directory symlinks since the target of the just found
18487                # link could be in a different directory
18488                cd `$DIRNAME $ISLINK`
18489                sym_link_dir=`$THEPWDCMD`
18490                sym_link_file=`$BASENAME $ISLINK`
18491                let COUNTER=COUNTER+1
18492            done
18493            cd $STARTDIR
18494            TEST_COMPILER=$sym_link_dir/$sym_link_file
18495        fi
18496    fi
18497
18498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18499$as_echo "$TEST_COMPILER" >&6; }
18500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18501$as_echo_n "checking if CC is disguised ccache... " >&6; }
18502
18503  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18504  if test "x$COMPILER_BASENAME" = "xccache"; then
18505    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18506$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18507    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18508    # We want to control ccache invocation ourselves, so ignore this cc and try
18509    # searching again.
18510
18511    # Remove the path to the fake ccache cc from the PATH
18512    RETRY_COMPILER_SAVED_PATH="$PATH"
18513    COMPILER_DIRNAME=`$DIRNAME $CC`
18514    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18515
18516    # Try again looking for our compiler
18517    if test -n "$ac_tool_prefix"; then
18518  for ac_prog in $COMPILER_CHECK_LIST
18519  do
18520    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18521set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18523$as_echo_n "checking for $ac_word... " >&6; }
18524if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18525  $as_echo_n "(cached) " >&6
18526else
18527  if test -n "$PROPER_COMPILER_CC"; then
18528  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18529else
18530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18531for as_dir in $PATH
18532do
18533  IFS=$as_save_IFS
18534  test -z "$as_dir" && as_dir=.
18535    for ac_exec_ext in '' $ac_executable_extensions; do
18536  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18537    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18539    break 2
18540  fi
18541done
18542  done
18543IFS=$as_save_IFS
18544
18545fi
18546fi
18547PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18548if test -n "$PROPER_COMPILER_CC"; then
18549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18550$as_echo "$PROPER_COMPILER_CC" >&6; }
18551else
18552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18553$as_echo "no" >&6; }
18554fi
18555
18556
18557    test -n "$PROPER_COMPILER_CC" && break
18558  done
18559fi
18560if test -z "$PROPER_COMPILER_CC"; then
18561  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18562  for ac_prog in $COMPILER_CHECK_LIST
18563do
18564  # Extract the first word of "$ac_prog", so it can be a program name with args.
18565set dummy $ac_prog; ac_word=$2
18566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18567$as_echo_n "checking for $ac_word... " >&6; }
18568if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18569  $as_echo_n "(cached) " >&6
18570else
18571  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18572  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18573else
18574as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18575for as_dir in $PATH
18576do
18577  IFS=$as_save_IFS
18578  test -z "$as_dir" && as_dir=.
18579    for ac_exec_ext in '' $ac_executable_extensions; do
18580  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18581    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18583    break 2
18584  fi
18585done
18586  done
18587IFS=$as_save_IFS
18588
18589fi
18590fi
18591ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18592if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18594$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18595else
18596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18597$as_echo "no" >&6; }
18598fi
18599
18600
18601  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18602done
18603
18604  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18605    PROPER_COMPILER_CC=""
18606  else
18607    case $cross_compiling:$ac_tool_warned in
18608yes:)
18609{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18610$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18611ac_tool_warned=yes ;;
18612esac
18613    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18614  fi
18615fi
18616
18617
18618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18619
18620  # First separate the path from the arguments. This will split at the first
18621  # space.
18622  complete="$PROPER_COMPILER_CC"
18623  path="${complete%% *}"
18624  tmp="$complete EOL"
18625  arguments="${tmp#* }"
18626
18627  # Input might be given as Windows format, start by converting to
18628  # unix format.
18629  new_path=`$CYGPATH -u "$path"`
18630
18631  # Now try to locate executable using which
18632  new_path=`$WHICH "$new_path" 2> /dev/null`
18633  # bat and cmd files are not always considered executable in cygwin causing which
18634  # to not find them
18635  if test "x$new_path" = x \
18636           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18637           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18638    new_path=`$CYGPATH -u "$path"`
18639  fi
18640  if test "x$new_path" = x; then
18641    # Oops. Which didn't find the executable.
18642    # The splitting of arguments from the executable at a space might have been incorrect,
18643    # since paths with space are more likely in Windows. Give it another try with the whole
18644    # argument.
18645    path="$complete"
18646    arguments="EOL"
18647    new_path=`$CYGPATH -u "$path"`
18648    new_path=`$WHICH "$new_path" 2> /dev/null`
18649    # bat and cmd files are not always considered executable in cygwin causing which
18650    # to not find them
18651    if test "x$new_path" = x \
18652             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18653             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18654      new_path=`$CYGPATH -u "$path"`
18655    fi
18656    if test "x$new_path" = x; then
18657      # It's still not found. Now this is an unrecoverable error.
18658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18659$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18660      has_space=`$ECHO "$complete" | $GREP " "`
18661      if test "x$has_space" != x; then
18662        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18663$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18664      fi
18665      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18666    fi
18667  fi
18668
18669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18672  # "foo.exe" is OK but "foo" is an error.
18673  #
18674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18675  # It is also a way to make sure we got the proper file name for the real test later on.
18676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18677  if test "x$test_shortpath" = x; then
18678    # Short path failed, file does not exist as specified.
18679    # Try adding .exe or .cmd
18680    if test -f "${new_path}.exe"; then
18681       input_to_shortpath="${new_path}.exe"
18682    elif test -f "${new_path}.cmd"; then
18683       input_to_shortpath="${new_path}.cmd"
18684    else
18685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18686$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18687      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18688$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18689      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18690    fi
18691  else
18692    input_to_shortpath="$new_path"
18693  fi
18694
18695  # Call helper function which possibly converts this using DOS-style short mode.
18696  # If so, the updated path is stored in $new_path.
18697  new_path="$input_to_shortpath"
18698
18699  input_path="$input_to_shortpath"
18700  # Check if we need to convert this using DOS-style short mode. If the path
18701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18702  # take no chances and rewrite it.
18703  # Note: m4 eats our [], so we need to use [ and ] instead.
18704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18705  if test "x$has_forbidden_chars" != x; then
18706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18710      # Going to short mode and back again did indeed matter. Since short mode is
18711      # case insensitive, let's make it lowercase to improve readability.
18712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18713      # Now convert it back to Unix-stile (cygpath)
18714      input_path=`$CYGPATH -u "$shortmode_path"`
18715      new_path="$input_path"
18716    fi
18717  fi
18718
18719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18720  if test "x$test_cygdrive_prefix" = x; then
18721    # As a simple fix, exclude /usr/bin since it's not a real path.
18722    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18724      # a path prefixed by /cygdrive for fixpath to work.
18725      new_path="$CYGWIN_ROOT_PATH$input_path"
18726    fi
18727  fi
18728
18729  # remove trailing .exe if any
18730  new_path="${new_path/%.exe/}"
18731
18732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18733
18734  # First separate the path from the arguments. This will split at the first
18735  # space.
18736  complete="$PROPER_COMPILER_CC"
18737  path="${complete%% *}"
18738  tmp="$complete EOL"
18739  arguments="${tmp#* }"
18740
18741  # Input might be given as Windows format, start by converting to
18742  # unix format.
18743  new_path="$path"
18744
18745  windows_path="$new_path"
18746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18747    unix_path=`$CYGPATH -u "$windows_path"`
18748    new_path="$unix_path"
18749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18751    new_path="$unix_path"
18752  fi
18753
18754
18755  # Now try to locate executable using which
18756  new_path=`$WHICH "$new_path" 2> /dev/null`
18757
18758  if test "x$new_path" = x; then
18759    # Oops. Which didn't find the executable.
18760    # The splitting of arguments from the executable at a space might have been incorrect,
18761    # since paths with space are more likely in Windows. Give it another try with the whole
18762    # argument.
18763    path="$complete"
18764    arguments="EOL"
18765    new_path="$path"
18766
18767  windows_path="$new_path"
18768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18769    unix_path=`$CYGPATH -u "$windows_path"`
18770    new_path="$unix_path"
18771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18773    new_path="$unix_path"
18774  fi
18775
18776
18777    new_path=`$WHICH "$new_path" 2> /dev/null`
18778
18779    if test "x$new_path" = x; then
18780      # It's still not found. Now this is an unrecoverable error.
18781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18782$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18783      has_space=`$ECHO "$complete" | $GREP " "`
18784      if test "x$has_space" != x; then
18785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18787      fi
18788      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18789    fi
18790  fi
18791
18792  # Now new_path has a complete unix path to the binary
18793  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18794    # Keep paths in /bin as-is, but remove trailing .exe if any
18795    new_path="${new_path/%.exe/}"
18796    # Do not save /bin paths to all_fixpath_prefixes!
18797  else
18798    # Not in mixed or Windows style, start by that.
18799    new_path=`cmd //c echo $new_path`
18800
18801  input_path="$new_path"
18802  # Check if we need to convert this using DOS-style short mode. If the path
18803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18804  # take no chances and rewrite it.
18805  # Note: m4 eats our [], so we need to use [ and ] instead.
18806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18807  if test "x$has_forbidden_chars" != x; then
18808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18810  fi
18811
18812    # Output is in $new_path
18813
18814  windows_path="$new_path"
18815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18816    unix_path=`$CYGPATH -u "$windows_path"`
18817    new_path="$unix_path"
18818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18820    new_path="$unix_path"
18821  fi
18822
18823    # remove trailing .exe if any
18824    new_path="${new_path/%.exe/}"
18825
18826    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18827    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18828  fi
18829
18830  else
18831    # We're on a posix platform. Hooray! :)
18832    # First separate the path from the arguments. This will split at the first
18833    # space.
18834    complete="$PROPER_COMPILER_CC"
18835    path="${complete%% *}"
18836    tmp="$complete EOL"
18837    arguments="${tmp#* }"
18838
18839    # Cannot rely on the command "which" here since it doesn't always work.
18840    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18841    if test -z "$is_absolute_path"; then
18842      # Path to executable is not absolute. Find it.
18843      IFS_save="$IFS"
18844      IFS=:
18845      for p in $PATH; do
18846        if test -f "$p/$path" && test -x "$p/$path"; then
18847          new_path="$p/$path"
18848          break
18849        fi
18850      done
18851      IFS="$IFS_save"
18852    else
18853      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18854$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18855      new_path="$path"
18856    fi
18857
18858    if test "x$new_path" = x; then
18859        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18860$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18861        has_space=`$ECHO "$complete" | $GREP " "`
18862        if test "x$has_space" != x; then
18863          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18864$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18865        fi
18866        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18867      fi
18868  fi
18869
18870      # Now join together the path and the arguments once again
18871      if test "x$arguments" != xEOL; then
18872        new_complete="$new_path ${arguments% *}"
18873      else
18874        new_complete="$new_path"
18875      fi
18876
18877  if test "x$complete" != "x$new_complete"; then
18878      PROPER_COMPILER_CC="$new_complete"
18879      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18880$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18881    fi
18882
18883    PATH="$RETRY_COMPILER_SAVED_PATH"
18884
18885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18886$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18887
18888    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18889        # Follow a chain of symbolic links. Use readlink
18890        # where it exists, else fall back to horribly
18891        # complicated shell code.
18892        if test "x$READLINK_TESTED" != yes; then
18893            # On MacOSX there is a readlink tool with a different
18894            # purpose than the GNU readlink tool. Check the found readlink.
18895            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18896            if test "x$ISGNU" = x; then
18897                 # A readlink that we do not know how to use.
18898                 # Are there other non-GNU readlinks out there?
18899                 READLINK_TESTED=yes
18900                 READLINK=
18901            fi
18902        fi
18903
18904        if test "x$READLINK" != x; then
18905            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18906        else
18907            # Save the current directory for restoring afterwards
18908            STARTDIR=$PWD
18909            COUNTER=0
18910            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18911            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18912            # Use the system pwd and not the shell builtin to resolve directory symlinks
18913            cd $sym_link_dir
18914            cd `$THEPWDCMD`
18915            sym_link_dir=`$THEPWDCMD`
18916            # Resolve file symlinks
18917            while test $COUNTER -lt 20; do
18918                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18919                if test "x$ISLINK" == x; then
18920                    # This is not a symbolic link! We are done!
18921                    break
18922                fi
18923                # Again resolve directory symlinks since the target of the just found
18924                # link could be in a different directory
18925                cd `$DIRNAME $ISLINK`
18926                sym_link_dir=`$THEPWDCMD`
18927                sym_link_file=`$BASENAME $ISLINK`
18928                let COUNTER=COUNTER+1
18929            done
18930            cd $STARTDIR
18931            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18932        fi
18933    fi
18934
18935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18936$as_echo "$PROPER_COMPILER_CC" >&6; }
18937    CC="$PROPER_COMPILER_CC"
18938  else
18939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18940$as_echo "no, keeping CC" >&6; }
18941    CC="$TEST_COMPILER"
18942  fi
18943
18944  COMPILER=$CC
18945  COMPILER_NAME=$COMPILER_NAME
18946
18947  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18948    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18949    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18950    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18951    if test $? -ne 0; then
18952      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18953
18954      { $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
18955$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18956      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18957$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18958      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18959    else
18960      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18961      COMPILER_VENDOR="Sun Studio"
18962    fi
18963  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18964    # First line typically looks something like:
18965    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18966    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18967    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18968    COMPILER_VENDOR="Microsoft CL.EXE"
18969    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18970    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18971      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18972        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
18973      fi
18974    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18975      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18976        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
18977      fi
18978    fi
18979  else
18980    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18981    # Check that this is likely to be GCC.
18982    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
18983    if test $? -ne 0; then
18984      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
18985$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
18986      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
18987$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
18988      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18989    fi
18990
18991    # First line typically looks something like:
18992    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
18993    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
18994    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
18995  fi
18996  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
18997  CC_VERSION="$COMPILER_VERSION"
18998  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
18999  CC_VENDOR="$COMPILER_VENDOR"
19000
19001  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19002$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19003
19004
19005# Now that we have resolved CC ourself, let autoconf have it's go at it
19006ac_ext=c
19007ac_cpp='$CPP $CPPFLAGS'
19008ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19009ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19010ac_compiler_gnu=$ac_cv_c_compiler_gnu
19011if test -n "$ac_tool_prefix"; then
19012  for ac_prog in $CC
19013  do
19014    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19015set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19017$as_echo_n "checking for $ac_word... " >&6; }
19018if test "${ac_cv_prog_CC+set}" = set; then :
19019  $as_echo_n "(cached) " >&6
19020else
19021  if test -n "$CC"; then
19022  ac_cv_prog_CC="$CC" # Let the user override the test.
19023else
19024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19025for as_dir in $PATH
19026do
19027  IFS=$as_save_IFS
19028  test -z "$as_dir" && as_dir=.
19029    for ac_exec_ext in '' $ac_executable_extensions; do
19030  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19031    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19033    break 2
19034  fi
19035done
19036  done
19037IFS=$as_save_IFS
19038
19039fi
19040fi
19041CC=$ac_cv_prog_CC
19042if test -n "$CC"; then
19043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19044$as_echo "$CC" >&6; }
19045else
19046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19047$as_echo "no" >&6; }
19048fi
19049
19050
19051    test -n "$CC" && break
19052  done
19053fi
19054if test -z "$CC"; then
19055  ac_ct_CC=$CC
19056  for ac_prog in $CC
19057do
19058  # Extract the first word of "$ac_prog", so it can be a program name with args.
19059set dummy $ac_prog; ac_word=$2
19060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19061$as_echo_n "checking for $ac_word... " >&6; }
19062if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19063  $as_echo_n "(cached) " >&6
19064else
19065  if test -n "$ac_ct_CC"; then
19066  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19067else
19068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19069for as_dir in $PATH
19070do
19071  IFS=$as_save_IFS
19072  test -z "$as_dir" && as_dir=.
19073    for ac_exec_ext in '' $ac_executable_extensions; do
19074  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19075    ac_cv_prog_ac_ct_CC="$ac_prog"
19076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19077    break 2
19078  fi
19079done
19080  done
19081IFS=$as_save_IFS
19082
19083fi
19084fi
19085ac_ct_CC=$ac_cv_prog_ac_ct_CC
19086if test -n "$ac_ct_CC"; then
19087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19088$as_echo "$ac_ct_CC" >&6; }
19089else
19090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19091$as_echo "no" >&6; }
19092fi
19093
19094
19095  test -n "$ac_ct_CC" && break
19096done
19097
19098  if test "x$ac_ct_CC" = x; then
19099    CC=""
19100  else
19101    case $cross_compiling:$ac_tool_warned in
19102yes:)
19103{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19104$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19105ac_tool_warned=yes ;;
19106esac
19107    CC=$ac_ct_CC
19108  fi
19109fi
19110
19111
19112test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19113$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19114as_fn_error $? "no acceptable C compiler found in \$PATH
19115See \`config.log' for more details" "$LINENO" 5 ; }
19116
19117# Provide some information about the compiler.
19118$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19119set X $ac_compile
19120ac_compiler=$2
19121for ac_option in --version -v -V -qversion; do
19122  { { ac_try="$ac_compiler $ac_option >&5"
19123case "(($ac_try" in
19124  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19125  *) ac_try_echo=$ac_try;;
19126esac
19127eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19128$as_echo "$ac_try_echo"; } >&5
19129  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19130  ac_status=$?
19131  if test -s conftest.err; then
19132    sed '10a\
19133... rest of stderr output deleted ...
19134         10q' conftest.err >conftest.er1
19135    cat conftest.er1 >&5
19136  fi
19137  rm -f conftest.er1 conftest.err
19138  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19139  test $ac_status = 0; }
19140done
19141
19142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19143/* end confdefs.h.  */
19144
19145int
19146main ()
19147{
19148
19149  ;
19150  return 0;
19151}
19152_ACEOF
19153ac_clean_files_save=$ac_clean_files
19154ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19155# Try to create an executable without -o first, disregard a.out.
19156# It will help us diagnose broken compilers, and finding out an intuition
19157# of exeext.
19158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19159$as_echo_n "checking whether the C compiler works... " >&6; }
19160ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19161
19162# The possible output files:
19163ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19164
19165ac_rmfiles=
19166for ac_file in $ac_files
19167do
19168  case $ac_file in
19169    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19170    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19171  esac
19172done
19173rm -f $ac_rmfiles
19174
19175if { { ac_try="$ac_link_default"
19176case "(($ac_try" in
19177  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19178  *) ac_try_echo=$ac_try;;
19179esac
19180eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19181$as_echo "$ac_try_echo"; } >&5
19182  (eval "$ac_link_default") 2>&5
19183  ac_status=$?
19184  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19185  test $ac_status = 0; }; then :
19186  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19187# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19188# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19189# so that the user can short-circuit this test for compilers unknown to
19190# Autoconf.
19191for ac_file in $ac_files ''
19192do
19193  test -f "$ac_file" || continue
19194  case $ac_file in
19195    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19196	;;
19197    [ab].out )
19198	# We found the default executable, but exeext='' is most
19199	# certainly right.
19200	break;;
19201    *.* )
19202	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19203	then :; else
19204	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19205	fi
19206	# We set ac_cv_exeext here because the later test for it is not
19207	# safe: cross compilers may not add the suffix if given an `-o'
19208	# argument, so we may need to know it at that point already.
19209	# Even if this section looks crufty: it has the advantage of
19210	# actually working.
19211	break;;
19212    * )
19213	break;;
19214  esac
19215done
19216test "$ac_cv_exeext" = no && ac_cv_exeext=
19217
19218else
19219  ac_file=''
19220fi
19221if test -z "$ac_file"; then :
19222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19223$as_echo "no" >&6; }
19224$as_echo "$as_me: failed program was:" >&5
19225sed 's/^/| /' conftest.$ac_ext >&5
19226
19227{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19228$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19229as_fn_error 77 "C compiler cannot create executables
19230See \`config.log' for more details" "$LINENO" 5 ; }
19231else
19232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19233$as_echo "yes" >&6; }
19234fi
19235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19236$as_echo_n "checking for C compiler default output file name... " >&6; }
19237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19238$as_echo "$ac_file" >&6; }
19239ac_exeext=$ac_cv_exeext
19240
19241rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19242ac_clean_files=$ac_clean_files_save
19243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19244$as_echo_n "checking for suffix of executables... " >&6; }
19245if { { ac_try="$ac_link"
19246case "(($ac_try" in
19247  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19248  *) ac_try_echo=$ac_try;;
19249esac
19250eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19251$as_echo "$ac_try_echo"; } >&5
19252  (eval "$ac_link") 2>&5
19253  ac_status=$?
19254  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19255  test $ac_status = 0; }; then :
19256  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19257# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19258# work properly (i.e., refer to `conftest.exe'), while it won't with
19259# `rm'.
19260for ac_file in conftest.exe conftest conftest.*; do
19261  test -f "$ac_file" || continue
19262  case $ac_file in
19263    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19264    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19265	  break;;
19266    * ) break;;
19267  esac
19268done
19269else
19270  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19271$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19272as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19273See \`config.log' for more details" "$LINENO" 5 ; }
19274fi
19275rm -f conftest conftest$ac_cv_exeext
19276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19277$as_echo "$ac_cv_exeext" >&6; }
19278
19279rm -f conftest.$ac_ext
19280EXEEXT=$ac_cv_exeext
19281ac_exeext=$EXEEXT
19282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19283/* end confdefs.h.  */
19284#include <stdio.h>
19285int
19286main ()
19287{
19288FILE *f = fopen ("conftest.out", "w");
19289 return ferror (f) || fclose (f) != 0;
19290
19291  ;
19292  return 0;
19293}
19294_ACEOF
19295ac_clean_files="$ac_clean_files conftest.out"
19296# Check that the compiler produces executables we can run.  If not, either
19297# the compiler is broken, or we cross compile.
19298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19299$as_echo_n "checking whether we are cross compiling... " >&6; }
19300if test "$cross_compiling" != yes; then
19301  { { ac_try="$ac_link"
19302case "(($ac_try" in
19303  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19304  *) ac_try_echo=$ac_try;;
19305esac
19306eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19307$as_echo "$ac_try_echo"; } >&5
19308  (eval "$ac_link") 2>&5
19309  ac_status=$?
19310  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19311  test $ac_status = 0; }
19312  if { ac_try='./conftest$ac_cv_exeext'
19313  { { case "(($ac_try" in
19314  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19315  *) ac_try_echo=$ac_try;;
19316esac
19317eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19318$as_echo "$ac_try_echo"; } >&5
19319  (eval "$ac_try") 2>&5
19320  ac_status=$?
19321  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19322  test $ac_status = 0; }; }; then
19323    cross_compiling=no
19324  else
19325    if test "$cross_compiling" = maybe; then
19326	cross_compiling=yes
19327    else
19328	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19329$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19330as_fn_error $? "cannot run C compiled programs.
19331If you meant to cross compile, use \`--host'.
19332See \`config.log' for more details" "$LINENO" 5 ; }
19333    fi
19334  fi
19335fi
19336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19337$as_echo "$cross_compiling" >&6; }
19338
19339rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19340ac_clean_files=$ac_clean_files_save
19341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19342$as_echo_n "checking for suffix of object files... " >&6; }
19343if test "${ac_cv_objext+set}" = set; then :
19344  $as_echo_n "(cached) " >&6
19345else
19346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19347/* end confdefs.h.  */
19348
19349int
19350main ()
19351{
19352
19353  ;
19354  return 0;
19355}
19356_ACEOF
19357rm -f conftest.o conftest.obj
19358if { { ac_try="$ac_compile"
19359case "(($ac_try" in
19360  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19361  *) ac_try_echo=$ac_try;;
19362esac
19363eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19364$as_echo "$ac_try_echo"; } >&5
19365  (eval "$ac_compile") 2>&5
19366  ac_status=$?
19367  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19368  test $ac_status = 0; }; then :
19369  for ac_file in conftest.o conftest.obj conftest.*; do
19370  test -f "$ac_file" || continue;
19371  case $ac_file in
19372    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19373    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19374       break;;
19375  esac
19376done
19377else
19378  $as_echo "$as_me: failed program was:" >&5
19379sed 's/^/| /' conftest.$ac_ext >&5
19380
19381{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19382$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19383as_fn_error $? "cannot compute suffix of object files: cannot compile
19384See \`config.log' for more details" "$LINENO" 5 ; }
19385fi
19386rm -f conftest.$ac_cv_objext conftest.$ac_ext
19387fi
19388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19389$as_echo "$ac_cv_objext" >&6; }
19390OBJEXT=$ac_cv_objext
19391ac_objext=$OBJEXT
19392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19393$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19394if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19395  $as_echo_n "(cached) " >&6
19396else
19397  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19398/* end confdefs.h.  */
19399
19400int
19401main ()
19402{
19403#ifndef __GNUC__
19404       choke me
19405#endif
19406
19407  ;
19408  return 0;
19409}
19410_ACEOF
19411if ac_fn_c_try_compile "$LINENO"; then :
19412  ac_compiler_gnu=yes
19413else
19414  ac_compiler_gnu=no
19415fi
19416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19417ac_cv_c_compiler_gnu=$ac_compiler_gnu
19418
19419fi
19420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19421$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19422if test $ac_compiler_gnu = yes; then
19423  GCC=yes
19424else
19425  GCC=
19426fi
19427ac_test_CFLAGS=${CFLAGS+set}
19428ac_save_CFLAGS=$CFLAGS
19429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19430$as_echo_n "checking whether $CC accepts -g... " >&6; }
19431if test "${ac_cv_prog_cc_g+set}" = set; then :
19432  $as_echo_n "(cached) " >&6
19433else
19434  ac_save_c_werror_flag=$ac_c_werror_flag
19435   ac_c_werror_flag=yes
19436   ac_cv_prog_cc_g=no
19437   CFLAGS="-g"
19438   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19439/* end confdefs.h.  */
19440
19441int
19442main ()
19443{
19444
19445  ;
19446  return 0;
19447}
19448_ACEOF
19449if ac_fn_c_try_compile "$LINENO"; then :
19450  ac_cv_prog_cc_g=yes
19451else
19452  CFLAGS=""
19453      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19454/* end confdefs.h.  */
19455
19456int
19457main ()
19458{
19459
19460  ;
19461  return 0;
19462}
19463_ACEOF
19464if ac_fn_c_try_compile "$LINENO"; then :
19465
19466else
19467  ac_c_werror_flag=$ac_save_c_werror_flag
19468	 CFLAGS="-g"
19469	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19470/* end confdefs.h.  */
19471
19472int
19473main ()
19474{
19475
19476  ;
19477  return 0;
19478}
19479_ACEOF
19480if ac_fn_c_try_compile "$LINENO"; then :
19481  ac_cv_prog_cc_g=yes
19482fi
19483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19484fi
19485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19486fi
19487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19488   ac_c_werror_flag=$ac_save_c_werror_flag
19489fi
19490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19491$as_echo "$ac_cv_prog_cc_g" >&6; }
19492if test "$ac_test_CFLAGS" = set; then
19493  CFLAGS=$ac_save_CFLAGS
19494elif test $ac_cv_prog_cc_g = yes; then
19495  if test "$GCC" = yes; then
19496    CFLAGS="-g -O2"
19497  else
19498    CFLAGS="-g"
19499  fi
19500else
19501  if test "$GCC" = yes; then
19502    CFLAGS="-O2"
19503  else
19504    CFLAGS=
19505  fi
19506fi
19507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19508$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19509if test "${ac_cv_prog_cc_c89+set}" = set; then :
19510  $as_echo_n "(cached) " >&6
19511else
19512  ac_cv_prog_cc_c89=no
19513ac_save_CC=$CC
19514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19515/* end confdefs.h.  */
19516#include <stdarg.h>
19517#include <stdio.h>
19518#include <sys/types.h>
19519#include <sys/stat.h>
19520/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19521struct buf { int x; };
19522FILE * (*rcsopen) (struct buf *, struct stat *, int);
19523static char *e (p, i)
19524     char **p;
19525     int i;
19526{
19527  return p[i];
19528}
19529static char *f (char * (*g) (char **, int), char **p, ...)
19530{
19531  char *s;
19532  va_list v;
19533  va_start (v,p);
19534  s = g (p, va_arg (v,int));
19535  va_end (v);
19536  return s;
19537}
19538
19539/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19540   function prototypes and stuff, but not '\xHH' hex character constants.
19541   These don't provoke an error unfortunately, instead are silently treated
19542   as 'x'.  The following induces an error, until -std is added to get
19543   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19544   array size at least.  It's necessary to write '\x00'==0 to get something
19545   that's true only with -std.  */
19546int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19547
19548/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19549   inside strings and character constants.  */
19550#define FOO(x) 'x'
19551int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19552
19553int test (int i, double x);
19554struct s1 {int (*f) (int a);};
19555struct s2 {int (*f) (double a);};
19556int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19557int argc;
19558char **argv;
19559int
19560main ()
19561{
19562return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19563  ;
19564  return 0;
19565}
19566_ACEOF
19567for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19568	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19569do
19570  CC="$ac_save_CC $ac_arg"
19571  if ac_fn_c_try_compile "$LINENO"; then :
19572  ac_cv_prog_cc_c89=$ac_arg
19573fi
19574rm -f core conftest.err conftest.$ac_objext
19575  test "x$ac_cv_prog_cc_c89" != "xno" && break
19576done
19577rm -f conftest.$ac_ext
19578CC=$ac_save_CC
19579
19580fi
19581# AC_CACHE_VAL
19582case "x$ac_cv_prog_cc_c89" in
19583  x)
19584    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19585$as_echo "none needed" >&6; } ;;
19586  xno)
19587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19588$as_echo "unsupported" >&6; } ;;
19589  *)
19590    CC="$CC $ac_cv_prog_cc_c89"
19591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19592$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19593esac
19594if test "x$ac_cv_prog_cc_c89" != xno; then :
19595
19596fi
19597
19598ac_ext=cpp
19599ac_cpp='$CXXCPP $CPPFLAGS'
19600ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19601ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19602ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19603
19604
19605### Locate C++ compiler (CXX)
19606
19607if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19608  # Do not probe for CC on MacOSX.
19609  COMPILER_CHECK_LIST="cl g++"
19610else
19611  COMPILER_CHECK_LIST="cl CC g++"
19612fi
19613
19614  COMPILER_NAME=C++
19615
19616  CXX=
19617  # If TOOLS_DIR is set, check for all compiler names in there first
19618  # before checking the rest of the PATH.
19619  if test -n "$TOOLS_DIR"; then
19620    PATH_save="$PATH"
19621    PATH="$TOOLS_DIR"
19622    for ac_prog in $COMPILER_CHECK_LIST
19623do
19624  # Extract the first word of "$ac_prog", so it can be a program name with args.
19625set dummy $ac_prog; ac_word=$2
19626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19627$as_echo_n "checking for $ac_word... " >&6; }
19628if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
19629  $as_echo_n "(cached) " >&6
19630else
19631  case $TOOLS_DIR_CXX in
19632  [\\/]* | ?:[\\/]*)
19633  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19634  ;;
19635  *)
19636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19637for as_dir in $PATH
19638do
19639  IFS=$as_save_IFS
19640  test -z "$as_dir" && as_dir=.
19641    for ac_exec_ext in '' $ac_executable_extensions; do
19642  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19643    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19645    break 2
19646  fi
19647done
19648  done
19649IFS=$as_save_IFS
19650
19651  ;;
19652esac
19653fi
19654TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19655if test -n "$TOOLS_DIR_CXX"; then
19656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19657$as_echo "$TOOLS_DIR_CXX" >&6; }
19658else
19659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19660$as_echo "no" >&6; }
19661fi
19662
19663
19664  test -n "$TOOLS_DIR_CXX" && break
19665done
19666
19667    CXX=$TOOLS_DIR_CXX
19668    PATH="$PATH_save"
19669  fi
19670
19671  # AC_PATH_PROGS can't be run multiple times with the same variable,
19672  # so create a new name for this run.
19673  if test "x$CXX" = x; then
19674    for ac_prog in $COMPILER_CHECK_LIST
19675do
19676  # Extract the first word of "$ac_prog", so it can be a program name with args.
19677set dummy $ac_prog; ac_word=$2
19678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19679$as_echo_n "checking for $ac_word... " >&6; }
19680if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19681  $as_echo_n "(cached) " >&6
19682else
19683  case $POTENTIAL_CXX in
19684  [\\/]* | ?:[\\/]*)
19685  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19686  ;;
19687  *)
19688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19689for as_dir in $PATH
19690do
19691  IFS=$as_save_IFS
19692  test -z "$as_dir" && as_dir=.
19693    for ac_exec_ext in '' $ac_executable_extensions; do
19694  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19695    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19697    break 2
19698  fi
19699done
19700  done
19701IFS=$as_save_IFS
19702
19703  ;;
19704esac
19705fi
19706POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19707if test -n "$POTENTIAL_CXX"; then
19708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19709$as_echo "$POTENTIAL_CXX" >&6; }
19710else
19711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19712$as_echo "no" >&6; }
19713fi
19714
19715
19716  test -n "$POTENTIAL_CXX" && break
19717done
19718
19719    CXX=$POTENTIAL_CXX
19720  fi
19721
19722  if test "x$CXX" = x; then
19723
19724    # Print a helpful message on how to acquire the necessary build dependency.
19725    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19726    MISSING_DEPENDENCY=devkit
19727    PKGHANDLER_COMMAND=
19728
19729    case $PKGHANDLER in
19730	apt-get)
19731                apt_help     $MISSING_DEPENDENCY ;;
19732    yum)
19733                yum_help     $MISSING_DEPENDENCY ;;
19734	port)
19735                port_help    $MISSING_DEPENDENCY ;;
19736	pkgutil)
19737                pkgutil_help $MISSING_DEPENDENCY ;;
19738	pkgadd)
19739                pkgadd_help  $MISSING_DEPENDENCY ;;
19740    * )
19741      break ;;
19742    esac
19743
19744    if test "x$PKGHANDLER_COMMAND" != x; then
19745        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19746    fi
19747
19748      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19749  fi
19750
19751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19752
19753  # First separate the path from the arguments. This will split at the first
19754  # space.
19755  complete="$CXX"
19756  path="${complete%% *}"
19757  tmp="$complete EOL"
19758  arguments="${tmp#* }"
19759
19760  # Input might be given as Windows format, start by converting to
19761  # unix format.
19762  new_path=`$CYGPATH -u "$path"`
19763
19764  # Now try to locate executable using which
19765  new_path=`$WHICH "$new_path" 2> /dev/null`
19766  # bat and cmd files are not always considered executable in cygwin causing which
19767  # to not find them
19768  if test "x$new_path" = x \
19769           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19770           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19771    new_path=`$CYGPATH -u "$path"`
19772  fi
19773  if test "x$new_path" = x; then
19774    # Oops. Which didn't find the executable.
19775    # The splitting of arguments from the executable at a space might have been incorrect,
19776    # since paths with space are more likely in Windows. Give it another try with the whole
19777    # argument.
19778    path="$complete"
19779    arguments="EOL"
19780    new_path=`$CYGPATH -u "$path"`
19781    new_path=`$WHICH "$new_path" 2> /dev/null`
19782    # bat and cmd files are not always considered executable in cygwin causing which
19783    # to not find them
19784    if test "x$new_path" = x \
19785             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19786             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19787      new_path=`$CYGPATH -u "$path"`
19788    fi
19789    if test "x$new_path" = x; then
19790      # It's still not found. Now this is an unrecoverable error.
19791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19792$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19793      has_space=`$ECHO "$complete" | $GREP " "`
19794      if test "x$has_space" != x; then
19795        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19796$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19797      fi
19798      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19799    fi
19800  fi
19801
19802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19805  # "foo.exe" is OK but "foo" is an error.
19806  #
19807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19808  # It is also a way to make sure we got the proper file name for the real test later on.
19809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19810  if test "x$test_shortpath" = x; then
19811    # Short path failed, file does not exist as specified.
19812    # Try adding .exe or .cmd
19813    if test -f "${new_path}.exe"; then
19814       input_to_shortpath="${new_path}.exe"
19815    elif test -f "${new_path}.cmd"; then
19816       input_to_shortpath="${new_path}.cmd"
19817    else
19818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19819$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19820      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19821$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19822      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19823    fi
19824  else
19825    input_to_shortpath="$new_path"
19826  fi
19827
19828  # Call helper function which possibly converts this using DOS-style short mode.
19829  # If so, the updated path is stored in $new_path.
19830  new_path="$input_to_shortpath"
19831
19832  input_path="$input_to_shortpath"
19833  # Check if we need to convert this using DOS-style short mode. If the path
19834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19835  # take no chances and rewrite it.
19836  # Note: m4 eats our [], so we need to use [ and ] instead.
19837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19838  if test "x$has_forbidden_chars" != x; then
19839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19843      # Going to short mode and back again did indeed matter. Since short mode is
19844      # case insensitive, let's make it lowercase to improve readability.
19845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19846      # Now convert it back to Unix-stile (cygpath)
19847      input_path=`$CYGPATH -u "$shortmode_path"`
19848      new_path="$input_path"
19849    fi
19850  fi
19851
19852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19853  if test "x$test_cygdrive_prefix" = x; then
19854    # As a simple fix, exclude /usr/bin since it's not a real path.
19855    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19857      # a path prefixed by /cygdrive for fixpath to work.
19858      new_path="$CYGWIN_ROOT_PATH$input_path"
19859    fi
19860  fi
19861
19862  # remove trailing .exe if any
19863  new_path="${new_path/%.exe/}"
19864
19865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19866
19867  # First separate the path from the arguments. This will split at the first
19868  # space.
19869  complete="$CXX"
19870  path="${complete%% *}"
19871  tmp="$complete EOL"
19872  arguments="${tmp#* }"
19873
19874  # Input might be given as Windows format, start by converting to
19875  # unix format.
19876  new_path="$path"
19877
19878  windows_path="$new_path"
19879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19880    unix_path=`$CYGPATH -u "$windows_path"`
19881    new_path="$unix_path"
19882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19884    new_path="$unix_path"
19885  fi
19886
19887
19888  # Now try to locate executable using which
19889  new_path=`$WHICH "$new_path" 2> /dev/null`
19890
19891  if test "x$new_path" = x; then
19892    # Oops. Which didn't find the executable.
19893    # The splitting of arguments from the executable at a space might have been incorrect,
19894    # since paths with space are more likely in Windows. Give it another try with the whole
19895    # argument.
19896    path="$complete"
19897    arguments="EOL"
19898    new_path="$path"
19899
19900  windows_path="$new_path"
19901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19902    unix_path=`$CYGPATH -u "$windows_path"`
19903    new_path="$unix_path"
19904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19906    new_path="$unix_path"
19907  fi
19908
19909
19910    new_path=`$WHICH "$new_path" 2> /dev/null`
19911
19912    if test "x$new_path" = x; then
19913      # It's still not found. Now this is an unrecoverable error.
19914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19915$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19916      has_space=`$ECHO "$complete" | $GREP " "`
19917      if test "x$has_space" != x; then
19918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19920      fi
19921      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19922    fi
19923  fi
19924
19925  # Now new_path has a complete unix path to the binary
19926  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19927    # Keep paths in /bin as-is, but remove trailing .exe if any
19928    new_path="${new_path/%.exe/}"
19929    # Do not save /bin paths to all_fixpath_prefixes!
19930  else
19931    # Not in mixed or Windows style, start by that.
19932    new_path=`cmd //c echo $new_path`
19933
19934  input_path="$new_path"
19935  # Check if we need to convert this using DOS-style short mode. If the path
19936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19937  # take no chances and rewrite it.
19938  # Note: m4 eats our [], so we need to use [ and ] instead.
19939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19940  if test "x$has_forbidden_chars" != x; then
19941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19943  fi
19944
19945    # Output is in $new_path
19946
19947  windows_path="$new_path"
19948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19949    unix_path=`$CYGPATH -u "$windows_path"`
19950    new_path="$unix_path"
19951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19953    new_path="$unix_path"
19954  fi
19955
19956    # remove trailing .exe if any
19957    new_path="${new_path/%.exe/}"
19958
19959    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19960    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19961  fi
19962
19963  else
19964    # We're on a posix platform. Hooray! :)
19965    # First separate the path from the arguments. This will split at the first
19966    # space.
19967    complete="$CXX"
19968    path="${complete%% *}"
19969    tmp="$complete EOL"
19970    arguments="${tmp#* }"
19971
19972    # Cannot rely on the command "which" here since it doesn't always work.
19973    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19974    if test -z "$is_absolute_path"; then
19975      # Path to executable is not absolute. Find it.
19976      IFS_save="$IFS"
19977      IFS=:
19978      for p in $PATH; do
19979        if test -f "$p/$path" && test -x "$p/$path"; then
19980          new_path="$p/$path"
19981          break
19982        fi
19983      done
19984      IFS="$IFS_save"
19985    else
19986      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
19987$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
19988      new_path="$path"
19989    fi
19990
19991    if test "x$new_path" = x; then
19992        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19993$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19994        has_space=`$ECHO "$complete" | $GREP " "`
19995        if test "x$has_space" != x; then
19996          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19997$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19998        fi
19999        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20000      fi
20001  fi
20002
20003      # Now join together the path and the arguments once again
20004      if test "x$arguments" != xEOL; then
20005        new_complete="$new_path ${arguments% *}"
20006      else
20007        new_complete="$new_path"
20008      fi
20009
20010  if test "x$complete" != "x$new_complete"; then
20011      CXX="$new_complete"
20012      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20013$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20014    fi
20015
20016  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20017$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20018  TEST_COMPILER="$CXX"
20019
20020    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20021        # Follow a chain of symbolic links. Use readlink
20022        # where it exists, else fall back to horribly
20023        # complicated shell code.
20024        if test "x$READLINK_TESTED" != yes; then
20025            # On MacOSX there is a readlink tool with a different
20026            # purpose than the GNU readlink tool. Check the found readlink.
20027            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20028            if test "x$ISGNU" = x; then
20029                 # A readlink that we do not know how to use.
20030                 # Are there other non-GNU readlinks out there?
20031                 READLINK_TESTED=yes
20032                 READLINK=
20033            fi
20034        fi
20035
20036        if test "x$READLINK" != x; then
20037            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20038        else
20039            # Save the current directory for restoring afterwards
20040            STARTDIR=$PWD
20041            COUNTER=0
20042            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20043            sym_link_file=`$BASENAME $TEST_COMPILER`
20044            # Use the system pwd and not the shell builtin to resolve directory symlinks
20045            cd $sym_link_dir
20046            cd `$THEPWDCMD`
20047            sym_link_dir=`$THEPWDCMD`
20048            # Resolve file symlinks
20049            while test $COUNTER -lt 20; do
20050                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20051                if test "x$ISLINK" == x; then
20052                    # This is not a symbolic link! We are done!
20053                    break
20054                fi
20055                # Again resolve directory symlinks since the target of the just found
20056                # link could be in a different directory
20057                cd `$DIRNAME $ISLINK`
20058                sym_link_dir=`$THEPWDCMD`
20059                sym_link_file=`$BASENAME $ISLINK`
20060                let COUNTER=COUNTER+1
20061            done
20062            cd $STARTDIR
20063            TEST_COMPILER=$sym_link_dir/$sym_link_file
20064        fi
20065    fi
20066
20067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20068$as_echo "$TEST_COMPILER" >&6; }
20069  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20070$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20071
20072  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20073  if test "x$COMPILER_BASENAME" = "xccache"; then
20074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20075$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20076    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20077    # We want to control ccache invocation ourselves, so ignore this cc and try
20078    # searching again.
20079
20080    # Remove the path to the fake ccache cc from the PATH
20081    RETRY_COMPILER_SAVED_PATH="$PATH"
20082    COMPILER_DIRNAME=`$DIRNAME $CXX`
20083    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20084
20085    # Try again looking for our compiler
20086    if test -n "$ac_tool_prefix"; then
20087  for ac_prog in $COMPILER_CHECK_LIST
20088  do
20089    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20090set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20092$as_echo_n "checking for $ac_word... " >&6; }
20093if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20094  $as_echo_n "(cached) " >&6
20095else
20096  if test -n "$PROPER_COMPILER_CXX"; then
20097  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20098else
20099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20100for as_dir in $PATH
20101do
20102  IFS=$as_save_IFS
20103  test -z "$as_dir" && as_dir=.
20104    for ac_exec_ext in '' $ac_executable_extensions; do
20105  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20106    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20108    break 2
20109  fi
20110done
20111  done
20112IFS=$as_save_IFS
20113
20114fi
20115fi
20116PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20117if test -n "$PROPER_COMPILER_CXX"; then
20118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20119$as_echo "$PROPER_COMPILER_CXX" >&6; }
20120else
20121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20122$as_echo "no" >&6; }
20123fi
20124
20125
20126    test -n "$PROPER_COMPILER_CXX" && break
20127  done
20128fi
20129if test -z "$PROPER_COMPILER_CXX"; then
20130  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20131  for ac_prog in $COMPILER_CHECK_LIST
20132do
20133  # Extract the first word of "$ac_prog", so it can be a program name with args.
20134set dummy $ac_prog; ac_word=$2
20135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20136$as_echo_n "checking for $ac_word... " >&6; }
20137if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20138  $as_echo_n "(cached) " >&6
20139else
20140  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20141  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20142else
20143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20144for as_dir in $PATH
20145do
20146  IFS=$as_save_IFS
20147  test -z "$as_dir" && as_dir=.
20148    for ac_exec_ext in '' $ac_executable_extensions; do
20149  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20150    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20152    break 2
20153  fi
20154done
20155  done
20156IFS=$as_save_IFS
20157
20158fi
20159fi
20160ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20161if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20163$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20164else
20165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20166$as_echo "no" >&6; }
20167fi
20168
20169
20170  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20171done
20172
20173  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20174    PROPER_COMPILER_CXX=""
20175  else
20176    case $cross_compiling:$ac_tool_warned in
20177yes:)
20178{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20179$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20180ac_tool_warned=yes ;;
20181esac
20182    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20183  fi
20184fi
20185
20186
20187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20188
20189  # First separate the path from the arguments. This will split at the first
20190  # space.
20191  complete="$PROPER_COMPILER_CXX"
20192  path="${complete%% *}"
20193  tmp="$complete EOL"
20194  arguments="${tmp#* }"
20195
20196  # Input might be given as Windows format, start by converting to
20197  # unix format.
20198  new_path=`$CYGPATH -u "$path"`
20199
20200  # Now try to locate executable using which
20201  new_path=`$WHICH "$new_path" 2> /dev/null`
20202  # bat and cmd files are not always considered executable in cygwin causing which
20203  # to not find them
20204  if test "x$new_path" = x \
20205           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20206           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20207    new_path=`$CYGPATH -u "$path"`
20208  fi
20209  if test "x$new_path" = x; then
20210    # Oops. Which didn't find the executable.
20211    # The splitting of arguments from the executable at a space might have been incorrect,
20212    # since paths with space are more likely in Windows. Give it another try with the whole
20213    # argument.
20214    path="$complete"
20215    arguments="EOL"
20216    new_path=`$CYGPATH -u "$path"`
20217    new_path=`$WHICH "$new_path" 2> /dev/null`
20218    # bat and cmd files are not always considered executable in cygwin causing which
20219    # to not find them
20220    if test "x$new_path" = x \
20221             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20222             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20223      new_path=`$CYGPATH -u "$path"`
20224    fi
20225    if test "x$new_path" = x; then
20226      # It's still not found. Now this is an unrecoverable error.
20227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20228$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20229      has_space=`$ECHO "$complete" | $GREP " "`
20230      if test "x$has_space" != x; then
20231        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20232$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20233      fi
20234      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20235    fi
20236  fi
20237
20238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20241  # "foo.exe" is OK but "foo" is an error.
20242  #
20243  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20244  # It is also a way to make sure we got the proper file name for the real test later on.
20245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20246  if test "x$test_shortpath" = x; then
20247    # Short path failed, file does not exist as specified.
20248    # Try adding .exe or .cmd
20249    if test -f "${new_path}.exe"; then
20250       input_to_shortpath="${new_path}.exe"
20251    elif test -f "${new_path}.cmd"; then
20252       input_to_shortpath="${new_path}.cmd"
20253    else
20254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20255$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20256      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20257$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20258      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20259    fi
20260  else
20261    input_to_shortpath="$new_path"
20262  fi
20263
20264  # Call helper function which possibly converts this using DOS-style short mode.
20265  # If so, the updated path is stored in $new_path.
20266  new_path="$input_to_shortpath"
20267
20268  input_path="$input_to_shortpath"
20269  # Check if we need to convert this using DOS-style short mode. If the path
20270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20271  # take no chances and rewrite it.
20272  # Note: m4 eats our [], so we need to use [ and ] instead.
20273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20274  if test "x$has_forbidden_chars" != x; then
20275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20279      # Going to short mode and back again did indeed matter. Since short mode is
20280      # case insensitive, let's make it lowercase to improve readability.
20281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20282      # Now convert it back to Unix-stile (cygpath)
20283      input_path=`$CYGPATH -u "$shortmode_path"`
20284      new_path="$input_path"
20285    fi
20286  fi
20287
20288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20289  if test "x$test_cygdrive_prefix" = x; then
20290    # As a simple fix, exclude /usr/bin since it's not a real path.
20291    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20293      # a path prefixed by /cygdrive for fixpath to work.
20294      new_path="$CYGWIN_ROOT_PATH$input_path"
20295    fi
20296  fi
20297
20298  # remove trailing .exe if any
20299  new_path="${new_path/%.exe/}"
20300
20301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20302
20303  # First separate the path from the arguments. This will split at the first
20304  # space.
20305  complete="$PROPER_COMPILER_CXX"
20306  path="${complete%% *}"
20307  tmp="$complete EOL"
20308  arguments="${tmp#* }"
20309
20310  # Input might be given as Windows format, start by converting to
20311  # unix format.
20312  new_path="$path"
20313
20314  windows_path="$new_path"
20315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20316    unix_path=`$CYGPATH -u "$windows_path"`
20317    new_path="$unix_path"
20318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20320    new_path="$unix_path"
20321  fi
20322
20323
20324  # Now try to locate executable using which
20325  new_path=`$WHICH "$new_path" 2> /dev/null`
20326
20327  if test "x$new_path" = x; then
20328    # Oops. Which didn't find the executable.
20329    # The splitting of arguments from the executable at a space might have been incorrect,
20330    # since paths with space are more likely in Windows. Give it another try with the whole
20331    # argument.
20332    path="$complete"
20333    arguments="EOL"
20334    new_path="$path"
20335
20336  windows_path="$new_path"
20337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20338    unix_path=`$CYGPATH -u "$windows_path"`
20339    new_path="$unix_path"
20340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20342    new_path="$unix_path"
20343  fi
20344
20345
20346    new_path=`$WHICH "$new_path" 2> /dev/null`
20347
20348    if test "x$new_path" = x; then
20349      # It's still not found. Now this is an unrecoverable error.
20350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20351$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20352      has_space=`$ECHO "$complete" | $GREP " "`
20353      if test "x$has_space" != x; then
20354        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20355$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20356      fi
20357      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20358    fi
20359  fi
20360
20361  # Now new_path has a complete unix path to the binary
20362  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20363    # Keep paths in /bin as-is, but remove trailing .exe if any
20364    new_path="${new_path/%.exe/}"
20365    # Do not save /bin paths to all_fixpath_prefixes!
20366  else
20367    # Not in mixed or Windows style, start by that.
20368    new_path=`cmd //c echo $new_path`
20369
20370  input_path="$new_path"
20371  # Check if we need to convert this using DOS-style short mode. If the path
20372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20373  # take no chances and rewrite it.
20374  # Note: m4 eats our [], so we need to use [ and ] instead.
20375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20376  if test "x$has_forbidden_chars" != x; then
20377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20379  fi
20380
20381    # Output is in $new_path
20382
20383  windows_path="$new_path"
20384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20385    unix_path=`$CYGPATH -u "$windows_path"`
20386    new_path="$unix_path"
20387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20389    new_path="$unix_path"
20390  fi
20391
20392    # remove trailing .exe if any
20393    new_path="${new_path/%.exe/}"
20394
20395    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20396    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20397  fi
20398
20399  else
20400    # We're on a posix platform. Hooray! :)
20401    # First separate the path from the arguments. This will split at the first
20402    # space.
20403    complete="$PROPER_COMPILER_CXX"
20404    path="${complete%% *}"
20405    tmp="$complete EOL"
20406    arguments="${tmp#* }"
20407
20408    # Cannot rely on the command "which" here since it doesn't always work.
20409    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20410    if test -z "$is_absolute_path"; then
20411      # Path to executable is not absolute. Find it.
20412      IFS_save="$IFS"
20413      IFS=:
20414      for p in $PATH; do
20415        if test -f "$p/$path" && test -x "$p/$path"; then
20416          new_path="$p/$path"
20417          break
20418        fi
20419      done
20420      IFS="$IFS_save"
20421    else
20422      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20423$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20424      new_path="$path"
20425    fi
20426
20427    if test "x$new_path" = x; then
20428        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20429$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20430        has_space=`$ECHO "$complete" | $GREP " "`
20431        if test "x$has_space" != x; then
20432          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20433$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20434        fi
20435        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20436      fi
20437  fi
20438
20439      # Now join together the path and the arguments once again
20440      if test "x$arguments" != xEOL; then
20441        new_complete="$new_path ${arguments% *}"
20442      else
20443        new_complete="$new_path"
20444      fi
20445
20446  if test "x$complete" != "x$new_complete"; then
20447      PROPER_COMPILER_CXX="$new_complete"
20448      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20449$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20450    fi
20451
20452    PATH="$RETRY_COMPILER_SAVED_PATH"
20453
20454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20455$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20456
20457    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20458        # Follow a chain of symbolic links. Use readlink
20459        # where it exists, else fall back to horribly
20460        # complicated shell code.
20461        if test "x$READLINK_TESTED" != yes; then
20462            # On MacOSX there is a readlink tool with a different
20463            # purpose than the GNU readlink tool. Check the found readlink.
20464            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20465            if test "x$ISGNU" = x; then
20466                 # A readlink that we do not know how to use.
20467                 # Are there other non-GNU readlinks out there?
20468                 READLINK_TESTED=yes
20469                 READLINK=
20470            fi
20471        fi
20472
20473        if test "x$READLINK" != x; then
20474            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20475        else
20476            # Save the current directory for restoring afterwards
20477            STARTDIR=$PWD
20478            COUNTER=0
20479            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20480            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20481            # Use the system pwd and not the shell builtin to resolve directory symlinks
20482            cd $sym_link_dir
20483            cd `$THEPWDCMD`
20484            sym_link_dir=`$THEPWDCMD`
20485            # Resolve file symlinks
20486            while test $COUNTER -lt 20; do
20487                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20488                if test "x$ISLINK" == x; then
20489                    # This is not a symbolic link! We are done!
20490                    break
20491                fi
20492                # Again resolve directory symlinks since the target of the just found
20493                # link could be in a different directory
20494                cd `$DIRNAME $ISLINK`
20495                sym_link_dir=`$THEPWDCMD`
20496                sym_link_file=`$BASENAME $ISLINK`
20497                let COUNTER=COUNTER+1
20498            done
20499            cd $STARTDIR
20500            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20501        fi
20502    fi
20503
20504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20505$as_echo "$PROPER_COMPILER_CXX" >&6; }
20506    CXX="$PROPER_COMPILER_CXX"
20507  else
20508    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20509$as_echo "no, keeping CXX" >&6; }
20510    CXX="$TEST_COMPILER"
20511  fi
20512
20513  COMPILER=$CXX
20514  COMPILER_NAME=$COMPILER_NAME
20515
20516  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20517    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20518    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20519    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20520    if test $? -ne 0; then
20521      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20522
20523      { $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
20524$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20525      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20526$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20527      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20528    else
20529      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20530      COMPILER_VENDOR="Sun Studio"
20531    fi
20532  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20533    # First line typically looks something like:
20534    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20535    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20536    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20537    COMPILER_VENDOR="Microsoft CL.EXE"
20538    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20539    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20540      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20541        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20542      fi
20543    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20544      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20545        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20546      fi
20547    fi
20548  else
20549    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20550    # Check that this is likely to be GCC.
20551    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20552    if test $? -ne 0; then
20553      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20554$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20555      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20556$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20557      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20558    fi
20559
20560    # First line typically looks something like:
20561    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20562    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20563    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20564  fi
20565  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20566  CXX_VERSION="$COMPILER_VERSION"
20567  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20568  CXX_VENDOR="$COMPILER_VENDOR"
20569
20570  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20571$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20572
20573
20574# Now that we have resolved CXX ourself, let autoconf have it's go at it
20575ac_ext=cpp
20576ac_cpp='$CXXCPP $CPPFLAGS'
20577ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20578ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20579ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20580if test -z "$CXX"; then
20581  if test -n "$CCC"; then
20582    CXX=$CCC
20583  else
20584    if test -n "$ac_tool_prefix"; then
20585  for ac_prog in $CXX
20586  do
20587    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20588set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20590$as_echo_n "checking for $ac_word... " >&6; }
20591if test "${ac_cv_prog_CXX+set}" = set; then :
20592  $as_echo_n "(cached) " >&6
20593else
20594  if test -n "$CXX"; then
20595  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20596else
20597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20598for as_dir in $PATH
20599do
20600  IFS=$as_save_IFS
20601  test -z "$as_dir" && as_dir=.
20602    for ac_exec_ext in '' $ac_executable_extensions; do
20603  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20604    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20606    break 2
20607  fi
20608done
20609  done
20610IFS=$as_save_IFS
20611
20612fi
20613fi
20614CXX=$ac_cv_prog_CXX
20615if test -n "$CXX"; then
20616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20617$as_echo "$CXX" >&6; }
20618else
20619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20620$as_echo "no" >&6; }
20621fi
20622
20623
20624    test -n "$CXX" && break
20625  done
20626fi
20627if test -z "$CXX"; then
20628  ac_ct_CXX=$CXX
20629  for ac_prog in $CXX
20630do
20631  # Extract the first word of "$ac_prog", so it can be a program name with args.
20632set dummy $ac_prog; ac_word=$2
20633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20634$as_echo_n "checking for $ac_word... " >&6; }
20635if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20636  $as_echo_n "(cached) " >&6
20637else
20638  if test -n "$ac_ct_CXX"; then
20639  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20640else
20641as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20642for as_dir in $PATH
20643do
20644  IFS=$as_save_IFS
20645  test -z "$as_dir" && as_dir=.
20646    for ac_exec_ext in '' $ac_executable_extensions; do
20647  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20648    ac_cv_prog_ac_ct_CXX="$ac_prog"
20649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20650    break 2
20651  fi
20652done
20653  done
20654IFS=$as_save_IFS
20655
20656fi
20657fi
20658ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20659if test -n "$ac_ct_CXX"; then
20660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20661$as_echo "$ac_ct_CXX" >&6; }
20662else
20663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20664$as_echo "no" >&6; }
20665fi
20666
20667
20668  test -n "$ac_ct_CXX" && break
20669done
20670
20671  if test "x$ac_ct_CXX" = x; then
20672    CXX="g++"
20673  else
20674    case $cross_compiling:$ac_tool_warned in
20675yes:)
20676{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20677$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20678ac_tool_warned=yes ;;
20679esac
20680    CXX=$ac_ct_CXX
20681  fi
20682fi
20683
20684  fi
20685fi
20686# Provide some information about the compiler.
20687$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20688set X $ac_compile
20689ac_compiler=$2
20690for ac_option in --version -v -V -qversion; do
20691  { { ac_try="$ac_compiler $ac_option >&5"
20692case "(($ac_try" in
20693  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20694  *) ac_try_echo=$ac_try;;
20695esac
20696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20697$as_echo "$ac_try_echo"; } >&5
20698  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20699  ac_status=$?
20700  if test -s conftest.err; then
20701    sed '10a\
20702... rest of stderr output deleted ...
20703         10q' conftest.err >conftest.er1
20704    cat conftest.er1 >&5
20705  fi
20706  rm -f conftest.er1 conftest.err
20707  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20708  test $ac_status = 0; }
20709done
20710
20711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20712$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20713if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20714  $as_echo_n "(cached) " >&6
20715else
20716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20717/* end confdefs.h.  */
20718
20719int
20720main ()
20721{
20722#ifndef __GNUC__
20723       choke me
20724#endif
20725
20726  ;
20727  return 0;
20728}
20729_ACEOF
20730if ac_fn_cxx_try_compile "$LINENO"; then :
20731  ac_compiler_gnu=yes
20732else
20733  ac_compiler_gnu=no
20734fi
20735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20736ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20737
20738fi
20739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20740$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20741if test $ac_compiler_gnu = yes; then
20742  GXX=yes
20743else
20744  GXX=
20745fi
20746ac_test_CXXFLAGS=${CXXFLAGS+set}
20747ac_save_CXXFLAGS=$CXXFLAGS
20748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20749$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20750if test "${ac_cv_prog_cxx_g+set}" = set; then :
20751  $as_echo_n "(cached) " >&6
20752else
20753  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20754   ac_cxx_werror_flag=yes
20755   ac_cv_prog_cxx_g=no
20756   CXXFLAGS="-g"
20757   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20758/* end confdefs.h.  */
20759
20760int
20761main ()
20762{
20763
20764  ;
20765  return 0;
20766}
20767_ACEOF
20768if ac_fn_cxx_try_compile "$LINENO"; then :
20769  ac_cv_prog_cxx_g=yes
20770else
20771  CXXFLAGS=""
20772      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20773/* end confdefs.h.  */
20774
20775int
20776main ()
20777{
20778
20779  ;
20780  return 0;
20781}
20782_ACEOF
20783if ac_fn_cxx_try_compile "$LINENO"; then :
20784
20785else
20786  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20787	 CXXFLAGS="-g"
20788	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20789/* end confdefs.h.  */
20790
20791int
20792main ()
20793{
20794
20795  ;
20796  return 0;
20797}
20798_ACEOF
20799if ac_fn_cxx_try_compile "$LINENO"; then :
20800  ac_cv_prog_cxx_g=yes
20801fi
20802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20803fi
20804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20805fi
20806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20807   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20808fi
20809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20810$as_echo "$ac_cv_prog_cxx_g" >&6; }
20811if test "$ac_test_CXXFLAGS" = set; then
20812  CXXFLAGS=$ac_save_CXXFLAGS
20813elif test $ac_cv_prog_cxx_g = yes; then
20814  if test "$GXX" = yes; then
20815    CXXFLAGS="-g -O2"
20816  else
20817    CXXFLAGS="-g"
20818  fi
20819else
20820  if test "$GXX" = yes; then
20821    CXXFLAGS="-O2"
20822  else
20823    CXXFLAGS=
20824  fi
20825fi
20826ac_ext=cpp
20827ac_cpp='$CXXCPP $CPPFLAGS'
20828ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20829ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20830ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20831
20832
20833### Locate other tools
20834
20835if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20836    ac_ext=m
20837ac_cpp='$OBJCPP $CPPFLAGS'
20838ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20839ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20840ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20841if test -n "$ac_tool_prefix"; then
20842  for ac_prog in gcc objcc objc cc CC
20843  do
20844    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20845set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20847$as_echo_n "checking for $ac_word... " >&6; }
20848if test "${ac_cv_prog_OBJC+set}" = set; then :
20849  $as_echo_n "(cached) " >&6
20850else
20851  if test -n "$OBJC"; then
20852  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20853else
20854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20855for as_dir in $PATH
20856do
20857  IFS=$as_save_IFS
20858  test -z "$as_dir" && as_dir=.
20859    for ac_exec_ext in '' $ac_executable_extensions; do
20860  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20861    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20863    break 2
20864  fi
20865done
20866  done
20867IFS=$as_save_IFS
20868
20869fi
20870fi
20871OBJC=$ac_cv_prog_OBJC
20872if test -n "$OBJC"; then
20873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20874$as_echo "$OBJC" >&6; }
20875else
20876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20877$as_echo "no" >&6; }
20878fi
20879
20880
20881    test -n "$OBJC" && break
20882  done
20883fi
20884if test -z "$OBJC"; then
20885  ac_ct_OBJC=$OBJC
20886  for ac_prog in gcc objcc objc cc CC
20887do
20888  # Extract the first word of "$ac_prog", so it can be a program name with args.
20889set dummy $ac_prog; ac_word=$2
20890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20891$as_echo_n "checking for $ac_word... " >&6; }
20892if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20893  $as_echo_n "(cached) " >&6
20894else
20895  if test -n "$ac_ct_OBJC"; then
20896  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20897else
20898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20899for as_dir in $PATH
20900do
20901  IFS=$as_save_IFS
20902  test -z "$as_dir" && as_dir=.
20903    for ac_exec_ext in '' $ac_executable_extensions; do
20904  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20905    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20907    break 2
20908  fi
20909done
20910  done
20911IFS=$as_save_IFS
20912
20913fi
20914fi
20915ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20916if test -n "$ac_ct_OBJC"; then
20917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20918$as_echo "$ac_ct_OBJC" >&6; }
20919else
20920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20921$as_echo "no" >&6; }
20922fi
20923
20924
20925  test -n "$ac_ct_OBJC" && break
20926done
20927
20928  if test "x$ac_ct_OBJC" = x; then
20929    OBJC="gcc"
20930  else
20931    case $cross_compiling:$ac_tool_warned in
20932yes:)
20933{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20934$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20935ac_tool_warned=yes ;;
20936esac
20937    OBJC=$ac_ct_OBJC
20938  fi
20939fi
20940
20941# Provide some information about the compiler.
20942$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20943set X $ac_compile
20944ac_compiler=$2
20945for ac_option in --version -v -V -qversion; do
20946  { { ac_try="$ac_compiler $ac_option >&5"
20947case "(($ac_try" in
20948  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20949  *) ac_try_echo=$ac_try;;
20950esac
20951eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20952$as_echo "$ac_try_echo"; } >&5
20953  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20954  ac_status=$?
20955  if test -s conftest.err; then
20956    sed '10a\
20957... rest of stderr output deleted ...
20958         10q' conftest.err >conftest.er1
20959    cat conftest.er1 >&5
20960  fi
20961  rm -f conftest.er1 conftest.err
20962  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20963  test $ac_status = 0; }
20964done
20965
20966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
20967$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20968if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
20969  $as_echo_n "(cached) " >&6
20970else
20971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20972/* end confdefs.h.  */
20973
20974int
20975main ()
20976{
20977#ifndef __GNUC__
20978       choke me
20979#endif
20980
20981  ;
20982  return 0;
20983}
20984_ACEOF
20985if ac_fn_objc_try_compile "$LINENO"; then :
20986  ac_compiler_gnu=yes
20987else
20988  ac_compiler_gnu=no
20989fi
20990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20991ac_cv_objc_compiler_gnu=$ac_compiler_gnu
20992
20993fi
20994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
20995$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
20996if test $ac_compiler_gnu = yes; then
20997  GOBJC=yes
20998else
20999  GOBJC=
21000fi
21001ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21002ac_save_OBJCFLAGS=$OBJCFLAGS
21003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21004$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21005if test "${ac_cv_prog_objc_g+set}" = set; then :
21006  $as_echo_n "(cached) " >&6
21007else
21008  ac_save_objc_werror_flag=$ac_objc_werror_flag
21009   ac_objc_werror_flag=yes
21010   ac_cv_prog_objc_g=no
21011   OBJCFLAGS="-g"
21012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21013/* end confdefs.h.  */
21014
21015int
21016main ()
21017{
21018
21019  ;
21020  return 0;
21021}
21022_ACEOF
21023if ac_fn_objc_try_compile "$LINENO"; then :
21024  ac_cv_prog_objc_g=yes
21025else
21026  OBJCFLAGS=""
21027      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21028/* end confdefs.h.  */
21029
21030int
21031main ()
21032{
21033
21034  ;
21035  return 0;
21036}
21037_ACEOF
21038if ac_fn_objc_try_compile "$LINENO"; then :
21039
21040else
21041  ac_objc_werror_flag=$ac_save_objc_werror_flag
21042	 OBJCFLAGS="-g"
21043	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21044/* end confdefs.h.  */
21045
21046int
21047main ()
21048{
21049
21050  ;
21051  return 0;
21052}
21053_ACEOF
21054if ac_fn_objc_try_compile "$LINENO"; then :
21055  ac_cv_prog_objc_g=yes
21056fi
21057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21058fi
21059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21060fi
21061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21062   ac_objc_werror_flag=$ac_save_objc_werror_flag
21063fi
21064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21065$as_echo "$ac_cv_prog_objc_g" >&6; }
21066if test "$ac_test_OBJCFLAGS" = set; then
21067  OBJCFLAGS=$ac_save_OBJCFLAGS
21068elif test $ac_cv_prog_objc_g = yes; then
21069  if test "$GOBJC" = yes; then
21070    OBJCFLAGS="-g -O2"
21071  else
21072    OBJCFLAGS="-g"
21073  fi
21074else
21075  if test "$GOBJC" = yes; then
21076    OBJCFLAGS="-O2"
21077  else
21078    OBJCFLAGS=
21079  fi
21080fi
21081ac_ext=cpp
21082ac_cpp='$CXXCPP $CPPFLAGS'
21083ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21084ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21085ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21086
21087
21088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21089
21090  # First separate the path from the arguments. This will split at the first
21091  # space.
21092  complete="$OBJC"
21093  path="${complete%% *}"
21094  tmp="$complete EOL"
21095  arguments="${tmp#* }"
21096
21097  # Input might be given as Windows format, start by converting to
21098  # unix format.
21099  new_path=`$CYGPATH -u "$path"`
21100
21101  # Now try to locate executable using which
21102  new_path=`$WHICH "$new_path" 2> /dev/null`
21103  # bat and cmd files are not always considered executable in cygwin causing which
21104  # to not find them
21105  if test "x$new_path" = x \
21106           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21107           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21108    new_path=`$CYGPATH -u "$path"`
21109  fi
21110  if test "x$new_path" = x; then
21111    # Oops. Which didn't find the executable.
21112    # The splitting of arguments from the executable at a space might have been incorrect,
21113    # since paths with space are more likely in Windows. Give it another try with the whole
21114    # argument.
21115    path="$complete"
21116    arguments="EOL"
21117    new_path=`$CYGPATH -u "$path"`
21118    new_path=`$WHICH "$new_path" 2> /dev/null`
21119    # bat and cmd files are not always considered executable in cygwin causing which
21120    # to not find them
21121    if test "x$new_path" = x \
21122             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21123             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21124      new_path=`$CYGPATH -u "$path"`
21125    fi
21126    if test "x$new_path" = x; then
21127      # It's still not found. Now this is an unrecoverable error.
21128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21129$as_echo "$as_me: The path of OBJC, 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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21133$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21134      fi
21135      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21136    fi
21137  fi
21138
21139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21142  # "foo.exe" is OK but "foo" is an error.
21143  #
21144  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21145  # It is also a way to make sure we got the proper file name for the real test later on.
21146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21147  if test "x$test_shortpath" = x; then
21148    # Short path failed, file does not exist as specified.
21149    # Try adding .exe or .cmd
21150    if test -f "${new_path}.exe"; then
21151       input_to_shortpath="${new_path}.exe"
21152    elif test -f "${new_path}.cmd"; then
21153       input_to_shortpath="${new_path}.cmd"
21154    else
21155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21156$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21157      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21158$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21159      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21160    fi
21161  else
21162    input_to_shortpath="$new_path"
21163  fi
21164
21165  # Call helper function which possibly converts this using DOS-style short mode.
21166  # If so, the updated path is stored in $new_path.
21167  new_path="$input_to_shortpath"
21168
21169  input_path="$input_to_shortpath"
21170  # Check if we need to convert this using DOS-style short mode. If the path
21171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21172  # take no chances and rewrite it.
21173  # Note: m4 eats our [], so we need to use [ and ] instead.
21174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21175  if test "x$has_forbidden_chars" != x; then
21176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21177    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21178    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21179    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21180      # Going to short mode and back again did indeed matter. Since short mode is
21181      # case insensitive, let's make it lowercase to improve readability.
21182      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21183      # Now convert it back to Unix-stile (cygpath)
21184      input_path=`$CYGPATH -u "$shortmode_path"`
21185      new_path="$input_path"
21186    fi
21187  fi
21188
21189  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21190  if test "x$test_cygdrive_prefix" = x; then
21191    # As a simple fix, exclude /usr/bin since it's not a real path.
21192    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21193      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21194      # a path prefixed by /cygdrive for fixpath to work.
21195      new_path="$CYGWIN_ROOT_PATH$input_path"
21196    fi
21197  fi
21198
21199  # remove trailing .exe if any
21200  new_path="${new_path/%.exe/}"
21201
21202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21203
21204  # First separate the path from the arguments. This will split at the first
21205  # space.
21206  complete="$OBJC"
21207  path="${complete%% *}"
21208  tmp="$complete EOL"
21209  arguments="${tmp#* }"
21210
21211  # Input might be given as Windows format, start by converting to
21212  # unix format.
21213  new_path="$path"
21214
21215  windows_path="$new_path"
21216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21217    unix_path=`$CYGPATH -u "$windows_path"`
21218    new_path="$unix_path"
21219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21221    new_path="$unix_path"
21222  fi
21223
21224
21225  # Now try to locate executable using which
21226  new_path=`$WHICH "$new_path" 2> /dev/null`
21227
21228  if test "x$new_path" = x; then
21229    # Oops. Which didn't find the executable.
21230    # The splitting of arguments from the executable at a space might have been incorrect,
21231    # since paths with space are more likely in Windows. Give it another try with the whole
21232    # argument.
21233    path="$complete"
21234    arguments="EOL"
21235    new_path="$path"
21236
21237  windows_path="$new_path"
21238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21239    unix_path=`$CYGPATH -u "$windows_path"`
21240    new_path="$unix_path"
21241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21243    new_path="$unix_path"
21244  fi
21245
21246
21247    new_path=`$WHICH "$new_path" 2> /dev/null`
21248
21249    if test "x$new_path" = x; then
21250      # It's still not found. Now this is an unrecoverable error.
21251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21252$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21253      has_space=`$ECHO "$complete" | $GREP " "`
21254      if test "x$has_space" != x; then
21255        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21256$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21257      fi
21258      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21259    fi
21260  fi
21261
21262  # Now new_path has a complete unix path to the binary
21263  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21264    # Keep paths in /bin as-is, but remove trailing .exe if any
21265    new_path="${new_path/%.exe/}"
21266    # Do not save /bin paths to all_fixpath_prefixes!
21267  else
21268    # Not in mixed or Windows style, start by that.
21269    new_path=`cmd //c echo $new_path`
21270
21271  input_path="$new_path"
21272  # Check if we need to convert this using DOS-style short mode. If the path
21273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21274  # take no chances and rewrite it.
21275  # Note: m4 eats our [], so we need to use [ and ] instead.
21276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21277  if test "x$has_forbidden_chars" != x; then
21278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21280  fi
21281
21282    # Output is in $new_path
21283
21284  windows_path="$new_path"
21285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21286    unix_path=`$CYGPATH -u "$windows_path"`
21287    new_path="$unix_path"
21288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21290    new_path="$unix_path"
21291  fi
21292
21293    # remove trailing .exe if any
21294    new_path="${new_path/%.exe/}"
21295
21296    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21297    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21298  fi
21299
21300  else
21301    # We're on a posix platform. Hooray! :)
21302    # First separate the path from the arguments. This will split at the first
21303    # space.
21304    complete="$OBJC"
21305    path="${complete%% *}"
21306    tmp="$complete EOL"
21307    arguments="${tmp#* }"
21308
21309    # Cannot rely on the command "which" here since it doesn't always work.
21310    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21311    if test -z "$is_absolute_path"; then
21312      # Path to executable is not absolute. Find it.
21313      IFS_save="$IFS"
21314      IFS=:
21315      for p in $PATH; do
21316        if test -f "$p/$path" && test -x "$p/$path"; then
21317          new_path="$p/$path"
21318          break
21319        fi
21320      done
21321      IFS="$IFS_save"
21322    else
21323      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21324$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21325      new_path="$path"
21326    fi
21327
21328    if test "x$new_path" = x; then
21329        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21330$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21331        has_space=`$ECHO "$complete" | $GREP " "`
21332        if test "x$has_space" != x; then
21333          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21334$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21335        fi
21336        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21337      fi
21338  fi
21339
21340      # Now join together the path and the arguments once again
21341      if test "x$arguments" != xEOL; then
21342        new_complete="$new_path ${arguments% *}"
21343      else
21344        new_complete="$new_path"
21345      fi
21346
21347  if test "x$complete" != "x$new_complete"; then
21348      OBJC="$new_complete"
21349      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21350$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21351    fi
21352
21353else
21354    OBJC=
21355fi
21356
21357# Restore the flags to the user specified values.
21358# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21359CFLAGS="$ORG_CFLAGS"
21360CXXFLAGS="$ORG_CXXFLAGS"
21361OBJCFLAGS="$ORG_OBJCFLAGS"
21362
21363LD="$CC"
21364LDEXE="$CC"
21365LDCXX="$CXX"
21366LDEXECXX="$CXX"
21367
21368# LDEXE is the linker to use, when creating executables.
21369
21370# Linking C++ libraries.
21371
21372# Linking C++ executables.
21373
21374
21375if test "x$OPENJDK_TARGET_OS" != xwindows; then
21376    if test -n "$ac_tool_prefix"; then
21377  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21378set dummy ${ac_tool_prefix}ar; ac_word=$2
21379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21380$as_echo_n "checking for $ac_word... " >&6; }
21381if test "${ac_cv_prog_AR+set}" = set; then :
21382  $as_echo_n "(cached) " >&6
21383else
21384  if test -n "$AR"; then
21385  ac_cv_prog_AR="$AR" # Let the user override the test.
21386else
21387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21388for as_dir in $PATH
21389do
21390  IFS=$as_save_IFS
21391  test -z "$as_dir" && as_dir=.
21392    for ac_exec_ext in '' $ac_executable_extensions; do
21393  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21394    ac_cv_prog_AR="${ac_tool_prefix}ar"
21395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21396    break 2
21397  fi
21398done
21399  done
21400IFS=$as_save_IFS
21401
21402fi
21403fi
21404AR=$ac_cv_prog_AR
21405if test -n "$AR"; then
21406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21407$as_echo "$AR" >&6; }
21408else
21409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21410$as_echo "no" >&6; }
21411fi
21412
21413
21414fi
21415if test -z "$ac_cv_prog_AR"; then
21416  ac_ct_AR=$AR
21417  # Extract the first word of "ar", so it can be a program name with args.
21418set dummy ar; ac_word=$2
21419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21420$as_echo_n "checking for $ac_word... " >&6; }
21421if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21422  $as_echo_n "(cached) " >&6
21423else
21424  if test -n "$ac_ct_AR"; then
21425  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21426else
21427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21428for as_dir in $PATH
21429do
21430  IFS=$as_save_IFS
21431  test -z "$as_dir" && as_dir=.
21432    for ac_exec_ext in '' $ac_executable_extensions; do
21433  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21434    ac_cv_prog_ac_ct_AR="ar"
21435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21436    break 2
21437  fi
21438done
21439  done
21440IFS=$as_save_IFS
21441
21442fi
21443fi
21444ac_ct_AR=$ac_cv_prog_ac_ct_AR
21445if test -n "$ac_ct_AR"; then
21446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21447$as_echo "$ac_ct_AR" >&6; }
21448else
21449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21450$as_echo "no" >&6; }
21451fi
21452
21453  if test "x$ac_ct_AR" = x; then
21454    AR=""
21455  else
21456    case $cross_compiling:$ac_tool_warned in
21457yes:)
21458{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21459$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21460ac_tool_warned=yes ;;
21461esac
21462    AR=$ac_ct_AR
21463  fi
21464else
21465  AR="$ac_cv_prog_AR"
21466fi
21467
21468
21469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21470
21471  # First separate the path from the arguments. This will split at the first
21472  # space.
21473  complete="$AR"
21474  path="${complete%% *}"
21475  tmp="$complete EOL"
21476  arguments="${tmp#* }"
21477
21478  # Input might be given as Windows format, start by converting to
21479  # unix format.
21480  new_path=`$CYGPATH -u "$path"`
21481
21482  # Now try to locate executable using which
21483  new_path=`$WHICH "$new_path" 2> /dev/null`
21484  # bat and cmd files are not always considered executable in cygwin causing which
21485  # to not find them
21486  if test "x$new_path" = x \
21487           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21488           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21489    new_path=`$CYGPATH -u "$path"`
21490  fi
21491  if test "x$new_path" = x; then
21492    # Oops. Which didn't find the executable.
21493    # The splitting of arguments from the executable at a space might have been incorrect,
21494    # since paths with space are more likely in Windows. Give it another try with the whole
21495    # argument.
21496    path="$complete"
21497    arguments="EOL"
21498    new_path=`$CYGPATH -u "$path"`
21499    new_path=`$WHICH "$new_path" 2> /dev/null`
21500    # bat and cmd files are not always considered executable in cygwin causing which
21501    # to not find them
21502    if test "x$new_path" = x \
21503             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21504             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21505      new_path=`$CYGPATH -u "$path"`
21506    fi
21507    if test "x$new_path" = x; then
21508      # It's still not found. Now this is an unrecoverable error.
21509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21510$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21511      has_space=`$ECHO "$complete" | $GREP " "`
21512      if test "x$has_space" != x; then
21513        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21514$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21515      fi
21516      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21517    fi
21518  fi
21519
21520  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21521  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21522  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21523  # "foo.exe" is OK but "foo" is an error.
21524  #
21525  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21526  # It is also a way to make sure we got the proper file name for the real test later on.
21527  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21528  if test "x$test_shortpath" = x; then
21529    # Short path failed, file does not exist as specified.
21530    # Try adding .exe or .cmd
21531    if test -f "${new_path}.exe"; then
21532       input_to_shortpath="${new_path}.exe"
21533    elif test -f "${new_path}.cmd"; then
21534       input_to_shortpath="${new_path}.cmd"
21535    else
21536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21537$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21538      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21539$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21540      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21541    fi
21542  else
21543    input_to_shortpath="$new_path"
21544  fi
21545
21546  # Call helper function which possibly converts this using DOS-style short mode.
21547  # If so, the updated path is stored in $new_path.
21548  new_path="$input_to_shortpath"
21549
21550  input_path="$input_to_shortpath"
21551  # Check if we need to convert this using DOS-style short mode. If the path
21552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21553  # take no chances and rewrite it.
21554  # Note: m4 eats our [], so we need to use [ and ] instead.
21555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21556  if test "x$has_forbidden_chars" != x; then
21557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21561      # Going to short mode and back again did indeed matter. Since short mode is
21562      # case insensitive, let's make it lowercase to improve readability.
21563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21564      # Now convert it back to Unix-stile (cygpath)
21565      input_path=`$CYGPATH -u "$shortmode_path"`
21566      new_path="$input_path"
21567    fi
21568  fi
21569
21570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21571  if test "x$test_cygdrive_prefix" = x; then
21572    # As a simple fix, exclude /usr/bin since it's not a real path.
21573    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21575      # a path prefixed by /cygdrive for fixpath to work.
21576      new_path="$CYGWIN_ROOT_PATH$input_path"
21577    fi
21578  fi
21579
21580  # remove trailing .exe if any
21581  new_path="${new_path/%.exe/}"
21582
21583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21584
21585  # First separate the path from the arguments. This will split at the first
21586  # space.
21587  complete="$AR"
21588  path="${complete%% *}"
21589  tmp="$complete EOL"
21590  arguments="${tmp#* }"
21591
21592  # Input might be given as Windows format, start by converting to
21593  # unix format.
21594  new_path="$path"
21595
21596  windows_path="$new_path"
21597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21598    unix_path=`$CYGPATH -u "$windows_path"`
21599    new_path="$unix_path"
21600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21602    new_path="$unix_path"
21603  fi
21604
21605
21606  # Now try to locate executable using which
21607  new_path=`$WHICH "$new_path" 2> /dev/null`
21608
21609  if test "x$new_path" = x; then
21610    # Oops. Which didn't find the executable.
21611    # The splitting of arguments from the executable at a space might have been incorrect,
21612    # since paths with space are more likely in Windows. Give it another try with the whole
21613    # argument.
21614    path="$complete"
21615    arguments="EOL"
21616    new_path="$path"
21617
21618  windows_path="$new_path"
21619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21620    unix_path=`$CYGPATH -u "$windows_path"`
21621    new_path="$unix_path"
21622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21624    new_path="$unix_path"
21625  fi
21626
21627
21628    new_path=`$WHICH "$new_path" 2> /dev/null`
21629
21630    if test "x$new_path" = x; then
21631      # It's still not found. Now this is an unrecoverable error.
21632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21633$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21634      has_space=`$ECHO "$complete" | $GREP " "`
21635      if test "x$has_space" != x; then
21636        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21637$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21638      fi
21639      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21640    fi
21641  fi
21642
21643  # Now new_path has a complete unix path to the binary
21644  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21645    # Keep paths in /bin as-is, but remove trailing .exe if any
21646    new_path="${new_path/%.exe/}"
21647    # Do not save /bin paths to all_fixpath_prefixes!
21648  else
21649    # Not in mixed or Windows style, start by that.
21650    new_path=`cmd //c echo $new_path`
21651
21652  input_path="$new_path"
21653  # Check if we need to convert this using DOS-style short mode. If the path
21654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21655  # take no chances and rewrite it.
21656  # Note: m4 eats our [], so we need to use [ and ] instead.
21657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21658  if test "x$has_forbidden_chars" != x; then
21659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21661  fi
21662
21663    # Output is in $new_path
21664
21665  windows_path="$new_path"
21666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21667    unix_path=`$CYGPATH -u "$windows_path"`
21668    new_path="$unix_path"
21669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21671    new_path="$unix_path"
21672  fi
21673
21674    # remove trailing .exe if any
21675    new_path="${new_path/%.exe/}"
21676
21677    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21678    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21679  fi
21680
21681  else
21682    # We're on a posix platform. Hooray! :)
21683    # First separate the path from the arguments. This will split at the first
21684    # space.
21685    complete="$AR"
21686    path="${complete%% *}"
21687    tmp="$complete EOL"
21688    arguments="${tmp#* }"
21689
21690    # Cannot rely on the command "which" here since it doesn't always work.
21691    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21692    if test -z "$is_absolute_path"; then
21693      # Path to executable is not absolute. Find it.
21694      IFS_save="$IFS"
21695      IFS=:
21696      for p in $PATH; do
21697        if test -f "$p/$path" && test -x "$p/$path"; then
21698          new_path="$p/$path"
21699          break
21700        fi
21701      done
21702      IFS="$IFS_save"
21703    else
21704      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21705$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21706      new_path="$path"
21707    fi
21708
21709    if test "x$new_path" = x; then
21710        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21711$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21712        has_space=`$ECHO "$complete" | $GREP " "`
21713        if test "x$has_space" != x; then
21714          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21715$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21716        fi
21717        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21718      fi
21719  fi
21720
21721      # Now join together the path and the arguments once again
21722      if test "x$arguments" != xEOL; then
21723        new_complete="$new_path ${arguments% *}"
21724      else
21725        new_complete="$new_path"
21726      fi
21727
21728  if test "x$complete" != "x$new_complete"; then
21729      AR="$new_complete"
21730      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21731$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21732    fi
21733
21734fi
21735if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21736    ARFLAGS="-r"
21737else
21738    ARFLAGS=""
21739fi
21740
21741
21742# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21743HOTSPOT_CXX="$CXX"
21744HOTSPOT_LD="$LD"
21745
21746
21747
21748COMPILER_NAME=gcc
21749COMPILER_TYPE=CC
21750if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21751
21752    # For now, assume that we are always compiling using cl.exe.
21753    CC_OUT_OPTION=-Fo
21754    EXE_OUT_OPTION=-out:
21755    LD_OUT_OPTION=-out:
21756    AR_OUT_OPTION=-out:
21757    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21758    # program for something completely different.
21759    # Extract the first word of "link", so it can be a program name with args.
21760set dummy link; ac_word=$2
21761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21762$as_echo_n "checking for $ac_word... " >&6; }
21763if test "${ac_cv_prog_WINLD+set}" = set; then :
21764  $as_echo_n "(cached) " >&6
21765else
21766  if test -n "$WINLD"; then
21767  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21768else
21769  ac_prog_rejected=no
21770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21771for as_dir in $PATH
21772do
21773  IFS=$as_save_IFS
21774  test -z "$as_dir" && as_dir=.
21775    for ac_exec_ext in '' $ac_executable_extensions; do
21776  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21777    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21778       ac_prog_rejected=yes
21779       continue
21780     fi
21781    ac_cv_prog_WINLD="link"
21782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21783    break 2
21784  fi
21785done
21786  done
21787IFS=$as_save_IFS
21788
21789if test $ac_prog_rejected = yes; then
21790  # We found a bogon in the path, so make sure we never use it.
21791  set dummy $ac_cv_prog_WINLD
21792  shift
21793  if test $# != 0; then
21794    # We chose a different compiler from the bogus one.
21795    # However, it has the same basename, so the bogon will be chosen
21796    # first if we set WINLD to just the basename; use the full file name.
21797    shift
21798    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21799  fi
21800fi
21801fi
21802fi
21803WINLD=$ac_cv_prog_WINLD
21804if test -n "$WINLD"; then
21805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21806$as_echo "$WINLD" >&6; }
21807else
21808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21809$as_echo "no" >&6; }
21810fi
21811
21812
21813    # Since we must ignore the first found link, WINLD will contain
21814    # the full path to the link.exe program.
21815
21816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21817
21818  # First separate the path from the arguments. This will split at the first
21819  # space.
21820  complete="$WINLD"
21821  path="${complete%% *}"
21822  tmp="$complete EOL"
21823  arguments="${tmp#* }"
21824
21825  # Input might be given as Windows format, start by converting to
21826  # unix format.
21827  new_path=`$CYGPATH -u "$path"`
21828
21829  # Now try to locate executable using which
21830  new_path=`$WHICH "$new_path" 2> /dev/null`
21831  # bat and cmd files are not always considered executable in cygwin causing which
21832  # to not find them
21833  if test "x$new_path" = x \
21834           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21835           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21836    new_path=`$CYGPATH -u "$path"`
21837  fi
21838  if test "x$new_path" = x; then
21839    # Oops. Which didn't find the executable.
21840    # The splitting of arguments from the executable at a space might have been incorrect,
21841    # since paths with space are more likely in Windows. Give it another try with the whole
21842    # argument.
21843    path="$complete"
21844    arguments="EOL"
21845    new_path=`$CYGPATH -u "$path"`
21846    new_path=`$WHICH "$new_path" 2> /dev/null`
21847    # bat and cmd files are not always considered executable in cygwin causing which
21848    # to not find them
21849    if test "x$new_path" = x \
21850             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21851             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21852      new_path=`$CYGPATH -u "$path"`
21853    fi
21854    if test "x$new_path" = x; then
21855      # It's still not found. Now this is an unrecoverable error.
21856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21857$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21858      has_space=`$ECHO "$complete" | $GREP " "`
21859      if test "x$has_space" != x; then
21860        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21861$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21862      fi
21863      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21864    fi
21865  fi
21866
21867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21870  # "foo.exe" is OK but "foo" is an error.
21871  #
21872  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21873  # It is also a way to make sure we got the proper file name for the real test later on.
21874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21875  if test "x$test_shortpath" = x; then
21876    # Short path failed, file does not exist as specified.
21877    # Try adding .exe or .cmd
21878    if test -f "${new_path}.exe"; then
21879       input_to_shortpath="${new_path}.exe"
21880    elif test -f "${new_path}.cmd"; then
21881       input_to_shortpath="${new_path}.cmd"
21882    else
21883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21884$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21885      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21886$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21887      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21888    fi
21889  else
21890    input_to_shortpath="$new_path"
21891  fi
21892
21893  # Call helper function which possibly converts this using DOS-style short mode.
21894  # If so, the updated path is stored in $new_path.
21895  new_path="$input_to_shortpath"
21896
21897  input_path="$input_to_shortpath"
21898  # Check if we need to convert this using DOS-style short mode. If the path
21899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21900  # take no chances and rewrite it.
21901  # Note: m4 eats our [], so we need to use [ and ] instead.
21902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21903  if test "x$has_forbidden_chars" != x; then
21904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21908      # Going to short mode and back again did indeed matter. Since short mode is
21909      # case insensitive, let's make it lowercase to improve readability.
21910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21911      # Now convert it back to Unix-stile (cygpath)
21912      input_path=`$CYGPATH -u "$shortmode_path"`
21913      new_path="$input_path"
21914    fi
21915  fi
21916
21917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21918  if test "x$test_cygdrive_prefix" = x; then
21919    # As a simple fix, exclude /usr/bin since it's not a real path.
21920    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21922      # a path prefixed by /cygdrive for fixpath to work.
21923      new_path="$CYGWIN_ROOT_PATH$input_path"
21924    fi
21925  fi
21926
21927  # remove trailing .exe if any
21928  new_path="${new_path/%.exe/}"
21929
21930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21931
21932  # First separate the path from the arguments. This will split at the first
21933  # space.
21934  complete="$WINLD"
21935  path="${complete%% *}"
21936  tmp="$complete EOL"
21937  arguments="${tmp#* }"
21938
21939  # Input might be given as Windows format, start by converting to
21940  # unix format.
21941  new_path="$path"
21942
21943  windows_path="$new_path"
21944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21945    unix_path=`$CYGPATH -u "$windows_path"`
21946    new_path="$unix_path"
21947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21949    new_path="$unix_path"
21950  fi
21951
21952
21953  # Now try to locate executable using which
21954  new_path=`$WHICH "$new_path" 2> /dev/null`
21955
21956  if test "x$new_path" = x; then
21957    # Oops. Which didn't find the executable.
21958    # The splitting of arguments from the executable at a space might have been incorrect,
21959    # since paths with space are more likely in Windows. Give it another try with the whole
21960    # argument.
21961    path="$complete"
21962    arguments="EOL"
21963    new_path="$path"
21964
21965  windows_path="$new_path"
21966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21967    unix_path=`$CYGPATH -u "$windows_path"`
21968    new_path="$unix_path"
21969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21971    new_path="$unix_path"
21972  fi
21973
21974
21975    new_path=`$WHICH "$new_path" 2> /dev/null`
21976
21977    if test "x$new_path" = x; then
21978      # It's still not found. Now this is an unrecoverable error.
21979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21980$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21981      has_space=`$ECHO "$complete" | $GREP " "`
21982      if test "x$has_space" != x; then
21983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21985      fi
21986      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21987    fi
21988  fi
21989
21990  # Now new_path has a complete unix path to the binary
21991  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21992    # Keep paths in /bin as-is, but remove trailing .exe if any
21993    new_path="${new_path/%.exe/}"
21994    # Do not save /bin paths to all_fixpath_prefixes!
21995  else
21996    # Not in mixed or Windows style, start by that.
21997    new_path=`cmd //c echo $new_path`
21998
21999  input_path="$new_path"
22000  # Check if we need to convert this using DOS-style short mode. If the path
22001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22002  # take no chances and rewrite it.
22003  # Note: m4 eats our [], so we need to use [ and ] instead.
22004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22005  if test "x$has_forbidden_chars" != x; then
22006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22008  fi
22009
22010    # Output is in $new_path
22011
22012  windows_path="$new_path"
22013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22014    unix_path=`$CYGPATH -u "$windows_path"`
22015    new_path="$unix_path"
22016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22018    new_path="$unix_path"
22019  fi
22020
22021    # remove trailing .exe if any
22022    new_path="${new_path/%.exe/}"
22023
22024    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22025    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22026  fi
22027
22028  else
22029    # We're on a posix platform. Hooray! :)
22030    # First separate the path from the arguments. This will split at the first
22031    # space.
22032    complete="$WINLD"
22033    path="${complete%% *}"
22034    tmp="$complete EOL"
22035    arguments="${tmp#* }"
22036
22037    # Cannot rely on the command "which" here since it doesn't always work.
22038    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22039    if test -z "$is_absolute_path"; then
22040      # Path to executable is not absolute. Find it.
22041      IFS_save="$IFS"
22042      IFS=:
22043      for p in $PATH; do
22044        if test -f "$p/$path" && test -x "$p/$path"; then
22045          new_path="$p/$path"
22046          break
22047        fi
22048      done
22049      IFS="$IFS_save"
22050    else
22051      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22052$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22053      new_path="$path"
22054    fi
22055
22056    if test "x$new_path" = x; then
22057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22058$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22059        has_space=`$ECHO "$complete" | $GREP " "`
22060        if test "x$has_space" != x; then
22061          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22062$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22063        fi
22064        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22065      fi
22066  fi
22067
22068      # Now join together the path and the arguments once again
22069      if test "x$arguments" != xEOL; then
22070        new_complete="$new_path ${arguments% *}"
22071      else
22072        new_complete="$new_path"
22073      fi
22074
22075  if test "x$complete" != "x$new_complete"; then
22076      WINLD="$new_complete"
22077      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22078$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22079    fi
22080
22081    printf "Windows linker was found at $WINLD\n"
22082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22083$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22084    "$WINLD" --version > /dev/null
22085    if test $? -eq 0 ; then
22086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22087$as_echo "no" >&6; }
22088      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22089    else
22090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22091$as_echo "yes" >&6; }
22092    fi
22093    LD="$WINLD"
22094    LDEXE="$WINLD"
22095    LDCXX="$WINLD"
22096    LDEXECXX="$WINLD"
22097
22098    # Extract the first word of "mt", so it can be a program name with args.
22099set dummy mt; ac_word=$2
22100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22101$as_echo_n "checking for $ac_word... " >&6; }
22102if test "${ac_cv_prog_MT+set}" = set; then :
22103  $as_echo_n "(cached) " >&6
22104else
22105  if test -n "$MT"; then
22106  ac_cv_prog_MT="$MT" # Let the user override the test.
22107else
22108  ac_prog_rejected=no
22109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22110for as_dir in $PATH
22111do
22112  IFS=$as_save_IFS
22113  test -z "$as_dir" && as_dir=.
22114    for ac_exec_ext in '' $ac_executable_extensions; do
22115  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22116    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22117       ac_prog_rejected=yes
22118       continue
22119     fi
22120    ac_cv_prog_MT="mt"
22121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22122    break 2
22123  fi
22124done
22125  done
22126IFS=$as_save_IFS
22127
22128if test $ac_prog_rejected = yes; then
22129  # We found a bogon in the path, so make sure we never use it.
22130  set dummy $ac_cv_prog_MT
22131  shift
22132  if test $# != 0; then
22133    # We chose a different compiler from the bogus one.
22134    # However, it has the same basename, so the bogon will be chosen
22135    # first if we set MT to just the basename; use the full file name.
22136    shift
22137    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22138  fi
22139fi
22140fi
22141fi
22142MT=$ac_cv_prog_MT
22143if test -n "$MT"; then
22144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22145$as_echo "$MT" >&6; }
22146else
22147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22148$as_echo "no" >&6; }
22149fi
22150
22151
22152
22153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22154
22155  # First separate the path from the arguments. This will split at the first
22156  # space.
22157  complete="$MT"
22158  path="${complete%% *}"
22159  tmp="$complete EOL"
22160  arguments="${tmp#* }"
22161
22162  # Input might be given as Windows format, start by converting to
22163  # unix format.
22164  new_path=`$CYGPATH -u "$path"`
22165
22166  # Now try to locate executable using which
22167  new_path=`$WHICH "$new_path" 2> /dev/null`
22168  # bat and cmd files are not always considered executable in cygwin causing which
22169  # to not find them
22170  if test "x$new_path" = x \
22171           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22172           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22173    new_path=`$CYGPATH -u "$path"`
22174  fi
22175  if test "x$new_path" = x; then
22176    # Oops. Which didn't find the executable.
22177    # The splitting of arguments from the executable at a space might have been incorrect,
22178    # since paths with space are more likely in Windows. Give it another try with the whole
22179    # argument.
22180    path="$complete"
22181    arguments="EOL"
22182    new_path=`$CYGPATH -u "$path"`
22183    new_path=`$WHICH "$new_path" 2> /dev/null`
22184    # bat and cmd files are not always considered executable in cygwin causing which
22185    # to not find them
22186    if test "x$new_path" = x \
22187             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22188             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22189      new_path=`$CYGPATH -u "$path"`
22190    fi
22191    if test "x$new_path" = x; then
22192      # It's still not found. Now this is an unrecoverable error.
22193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22194$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22195      has_space=`$ECHO "$complete" | $GREP " "`
22196      if test "x$has_space" != x; then
22197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22199      fi
22200      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22201    fi
22202  fi
22203
22204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22207  # "foo.exe" is OK but "foo" is an error.
22208  #
22209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22210  # It is also a way to make sure we got the proper file name for the real test later on.
22211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22212  if test "x$test_shortpath" = x; then
22213    # Short path failed, file does not exist as specified.
22214    # Try adding .exe or .cmd
22215    if test -f "${new_path}.exe"; then
22216       input_to_shortpath="${new_path}.exe"
22217    elif test -f "${new_path}.cmd"; then
22218       input_to_shortpath="${new_path}.cmd"
22219    else
22220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22221$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22222      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22223$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22224      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22225    fi
22226  else
22227    input_to_shortpath="$new_path"
22228  fi
22229
22230  # Call helper function which possibly converts this using DOS-style short mode.
22231  # If so, the updated path is stored in $new_path.
22232  new_path="$input_to_shortpath"
22233
22234  input_path="$input_to_shortpath"
22235  # Check if we need to convert this using DOS-style short mode. If the path
22236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22237  # take no chances and rewrite it.
22238  # Note: m4 eats our [], so we need to use [ and ] instead.
22239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22240  if test "x$has_forbidden_chars" != x; then
22241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22245      # Going to short mode and back again did indeed matter. Since short mode is
22246      # case insensitive, let's make it lowercase to improve readability.
22247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22248      # Now convert it back to Unix-stile (cygpath)
22249      input_path=`$CYGPATH -u "$shortmode_path"`
22250      new_path="$input_path"
22251    fi
22252  fi
22253
22254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22255  if test "x$test_cygdrive_prefix" = x; then
22256    # As a simple fix, exclude /usr/bin since it's not a real path.
22257    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22259      # a path prefixed by /cygdrive for fixpath to work.
22260      new_path="$CYGWIN_ROOT_PATH$input_path"
22261    fi
22262  fi
22263
22264  # remove trailing .exe if any
22265  new_path="${new_path/%.exe/}"
22266
22267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22268
22269  # First separate the path from the arguments. This will split at the first
22270  # space.
22271  complete="$MT"
22272  path="${complete%% *}"
22273  tmp="$complete EOL"
22274  arguments="${tmp#* }"
22275
22276  # Input might be given as Windows format, start by converting to
22277  # unix format.
22278  new_path="$path"
22279
22280  windows_path="$new_path"
22281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22282    unix_path=`$CYGPATH -u "$windows_path"`
22283    new_path="$unix_path"
22284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22286    new_path="$unix_path"
22287  fi
22288
22289
22290  # Now try to locate executable using which
22291  new_path=`$WHICH "$new_path" 2> /dev/null`
22292
22293  if test "x$new_path" = x; then
22294    # Oops. Which didn't find the executable.
22295    # The splitting of arguments from the executable at a space might have been incorrect,
22296    # since paths with space are more likely in Windows. Give it another try with the whole
22297    # argument.
22298    path="$complete"
22299    arguments="EOL"
22300    new_path="$path"
22301
22302  windows_path="$new_path"
22303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22304    unix_path=`$CYGPATH -u "$windows_path"`
22305    new_path="$unix_path"
22306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22308    new_path="$unix_path"
22309  fi
22310
22311
22312    new_path=`$WHICH "$new_path" 2> /dev/null`
22313
22314    if test "x$new_path" = x; then
22315      # It's still not found. Now this is an unrecoverable error.
22316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22317$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22318      has_space=`$ECHO "$complete" | $GREP " "`
22319      if test "x$has_space" != x; then
22320        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22321$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22322      fi
22323      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22324    fi
22325  fi
22326
22327  # Now new_path has a complete unix path to the binary
22328  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22329    # Keep paths in /bin as-is, but remove trailing .exe if any
22330    new_path="${new_path/%.exe/}"
22331    # Do not save /bin paths to all_fixpath_prefixes!
22332  else
22333    # Not in mixed or Windows style, start by that.
22334    new_path=`cmd //c echo $new_path`
22335
22336  input_path="$new_path"
22337  # Check if we need to convert this using DOS-style short mode. If the path
22338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22339  # take no chances and rewrite it.
22340  # Note: m4 eats our [], so we need to use [ and ] instead.
22341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22342  if test "x$has_forbidden_chars" != x; then
22343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22345  fi
22346
22347    # Output is in $new_path
22348
22349  windows_path="$new_path"
22350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22351    unix_path=`$CYGPATH -u "$windows_path"`
22352    new_path="$unix_path"
22353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22355    new_path="$unix_path"
22356  fi
22357
22358    # remove trailing .exe if any
22359    new_path="${new_path/%.exe/}"
22360
22361    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22362    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22363  fi
22364
22365  else
22366    # We're on a posix platform. Hooray! :)
22367    # First separate the path from the arguments. This will split at the first
22368    # space.
22369    complete="$MT"
22370    path="${complete%% *}"
22371    tmp="$complete EOL"
22372    arguments="${tmp#* }"
22373
22374    # Cannot rely on the command "which" here since it doesn't always work.
22375    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22376    if test -z "$is_absolute_path"; then
22377      # Path to executable is not absolute. Find it.
22378      IFS_save="$IFS"
22379      IFS=:
22380      for p in $PATH; do
22381        if test -f "$p/$path" && test -x "$p/$path"; then
22382          new_path="$p/$path"
22383          break
22384        fi
22385      done
22386      IFS="$IFS_save"
22387    else
22388      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22389$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22390      new_path="$path"
22391    fi
22392
22393    if test "x$new_path" = x; then
22394        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22395$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22396        has_space=`$ECHO "$complete" | $GREP " "`
22397        if test "x$has_space" != x; then
22398          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22399$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22400        fi
22401        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22402      fi
22403  fi
22404
22405      # Now join together the path and the arguments once again
22406      if test "x$arguments" != xEOL; then
22407        new_complete="$new_path ${arguments% *}"
22408      else
22409        new_complete="$new_path"
22410      fi
22411
22412  if test "x$complete" != "x$new_complete"; then
22413      MT="$new_complete"
22414      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22415$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22416    fi
22417
22418    # The resource compiler
22419    # Extract the first word of "rc", so it can be a program name with args.
22420set dummy rc; ac_word=$2
22421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22422$as_echo_n "checking for $ac_word... " >&6; }
22423if test "${ac_cv_prog_RC+set}" = set; then :
22424  $as_echo_n "(cached) " >&6
22425else
22426  if test -n "$RC"; then
22427  ac_cv_prog_RC="$RC" # Let the user override the test.
22428else
22429  ac_prog_rejected=no
22430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22431for as_dir in $PATH
22432do
22433  IFS=$as_save_IFS
22434  test -z "$as_dir" && as_dir=.
22435    for ac_exec_ext in '' $ac_executable_extensions; do
22436  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22437    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22438       ac_prog_rejected=yes
22439       continue
22440     fi
22441    ac_cv_prog_RC="rc"
22442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22443    break 2
22444  fi
22445done
22446  done
22447IFS=$as_save_IFS
22448
22449if test $ac_prog_rejected = yes; then
22450  # We found a bogon in the path, so make sure we never use it.
22451  set dummy $ac_cv_prog_RC
22452  shift
22453  if test $# != 0; then
22454    # We chose a different compiler from the bogus one.
22455    # However, it has the same basename, so the bogon will be chosen
22456    # first if we set RC to just the basename; use the full file name.
22457    shift
22458    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22459  fi
22460fi
22461fi
22462fi
22463RC=$ac_cv_prog_RC
22464if test -n "$RC"; then
22465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22466$as_echo "$RC" >&6; }
22467else
22468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22469$as_echo "no" >&6; }
22470fi
22471
22472
22473
22474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22475
22476  # First separate the path from the arguments. This will split at the first
22477  # space.
22478  complete="$RC"
22479  path="${complete%% *}"
22480  tmp="$complete EOL"
22481  arguments="${tmp#* }"
22482
22483  # Input might be given as Windows format, start by converting to
22484  # unix format.
22485  new_path=`$CYGPATH -u "$path"`
22486
22487  # Now try to locate executable using which
22488  new_path=`$WHICH "$new_path" 2> /dev/null`
22489  # bat and cmd files are not always considered executable in cygwin causing which
22490  # to not find them
22491  if test "x$new_path" = x \
22492           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22493           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22494    new_path=`$CYGPATH -u "$path"`
22495  fi
22496  if test "x$new_path" = x; then
22497    # Oops. Which didn't find the executable.
22498    # The splitting of arguments from the executable at a space might have been incorrect,
22499    # since paths with space are more likely in Windows. Give it another try with the whole
22500    # argument.
22501    path="$complete"
22502    arguments="EOL"
22503    new_path=`$CYGPATH -u "$path"`
22504    new_path=`$WHICH "$new_path" 2> /dev/null`
22505    # bat and cmd files are not always considered executable in cygwin causing which
22506    # to not find them
22507    if test "x$new_path" = x \
22508             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22509             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22510      new_path=`$CYGPATH -u "$path"`
22511    fi
22512    if test "x$new_path" = x; then
22513      # It's still not found. Now this is an unrecoverable error.
22514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22515$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22516      has_space=`$ECHO "$complete" | $GREP " "`
22517      if test "x$has_space" != x; then
22518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22520      fi
22521      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22522    fi
22523  fi
22524
22525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22528  # "foo.exe" is OK but "foo" is an error.
22529  #
22530  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22531  # It is also a way to make sure we got the proper file name for the real test later on.
22532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22533  if test "x$test_shortpath" = x; then
22534    # Short path failed, file does not exist as specified.
22535    # Try adding .exe or .cmd
22536    if test -f "${new_path}.exe"; then
22537       input_to_shortpath="${new_path}.exe"
22538    elif test -f "${new_path}.cmd"; then
22539       input_to_shortpath="${new_path}.cmd"
22540    else
22541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22542$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22543      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22544$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22545      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22546    fi
22547  else
22548    input_to_shortpath="$new_path"
22549  fi
22550
22551  # Call helper function which possibly converts this using DOS-style short mode.
22552  # If so, the updated path is stored in $new_path.
22553  new_path="$input_to_shortpath"
22554
22555  input_path="$input_to_shortpath"
22556  # Check if we need to convert this using DOS-style short mode. If the path
22557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22558  # take no chances and rewrite it.
22559  # Note: m4 eats our [], so we need to use [ and ] instead.
22560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22561  if test "x$has_forbidden_chars" != x; then
22562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22563    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22564    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22565    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22566      # Going to short mode and back again did indeed matter. Since short mode is
22567      # case insensitive, let's make it lowercase to improve readability.
22568      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22569      # Now convert it back to Unix-stile (cygpath)
22570      input_path=`$CYGPATH -u "$shortmode_path"`
22571      new_path="$input_path"
22572    fi
22573  fi
22574
22575  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22576  if test "x$test_cygdrive_prefix" = x; then
22577    # As a simple fix, exclude /usr/bin since it's not a real path.
22578    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22579      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22580      # a path prefixed by /cygdrive for fixpath to work.
22581      new_path="$CYGWIN_ROOT_PATH$input_path"
22582    fi
22583  fi
22584
22585  # remove trailing .exe if any
22586  new_path="${new_path/%.exe/}"
22587
22588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22589
22590  # First separate the path from the arguments. This will split at the first
22591  # space.
22592  complete="$RC"
22593  path="${complete%% *}"
22594  tmp="$complete EOL"
22595  arguments="${tmp#* }"
22596
22597  # Input might be given as Windows format, start by converting to
22598  # unix format.
22599  new_path="$path"
22600
22601  windows_path="$new_path"
22602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22603    unix_path=`$CYGPATH -u "$windows_path"`
22604    new_path="$unix_path"
22605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22607    new_path="$unix_path"
22608  fi
22609
22610
22611  # Now try to locate executable using which
22612  new_path=`$WHICH "$new_path" 2> /dev/null`
22613
22614  if test "x$new_path" = x; then
22615    # Oops. Which didn't find the executable.
22616    # The splitting of arguments from the executable at a space might have been incorrect,
22617    # since paths with space are more likely in Windows. Give it another try with the whole
22618    # argument.
22619    path="$complete"
22620    arguments="EOL"
22621    new_path="$path"
22622
22623  windows_path="$new_path"
22624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22625    unix_path=`$CYGPATH -u "$windows_path"`
22626    new_path="$unix_path"
22627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22629    new_path="$unix_path"
22630  fi
22631
22632
22633    new_path=`$WHICH "$new_path" 2> /dev/null`
22634
22635    if test "x$new_path" = x; then
22636      # It's still not found. Now this is an unrecoverable error.
22637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22638$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22639      has_space=`$ECHO "$complete" | $GREP " "`
22640      if test "x$has_space" != x; then
22641        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22642$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22643      fi
22644      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22645    fi
22646  fi
22647
22648  # Now new_path has a complete unix path to the binary
22649  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22650    # Keep paths in /bin as-is, but remove trailing .exe if any
22651    new_path="${new_path/%.exe/}"
22652    # Do not save /bin paths to all_fixpath_prefixes!
22653  else
22654    # Not in mixed or Windows style, start by that.
22655    new_path=`cmd //c echo $new_path`
22656
22657  input_path="$new_path"
22658  # Check if we need to convert this using DOS-style short mode. If the path
22659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22660  # take no chances and rewrite it.
22661  # Note: m4 eats our [], so we need to use [ and ] instead.
22662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22663  if test "x$has_forbidden_chars" != x; then
22664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22666  fi
22667
22668    # Output is in $new_path
22669
22670  windows_path="$new_path"
22671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22672    unix_path=`$CYGPATH -u "$windows_path"`
22673    new_path="$unix_path"
22674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22676    new_path="$unix_path"
22677  fi
22678
22679    # remove trailing .exe if any
22680    new_path="${new_path/%.exe/}"
22681
22682    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22683    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22684  fi
22685
22686  else
22687    # We're on a posix platform. Hooray! :)
22688    # First separate the path from the arguments. This will split at the first
22689    # space.
22690    complete="$RC"
22691    path="${complete%% *}"
22692    tmp="$complete EOL"
22693    arguments="${tmp#* }"
22694
22695    # Cannot rely on the command "which" here since it doesn't always work.
22696    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22697    if test -z "$is_absolute_path"; then
22698      # Path to executable is not absolute. Find it.
22699      IFS_save="$IFS"
22700      IFS=:
22701      for p in $PATH; do
22702        if test -f "$p/$path" && test -x "$p/$path"; then
22703          new_path="$p/$path"
22704          break
22705        fi
22706      done
22707      IFS="$IFS_save"
22708    else
22709      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22710$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22711      new_path="$path"
22712    fi
22713
22714    if test "x$new_path" = x; then
22715        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22716$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22717        has_space=`$ECHO "$complete" | $GREP " "`
22718        if test "x$has_space" != x; then
22719          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22720$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22721        fi
22722        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22723      fi
22724  fi
22725
22726      # Now join together the path and the arguments once again
22727      if test "x$arguments" != xEOL; then
22728        new_complete="$new_path ${arguments% *}"
22729      else
22730        new_complete="$new_path"
22731      fi
22732
22733  if test "x$complete" != "x$new_complete"; then
22734      RC="$new_complete"
22735      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22736$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22737    fi
22738
22739
22740    # For hotspot, we need these in Windows mixed path,
22741    # so rewrite them all. Need added .exe suffix.
22742    HOTSPOT_CXX="$CXX.exe"
22743    HOTSPOT_LD="$LD.exe"
22744    HOTSPOT_MT="$MT.exe"
22745    HOTSPOT_RC="$RC.exe"
22746
22747  unix_path="$HOTSPOT_CXX"
22748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22749    windows_path=`$CYGPATH -m "$unix_path"`
22750    HOTSPOT_CXX="$windows_path"
22751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22752    windows_path=`cmd //c echo $unix_path`
22753    HOTSPOT_CXX="$windows_path"
22754  fi
22755
22756
22757  unix_path="$HOTSPOT_LD"
22758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22759    windows_path=`$CYGPATH -m "$unix_path"`
22760    HOTSPOT_LD="$windows_path"
22761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22762    windows_path=`cmd //c echo $unix_path`
22763    HOTSPOT_LD="$windows_path"
22764  fi
22765
22766
22767  unix_path="$HOTSPOT_MT"
22768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22769    windows_path=`$CYGPATH -m "$unix_path"`
22770    HOTSPOT_MT="$windows_path"
22771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22772    windows_path=`cmd //c echo $unix_path`
22773    HOTSPOT_MT="$windows_path"
22774  fi
22775
22776
22777  unix_path="$HOTSPOT_RC"
22778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22779    windows_path=`$CYGPATH -m "$unix_path"`
22780    HOTSPOT_RC="$windows_path"
22781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22782    windows_path=`cmd //c echo $unix_path`
22783    HOTSPOT_RC="$windows_path"
22784  fi
22785
22786
22787
22788
22789    RC_FLAGS="-nologo -l 0x409 -r"
22790    if test "x$VARIANT" = xOPT; then :
22791
22792        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22793
22794fi
22795    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22796    if test "x$JDK_UPDATE_VERSION" = x; then :
22797
22798        JDK_UPDATE_VERSION_NOTNULL=0
22799
22800fi
22801    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22802    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22803    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22804    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22805    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22806    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22807    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22808
22809    # lib.exe is used to create static libraries.
22810    # Extract the first word of "lib", so it can be a program name with args.
22811set dummy lib; ac_word=$2
22812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22813$as_echo_n "checking for $ac_word... " >&6; }
22814if test "${ac_cv_prog_WINAR+set}" = set; then :
22815  $as_echo_n "(cached) " >&6
22816else
22817  if test -n "$WINAR"; then
22818  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22819else
22820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22821for as_dir in $PATH
22822do
22823  IFS=$as_save_IFS
22824  test -z "$as_dir" && as_dir=.
22825    for ac_exec_ext in '' $ac_executable_extensions; do
22826  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22827    ac_cv_prog_WINAR="lib"
22828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22829    break 2
22830  fi
22831done
22832  done
22833IFS=$as_save_IFS
22834
22835fi
22836fi
22837WINAR=$ac_cv_prog_WINAR
22838if test -n "$WINAR"; then
22839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22840$as_echo "$WINAR" >&6; }
22841else
22842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22843$as_echo "no" >&6; }
22844fi
22845
22846
22847
22848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22849
22850  # First separate the path from the arguments. This will split at the first
22851  # space.
22852  complete="$WINAR"
22853  path="${complete%% *}"
22854  tmp="$complete EOL"
22855  arguments="${tmp#* }"
22856
22857  # Input might be given as Windows format, start by converting to
22858  # unix format.
22859  new_path=`$CYGPATH -u "$path"`
22860
22861  # Now try to locate executable using which
22862  new_path=`$WHICH "$new_path" 2> /dev/null`
22863  # bat and cmd files are not always considered executable in cygwin causing which
22864  # to not find them
22865  if test "x$new_path" = x \
22866           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22867           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22868    new_path=`$CYGPATH -u "$path"`
22869  fi
22870  if test "x$new_path" = x; then
22871    # Oops. Which didn't find the executable.
22872    # The splitting of arguments from the executable at a space might have been incorrect,
22873    # since paths with space are more likely in Windows. Give it another try with the whole
22874    # argument.
22875    path="$complete"
22876    arguments="EOL"
22877    new_path=`$CYGPATH -u "$path"`
22878    new_path=`$WHICH "$new_path" 2> /dev/null`
22879    # bat and cmd files are not always considered executable in cygwin causing which
22880    # to not find them
22881    if test "x$new_path" = x \
22882             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22883             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22884      new_path=`$CYGPATH -u "$path"`
22885    fi
22886    if test "x$new_path" = x; then
22887      # It's still not found. Now this is an unrecoverable error.
22888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22889$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22890      has_space=`$ECHO "$complete" | $GREP " "`
22891      if test "x$has_space" != x; then
22892        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22893$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22894      fi
22895      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22896    fi
22897  fi
22898
22899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22902  # "foo.exe" is OK but "foo" is an error.
22903  #
22904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22905  # It is also a way to make sure we got the proper file name for the real test later on.
22906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22907  if test "x$test_shortpath" = x; then
22908    # Short path failed, file does not exist as specified.
22909    # Try adding .exe or .cmd
22910    if test -f "${new_path}.exe"; then
22911       input_to_shortpath="${new_path}.exe"
22912    elif test -f "${new_path}.cmd"; then
22913       input_to_shortpath="${new_path}.cmd"
22914    else
22915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22916$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22917      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22918$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22919      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22920    fi
22921  else
22922    input_to_shortpath="$new_path"
22923  fi
22924
22925  # Call helper function which possibly converts this using DOS-style short mode.
22926  # If so, the updated path is stored in $new_path.
22927  new_path="$input_to_shortpath"
22928
22929  input_path="$input_to_shortpath"
22930  # Check if we need to convert this using DOS-style short mode. If the path
22931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22932  # take no chances and rewrite it.
22933  # Note: m4 eats our [], so we need to use [ and ] instead.
22934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22935  if test "x$has_forbidden_chars" != x; then
22936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22940      # Going to short mode and back again did indeed matter. Since short mode is
22941      # case insensitive, let's make it lowercase to improve readability.
22942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22943      # Now convert it back to Unix-stile (cygpath)
22944      input_path=`$CYGPATH -u "$shortmode_path"`
22945      new_path="$input_path"
22946    fi
22947  fi
22948
22949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22950  if test "x$test_cygdrive_prefix" = x; then
22951    # As a simple fix, exclude /usr/bin since it's not a real path.
22952    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22954      # a path prefixed by /cygdrive for fixpath to work.
22955      new_path="$CYGWIN_ROOT_PATH$input_path"
22956    fi
22957  fi
22958
22959  # remove trailing .exe if any
22960  new_path="${new_path/%.exe/}"
22961
22962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22963
22964  # First separate the path from the arguments. This will split at the first
22965  # space.
22966  complete="$WINAR"
22967  path="${complete%% *}"
22968  tmp="$complete EOL"
22969  arguments="${tmp#* }"
22970
22971  # Input might be given as Windows format, start by converting to
22972  # unix format.
22973  new_path="$path"
22974
22975  windows_path="$new_path"
22976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22977    unix_path=`$CYGPATH -u "$windows_path"`
22978    new_path="$unix_path"
22979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22981    new_path="$unix_path"
22982  fi
22983
22984
22985  # Now try to locate executable using which
22986  new_path=`$WHICH "$new_path" 2> /dev/null`
22987
22988  if test "x$new_path" = x; then
22989    # Oops. Which didn't find the executable.
22990    # The splitting of arguments from the executable at a space might have been incorrect,
22991    # since paths with space are more likely in Windows. Give it another try with the whole
22992    # argument.
22993    path="$complete"
22994    arguments="EOL"
22995    new_path="$path"
22996
22997  windows_path="$new_path"
22998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22999    unix_path=`$CYGPATH -u "$windows_path"`
23000    new_path="$unix_path"
23001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23003    new_path="$unix_path"
23004  fi
23005
23006
23007    new_path=`$WHICH "$new_path" 2> /dev/null`
23008
23009    if test "x$new_path" = x; then
23010      # It's still not found. Now this is an unrecoverable error.
23011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23012$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23013      has_space=`$ECHO "$complete" | $GREP " "`
23014      if test "x$has_space" != x; then
23015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23017      fi
23018      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23019    fi
23020  fi
23021
23022  # Now new_path has a complete unix path to the binary
23023  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23024    # Keep paths in /bin as-is, but remove trailing .exe if any
23025    new_path="${new_path/%.exe/}"
23026    # Do not save /bin paths to all_fixpath_prefixes!
23027  else
23028    # Not in mixed or Windows style, start by that.
23029    new_path=`cmd //c echo $new_path`
23030
23031  input_path="$new_path"
23032  # Check if we need to convert this using DOS-style short mode. If the path
23033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23034  # take no chances and rewrite it.
23035  # Note: m4 eats our [], so we need to use [ and ] instead.
23036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23037  if test "x$has_forbidden_chars" != x; then
23038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23040  fi
23041
23042    # Output is in $new_path
23043
23044  windows_path="$new_path"
23045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23046    unix_path=`$CYGPATH -u "$windows_path"`
23047    new_path="$unix_path"
23048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23050    new_path="$unix_path"
23051  fi
23052
23053    # remove trailing .exe if any
23054    new_path="${new_path/%.exe/}"
23055
23056    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23057    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23058  fi
23059
23060  else
23061    # We're on a posix platform. Hooray! :)
23062    # First separate the path from the arguments. This will split at the first
23063    # space.
23064    complete="$WINAR"
23065    path="${complete%% *}"
23066    tmp="$complete EOL"
23067    arguments="${tmp#* }"
23068
23069    # Cannot rely on the command "which" here since it doesn't always work.
23070    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23071    if test -z "$is_absolute_path"; then
23072      # Path to executable is not absolute. Find it.
23073      IFS_save="$IFS"
23074      IFS=:
23075      for p in $PATH; do
23076        if test -f "$p/$path" && test -x "$p/$path"; then
23077          new_path="$p/$path"
23078          break
23079        fi
23080      done
23081      IFS="$IFS_save"
23082    else
23083      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23084$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23085      new_path="$path"
23086    fi
23087
23088    if test "x$new_path" = x; then
23089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23090$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23091        has_space=`$ECHO "$complete" | $GREP " "`
23092        if test "x$has_space" != x; then
23093          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23094$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23095        fi
23096        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23097      fi
23098  fi
23099
23100      # Now join together the path and the arguments once again
23101      if test "x$arguments" != xEOL; then
23102        new_complete="$new_path ${arguments% *}"
23103      else
23104        new_complete="$new_path"
23105      fi
23106
23107  if test "x$complete" != "x$new_complete"; then
23108      WINAR="$new_complete"
23109      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23110$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23111    fi
23112
23113    AR="$WINAR"
23114    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23115
23116    # Extract the first word of "dumpbin", so it can be a program name with args.
23117set dummy dumpbin; ac_word=$2
23118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23119$as_echo_n "checking for $ac_word... " >&6; }
23120if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23121  $as_echo_n "(cached) " >&6
23122else
23123  if test -n "$DUMPBIN"; then
23124  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23125else
23126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23127for as_dir in $PATH
23128do
23129  IFS=$as_save_IFS
23130  test -z "$as_dir" && as_dir=.
23131    for ac_exec_ext in '' $ac_executable_extensions; do
23132  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23133    ac_cv_prog_DUMPBIN="dumpbin"
23134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23135    break 2
23136  fi
23137done
23138  done
23139IFS=$as_save_IFS
23140
23141fi
23142fi
23143DUMPBIN=$ac_cv_prog_DUMPBIN
23144if test -n "$DUMPBIN"; then
23145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23146$as_echo "$DUMPBIN" >&6; }
23147else
23148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23149$as_echo "no" >&6; }
23150fi
23151
23152
23153
23154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23155
23156  # First separate the path from the arguments. This will split at the first
23157  # space.
23158  complete="$DUMPBIN"
23159  path="${complete%% *}"
23160  tmp="$complete EOL"
23161  arguments="${tmp#* }"
23162
23163  # Input might be given as Windows format, start by converting to
23164  # unix format.
23165  new_path=`$CYGPATH -u "$path"`
23166
23167  # Now try to locate executable using which
23168  new_path=`$WHICH "$new_path" 2> /dev/null`
23169  # bat and cmd files are not always considered executable in cygwin causing which
23170  # to not find them
23171  if test "x$new_path" = x \
23172           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23173           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23174    new_path=`$CYGPATH -u "$path"`
23175  fi
23176  if test "x$new_path" = x; then
23177    # Oops. Which didn't find the executable.
23178    # The splitting of arguments from the executable at a space might have been incorrect,
23179    # since paths with space are more likely in Windows. Give it another try with the whole
23180    # argument.
23181    path="$complete"
23182    arguments="EOL"
23183    new_path=`$CYGPATH -u "$path"`
23184    new_path=`$WHICH "$new_path" 2> /dev/null`
23185    # bat and cmd files are not always considered executable in cygwin causing which
23186    # to not find them
23187    if test "x$new_path" = x \
23188             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23189             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23190      new_path=`$CYGPATH -u "$path"`
23191    fi
23192    if test "x$new_path" = x; then
23193      # It's still not found. Now this is an unrecoverable error.
23194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23195$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23196      has_space=`$ECHO "$complete" | $GREP " "`
23197      if test "x$has_space" != x; then
23198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23200      fi
23201      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23202    fi
23203  fi
23204
23205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23208  # "foo.exe" is OK but "foo" is an error.
23209  #
23210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23211  # It is also a way to make sure we got the proper file name for the real test later on.
23212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23213  if test "x$test_shortpath" = x; then
23214    # Short path failed, file does not exist as specified.
23215    # Try adding .exe or .cmd
23216    if test -f "${new_path}.exe"; then
23217       input_to_shortpath="${new_path}.exe"
23218    elif test -f "${new_path}.cmd"; then
23219       input_to_shortpath="${new_path}.cmd"
23220    else
23221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23222$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23223      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23224$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23225      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23226    fi
23227  else
23228    input_to_shortpath="$new_path"
23229  fi
23230
23231  # Call helper function which possibly converts this using DOS-style short mode.
23232  # If so, the updated path is stored in $new_path.
23233  new_path="$input_to_shortpath"
23234
23235  input_path="$input_to_shortpath"
23236  # Check if we need to convert this using DOS-style short mode. If the path
23237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23238  # take no chances and rewrite it.
23239  # Note: m4 eats our [], so we need to use [ and ] instead.
23240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23241  if test "x$has_forbidden_chars" != x; then
23242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23246      # Going to short mode and back again did indeed matter. Since short mode is
23247      # case insensitive, let's make it lowercase to improve readability.
23248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23249      # Now convert it back to Unix-stile (cygpath)
23250      input_path=`$CYGPATH -u "$shortmode_path"`
23251      new_path="$input_path"
23252    fi
23253  fi
23254
23255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23256  if test "x$test_cygdrive_prefix" = x; then
23257    # As a simple fix, exclude /usr/bin since it's not a real path.
23258    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23260      # a path prefixed by /cygdrive for fixpath to work.
23261      new_path="$CYGWIN_ROOT_PATH$input_path"
23262    fi
23263  fi
23264
23265  # remove trailing .exe if any
23266  new_path="${new_path/%.exe/}"
23267
23268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23269
23270  # First separate the path from the arguments. This will split at the first
23271  # space.
23272  complete="$DUMPBIN"
23273  path="${complete%% *}"
23274  tmp="$complete EOL"
23275  arguments="${tmp#* }"
23276
23277  # Input might be given as Windows format, start by converting to
23278  # unix format.
23279  new_path="$path"
23280
23281  windows_path="$new_path"
23282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23283    unix_path=`$CYGPATH -u "$windows_path"`
23284    new_path="$unix_path"
23285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23287    new_path="$unix_path"
23288  fi
23289
23290
23291  # Now try to locate executable using which
23292  new_path=`$WHICH "$new_path" 2> /dev/null`
23293
23294  if test "x$new_path" = x; then
23295    # Oops. Which didn't find the executable.
23296    # The splitting of arguments from the executable at a space might have been incorrect,
23297    # since paths with space are more likely in Windows. Give it another try with the whole
23298    # argument.
23299    path="$complete"
23300    arguments="EOL"
23301    new_path="$path"
23302
23303  windows_path="$new_path"
23304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23305    unix_path=`$CYGPATH -u "$windows_path"`
23306    new_path="$unix_path"
23307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23309    new_path="$unix_path"
23310  fi
23311
23312
23313    new_path=`$WHICH "$new_path" 2> /dev/null`
23314
23315    if test "x$new_path" = x; then
23316      # It's still not found. Now this is an unrecoverable error.
23317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23318$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23319      has_space=`$ECHO "$complete" | $GREP " "`
23320      if test "x$has_space" != x; then
23321        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23322$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23323      fi
23324      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23325    fi
23326  fi
23327
23328  # Now new_path has a complete unix path to the binary
23329  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23330    # Keep paths in /bin as-is, but remove trailing .exe if any
23331    new_path="${new_path/%.exe/}"
23332    # Do not save /bin paths to all_fixpath_prefixes!
23333  else
23334    # Not in mixed or Windows style, start by that.
23335    new_path=`cmd //c echo $new_path`
23336
23337  input_path="$new_path"
23338  # Check if we need to convert this using DOS-style short mode. If the path
23339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23340  # take no chances and rewrite it.
23341  # Note: m4 eats our [], so we need to use [ and ] instead.
23342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23343  if test "x$has_forbidden_chars" != x; then
23344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23346  fi
23347
23348    # Output is in $new_path
23349
23350  windows_path="$new_path"
23351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23352    unix_path=`$CYGPATH -u "$windows_path"`
23353    new_path="$unix_path"
23354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23356    new_path="$unix_path"
23357  fi
23358
23359    # remove trailing .exe if any
23360    new_path="${new_path/%.exe/}"
23361
23362    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23363    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23364  fi
23365
23366  else
23367    # We're on a posix platform. Hooray! :)
23368    # First separate the path from the arguments. This will split at the first
23369    # space.
23370    complete="$DUMPBIN"
23371    path="${complete%% *}"
23372    tmp="$complete EOL"
23373    arguments="${tmp#* }"
23374
23375    # Cannot rely on the command "which" here since it doesn't always work.
23376    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23377    if test -z "$is_absolute_path"; then
23378      # Path to executable is not absolute. Find it.
23379      IFS_save="$IFS"
23380      IFS=:
23381      for p in $PATH; do
23382        if test -f "$p/$path" && test -x "$p/$path"; then
23383          new_path="$p/$path"
23384          break
23385        fi
23386      done
23387      IFS="$IFS_save"
23388    else
23389      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23390$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23391      new_path="$path"
23392    fi
23393
23394    if test "x$new_path" = x; then
23395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23396$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23397        has_space=`$ECHO "$complete" | $GREP " "`
23398        if test "x$has_space" != x; then
23399          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23400$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23401        fi
23402        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23403      fi
23404  fi
23405
23406      # Now join together the path and the arguments once again
23407      if test "x$arguments" != xEOL; then
23408        new_complete="$new_path ${arguments% *}"
23409      else
23410        new_complete="$new_path"
23411      fi
23412
23413  if test "x$complete" != "x$new_complete"; then
23414      DUMPBIN="$new_complete"
23415      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23416$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23417    fi
23418
23419
23420    COMPILER_TYPE=CL
23421    CCXXFLAGS="$CCXXFLAGS -nologo"
23422
23423fi
23424
23425
23426
23427ac_ext=c
23428ac_cpp='$CPP $CPPFLAGS'
23429ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23430ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23431ac_compiler_gnu=$ac_cv_c_compiler_gnu
23432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23433$as_echo_n "checking how to run the C preprocessor... " >&6; }
23434# On Suns, sometimes $CPP names a directory.
23435if test -n "$CPP" && test -d "$CPP"; then
23436  CPP=
23437fi
23438if test -z "$CPP"; then
23439  if test "${ac_cv_prog_CPP+set}" = set; then :
23440  $as_echo_n "(cached) " >&6
23441else
23442      # Double quotes because CPP needs to be expanded
23443    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23444    do
23445      ac_preproc_ok=false
23446for ac_c_preproc_warn_flag in '' yes
23447do
23448  # Use a header file that comes with gcc, so configuring glibc
23449  # with a fresh cross-compiler works.
23450  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23451  # <limits.h> exists even on freestanding compilers.
23452  # On the NeXT, cc -E runs the code through the compiler's parser,
23453  # not just through cpp. "Syntax error" is here to catch this case.
23454  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23455/* end confdefs.h.  */
23456#ifdef __STDC__
23457# include <limits.h>
23458#else
23459# include <assert.h>
23460#endif
23461		     Syntax error
23462_ACEOF
23463if ac_fn_c_try_cpp "$LINENO"; then :
23464
23465else
23466  # Broken: fails on valid input.
23467continue
23468fi
23469rm -f conftest.err conftest.i conftest.$ac_ext
23470
23471  # OK, works on sane cases.  Now check whether nonexistent headers
23472  # can be detected and how.
23473  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23474/* end confdefs.h.  */
23475#include <ac_nonexistent.h>
23476_ACEOF
23477if ac_fn_c_try_cpp "$LINENO"; then :
23478  # Broken: success on invalid input.
23479continue
23480else
23481  # Passes both tests.
23482ac_preproc_ok=:
23483break
23484fi
23485rm -f conftest.err conftest.i conftest.$ac_ext
23486
23487done
23488# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23489rm -f conftest.i conftest.err conftest.$ac_ext
23490if $ac_preproc_ok; then :
23491  break
23492fi
23493
23494    done
23495    ac_cv_prog_CPP=$CPP
23496
23497fi
23498  CPP=$ac_cv_prog_CPP
23499else
23500  ac_cv_prog_CPP=$CPP
23501fi
23502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23503$as_echo "$CPP" >&6; }
23504ac_preproc_ok=false
23505for ac_c_preproc_warn_flag in '' yes
23506do
23507  # Use a header file that comes with gcc, so configuring glibc
23508  # with a fresh cross-compiler works.
23509  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23510  # <limits.h> exists even on freestanding compilers.
23511  # On the NeXT, cc -E runs the code through the compiler's parser,
23512  # not just through cpp. "Syntax error" is here to catch this case.
23513  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23514/* end confdefs.h.  */
23515#ifdef __STDC__
23516# include <limits.h>
23517#else
23518# include <assert.h>
23519#endif
23520		     Syntax error
23521_ACEOF
23522if ac_fn_c_try_cpp "$LINENO"; then :
23523
23524else
23525  # Broken: fails on valid input.
23526continue
23527fi
23528rm -f conftest.err conftest.i conftest.$ac_ext
23529
23530  # OK, works on sane cases.  Now check whether nonexistent headers
23531  # can be detected and how.
23532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23533/* end confdefs.h.  */
23534#include <ac_nonexistent.h>
23535_ACEOF
23536if ac_fn_c_try_cpp "$LINENO"; then :
23537  # Broken: success on invalid input.
23538continue
23539else
23540  # Passes both tests.
23541ac_preproc_ok=:
23542break
23543fi
23544rm -f conftest.err conftest.i conftest.$ac_ext
23545
23546done
23547# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23548rm -f conftest.i conftest.err conftest.$ac_ext
23549if $ac_preproc_ok; then :
23550
23551else
23552  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23553$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23554as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23555See \`config.log' for more details" "$LINENO" 5 ; }
23556fi
23557
23558ac_ext=cpp
23559ac_cpp='$CXXCPP $CPPFLAGS'
23560ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23561ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23562ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23563
23564
23565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23566
23567  # First separate the path from the arguments. This will split at the first
23568  # space.
23569  complete="$CPP"
23570  path="${complete%% *}"
23571  tmp="$complete EOL"
23572  arguments="${tmp#* }"
23573
23574  # Input might be given as Windows format, start by converting to
23575  # unix format.
23576  new_path=`$CYGPATH -u "$path"`
23577
23578  # Now try to locate executable using which
23579  new_path=`$WHICH "$new_path" 2> /dev/null`
23580  # bat and cmd files are not always considered executable in cygwin causing which
23581  # to not find them
23582  if test "x$new_path" = x \
23583           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23584           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23585    new_path=`$CYGPATH -u "$path"`
23586  fi
23587  if test "x$new_path" = x; then
23588    # Oops. Which didn't find the executable.
23589    # The splitting of arguments from the executable at a space might have been incorrect,
23590    # since paths with space are more likely in Windows. Give it another try with the whole
23591    # argument.
23592    path="$complete"
23593    arguments="EOL"
23594    new_path=`$CYGPATH -u "$path"`
23595    new_path=`$WHICH "$new_path" 2> /dev/null`
23596    # bat and cmd files are not always considered executable in cygwin causing which
23597    # to not find them
23598    if test "x$new_path" = x \
23599             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23600             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23601      new_path=`$CYGPATH -u "$path"`
23602    fi
23603    if test "x$new_path" = x; then
23604      # It's still not found. Now this is an unrecoverable error.
23605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23606$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23607      has_space=`$ECHO "$complete" | $GREP " "`
23608      if test "x$has_space" != x; then
23609        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23610$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23611      fi
23612      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23613    fi
23614  fi
23615
23616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23619  # "foo.exe" is OK but "foo" is an error.
23620  #
23621  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23622  # It is also a way to make sure we got the proper file name for the real test later on.
23623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23624  if test "x$test_shortpath" = x; then
23625    # Short path failed, file does not exist as specified.
23626    # Try adding .exe or .cmd
23627    if test -f "${new_path}.exe"; then
23628       input_to_shortpath="${new_path}.exe"
23629    elif test -f "${new_path}.cmd"; then
23630       input_to_shortpath="${new_path}.cmd"
23631    else
23632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23633$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23634      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23635$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23636      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23637    fi
23638  else
23639    input_to_shortpath="$new_path"
23640  fi
23641
23642  # Call helper function which possibly converts this using DOS-style short mode.
23643  # If so, the updated path is stored in $new_path.
23644  new_path="$input_to_shortpath"
23645
23646  input_path="$input_to_shortpath"
23647  # Check if we need to convert this using DOS-style short mode. If the path
23648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23649  # take no chances and rewrite it.
23650  # Note: m4 eats our [], so we need to use [ and ] instead.
23651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23652  if test "x$has_forbidden_chars" != x; then
23653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23657      # Going to short mode and back again did indeed matter. Since short mode is
23658      # case insensitive, let's make it lowercase to improve readability.
23659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23660      # Now convert it back to Unix-stile (cygpath)
23661      input_path=`$CYGPATH -u "$shortmode_path"`
23662      new_path="$input_path"
23663    fi
23664  fi
23665
23666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23667  if test "x$test_cygdrive_prefix" = x; then
23668    # As a simple fix, exclude /usr/bin since it's not a real path.
23669    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23671      # a path prefixed by /cygdrive for fixpath to work.
23672      new_path="$CYGWIN_ROOT_PATH$input_path"
23673    fi
23674  fi
23675
23676  # remove trailing .exe if any
23677  new_path="${new_path/%.exe/}"
23678
23679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23680
23681  # First separate the path from the arguments. This will split at the first
23682  # space.
23683  complete="$CPP"
23684  path="${complete%% *}"
23685  tmp="$complete EOL"
23686  arguments="${tmp#* }"
23687
23688  # Input might be given as Windows format, start by converting to
23689  # unix format.
23690  new_path="$path"
23691
23692  windows_path="$new_path"
23693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23694    unix_path=`$CYGPATH -u "$windows_path"`
23695    new_path="$unix_path"
23696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23698    new_path="$unix_path"
23699  fi
23700
23701
23702  # Now try to locate executable using which
23703  new_path=`$WHICH "$new_path" 2> /dev/null`
23704
23705  if test "x$new_path" = x; then
23706    # Oops. Which didn't find the executable.
23707    # The splitting of arguments from the executable at a space might have been incorrect,
23708    # since paths with space are more likely in Windows. Give it another try with the whole
23709    # argument.
23710    path="$complete"
23711    arguments="EOL"
23712    new_path="$path"
23713
23714  windows_path="$new_path"
23715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23716    unix_path=`$CYGPATH -u "$windows_path"`
23717    new_path="$unix_path"
23718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23720    new_path="$unix_path"
23721  fi
23722
23723
23724    new_path=`$WHICH "$new_path" 2> /dev/null`
23725
23726    if test "x$new_path" = x; then
23727      # It's still not found. Now this is an unrecoverable error.
23728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23729$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23730      has_space=`$ECHO "$complete" | $GREP " "`
23731      if test "x$has_space" != x; then
23732        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23733$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23734      fi
23735      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23736    fi
23737  fi
23738
23739  # Now new_path has a complete unix path to the binary
23740  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23741    # Keep paths in /bin as-is, but remove trailing .exe if any
23742    new_path="${new_path/%.exe/}"
23743    # Do not save /bin paths to all_fixpath_prefixes!
23744  else
23745    # Not in mixed or Windows style, start by that.
23746    new_path=`cmd //c echo $new_path`
23747
23748  input_path="$new_path"
23749  # Check if we need to convert this using DOS-style short mode. If the path
23750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23751  # take no chances and rewrite it.
23752  # Note: m4 eats our [], so we need to use [ and ] instead.
23753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23754  if test "x$has_forbidden_chars" != x; then
23755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23756    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23757  fi
23758
23759    # Output is in $new_path
23760
23761  windows_path="$new_path"
23762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23763    unix_path=`$CYGPATH -u "$windows_path"`
23764    new_path="$unix_path"
23765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23767    new_path="$unix_path"
23768  fi
23769
23770    # remove trailing .exe if any
23771    new_path="${new_path/%.exe/}"
23772
23773    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23774    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23775  fi
23776
23777  else
23778    # We're on a posix platform. Hooray! :)
23779    # First separate the path from the arguments. This will split at the first
23780    # space.
23781    complete="$CPP"
23782    path="${complete%% *}"
23783    tmp="$complete EOL"
23784    arguments="${tmp#* }"
23785
23786    # Cannot rely on the command "which" here since it doesn't always work.
23787    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23788    if test -z "$is_absolute_path"; then
23789      # Path to executable is not absolute. Find it.
23790      IFS_save="$IFS"
23791      IFS=:
23792      for p in $PATH; do
23793        if test -f "$p/$path" && test -x "$p/$path"; then
23794          new_path="$p/$path"
23795          break
23796        fi
23797      done
23798      IFS="$IFS_save"
23799    else
23800      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23801$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23802      new_path="$path"
23803    fi
23804
23805    if test "x$new_path" = x; then
23806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23807$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23808        has_space=`$ECHO "$complete" | $GREP " "`
23809        if test "x$has_space" != x; then
23810          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23811$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23812        fi
23813        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23814      fi
23815  fi
23816
23817      # Now join together the path and the arguments once again
23818      if test "x$arguments" != xEOL; then
23819        new_complete="$new_path ${arguments% *}"
23820      else
23821        new_complete="$new_path"
23822      fi
23823
23824  if test "x$complete" != "x$new_complete"; then
23825      CPP="$new_complete"
23826      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23827$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23828    fi
23829
23830
23831ac_ext=cpp
23832ac_cpp='$CXXCPP $CPPFLAGS'
23833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23837$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23838if test -z "$CXXCPP"; then
23839  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23840  $as_echo_n "(cached) " >&6
23841else
23842      # Double quotes because CXXCPP needs to be expanded
23843    for CXXCPP in "$CXX -E" "/lib/cpp"
23844    do
23845      ac_preproc_ok=false
23846for ac_cxx_preproc_warn_flag in '' yes
23847do
23848  # Use a header file that comes with gcc, so configuring glibc
23849  # with a fresh cross-compiler works.
23850  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23851  # <limits.h> exists even on freestanding compilers.
23852  # On the NeXT, cc -E runs the code through the compiler's parser,
23853  # not just through cpp. "Syntax error" is here to catch this case.
23854  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23855/* end confdefs.h.  */
23856#ifdef __STDC__
23857# include <limits.h>
23858#else
23859# include <assert.h>
23860#endif
23861		     Syntax error
23862_ACEOF
23863if ac_fn_cxx_try_cpp "$LINENO"; then :
23864
23865else
23866  # Broken: fails on valid input.
23867continue
23868fi
23869rm -f conftest.err conftest.i conftest.$ac_ext
23870
23871  # OK, works on sane cases.  Now check whether nonexistent headers
23872  # can be detected and how.
23873  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23874/* end confdefs.h.  */
23875#include <ac_nonexistent.h>
23876_ACEOF
23877if ac_fn_cxx_try_cpp "$LINENO"; then :
23878  # Broken: success on invalid input.
23879continue
23880else
23881  # Passes both tests.
23882ac_preproc_ok=:
23883break
23884fi
23885rm -f conftest.err conftest.i conftest.$ac_ext
23886
23887done
23888# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23889rm -f conftest.i conftest.err conftest.$ac_ext
23890if $ac_preproc_ok; then :
23891  break
23892fi
23893
23894    done
23895    ac_cv_prog_CXXCPP=$CXXCPP
23896
23897fi
23898  CXXCPP=$ac_cv_prog_CXXCPP
23899else
23900  ac_cv_prog_CXXCPP=$CXXCPP
23901fi
23902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23903$as_echo "$CXXCPP" >&6; }
23904ac_preproc_ok=false
23905for ac_cxx_preproc_warn_flag in '' yes
23906do
23907  # Use a header file that comes with gcc, so configuring glibc
23908  # with a fresh cross-compiler works.
23909  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23910  # <limits.h> exists even on freestanding compilers.
23911  # On the NeXT, cc -E runs the code through the compiler's parser,
23912  # not just through cpp. "Syntax error" is here to catch this case.
23913  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23914/* end confdefs.h.  */
23915#ifdef __STDC__
23916# include <limits.h>
23917#else
23918# include <assert.h>
23919#endif
23920		     Syntax error
23921_ACEOF
23922if ac_fn_cxx_try_cpp "$LINENO"; then :
23923
23924else
23925  # Broken: fails on valid input.
23926continue
23927fi
23928rm -f conftest.err conftest.i conftest.$ac_ext
23929
23930  # OK, works on sane cases.  Now check whether nonexistent headers
23931  # can be detected and how.
23932  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23933/* end confdefs.h.  */
23934#include <ac_nonexistent.h>
23935_ACEOF
23936if ac_fn_cxx_try_cpp "$LINENO"; then :
23937  # Broken: success on invalid input.
23938continue
23939else
23940  # Passes both tests.
23941ac_preproc_ok=:
23942break
23943fi
23944rm -f conftest.err conftest.i conftest.$ac_ext
23945
23946done
23947# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23948rm -f conftest.i conftest.err conftest.$ac_ext
23949if $ac_preproc_ok; then :
23950
23951else
23952  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23954as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
23955See \`config.log' for more details" "$LINENO" 5 ; }
23956fi
23957
23958ac_ext=cpp
23959ac_cpp='$CXXCPP $CPPFLAGS'
23960ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23961ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23962ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23963
23964
23965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23966
23967  # First separate the path from the arguments. This will split at the first
23968  # space.
23969  complete="$CXXCPP"
23970  path="${complete%% *}"
23971  tmp="$complete EOL"
23972  arguments="${tmp#* }"
23973
23974  # Input might be given as Windows format, start by converting to
23975  # unix format.
23976  new_path=`$CYGPATH -u "$path"`
23977
23978  # Now try to locate executable using which
23979  new_path=`$WHICH "$new_path" 2> /dev/null`
23980  # bat and cmd files are not always considered executable in cygwin causing which
23981  # to not find them
23982  if test "x$new_path" = x \
23983           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23984           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23985    new_path=`$CYGPATH -u "$path"`
23986  fi
23987  if test "x$new_path" = x; then
23988    # Oops. Which didn't find the executable.
23989    # The splitting of arguments from the executable at a space might have been incorrect,
23990    # since paths with space are more likely in Windows. Give it another try with the whole
23991    # argument.
23992    path="$complete"
23993    arguments="EOL"
23994    new_path=`$CYGPATH -u "$path"`
23995    new_path=`$WHICH "$new_path" 2> /dev/null`
23996    # bat and cmd files are not always considered executable in cygwin causing which
23997    # to not find them
23998    if test "x$new_path" = x \
23999             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24000             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24001      new_path=`$CYGPATH -u "$path"`
24002    fi
24003    if test "x$new_path" = x; then
24004      # It's still not found. Now this is an unrecoverable error.
24005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24006$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24007      has_space=`$ECHO "$complete" | $GREP " "`
24008      if test "x$has_space" != x; then
24009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24011      fi
24012      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24013    fi
24014  fi
24015
24016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24019  # "foo.exe" is OK but "foo" is an error.
24020  #
24021  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24022  # It is also a way to make sure we got the proper file name for the real test later on.
24023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24024  if test "x$test_shortpath" = x; then
24025    # Short path failed, file does not exist as specified.
24026    # Try adding .exe or .cmd
24027    if test -f "${new_path}.exe"; then
24028       input_to_shortpath="${new_path}.exe"
24029    elif test -f "${new_path}.cmd"; then
24030       input_to_shortpath="${new_path}.cmd"
24031    else
24032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24033$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24034      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24035$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24036      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24037    fi
24038  else
24039    input_to_shortpath="$new_path"
24040  fi
24041
24042  # Call helper function which possibly converts this using DOS-style short mode.
24043  # If so, the updated path is stored in $new_path.
24044  new_path="$input_to_shortpath"
24045
24046  input_path="$input_to_shortpath"
24047  # Check if we need to convert this using DOS-style short mode. If the path
24048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24049  # take no chances and rewrite it.
24050  # Note: m4 eats our [], so we need to use [ and ] instead.
24051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24052  if test "x$has_forbidden_chars" != x; then
24053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24057      # Going to short mode and back again did indeed matter. Since short mode is
24058      # case insensitive, let's make it lowercase to improve readability.
24059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24060      # Now convert it back to Unix-stile (cygpath)
24061      input_path=`$CYGPATH -u "$shortmode_path"`
24062      new_path="$input_path"
24063    fi
24064  fi
24065
24066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24067  if test "x$test_cygdrive_prefix" = x; then
24068    # As a simple fix, exclude /usr/bin since it's not a real path.
24069    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24071      # a path prefixed by /cygdrive for fixpath to work.
24072      new_path="$CYGWIN_ROOT_PATH$input_path"
24073    fi
24074  fi
24075
24076  # remove trailing .exe if any
24077  new_path="${new_path/%.exe/}"
24078
24079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24080
24081  # First separate the path from the arguments. This will split at the first
24082  # space.
24083  complete="$CXXCPP"
24084  path="${complete%% *}"
24085  tmp="$complete EOL"
24086  arguments="${tmp#* }"
24087
24088  # Input might be given as Windows format, start by converting to
24089  # unix format.
24090  new_path="$path"
24091
24092  windows_path="$new_path"
24093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24094    unix_path=`$CYGPATH -u "$windows_path"`
24095    new_path="$unix_path"
24096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24098    new_path="$unix_path"
24099  fi
24100
24101
24102  # Now try to locate executable using which
24103  new_path=`$WHICH "$new_path" 2> /dev/null`
24104
24105  if test "x$new_path" = x; then
24106    # Oops. Which didn't find the executable.
24107    # The splitting of arguments from the executable at a space might have been incorrect,
24108    # since paths with space are more likely in Windows. Give it another try with the whole
24109    # argument.
24110    path="$complete"
24111    arguments="EOL"
24112    new_path="$path"
24113
24114  windows_path="$new_path"
24115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24116    unix_path=`$CYGPATH -u "$windows_path"`
24117    new_path="$unix_path"
24118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24120    new_path="$unix_path"
24121  fi
24122
24123
24124    new_path=`$WHICH "$new_path" 2> /dev/null`
24125
24126    if test "x$new_path" = x; then
24127      # It's still not found. Now this is an unrecoverable error.
24128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24129$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24130      has_space=`$ECHO "$complete" | $GREP " "`
24131      if test "x$has_space" != x; then
24132        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24133$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24134      fi
24135      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24136    fi
24137  fi
24138
24139  # Now new_path has a complete unix path to the binary
24140  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24141    # Keep paths in /bin as-is, but remove trailing .exe if any
24142    new_path="${new_path/%.exe/}"
24143    # Do not save /bin paths to all_fixpath_prefixes!
24144  else
24145    # Not in mixed or Windows style, start by that.
24146    new_path=`cmd //c echo $new_path`
24147
24148  input_path="$new_path"
24149  # Check if we need to convert this using DOS-style short mode. If the path
24150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24151  # take no chances and rewrite it.
24152  # Note: m4 eats our [], so we need to use [ and ] instead.
24153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24154  if test "x$has_forbidden_chars" != x; then
24155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24157  fi
24158
24159    # Output is in $new_path
24160
24161  windows_path="$new_path"
24162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24163    unix_path=`$CYGPATH -u "$windows_path"`
24164    new_path="$unix_path"
24165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24167    new_path="$unix_path"
24168  fi
24169
24170    # remove trailing .exe if any
24171    new_path="${new_path/%.exe/}"
24172
24173    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24174    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24175  fi
24176
24177  else
24178    # We're on a posix platform. Hooray! :)
24179    # First separate the path from the arguments. This will split at the first
24180    # space.
24181    complete="$CXXCPP"
24182    path="${complete%% *}"
24183    tmp="$complete EOL"
24184    arguments="${tmp#* }"
24185
24186    # Cannot rely on the command "which" here since it doesn't always work.
24187    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24188    if test -z "$is_absolute_path"; then
24189      # Path to executable is not absolute. Find it.
24190      IFS_save="$IFS"
24191      IFS=:
24192      for p in $PATH; do
24193        if test -f "$p/$path" && test -x "$p/$path"; then
24194          new_path="$p/$path"
24195          break
24196        fi
24197      done
24198      IFS="$IFS_save"
24199    else
24200      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24201$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24202      new_path="$path"
24203    fi
24204
24205    if test "x$new_path" = x; then
24206        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24207$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24208        has_space=`$ECHO "$complete" | $GREP " "`
24209        if test "x$has_space" != x; then
24210          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24211$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24212        fi
24213        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24214      fi
24215  fi
24216
24217      # Now join together the path and the arguments once again
24218      if test "x$arguments" != xEOL; then
24219        new_complete="$new_path ${arguments% *}"
24220      else
24221        new_complete="$new_path"
24222      fi
24223
24224  if test "x$complete" != "x$new_complete"; then
24225      CXXCPP="$new_complete"
24226      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24227$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24228    fi
24229
24230
24231if test "x$COMPILE_TYPE" != "xcross"; then
24232    # If we are not cross compiling, use the same compilers for
24233    # building the build platform executables. The cross-compilation
24234    # case needed to be done earlier, but this can only be done after
24235    # the native tools have been localized.
24236    BUILD_CC="$CC"
24237    BUILD_CXX="$CXX"
24238    BUILD_LD="$LD"
24239fi
24240
24241# for solaris we really need solaris tools, and not gnu equivalent
24242#   these seems to normally reside in /usr/ccs/bin so add that to path before
24243#   starting to probe
24244#
24245#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24246#         so that it can be overriden --with-tools-dir
24247if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24248    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24249fi
24250
24251# Find the right assembler.
24252if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24253    # Extract the first word of "as", so it can be a program name with args.
24254set dummy as; ac_word=$2
24255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24256$as_echo_n "checking for $ac_word... " >&6; }
24257if test "${ac_cv_path_AS+set}" = set; then :
24258  $as_echo_n "(cached) " >&6
24259else
24260  case $AS in
24261  [\\/]* | ?:[\\/]*)
24262  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24263  ;;
24264  *)
24265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24266for as_dir in $PATH
24267do
24268  IFS=$as_save_IFS
24269  test -z "$as_dir" && as_dir=.
24270    for ac_exec_ext in '' $ac_executable_extensions; do
24271  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24272    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24274    break 2
24275  fi
24276done
24277  done
24278IFS=$as_save_IFS
24279
24280  ;;
24281esac
24282fi
24283AS=$ac_cv_path_AS
24284if test -n "$AS"; then
24285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24286$as_echo "$AS" >&6; }
24287else
24288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24289$as_echo "no" >&6; }
24290fi
24291
24292
24293
24294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24295
24296  # First separate the path from the arguments. This will split at the first
24297  # space.
24298  complete="$AS"
24299  path="${complete%% *}"
24300  tmp="$complete EOL"
24301  arguments="${tmp#* }"
24302
24303  # Input might be given as Windows format, start by converting to
24304  # unix format.
24305  new_path=`$CYGPATH -u "$path"`
24306
24307  # Now try to locate executable using which
24308  new_path=`$WHICH "$new_path" 2> /dev/null`
24309  # bat and cmd files are not always considered executable in cygwin causing which
24310  # to not find them
24311  if test "x$new_path" = x \
24312           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24313           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24314    new_path=`$CYGPATH -u "$path"`
24315  fi
24316  if test "x$new_path" = x; then
24317    # Oops. Which didn't find the executable.
24318    # The splitting of arguments from the executable at a space might have been incorrect,
24319    # since paths with space are more likely in Windows. Give it another try with the whole
24320    # argument.
24321    path="$complete"
24322    arguments="EOL"
24323    new_path=`$CYGPATH -u "$path"`
24324    new_path=`$WHICH "$new_path" 2> /dev/null`
24325    # bat and cmd files are not always considered executable in cygwin causing which
24326    # to not find them
24327    if test "x$new_path" = x \
24328             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24329             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24330      new_path=`$CYGPATH -u "$path"`
24331    fi
24332    if test "x$new_path" = x; then
24333      # It's still not found. Now this is an unrecoverable error.
24334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24335$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24336      has_space=`$ECHO "$complete" | $GREP " "`
24337      if test "x$has_space" != x; then
24338        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24340      fi
24341      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24342    fi
24343  fi
24344
24345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24348  # "foo.exe" is OK but "foo" is an error.
24349  #
24350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24351  # It is also a way to make sure we got the proper file name for the real test later on.
24352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24353  if test "x$test_shortpath" = x; then
24354    # Short path failed, file does not exist as specified.
24355    # Try adding .exe or .cmd
24356    if test -f "${new_path}.exe"; then
24357       input_to_shortpath="${new_path}.exe"
24358    elif test -f "${new_path}.cmd"; then
24359       input_to_shortpath="${new_path}.cmd"
24360    else
24361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24362$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24363      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24364$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24365      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24366    fi
24367  else
24368    input_to_shortpath="$new_path"
24369  fi
24370
24371  # Call helper function which possibly converts this using DOS-style short mode.
24372  # If so, the updated path is stored in $new_path.
24373  new_path="$input_to_shortpath"
24374
24375  input_path="$input_to_shortpath"
24376  # Check if we need to convert this using DOS-style short mode. If the path
24377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24378  # take no chances and rewrite it.
24379  # Note: m4 eats our [], so we need to use [ and ] instead.
24380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24381  if test "x$has_forbidden_chars" != x; then
24382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24386      # Going to short mode and back again did indeed matter. Since short mode is
24387      # case insensitive, let's make it lowercase to improve readability.
24388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24389      # Now convert it back to Unix-stile (cygpath)
24390      input_path=`$CYGPATH -u "$shortmode_path"`
24391      new_path="$input_path"
24392    fi
24393  fi
24394
24395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24396  if test "x$test_cygdrive_prefix" = x; then
24397    # As a simple fix, exclude /usr/bin since it's not a real path.
24398    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24400      # a path prefixed by /cygdrive for fixpath to work.
24401      new_path="$CYGWIN_ROOT_PATH$input_path"
24402    fi
24403  fi
24404
24405  # remove trailing .exe if any
24406  new_path="${new_path/%.exe/}"
24407
24408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24409
24410  # First separate the path from the arguments. This will split at the first
24411  # space.
24412  complete="$AS"
24413  path="${complete%% *}"
24414  tmp="$complete EOL"
24415  arguments="${tmp#* }"
24416
24417  # Input might be given as Windows format, start by converting to
24418  # unix format.
24419  new_path="$path"
24420
24421  windows_path="$new_path"
24422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24423    unix_path=`$CYGPATH -u "$windows_path"`
24424    new_path="$unix_path"
24425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24427    new_path="$unix_path"
24428  fi
24429
24430
24431  # Now try to locate executable using which
24432  new_path=`$WHICH "$new_path" 2> /dev/null`
24433
24434  if test "x$new_path" = x; then
24435    # Oops. Which didn't find the executable.
24436    # The splitting of arguments from the executable at a space might have been incorrect,
24437    # since paths with space are more likely in Windows. Give it another try with the whole
24438    # argument.
24439    path="$complete"
24440    arguments="EOL"
24441    new_path="$path"
24442
24443  windows_path="$new_path"
24444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24445    unix_path=`$CYGPATH -u "$windows_path"`
24446    new_path="$unix_path"
24447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24449    new_path="$unix_path"
24450  fi
24451
24452
24453    new_path=`$WHICH "$new_path" 2> /dev/null`
24454
24455    if test "x$new_path" = x; then
24456      # It's still not found. Now this is an unrecoverable error.
24457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24458$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24459      has_space=`$ECHO "$complete" | $GREP " "`
24460      if test "x$has_space" != x; then
24461        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24462$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24463      fi
24464      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24465    fi
24466  fi
24467
24468  # Now new_path has a complete unix path to the binary
24469  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24470    # Keep paths in /bin as-is, but remove trailing .exe if any
24471    new_path="${new_path/%.exe/}"
24472    # Do not save /bin paths to all_fixpath_prefixes!
24473  else
24474    # Not in mixed or Windows style, start by that.
24475    new_path=`cmd //c echo $new_path`
24476
24477  input_path="$new_path"
24478  # Check if we need to convert this using DOS-style short mode. If the path
24479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24480  # take no chances and rewrite it.
24481  # Note: m4 eats our [], so we need to use [ and ] instead.
24482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24483  if test "x$has_forbidden_chars" != x; then
24484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24486  fi
24487
24488    # Output is in $new_path
24489
24490  windows_path="$new_path"
24491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24492    unix_path=`$CYGPATH -u "$windows_path"`
24493    new_path="$unix_path"
24494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24496    new_path="$unix_path"
24497  fi
24498
24499    # remove trailing .exe if any
24500    new_path="${new_path/%.exe/}"
24501
24502    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24503    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24504  fi
24505
24506  else
24507    # We're on a posix platform. Hooray! :)
24508    # First separate the path from the arguments. This will split at the first
24509    # space.
24510    complete="$AS"
24511    path="${complete%% *}"
24512    tmp="$complete EOL"
24513    arguments="${tmp#* }"
24514
24515    # Cannot rely on the command "which" here since it doesn't always work.
24516    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24517    if test -z "$is_absolute_path"; then
24518      # Path to executable is not absolute. Find it.
24519      IFS_save="$IFS"
24520      IFS=:
24521      for p in $PATH; do
24522        if test -f "$p/$path" && test -x "$p/$path"; then
24523          new_path="$p/$path"
24524          break
24525        fi
24526      done
24527      IFS="$IFS_save"
24528    else
24529      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24530$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24531      new_path="$path"
24532    fi
24533
24534    if test "x$new_path" = x; then
24535        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24536$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24537        has_space=`$ECHO "$complete" | $GREP " "`
24538        if test "x$has_space" != x; then
24539          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24540$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24541        fi
24542        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24543      fi
24544  fi
24545
24546      # Now join together the path and the arguments once again
24547      if test "x$arguments" != xEOL; then
24548        new_complete="$new_path ${arguments% *}"
24549      else
24550        new_complete="$new_path"
24551      fi
24552
24553  if test "x$complete" != "x$new_complete"; then
24554      AS="$new_complete"
24555      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24556$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24557    fi
24558
24559else
24560    AS="$CC -c"
24561fi
24562
24563
24564if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24565    for ac_prog in gnm nm
24566do
24567  # Extract the first word of "$ac_prog", so it can be a program name with args.
24568set dummy $ac_prog; ac_word=$2
24569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24570$as_echo_n "checking for $ac_word... " >&6; }
24571if test "${ac_cv_path_NM+set}" = set; then :
24572  $as_echo_n "(cached) " >&6
24573else
24574  case $NM in
24575  [\\/]* | ?:[\\/]*)
24576  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24577  ;;
24578  *)
24579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24580for as_dir in $PATH
24581do
24582  IFS=$as_save_IFS
24583  test -z "$as_dir" && as_dir=.
24584    for ac_exec_ext in '' $ac_executable_extensions; do
24585  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24586    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24588    break 2
24589  fi
24590done
24591  done
24592IFS=$as_save_IFS
24593
24594  ;;
24595esac
24596fi
24597NM=$ac_cv_path_NM
24598if test -n "$NM"; then
24599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24600$as_echo "$NM" >&6; }
24601else
24602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24603$as_echo "no" >&6; }
24604fi
24605
24606
24607  test -n "$NM" && break
24608done
24609
24610
24611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24612
24613  # First separate the path from the arguments. This will split at the first
24614  # space.
24615  complete="$NM"
24616  path="${complete%% *}"
24617  tmp="$complete EOL"
24618  arguments="${tmp#* }"
24619
24620  # Input might be given as Windows format, start by converting to
24621  # unix format.
24622  new_path=`$CYGPATH -u "$path"`
24623
24624  # Now try to locate executable using which
24625  new_path=`$WHICH "$new_path" 2> /dev/null`
24626  # bat and cmd files are not always considered executable in cygwin causing which
24627  # to not find them
24628  if test "x$new_path" = x \
24629           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24630           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24631    new_path=`$CYGPATH -u "$path"`
24632  fi
24633  if test "x$new_path" = x; then
24634    # Oops. Which didn't find the executable.
24635    # The splitting of arguments from the executable at a space might have been incorrect,
24636    # since paths with space are more likely in Windows. Give it another try with the whole
24637    # argument.
24638    path="$complete"
24639    arguments="EOL"
24640    new_path=`$CYGPATH -u "$path"`
24641    new_path=`$WHICH "$new_path" 2> /dev/null`
24642    # bat and cmd files are not always considered executable in cygwin causing which
24643    # to not find them
24644    if test "x$new_path" = x \
24645             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24646             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24647      new_path=`$CYGPATH -u "$path"`
24648    fi
24649    if test "x$new_path" = x; then
24650      # It's still not found. Now this is an unrecoverable error.
24651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24652$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24653      has_space=`$ECHO "$complete" | $GREP " "`
24654      if test "x$has_space" != x; then
24655        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24656$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24657      fi
24658      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24659    fi
24660  fi
24661
24662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24665  # "foo.exe" is OK but "foo" is an error.
24666  #
24667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24668  # It is also a way to make sure we got the proper file name for the real test later on.
24669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24670  if test "x$test_shortpath" = x; then
24671    # Short path failed, file does not exist as specified.
24672    # Try adding .exe or .cmd
24673    if test -f "${new_path}.exe"; then
24674       input_to_shortpath="${new_path}.exe"
24675    elif test -f "${new_path}.cmd"; then
24676       input_to_shortpath="${new_path}.cmd"
24677    else
24678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24679$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24680      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24681$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24682      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24683    fi
24684  else
24685    input_to_shortpath="$new_path"
24686  fi
24687
24688  # Call helper function which possibly converts this using DOS-style short mode.
24689  # If so, the updated path is stored in $new_path.
24690  new_path="$input_to_shortpath"
24691
24692  input_path="$input_to_shortpath"
24693  # Check if we need to convert this using DOS-style short mode. If the path
24694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24695  # take no chances and rewrite it.
24696  # Note: m4 eats our [], so we need to use [ and ] instead.
24697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24698  if test "x$has_forbidden_chars" != x; then
24699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24703      # Going to short mode and back again did indeed matter. Since short mode is
24704      # case insensitive, let's make it lowercase to improve readability.
24705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24706      # Now convert it back to Unix-stile (cygpath)
24707      input_path=`$CYGPATH -u "$shortmode_path"`
24708      new_path="$input_path"
24709    fi
24710  fi
24711
24712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24713  if test "x$test_cygdrive_prefix" = x; then
24714    # As a simple fix, exclude /usr/bin since it's not a real path.
24715    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24717      # a path prefixed by /cygdrive for fixpath to work.
24718      new_path="$CYGWIN_ROOT_PATH$input_path"
24719    fi
24720  fi
24721
24722  # remove trailing .exe if any
24723  new_path="${new_path/%.exe/}"
24724
24725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24726
24727  # First separate the path from the arguments. This will split at the first
24728  # space.
24729  complete="$NM"
24730  path="${complete%% *}"
24731  tmp="$complete EOL"
24732  arguments="${tmp#* }"
24733
24734  # Input might be given as Windows format, start by converting to
24735  # unix format.
24736  new_path="$path"
24737
24738  windows_path="$new_path"
24739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24740    unix_path=`$CYGPATH -u "$windows_path"`
24741    new_path="$unix_path"
24742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24744    new_path="$unix_path"
24745  fi
24746
24747
24748  # Now try to locate executable using which
24749  new_path=`$WHICH "$new_path" 2> /dev/null`
24750
24751  if test "x$new_path" = x; then
24752    # Oops. Which didn't find the executable.
24753    # The splitting of arguments from the executable at a space might have been incorrect,
24754    # since paths with space are more likely in Windows. Give it another try with the whole
24755    # argument.
24756    path="$complete"
24757    arguments="EOL"
24758    new_path="$path"
24759
24760  windows_path="$new_path"
24761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24762    unix_path=`$CYGPATH -u "$windows_path"`
24763    new_path="$unix_path"
24764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24766    new_path="$unix_path"
24767  fi
24768
24769
24770    new_path=`$WHICH "$new_path" 2> /dev/null`
24771
24772    if test "x$new_path" = x; then
24773      # It's still not found. Now this is an unrecoverable error.
24774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24775$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24776      has_space=`$ECHO "$complete" | $GREP " "`
24777      if test "x$has_space" != x; then
24778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24780      fi
24781      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24782    fi
24783  fi
24784
24785  # Now new_path has a complete unix path to the binary
24786  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24787    # Keep paths in /bin as-is, but remove trailing .exe if any
24788    new_path="${new_path/%.exe/}"
24789    # Do not save /bin paths to all_fixpath_prefixes!
24790  else
24791    # Not in mixed or Windows style, start by that.
24792    new_path=`cmd //c echo $new_path`
24793
24794  input_path="$new_path"
24795  # Check if we need to convert this using DOS-style short mode. If the path
24796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24797  # take no chances and rewrite it.
24798  # Note: m4 eats our [], so we need to use [ and ] instead.
24799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24800  if test "x$has_forbidden_chars" != x; then
24801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24802    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24803  fi
24804
24805    # Output is in $new_path
24806
24807  windows_path="$new_path"
24808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24809    unix_path=`$CYGPATH -u "$windows_path"`
24810    new_path="$unix_path"
24811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24813    new_path="$unix_path"
24814  fi
24815
24816    # remove trailing .exe if any
24817    new_path="${new_path/%.exe/}"
24818
24819    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24820    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24821  fi
24822
24823  else
24824    # We're on a posix platform. Hooray! :)
24825    # First separate the path from the arguments. This will split at the first
24826    # space.
24827    complete="$NM"
24828    path="${complete%% *}"
24829    tmp="$complete EOL"
24830    arguments="${tmp#* }"
24831
24832    # Cannot rely on the command "which" here since it doesn't always work.
24833    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24834    if test -z "$is_absolute_path"; then
24835      # Path to executable is not absolute. Find it.
24836      IFS_save="$IFS"
24837      IFS=:
24838      for p in $PATH; do
24839        if test -f "$p/$path" && test -x "$p/$path"; then
24840          new_path="$p/$path"
24841          break
24842        fi
24843      done
24844      IFS="$IFS_save"
24845    else
24846      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24847$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24848      new_path="$path"
24849    fi
24850
24851    if test "x$new_path" = x; then
24852        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24853$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24854        has_space=`$ECHO "$complete" | $GREP " "`
24855        if test "x$has_space" != x; then
24856          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24857$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24858        fi
24859        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24860      fi
24861  fi
24862
24863      # Now join together the path and the arguments once again
24864      if test "x$arguments" != xEOL; then
24865        new_complete="$new_path ${arguments% *}"
24866      else
24867        new_complete="$new_path"
24868      fi
24869
24870  if test "x$complete" != "x$new_complete"; then
24871      NM="$new_complete"
24872      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24873$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24874    fi
24875
24876    # Extract the first word of "strip", so it can be a program name with args.
24877set dummy strip; ac_word=$2
24878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24879$as_echo_n "checking for $ac_word... " >&6; }
24880if test "${ac_cv_path_STRIP+set}" = set; then :
24881  $as_echo_n "(cached) " >&6
24882else
24883  case $STRIP in
24884  [\\/]* | ?:[\\/]*)
24885  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24886  ;;
24887  *)
24888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24889for as_dir in $PATH
24890do
24891  IFS=$as_save_IFS
24892  test -z "$as_dir" && as_dir=.
24893    for ac_exec_ext in '' $ac_executable_extensions; do
24894  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24895    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24897    break 2
24898  fi
24899done
24900  done
24901IFS=$as_save_IFS
24902
24903  ;;
24904esac
24905fi
24906STRIP=$ac_cv_path_STRIP
24907if test -n "$STRIP"; then
24908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24909$as_echo "$STRIP" >&6; }
24910else
24911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24912$as_echo "no" >&6; }
24913fi
24914
24915
24916
24917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24918
24919  # First separate the path from the arguments. This will split at the first
24920  # space.
24921  complete="$STRIP"
24922  path="${complete%% *}"
24923  tmp="$complete EOL"
24924  arguments="${tmp#* }"
24925
24926  # Input might be given as Windows format, start by converting to
24927  # unix format.
24928  new_path=`$CYGPATH -u "$path"`
24929
24930  # Now try to locate executable using which
24931  new_path=`$WHICH "$new_path" 2> /dev/null`
24932  # bat and cmd files are not always considered executable in cygwin causing which
24933  # to not find them
24934  if test "x$new_path" = x \
24935           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24936           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24937    new_path=`$CYGPATH -u "$path"`
24938  fi
24939  if test "x$new_path" = x; then
24940    # Oops. Which didn't find the executable.
24941    # The splitting of arguments from the executable at a space might have been incorrect,
24942    # since paths with space are more likely in Windows. Give it another try with the whole
24943    # argument.
24944    path="$complete"
24945    arguments="EOL"
24946    new_path=`$CYGPATH -u "$path"`
24947    new_path=`$WHICH "$new_path" 2> /dev/null`
24948    # bat and cmd files are not always considered executable in cygwin causing which
24949    # to not find them
24950    if test "x$new_path" = x \
24951             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24952             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24953      new_path=`$CYGPATH -u "$path"`
24954    fi
24955    if test "x$new_path" = x; then
24956      # It's still not found. Now this is an unrecoverable error.
24957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24958$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24959      has_space=`$ECHO "$complete" | $GREP " "`
24960      if test "x$has_space" != x; then
24961        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24962$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24963      fi
24964      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24965    fi
24966  fi
24967
24968  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24969  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24970  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24971  # "foo.exe" is OK but "foo" is an error.
24972  #
24973  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24974  # It is also a way to make sure we got the proper file name for the real test later on.
24975  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24976  if test "x$test_shortpath" = x; then
24977    # Short path failed, file does not exist as specified.
24978    # Try adding .exe or .cmd
24979    if test -f "${new_path}.exe"; then
24980       input_to_shortpath="${new_path}.exe"
24981    elif test -f "${new_path}.cmd"; then
24982       input_to_shortpath="${new_path}.cmd"
24983    else
24984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
24985$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
24986      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24987$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24988      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24989    fi
24990  else
24991    input_to_shortpath="$new_path"
24992  fi
24993
24994  # Call helper function which possibly converts this using DOS-style short mode.
24995  # If so, the updated path is stored in $new_path.
24996  new_path="$input_to_shortpath"
24997
24998  input_path="$input_to_shortpath"
24999  # Check if we need to convert this using DOS-style short mode. If the path
25000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25001  # take no chances and rewrite it.
25002  # Note: m4 eats our [], so we need to use [ and ] instead.
25003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25004  if test "x$has_forbidden_chars" != x; then
25005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25009      # Going to short mode and back again did indeed matter. Since short mode is
25010      # case insensitive, let's make it lowercase to improve readability.
25011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25012      # Now convert it back to Unix-stile (cygpath)
25013      input_path=`$CYGPATH -u "$shortmode_path"`
25014      new_path="$input_path"
25015    fi
25016  fi
25017
25018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25019  if test "x$test_cygdrive_prefix" = x; then
25020    # As a simple fix, exclude /usr/bin since it's not a real path.
25021    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25023      # a path prefixed by /cygdrive for fixpath to work.
25024      new_path="$CYGWIN_ROOT_PATH$input_path"
25025    fi
25026  fi
25027
25028  # remove trailing .exe if any
25029  new_path="${new_path/%.exe/}"
25030
25031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25032
25033  # First separate the path from the arguments. This will split at the first
25034  # space.
25035  complete="$STRIP"
25036  path="${complete%% *}"
25037  tmp="$complete EOL"
25038  arguments="${tmp#* }"
25039
25040  # Input might be given as Windows format, start by converting to
25041  # unix format.
25042  new_path="$path"
25043
25044  windows_path="$new_path"
25045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25046    unix_path=`$CYGPATH -u "$windows_path"`
25047    new_path="$unix_path"
25048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25050    new_path="$unix_path"
25051  fi
25052
25053
25054  # Now try to locate executable using which
25055  new_path=`$WHICH "$new_path" 2> /dev/null`
25056
25057  if test "x$new_path" = x; then
25058    # Oops. Which didn't find the executable.
25059    # The splitting of arguments from the executable at a space might have been incorrect,
25060    # since paths with space are more likely in Windows. Give it another try with the whole
25061    # argument.
25062    path="$complete"
25063    arguments="EOL"
25064    new_path="$path"
25065
25066  windows_path="$new_path"
25067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25068    unix_path=`$CYGPATH -u "$windows_path"`
25069    new_path="$unix_path"
25070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25072    new_path="$unix_path"
25073  fi
25074
25075
25076    new_path=`$WHICH "$new_path" 2> /dev/null`
25077
25078    if test "x$new_path" = x; then
25079      # It's still not found. Now this is an unrecoverable error.
25080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25081$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25082      has_space=`$ECHO "$complete" | $GREP " "`
25083      if test "x$has_space" != x; then
25084        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25085$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25086      fi
25087      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25088    fi
25089  fi
25090
25091  # Now new_path has a complete unix path to the binary
25092  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25093    # Keep paths in /bin as-is, but remove trailing .exe if any
25094    new_path="${new_path/%.exe/}"
25095    # Do not save /bin paths to all_fixpath_prefixes!
25096  else
25097    # Not in mixed or Windows style, start by that.
25098    new_path=`cmd //c echo $new_path`
25099
25100  input_path="$new_path"
25101  # Check if we need to convert this using DOS-style short mode. If the path
25102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25103  # take no chances and rewrite it.
25104  # Note: m4 eats our [], so we need to use [ and ] instead.
25105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25106  if test "x$has_forbidden_chars" != x; then
25107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25109  fi
25110
25111    # Output is in $new_path
25112
25113  windows_path="$new_path"
25114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25115    unix_path=`$CYGPATH -u "$windows_path"`
25116    new_path="$unix_path"
25117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25119    new_path="$unix_path"
25120  fi
25121
25122    # remove trailing .exe if any
25123    new_path="${new_path/%.exe/}"
25124
25125    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25126    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25127  fi
25128
25129  else
25130    # We're on a posix platform. Hooray! :)
25131    # First separate the path from the arguments. This will split at the first
25132    # space.
25133    complete="$STRIP"
25134    path="${complete%% *}"
25135    tmp="$complete EOL"
25136    arguments="${tmp#* }"
25137
25138    # Cannot rely on the command "which" here since it doesn't always work.
25139    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25140    if test -z "$is_absolute_path"; then
25141      # Path to executable is not absolute. Find it.
25142      IFS_save="$IFS"
25143      IFS=:
25144      for p in $PATH; do
25145        if test -f "$p/$path" && test -x "$p/$path"; then
25146          new_path="$p/$path"
25147          break
25148        fi
25149      done
25150      IFS="$IFS_save"
25151    else
25152      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25153$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25154      new_path="$path"
25155    fi
25156
25157    if test "x$new_path" = x; then
25158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25159$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25160        has_space=`$ECHO "$complete" | $GREP " "`
25161        if test "x$has_space" != x; then
25162          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25163$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25164        fi
25165        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25166      fi
25167  fi
25168
25169      # Now join together the path and the arguments once again
25170      if test "x$arguments" != xEOL; then
25171        new_complete="$new_path ${arguments% *}"
25172      else
25173        new_complete="$new_path"
25174      fi
25175
25176  if test "x$complete" != "x$new_complete"; then
25177      STRIP="$new_complete"
25178      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25179$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25180    fi
25181
25182    # Extract the first word of "mcs", so it can be a program name with args.
25183set dummy mcs; ac_word=$2
25184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25185$as_echo_n "checking for $ac_word... " >&6; }
25186if test "${ac_cv_path_MCS+set}" = set; then :
25187  $as_echo_n "(cached) " >&6
25188else
25189  case $MCS in
25190  [\\/]* | ?:[\\/]*)
25191  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25192  ;;
25193  *)
25194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25195for as_dir in $PATH
25196do
25197  IFS=$as_save_IFS
25198  test -z "$as_dir" && as_dir=.
25199    for ac_exec_ext in '' $ac_executable_extensions; do
25200  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25201    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25203    break 2
25204  fi
25205done
25206  done
25207IFS=$as_save_IFS
25208
25209  ;;
25210esac
25211fi
25212MCS=$ac_cv_path_MCS
25213if test -n "$MCS"; then
25214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25215$as_echo "$MCS" >&6; }
25216else
25217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25218$as_echo "no" >&6; }
25219fi
25220
25221
25222
25223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25224
25225  # First separate the path from the arguments. This will split at the first
25226  # space.
25227  complete="$MCS"
25228  path="${complete%% *}"
25229  tmp="$complete EOL"
25230  arguments="${tmp#* }"
25231
25232  # Input might be given as Windows format, start by converting to
25233  # unix format.
25234  new_path=`$CYGPATH -u "$path"`
25235
25236  # Now try to locate executable using which
25237  new_path=`$WHICH "$new_path" 2> /dev/null`
25238  # bat and cmd files are not always considered executable in cygwin causing which
25239  # to not find them
25240  if test "x$new_path" = x \
25241           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25242           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25243    new_path=`$CYGPATH -u "$path"`
25244  fi
25245  if test "x$new_path" = x; then
25246    # Oops. Which didn't find the executable.
25247    # The splitting of arguments from the executable at a space might have been incorrect,
25248    # since paths with space are more likely in Windows. Give it another try with the whole
25249    # argument.
25250    path="$complete"
25251    arguments="EOL"
25252    new_path=`$CYGPATH -u "$path"`
25253    new_path=`$WHICH "$new_path" 2> /dev/null`
25254    # bat and cmd files are not always considered executable in cygwin causing which
25255    # to not find them
25256    if test "x$new_path" = x \
25257             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25258             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25259      new_path=`$CYGPATH -u "$path"`
25260    fi
25261    if test "x$new_path" = x; then
25262      # It's still not found. Now this is an unrecoverable error.
25263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25264$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25265      has_space=`$ECHO "$complete" | $GREP " "`
25266      if test "x$has_space" != x; then
25267        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25268$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25269      fi
25270      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25271    fi
25272  fi
25273
25274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25277  # "foo.exe" is OK but "foo" is an error.
25278  #
25279  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25280  # It is also a way to make sure we got the proper file name for the real test later on.
25281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25282  if test "x$test_shortpath" = x; then
25283    # Short path failed, file does not exist as specified.
25284    # Try adding .exe or .cmd
25285    if test -f "${new_path}.exe"; then
25286       input_to_shortpath="${new_path}.exe"
25287    elif test -f "${new_path}.cmd"; then
25288       input_to_shortpath="${new_path}.cmd"
25289    else
25290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25291$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25292      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25293$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25294      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25295    fi
25296  else
25297    input_to_shortpath="$new_path"
25298  fi
25299
25300  # Call helper function which possibly converts this using DOS-style short mode.
25301  # If so, the updated path is stored in $new_path.
25302  new_path="$input_to_shortpath"
25303
25304  input_path="$input_to_shortpath"
25305  # Check if we need to convert this using DOS-style short mode. If the path
25306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25307  # take no chances and rewrite it.
25308  # Note: m4 eats our [], so we need to use [ and ] instead.
25309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25310  if test "x$has_forbidden_chars" != x; then
25311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25315      # Going to short mode and back again did indeed matter. Since short mode is
25316      # case insensitive, let's make it lowercase to improve readability.
25317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25318      # Now convert it back to Unix-stile (cygpath)
25319      input_path=`$CYGPATH -u "$shortmode_path"`
25320      new_path="$input_path"
25321    fi
25322  fi
25323
25324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25325  if test "x$test_cygdrive_prefix" = x; then
25326    # As a simple fix, exclude /usr/bin since it's not a real path.
25327    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25329      # a path prefixed by /cygdrive for fixpath to work.
25330      new_path="$CYGWIN_ROOT_PATH$input_path"
25331    fi
25332  fi
25333
25334  # remove trailing .exe if any
25335  new_path="${new_path/%.exe/}"
25336
25337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25338
25339  # First separate the path from the arguments. This will split at the first
25340  # space.
25341  complete="$MCS"
25342  path="${complete%% *}"
25343  tmp="$complete EOL"
25344  arguments="${tmp#* }"
25345
25346  # Input might be given as Windows format, start by converting to
25347  # unix format.
25348  new_path="$path"
25349
25350  windows_path="$new_path"
25351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25352    unix_path=`$CYGPATH -u "$windows_path"`
25353    new_path="$unix_path"
25354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25356    new_path="$unix_path"
25357  fi
25358
25359
25360  # Now try to locate executable using which
25361  new_path=`$WHICH "$new_path" 2> /dev/null`
25362
25363  if test "x$new_path" = x; then
25364    # Oops. Which didn't find the executable.
25365    # The splitting of arguments from the executable at a space might have been incorrect,
25366    # since paths with space are more likely in Windows. Give it another try with the whole
25367    # argument.
25368    path="$complete"
25369    arguments="EOL"
25370    new_path="$path"
25371
25372  windows_path="$new_path"
25373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25374    unix_path=`$CYGPATH -u "$windows_path"`
25375    new_path="$unix_path"
25376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25378    new_path="$unix_path"
25379  fi
25380
25381
25382    new_path=`$WHICH "$new_path" 2> /dev/null`
25383
25384    if test "x$new_path" = x; then
25385      # It's still not found. Now this is an unrecoverable error.
25386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25387$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25388      has_space=`$ECHO "$complete" | $GREP " "`
25389      if test "x$has_space" != x; then
25390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25392      fi
25393      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25394    fi
25395  fi
25396
25397  # Now new_path has a complete unix path to the binary
25398  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25399    # Keep paths in /bin as-is, but remove trailing .exe if any
25400    new_path="${new_path/%.exe/}"
25401    # Do not save /bin paths to all_fixpath_prefixes!
25402  else
25403    # Not in mixed or Windows style, start by that.
25404    new_path=`cmd //c echo $new_path`
25405
25406  input_path="$new_path"
25407  # Check if we need to convert this using DOS-style short mode. If the path
25408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25409  # take no chances and rewrite it.
25410  # Note: m4 eats our [], so we need to use [ and ] instead.
25411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25412  if test "x$has_forbidden_chars" != x; then
25413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25415  fi
25416
25417    # Output is in $new_path
25418
25419  windows_path="$new_path"
25420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25421    unix_path=`$CYGPATH -u "$windows_path"`
25422    new_path="$unix_path"
25423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25425    new_path="$unix_path"
25426  fi
25427
25428    # remove trailing .exe if any
25429    new_path="${new_path/%.exe/}"
25430
25431    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25432    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25433  fi
25434
25435  else
25436    # We're on a posix platform. Hooray! :)
25437    # First separate the path from the arguments. This will split at the first
25438    # space.
25439    complete="$MCS"
25440    path="${complete%% *}"
25441    tmp="$complete EOL"
25442    arguments="${tmp#* }"
25443
25444    # Cannot rely on the command "which" here since it doesn't always work.
25445    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25446    if test -z "$is_absolute_path"; then
25447      # Path to executable is not absolute. Find it.
25448      IFS_save="$IFS"
25449      IFS=:
25450      for p in $PATH; do
25451        if test -f "$p/$path" && test -x "$p/$path"; then
25452          new_path="$p/$path"
25453          break
25454        fi
25455      done
25456      IFS="$IFS_save"
25457    else
25458      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25459$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25460      new_path="$path"
25461    fi
25462
25463    if test "x$new_path" = x; then
25464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25465$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25466        has_space=`$ECHO "$complete" | $GREP " "`
25467        if test "x$has_space" != x; then
25468          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25469$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25470        fi
25471        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25472      fi
25473  fi
25474
25475      # Now join together the path and the arguments once again
25476      if test "x$arguments" != xEOL; then
25477        new_complete="$new_path ${arguments% *}"
25478      else
25479        new_complete="$new_path"
25480      fi
25481
25482  if test "x$complete" != "x$new_complete"; then
25483      MCS="$new_complete"
25484      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25485$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25486    fi
25487
25488elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25489    if test -n "$ac_tool_prefix"; then
25490  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25491set dummy ${ac_tool_prefix}nm; ac_word=$2
25492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25493$as_echo_n "checking for $ac_word... " >&6; }
25494if test "${ac_cv_prog_NM+set}" = set; then :
25495  $as_echo_n "(cached) " >&6
25496else
25497  if test -n "$NM"; then
25498  ac_cv_prog_NM="$NM" # Let the user override the test.
25499else
25500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25501for as_dir in $PATH
25502do
25503  IFS=$as_save_IFS
25504  test -z "$as_dir" && as_dir=.
25505    for ac_exec_ext in '' $ac_executable_extensions; do
25506  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25507    ac_cv_prog_NM="${ac_tool_prefix}nm"
25508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25509    break 2
25510  fi
25511done
25512  done
25513IFS=$as_save_IFS
25514
25515fi
25516fi
25517NM=$ac_cv_prog_NM
25518if test -n "$NM"; then
25519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25520$as_echo "$NM" >&6; }
25521else
25522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25523$as_echo "no" >&6; }
25524fi
25525
25526
25527fi
25528if test -z "$ac_cv_prog_NM"; then
25529  ac_ct_NM=$NM
25530  # Extract the first word of "nm", so it can be a program name with args.
25531set dummy nm; ac_word=$2
25532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25533$as_echo_n "checking for $ac_word... " >&6; }
25534if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
25535  $as_echo_n "(cached) " >&6
25536else
25537  if test -n "$ac_ct_NM"; then
25538  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25539else
25540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25541for as_dir in $PATH
25542do
25543  IFS=$as_save_IFS
25544  test -z "$as_dir" && as_dir=.
25545    for ac_exec_ext in '' $ac_executable_extensions; do
25546  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25547    ac_cv_prog_ac_ct_NM="nm"
25548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25549    break 2
25550  fi
25551done
25552  done
25553IFS=$as_save_IFS
25554
25555fi
25556fi
25557ac_ct_NM=$ac_cv_prog_ac_ct_NM
25558if test -n "$ac_ct_NM"; then
25559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25560$as_echo "$ac_ct_NM" >&6; }
25561else
25562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25563$as_echo "no" >&6; }
25564fi
25565
25566  if test "x$ac_ct_NM" = x; then
25567    NM=""
25568  else
25569    case $cross_compiling:$ac_tool_warned in
25570yes:)
25571{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25572$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25573ac_tool_warned=yes ;;
25574esac
25575    NM=$ac_ct_NM
25576  fi
25577else
25578  NM="$ac_cv_prog_NM"
25579fi
25580
25581
25582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25583
25584  # First separate the path from the arguments. This will split at the first
25585  # space.
25586  complete="$NM"
25587  path="${complete%% *}"
25588  tmp="$complete EOL"
25589  arguments="${tmp#* }"
25590
25591  # Input might be given as Windows format, start by converting to
25592  # unix format.
25593  new_path=`$CYGPATH -u "$path"`
25594
25595  # Now try to locate executable using which
25596  new_path=`$WHICH "$new_path" 2> /dev/null`
25597  # bat and cmd files are not always considered executable in cygwin causing which
25598  # to not find them
25599  if test "x$new_path" = x \
25600           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25601           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25602    new_path=`$CYGPATH -u "$path"`
25603  fi
25604  if test "x$new_path" = x; then
25605    # Oops. Which didn't find the executable.
25606    # The splitting of arguments from the executable at a space might have been incorrect,
25607    # since paths with space are more likely in Windows. Give it another try with the whole
25608    # argument.
25609    path="$complete"
25610    arguments="EOL"
25611    new_path=`$CYGPATH -u "$path"`
25612    new_path=`$WHICH "$new_path" 2> /dev/null`
25613    # bat and cmd files are not always considered executable in cygwin causing which
25614    # to not find them
25615    if test "x$new_path" = x \
25616             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25617             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25618      new_path=`$CYGPATH -u "$path"`
25619    fi
25620    if test "x$new_path" = x; then
25621      # It's still not found. Now this is an unrecoverable error.
25622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25623$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25624      has_space=`$ECHO "$complete" | $GREP " "`
25625      if test "x$has_space" != x; then
25626        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25628      fi
25629      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25630    fi
25631  fi
25632
25633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25636  # "foo.exe" is OK but "foo" is an error.
25637  #
25638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25639  # It is also a way to make sure we got the proper file name for the real test later on.
25640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25641  if test "x$test_shortpath" = x; then
25642    # Short path failed, file does not exist as specified.
25643    # Try adding .exe or .cmd
25644    if test -f "${new_path}.exe"; then
25645       input_to_shortpath="${new_path}.exe"
25646    elif test -f "${new_path}.cmd"; then
25647       input_to_shortpath="${new_path}.cmd"
25648    else
25649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25650$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25651      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25652$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25653      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25654    fi
25655  else
25656    input_to_shortpath="$new_path"
25657  fi
25658
25659  # Call helper function which possibly converts this using DOS-style short mode.
25660  # If so, the updated path is stored in $new_path.
25661  new_path="$input_to_shortpath"
25662
25663  input_path="$input_to_shortpath"
25664  # Check if we need to convert this using DOS-style short mode. If the path
25665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25666  # take no chances and rewrite it.
25667  # Note: m4 eats our [], so we need to use [ and ] instead.
25668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25669  if test "x$has_forbidden_chars" != x; then
25670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25674      # Going to short mode and back again did indeed matter. Since short mode is
25675      # case insensitive, let's make it lowercase to improve readability.
25676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25677      # Now convert it back to Unix-stile (cygpath)
25678      input_path=`$CYGPATH -u "$shortmode_path"`
25679      new_path="$input_path"
25680    fi
25681  fi
25682
25683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25684  if test "x$test_cygdrive_prefix" = x; then
25685    # As a simple fix, exclude /usr/bin since it's not a real path.
25686    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25688      # a path prefixed by /cygdrive for fixpath to work.
25689      new_path="$CYGWIN_ROOT_PATH$input_path"
25690    fi
25691  fi
25692
25693  # remove trailing .exe if any
25694  new_path="${new_path/%.exe/}"
25695
25696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25697
25698  # First separate the path from the arguments. This will split at the first
25699  # space.
25700  complete="$NM"
25701  path="${complete%% *}"
25702  tmp="$complete EOL"
25703  arguments="${tmp#* }"
25704
25705  # Input might be given as Windows format, start by converting to
25706  # unix format.
25707  new_path="$path"
25708
25709  windows_path="$new_path"
25710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25711    unix_path=`$CYGPATH -u "$windows_path"`
25712    new_path="$unix_path"
25713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25715    new_path="$unix_path"
25716  fi
25717
25718
25719  # Now try to locate executable using which
25720  new_path=`$WHICH "$new_path" 2> /dev/null`
25721
25722  if test "x$new_path" = x; then
25723    # Oops. Which didn't find the executable.
25724    # The splitting of arguments from the executable at a space might have been incorrect,
25725    # since paths with space are more likely in Windows. Give it another try with the whole
25726    # argument.
25727    path="$complete"
25728    arguments="EOL"
25729    new_path="$path"
25730
25731  windows_path="$new_path"
25732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25733    unix_path=`$CYGPATH -u "$windows_path"`
25734    new_path="$unix_path"
25735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25737    new_path="$unix_path"
25738  fi
25739
25740
25741    new_path=`$WHICH "$new_path" 2> /dev/null`
25742
25743    if test "x$new_path" = x; then
25744      # It's still not found. Now this is an unrecoverable error.
25745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25746$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25747      has_space=`$ECHO "$complete" | $GREP " "`
25748      if test "x$has_space" != x; then
25749        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25750$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25751      fi
25752      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25753    fi
25754  fi
25755
25756  # Now new_path has a complete unix path to the binary
25757  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25758    # Keep paths in /bin as-is, but remove trailing .exe if any
25759    new_path="${new_path/%.exe/}"
25760    # Do not save /bin paths to all_fixpath_prefixes!
25761  else
25762    # Not in mixed or Windows style, start by that.
25763    new_path=`cmd //c echo $new_path`
25764
25765  input_path="$new_path"
25766  # Check if we need to convert this using DOS-style short mode. If the path
25767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25768  # take no chances and rewrite it.
25769  # Note: m4 eats our [], so we need to use [ and ] instead.
25770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25771  if test "x$has_forbidden_chars" != x; then
25772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25774  fi
25775
25776    # Output is in $new_path
25777
25778  windows_path="$new_path"
25779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25780    unix_path=`$CYGPATH -u "$windows_path"`
25781    new_path="$unix_path"
25782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25784    new_path="$unix_path"
25785  fi
25786
25787    # remove trailing .exe if any
25788    new_path="${new_path/%.exe/}"
25789
25790    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25791    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25792  fi
25793
25794  else
25795    # We're on a posix platform. Hooray! :)
25796    # First separate the path from the arguments. This will split at the first
25797    # space.
25798    complete="$NM"
25799    path="${complete%% *}"
25800    tmp="$complete EOL"
25801    arguments="${tmp#* }"
25802
25803    # Cannot rely on the command "which" here since it doesn't always work.
25804    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25805    if test -z "$is_absolute_path"; then
25806      # Path to executable is not absolute. Find it.
25807      IFS_save="$IFS"
25808      IFS=:
25809      for p in $PATH; do
25810        if test -f "$p/$path" && test -x "$p/$path"; then
25811          new_path="$p/$path"
25812          break
25813        fi
25814      done
25815      IFS="$IFS_save"
25816    else
25817      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25818$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25819      new_path="$path"
25820    fi
25821
25822    if test "x$new_path" = x; then
25823        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25824$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25825        has_space=`$ECHO "$complete" | $GREP " "`
25826        if test "x$has_space" != x; then
25827          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25828$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25829        fi
25830        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25831      fi
25832  fi
25833
25834      # Now join together the path and the arguments once again
25835      if test "x$arguments" != xEOL; then
25836        new_complete="$new_path ${arguments% *}"
25837      else
25838        new_complete="$new_path"
25839      fi
25840
25841  if test "x$complete" != "x$new_complete"; then
25842      NM="$new_complete"
25843      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25844$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25845    fi
25846
25847    if test -n "$ac_tool_prefix"; then
25848  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25849set dummy ${ac_tool_prefix}strip; ac_word=$2
25850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25851$as_echo_n "checking for $ac_word... " >&6; }
25852if test "${ac_cv_prog_STRIP+set}" = set; then :
25853  $as_echo_n "(cached) " >&6
25854else
25855  if test -n "$STRIP"; then
25856  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25857else
25858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25859for as_dir in $PATH
25860do
25861  IFS=$as_save_IFS
25862  test -z "$as_dir" && as_dir=.
25863    for ac_exec_ext in '' $ac_executable_extensions; do
25864  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25865    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25867    break 2
25868  fi
25869done
25870  done
25871IFS=$as_save_IFS
25872
25873fi
25874fi
25875STRIP=$ac_cv_prog_STRIP
25876if test -n "$STRIP"; then
25877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25878$as_echo "$STRIP" >&6; }
25879else
25880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25881$as_echo "no" >&6; }
25882fi
25883
25884
25885fi
25886if test -z "$ac_cv_prog_STRIP"; then
25887  ac_ct_STRIP=$STRIP
25888  # Extract the first word of "strip", so it can be a program name with args.
25889set dummy strip; ac_word=$2
25890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25891$as_echo_n "checking for $ac_word... " >&6; }
25892if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25893  $as_echo_n "(cached) " >&6
25894else
25895  if test -n "$ac_ct_STRIP"; then
25896  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25897else
25898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25899for as_dir in $PATH
25900do
25901  IFS=$as_save_IFS
25902  test -z "$as_dir" && as_dir=.
25903    for ac_exec_ext in '' $ac_executable_extensions; do
25904  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25905    ac_cv_prog_ac_ct_STRIP="strip"
25906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25907    break 2
25908  fi
25909done
25910  done
25911IFS=$as_save_IFS
25912
25913fi
25914fi
25915ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25916if test -n "$ac_ct_STRIP"; then
25917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25918$as_echo "$ac_ct_STRIP" >&6; }
25919else
25920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25921$as_echo "no" >&6; }
25922fi
25923
25924  if test "x$ac_ct_STRIP" = x; then
25925    STRIP=""
25926  else
25927    case $cross_compiling:$ac_tool_warned in
25928yes:)
25929{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25930$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25931ac_tool_warned=yes ;;
25932esac
25933    STRIP=$ac_ct_STRIP
25934  fi
25935else
25936  STRIP="$ac_cv_prog_STRIP"
25937fi
25938
25939
25940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25941
25942  # First separate the path from the arguments. This will split at the first
25943  # space.
25944  complete="$STRIP"
25945  path="${complete%% *}"
25946  tmp="$complete EOL"
25947  arguments="${tmp#* }"
25948
25949  # Input might be given as Windows format, start by converting to
25950  # unix format.
25951  new_path=`$CYGPATH -u "$path"`
25952
25953  # Now try to locate executable using which
25954  new_path=`$WHICH "$new_path" 2> /dev/null`
25955  # bat and cmd files are not always considered executable in cygwin causing which
25956  # to not find them
25957  if test "x$new_path" = x \
25958           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25959           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25960    new_path=`$CYGPATH -u "$path"`
25961  fi
25962  if test "x$new_path" = x; then
25963    # Oops. Which didn't find the executable.
25964    # The splitting of arguments from the executable at a space might have been incorrect,
25965    # since paths with space are more likely in Windows. Give it another try with the whole
25966    # argument.
25967    path="$complete"
25968    arguments="EOL"
25969    new_path=`$CYGPATH -u "$path"`
25970    new_path=`$WHICH "$new_path" 2> /dev/null`
25971    # bat and cmd files are not always considered executable in cygwin causing which
25972    # to not find them
25973    if test "x$new_path" = x \
25974             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25975             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25976      new_path=`$CYGPATH -u "$path"`
25977    fi
25978    if test "x$new_path" = x; then
25979      # It's still not found. Now this is an unrecoverable error.
25980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25981$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25982      has_space=`$ECHO "$complete" | $GREP " "`
25983      if test "x$has_space" != x; then
25984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25986      fi
25987      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25988    fi
25989  fi
25990
25991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25994  # "foo.exe" is OK but "foo" is an error.
25995  #
25996  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25997  # It is also a way to make sure we got the proper file name for the real test later on.
25998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25999  if test "x$test_shortpath" = x; then
26000    # Short path failed, file does not exist as specified.
26001    # Try adding .exe or .cmd
26002    if test -f "${new_path}.exe"; then
26003       input_to_shortpath="${new_path}.exe"
26004    elif test -f "${new_path}.cmd"; then
26005       input_to_shortpath="${new_path}.cmd"
26006    else
26007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26008$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26009      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26010$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26011      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26012    fi
26013  else
26014    input_to_shortpath="$new_path"
26015  fi
26016
26017  # Call helper function which possibly converts this using DOS-style short mode.
26018  # If so, the updated path is stored in $new_path.
26019  new_path="$input_to_shortpath"
26020
26021  input_path="$input_to_shortpath"
26022  # Check if we need to convert this using DOS-style short mode. If the path
26023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26024  # take no chances and rewrite it.
26025  # Note: m4 eats our [], so we need to use [ and ] instead.
26026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26027  if test "x$has_forbidden_chars" != x; then
26028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26032      # Going to short mode and back again did indeed matter. Since short mode is
26033      # case insensitive, let's make it lowercase to improve readability.
26034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26035      # Now convert it back to Unix-stile (cygpath)
26036      input_path=`$CYGPATH -u "$shortmode_path"`
26037      new_path="$input_path"
26038    fi
26039  fi
26040
26041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26042  if test "x$test_cygdrive_prefix" = x; then
26043    # As a simple fix, exclude /usr/bin since it's not a real path.
26044    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26046      # a path prefixed by /cygdrive for fixpath to work.
26047      new_path="$CYGWIN_ROOT_PATH$input_path"
26048    fi
26049  fi
26050
26051  # remove trailing .exe if any
26052  new_path="${new_path/%.exe/}"
26053
26054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26055
26056  # First separate the path from the arguments. This will split at the first
26057  # space.
26058  complete="$STRIP"
26059  path="${complete%% *}"
26060  tmp="$complete EOL"
26061  arguments="${tmp#* }"
26062
26063  # Input might be given as Windows format, start by converting to
26064  # unix format.
26065  new_path="$path"
26066
26067  windows_path="$new_path"
26068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26069    unix_path=`$CYGPATH -u "$windows_path"`
26070    new_path="$unix_path"
26071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26073    new_path="$unix_path"
26074  fi
26075
26076
26077  # Now try to locate executable using which
26078  new_path=`$WHICH "$new_path" 2> /dev/null`
26079
26080  if test "x$new_path" = x; then
26081    # Oops. Which didn't find the executable.
26082    # The splitting of arguments from the executable at a space might have been incorrect,
26083    # since paths with space are more likely in Windows. Give it another try with the whole
26084    # argument.
26085    path="$complete"
26086    arguments="EOL"
26087    new_path="$path"
26088
26089  windows_path="$new_path"
26090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26091    unix_path=`$CYGPATH -u "$windows_path"`
26092    new_path="$unix_path"
26093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26095    new_path="$unix_path"
26096  fi
26097
26098
26099    new_path=`$WHICH "$new_path" 2> /dev/null`
26100
26101    if test "x$new_path" = x; then
26102      # It's still not found. Now this is an unrecoverable error.
26103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26104$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26105      has_space=`$ECHO "$complete" | $GREP " "`
26106      if test "x$has_space" != x; then
26107        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26108$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26109      fi
26110      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26111    fi
26112  fi
26113
26114  # Now new_path has a complete unix path to the binary
26115  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26116    # Keep paths in /bin as-is, but remove trailing .exe if any
26117    new_path="${new_path/%.exe/}"
26118    # Do not save /bin paths to all_fixpath_prefixes!
26119  else
26120    # Not in mixed or Windows style, start by that.
26121    new_path=`cmd //c echo $new_path`
26122
26123  input_path="$new_path"
26124  # Check if we need to convert this using DOS-style short mode. If the path
26125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26126  # take no chances and rewrite it.
26127  # Note: m4 eats our [], so we need to use [ and ] instead.
26128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26129  if test "x$has_forbidden_chars" != x; then
26130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26131    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26132  fi
26133
26134    # Output is in $new_path
26135
26136  windows_path="$new_path"
26137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26138    unix_path=`$CYGPATH -u "$windows_path"`
26139    new_path="$unix_path"
26140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26142    new_path="$unix_path"
26143  fi
26144
26145    # remove trailing .exe if any
26146    new_path="${new_path/%.exe/}"
26147
26148    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26149    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26150  fi
26151
26152  else
26153    # We're on a posix platform. Hooray! :)
26154    # First separate the path from the arguments. This will split at the first
26155    # space.
26156    complete="$STRIP"
26157    path="${complete%% *}"
26158    tmp="$complete EOL"
26159    arguments="${tmp#* }"
26160
26161    # Cannot rely on the command "which" here since it doesn't always work.
26162    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26163    if test -z "$is_absolute_path"; then
26164      # Path to executable is not absolute. Find it.
26165      IFS_save="$IFS"
26166      IFS=:
26167      for p in $PATH; do
26168        if test -f "$p/$path" && test -x "$p/$path"; then
26169          new_path="$p/$path"
26170          break
26171        fi
26172      done
26173      IFS="$IFS_save"
26174    else
26175      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26176$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26177      new_path="$path"
26178    fi
26179
26180    if test "x$new_path" = x; then
26181        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26182$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26183        has_space=`$ECHO "$complete" | $GREP " "`
26184        if test "x$has_space" != x; then
26185          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26186$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26187        fi
26188        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26189      fi
26190  fi
26191
26192      # Now join together the path and the arguments once again
26193      if test "x$arguments" != xEOL; then
26194        new_complete="$new_path ${arguments% *}"
26195      else
26196        new_complete="$new_path"
26197      fi
26198
26199  if test "x$complete" != "x$new_complete"; then
26200      STRIP="$new_complete"
26201      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26202$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26203    fi
26204
26205fi
26206
26207# objcopy is used for moving debug symbols to separate files when
26208# full debug symbols are enabled.
26209if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26210    if test -n "$ac_tool_prefix"; then
26211  for ac_prog in gobjcopy objcopy
26212  do
26213    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26214set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26216$as_echo_n "checking for $ac_word... " >&6; }
26217if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26218  $as_echo_n "(cached) " >&6
26219else
26220  if test -n "$OBJCOPY"; then
26221  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26222else
26223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26224for as_dir in $PATH
26225do
26226  IFS=$as_save_IFS
26227  test -z "$as_dir" && as_dir=.
26228    for ac_exec_ext in '' $ac_executable_extensions; do
26229  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26230    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26232    break 2
26233  fi
26234done
26235  done
26236IFS=$as_save_IFS
26237
26238fi
26239fi
26240OBJCOPY=$ac_cv_prog_OBJCOPY
26241if test -n "$OBJCOPY"; then
26242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26243$as_echo "$OBJCOPY" >&6; }
26244else
26245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26246$as_echo "no" >&6; }
26247fi
26248
26249
26250    test -n "$OBJCOPY" && break
26251  done
26252fi
26253if test -z "$OBJCOPY"; then
26254  ac_ct_OBJCOPY=$OBJCOPY
26255  for ac_prog in gobjcopy objcopy
26256do
26257  # Extract the first word of "$ac_prog", so it can be a program name with args.
26258set dummy $ac_prog; ac_word=$2
26259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26260$as_echo_n "checking for $ac_word... " >&6; }
26261if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26262  $as_echo_n "(cached) " >&6
26263else
26264  if test -n "$ac_ct_OBJCOPY"; then
26265  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26266else
26267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26268for as_dir in $PATH
26269do
26270  IFS=$as_save_IFS
26271  test -z "$as_dir" && as_dir=.
26272    for ac_exec_ext in '' $ac_executable_extensions; do
26273  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26274    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26276    break 2
26277  fi
26278done
26279  done
26280IFS=$as_save_IFS
26281
26282fi
26283fi
26284ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26285if test -n "$ac_ct_OBJCOPY"; then
26286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26287$as_echo "$ac_ct_OBJCOPY" >&6; }
26288else
26289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26290$as_echo "no" >&6; }
26291fi
26292
26293
26294  test -n "$ac_ct_OBJCOPY" && break
26295done
26296
26297  if test "x$ac_ct_OBJCOPY" = x; then
26298    OBJCOPY=""
26299  else
26300    case $cross_compiling:$ac_tool_warned in
26301yes:)
26302{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26303$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26304ac_tool_warned=yes ;;
26305esac
26306    OBJCOPY=$ac_ct_OBJCOPY
26307  fi
26308fi
26309
26310    # Only call fixup if objcopy was found.
26311    if test -n "$OBJCOPY"; then
26312
26313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26314
26315  # First separate the path from the arguments. This will split at the first
26316  # space.
26317  complete="$OBJCOPY"
26318  path="${complete%% *}"
26319  tmp="$complete EOL"
26320  arguments="${tmp#* }"
26321
26322  # Input might be given as Windows format, start by converting to
26323  # unix format.
26324  new_path=`$CYGPATH -u "$path"`
26325
26326  # Now try to locate executable using which
26327  new_path=`$WHICH "$new_path" 2> /dev/null`
26328  # bat and cmd files are not always considered executable in cygwin causing which
26329  # to not find them
26330  if test "x$new_path" = x \
26331           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26332           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26333    new_path=`$CYGPATH -u "$path"`
26334  fi
26335  if test "x$new_path" = x; then
26336    # Oops. Which didn't find the executable.
26337    # The splitting of arguments from the executable at a space might have been incorrect,
26338    # since paths with space are more likely in Windows. Give it another try with the whole
26339    # argument.
26340    path="$complete"
26341    arguments="EOL"
26342    new_path=`$CYGPATH -u "$path"`
26343    new_path=`$WHICH "$new_path" 2> /dev/null`
26344    # bat and cmd files are not always considered executable in cygwin causing which
26345    # to not find them
26346    if test "x$new_path" = x \
26347             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26348             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26349      new_path=`$CYGPATH -u "$path"`
26350    fi
26351    if test "x$new_path" = x; then
26352      # It's still not found. Now this is an unrecoverable error.
26353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26354$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26355      has_space=`$ECHO "$complete" | $GREP " "`
26356      if test "x$has_space" != x; then
26357        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26358$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26359      fi
26360      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26361    fi
26362  fi
26363
26364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26367  # "foo.exe" is OK but "foo" is an error.
26368  #
26369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26370  # It is also a way to make sure we got the proper file name for the real test later on.
26371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26372  if test "x$test_shortpath" = x; then
26373    # Short path failed, file does not exist as specified.
26374    # Try adding .exe or .cmd
26375    if test -f "${new_path}.exe"; then
26376       input_to_shortpath="${new_path}.exe"
26377    elif test -f "${new_path}.cmd"; then
26378       input_to_shortpath="${new_path}.cmd"
26379    else
26380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26381$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26382      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26383$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26384      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26385    fi
26386  else
26387    input_to_shortpath="$new_path"
26388  fi
26389
26390  # Call helper function which possibly converts this using DOS-style short mode.
26391  # If so, the updated path is stored in $new_path.
26392  new_path="$input_to_shortpath"
26393
26394  input_path="$input_to_shortpath"
26395  # Check if we need to convert this using DOS-style short mode. If the path
26396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26397  # take no chances and rewrite it.
26398  # Note: m4 eats our [], so we need to use [ and ] instead.
26399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26400  if test "x$has_forbidden_chars" != x; then
26401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26405      # Going to short mode and back again did indeed matter. Since short mode is
26406      # case insensitive, let's make it lowercase to improve readability.
26407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26408      # Now convert it back to Unix-stile (cygpath)
26409      input_path=`$CYGPATH -u "$shortmode_path"`
26410      new_path="$input_path"
26411    fi
26412  fi
26413
26414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26415  if test "x$test_cygdrive_prefix" = x; then
26416    # As a simple fix, exclude /usr/bin since it's not a real path.
26417    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26419      # a path prefixed by /cygdrive for fixpath to work.
26420      new_path="$CYGWIN_ROOT_PATH$input_path"
26421    fi
26422  fi
26423
26424  # remove trailing .exe if any
26425  new_path="${new_path/%.exe/}"
26426
26427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26428
26429  # First separate the path from the arguments. This will split at the first
26430  # space.
26431  complete="$OBJCOPY"
26432  path="${complete%% *}"
26433  tmp="$complete EOL"
26434  arguments="${tmp#* }"
26435
26436  # Input might be given as Windows format, start by converting to
26437  # unix format.
26438  new_path="$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
26450  # Now try to locate executable using which
26451  new_path=`$WHICH "$new_path" 2> /dev/null`
26452
26453  if test "x$new_path" = x; then
26454    # Oops. Which didn't find the executable.
26455    # The splitting of arguments from the executable at a space might have been incorrect,
26456    # since paths with space are more likely in Windows. Give it another try with the whole
26457    # argument.
26458    path="$complete"
26459    arguments="EOL"
26460    new_path="$path"
26461
26462  windows_path="$new_path"
26463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26464    unix_path=`$CYGPATH -u "$windows_path"`
26465    new_path="$unix_path"
26466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26468    new_path="$unix_path"
26469  fi
26470
26471
26472    new_path=`$WHICH "$new_path" 2> /dev/null`
26473
26474    if test "x$new_path" = x; then
26475      # It's still not found. Now this is an unrecoverable error.
26476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26477$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26478      has_space=`$ECHO "$complete" | $GREP " "`
26479      if test "x$has_space" != x; then
26480        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26481$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26482      fi
26483      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26484    fi
26485  fi
26486
26487  # Now new_path has a complete unix path to the binary
26488  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26489    # Keep paths in /bin as-is, but remove trailing .exe if any
26490    new_path="${new_path/%.exe/}"
26491    # Do not save /bin paths to all_fixpath_prefixes!
26492  else
26493    # Not in mixed or Windows style, start by that.
26494    new_path=`cmd //c echo $new_path`
26495
26496  input_path="$new_path"
26497  # Check if we need to convert this using DOS-style short mode. If the path
26498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26499  # take no chances and rewrite it.
26500  # Note: m4 eats our [], so we need to use [ and ] instead.
26501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26502  if test "x$has_forbidden_chars" != x; then
26503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26505  fi
26506
26507    # Output is in $new_path
26508
26509  windows_path="$new_path"
26510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26511    unix_path=`$CYGPATH -u "$windows_path"`
26512    new_path="$unix_path"
26513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26515    new_path="$unix_path"
26516  fi
26517
26518    # remove trailing .exe if any
26519    new_path="${new_path/%.exe/}"
26520
26521    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26522    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26523  fi
26524
26525  else
26526    # We're on a posix platform. Hooray! :)
26527    # First separate the path from the arguments. This will split at the first
26528    # space.
26529    complete="$OBJCOPY"
26530    path="${complete%% *}"
26531    tmp="$complete EOL"
26532    arguments="${tmp#* }"
26533
26534    # Cannot rely on the command "which" here since it doesn't always work.
26535    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26536    if test -z "$is_absolute_path"; then
26537      # Path to executable is not absolute. Find it.
26538      IFS_save="$IFS"
26539      IFS=:
26540      for p in $PATH; do
26541        if test -f "$p/$path" && test -x "$p/$path"; then
26542          new_path="$p/$path"
26543          break
26544        fi
26545      done
26546      IFS="$IFS_save"
26547    else
26548      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26549$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26550      new_path="$path"
26551    fi
26552
26553    if test "x$new_path" = x; then
26554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26555$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26556        has_space=`$ECHO "$complete" | $GREP " "`
26557        if test "x$has_space" != x; then
26558          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26559$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26560        fi
26561        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26562      fi
26563  fi
26564
26565      # Now join together the path and the arguments once again
26566      if test "x$arguments" != xEOL; then
26567        new_complete="$new_path ${arguments% *}"
26568      else
26569        new_complete="$new_path"
26570      fi
26571
26572  if test "x$complete" != "x$new_complete"; then
26573      OBJCOPY="$new_complete"
26574      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26575$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26576    fi
26577
26578    fi
26579fi
26580
26581if test -n "$ac_tool_prefix"; then
26582  for ac_prog in gobjdump objdump
26583  do
26584    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26585set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26587$as_echo_n "checking for $ac_word... " >&6; }
26588if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
26589  $as_echo_n "(cached) " >&6
26590else
26591  if test -n "$OBJDUMP"; then
26592  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26593else
26594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26595for as_dir in $PATH
26596do
26597  IFS=$as_save_IFS
26598  test -z "$as_dir" && as_dir=.
26599    for ac_exec_ext in '' $ac_executable_extensions; do
26600  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26601    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26603    break 2
26604  fi
26605done
26606  done
26607IFS=$as_save_IFS
26608
26609fi
26610fi
26611OBJDUMP=$ac_cv_prog_OBJDUMP
26612if test -n "$OBJDUMP"; then
26613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26614$as_echo "$OBJDUMP" >&6; }
26615else
26616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26617$as_echo "no" >&6; }
26618fi
26619
26620
26621    test -n "$OBJDUMP" && break
26622  done
26623fi
26624if test -z "$OBJDUMP"; then
26625  ac_ct_OBJDUMP=$OBJDUMP
26626  for ac_prog in gobjdump objdump
26627do
26628  # Extract the first word of "$ac_prog", so it can be a program name with args.
26629set dummy $ac_prog; ac_word=$2
26630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26631$as_echo_n "checking for $ac_word... " >&6; }
26632if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26633  $as_echo_n "(cached) " >&6
26634else
26635  if test -n "$ac_ct_OBJDUMP"; then
26636  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26637else
26638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26639for as_dir in $PATH
26640do
26641  IFS=$as_save_IFS
26642  test -z "$as_dir" && as_dir=.
26643    for ac_exec_ext in '' $ac_executable_extensions; do
26644  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26645    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26647    break 2
26648  fi
26649done
26650  done
26651IFS=$as_save_IFS
26652
26653fi
26654fi
26655ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26656if test -n "$ac_ct_OBJDUMP"; then
26657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26658$as_echo "$ac_ct_OBJDUMP" >&6; }
26659else
26660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26661$as_echo "no" >&6; }
26662fi
26663
26664
26665  test -n "$ac_ct_OBJDUMP" && break
26666done
26667
26668  if test "x$ac_ct_OBJDUMP" = x; then
26669    OBJDUMP=""
26670  else
26671    case $cross_compiling:$ac_tool_warned in
26672yes:)
26673{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26674$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26675ac_tool_warned=yes ;;
26676esac
26677    OBJDUMP=$ac_ct_OBJDUMP
26678  fi
26679fi
26680
26681if test "x$OBJDUMP" != x; then
26682  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26683
26684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26685
26686  # First separate the path from the arguments. This will split at the first
26687  # space.
26688  complete="$OBJDUMP"
26689  path="${complete%% *}"
26690  tmp="$complete EOL"
26691  arguments="${tmp#* }"
26692
26693  # Input might be given as Windows format, start by converting to
26694  # unix format.
26695  new_path=`$CYGPATH -u "$path"`
26696
26697  # Now try to locate executable using which
26698  new_path=`$WHICH "$new_path" 2> /dev/null`
26699  # bat and cmd files are not always considered executable in cygwin causing which
26700  # to not find them
26701  if test "x$new_path" = x \
26702           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26703           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26704    new_path=`$CYGPATH -u "$path"`
26705  fi
26706  if test "x$new_path" = x; then
26707    # Oops. Which didn't find the executable.
26708    # The splitting of arguments from the executable at a space might have been incorrect,
26709    # since paths with space are more likely in Windows. Give it another try with the whole
26710    # argument.
26711    path="$complete"
26712    arguments="EOL"
26713    new_path=`$CYGPATH -u "$path"`
26714    new_path=`$WHICH "$new_path" 2> /dev/null`
26715    # bat and cmd files are not always considered executable in cygwin causing which
26716    # to not find them
26717    if test "x$new_path" = x \
26718             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26719             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26720      new_path=`$CYGPATH -u "$path"`
26721    fi
26722    if test "x$new_path" = x; then
26723      # It's still not found. Now this is an unrecoverable error.
26724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26725$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26726      has_space=`$ECHO "$complete" | $GREP " "`
26727      if test "x$has_space" != x; then
26728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26730      fi
26731      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26732    fi
26733  fi
26734
26735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26738  # "foo.exe" is OK but "foo" is an error.
26739  #
26740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26741  # It is also a way to make sure we got the proper file name for the real test later on.
26742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26743  if test "x$test_shortpath" = x; then
26744    # Short path failed, file does not exist as specified.
26745    # Try adding .exe or .cmd
26746    if test -f "${new_path}.exe"; then
26747       input_to_shortpath="${new_path}.exe"
26748    elif test -f "${new_path}.cmd"; then
26749       input_to_shortpath="${new_path}.cmd"
26750    else
26751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26752$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26753      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26754$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26755      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26756    fi
26757  else
26758    input_to_shortpath="$new_path"
26759  fi
26760
26761  # Call helper function which possibly converts this using DOS-style short mode.
26762  # If so, the updated path is stored in $new_path.
26763  new_path="$input_to_shortpath"
26764
26765  input_path="$input_to_shortpath"
26766  # Check if we need to convert this using DOS-style short mode. If the path
26767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26768  # take no chances and rewrite it.
26769  # Note: m4 eats our [], so we need to use [ and ] instead.
26770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26771  if test "x$has_forbidden_chars" != x; then
26772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26776      # Going to short mode and back again did indeed matter. Since short mode is
26777      # case insensitive, let's make it lowercase to improve readability.
26778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26779      # Now convert it back to Unix-stile (cygpath)
26780      input_path=`$CYGPATH -u "$shortmode_path"`
26781      new_path="$input_path"
26782    fi
26783  fi
26784
26785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26786  if test "x$test_cygdrive_prefix" = x; then
26787    # As a simple fix, exclude /usr/bin since it's not a real path.
26788    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26790      # a path prefixed by /cygdrive for fixpath to work.
26791      new_path="$CYGWIN_ROOT_PATH$input_path"
26792    fi
26793  fi
26794
26795  # remove trailing .exe if any
26796  new_path="${new_path/%.exe/}"
26797
26798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26799
26800  # First separate the path from the arguments. This will split at the first
26801  # space.
26802  complete="$OBJDUMP"
26803  path="${complete%% *}"
26804  tmp="$complete EOL"
26805  arguments="${tmp#* }"
26806
26807  # Input might be given as Windows format, start by converting to
26808  # unix format.
26809  new_path="$path"
26810
26811  windows_path="$new_path"
26812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26813    unix_path=`$CYGPATH -u "$windows_path"`
26814    new_path="$unix_path"
26815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26817    new_path="$unix_path"
26818  fi
26819
26820
26821  # Now try to locate executable using which
26822  new_path=`$WHICH "$new_path" 2> /dev/null`
26823
26824  if test "x$new_path" = x; then
26825    # Oops. Which didn't find the executable.
26826    # The splitting of arguments from the executable at a space might have been incorrect,
26827    # since paths with space are more likely in Windows. Give it another try with the whole
26828    # argument.
26829    path="$complete"
26830    arguments="EOL"
26831    new_path="$path"
26832
26833  windows_path="$new_path"
26834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26835    unix_path=`$CYGPATH -u "$windows_path"`
26836    new_path="$unix_path"
26837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26839    new_path="$unix_path"
26840  fi
26841
26842
26843    new_path=`$WHICH "$new_path" 2> /dev/null`
26844
26845    if test "x$new_path" = x; then
26846      # It's still not found. Now this is an unrecoverable error.
26847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26848$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26849      has_space=`$ECHO "$complete" | $GREP " "`
26850      if test "x$has_space" != x; then
26851        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26852$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26853      fi
26854      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26855    fi
26856  fi
26857
26858  # Now new_path has a complete unix path to the binary
26859  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26860    # Keep paths in /bin as-is, but remove trailing .exe if any
26861    new_path="${new_path/%.exe/}"
26862    # Do not save /bin paths to all_fixpath_prefixes!
26863  else
26864    # Not in mixed or Windows style, start by that.
26865    new_path=`cmd //c echo $new_path`
26866
26867  input_path="$new_path"
26868  # Check if we need to convert this using DOS-style short mode. If the path
26869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26870  # take no chances and rewrite it.
26871  # Note: m4 eats our [], so we need to use [ and ] instead.
26872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26873  if test "x$has_forbidden_chars" != x; then
26874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26876  fi
26877
26878    # Output is in $new_path
26879
26880  windows_path="$new_path"
26881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26882    unix_path=`$CYGPATH -u "$windows_path"`
26883    new_path="$unix_path"
26884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26886    new_path="$unix_path"
26887  fi
26888
26889    # remove trailing .exe if any
26890    new_path="${new_path/%.exe/}"
26891
26892    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26893    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26894  fi
26895
26896  else
26897    # We're on a posix platform. Hooray! :)
26898    # First separate the path from the arguments. This will split at the first
26899    # space.
26900    complete="$OBJDUMP"
26901    path="${complete%% *}"
26902    tmp="$complete EOL"
26903    arguments="${tmp#* }"
26904
26905    # Cannot rely on the command "which" here since it doesn't always work.
26906    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26907    if test -z "$is_absolute_path"; then
26908      # Path to executable is not absolute. Find it.
26909      IFS_save="$IFS"
26910      IFS=:
26911      for p in $PATH; do
26912        if test -f "$p/$path" && test -x "$p/$path"; then
26913          new_path="$p/$path"
26914          break
26915        fi
26916      done
26917      IFS="$IFS_save"
26918    else
26919      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26920$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26921      new_path="$path"
26922    fi
26923
26924    if test "x$new_path" = x; then
26925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26926$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26927        has_space=`$ECHO "$complete" | $GREP " "`
26928        if test "x$has_space" != x; then
26929          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26930$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26931        fi
26932        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26933      fi
26934  fi
26935
26936      # Now join together the path and the arguments once again
26937      if test "x$arguments" != xEOL; then
26938        new_complete="$new_path ${arguments% *}"
26939      else
26940        new_complete="$new_path"
26941      fi
26942
26943  if test "x$complete" != "x$new_complete"; then
26944      OBJDUMP="$new_complete"
26945      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26946$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26947    fi
26948
26949fi
26950
26951if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26952   # Extract the first word of "lipo", so it can be a program name with args.
26953set dummy lipo; ac_word=$2
26954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26955$as_echo_n "checking for $ac_word... " >&6; }
26956if test "${ac_cv_path_LIPO+set}" = set; then :
26957  $as_echo_n "(cached) " >&6
26958else
26959  case $LIPO in
26960  [\\/]* | ?:[\\/]*)
26961  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26962  ;;
26963  *)
26964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26965for as_dir in $PATH
26966do
26967  IFS=$as_save_IFS
26968  test -z "$as_dir" && as_dir=.
26969    for ac_exec_ext in '' $ac_executable_extensions; do
26970  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26971    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26973    break 2
26974  fi
26975done
26976  done
26977IFS=$as_save_IFS
26978
26979  ;;
26980esac
26981fi
26982LIPO=$ac_cv_path_LIPO
26983if test -n "$LIPO"; then
26984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
26985$as_echo "$LIPO" >&6; }
26986else
26987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26988$as_echo "no" >&6; }
26989fi
26990
26991
26992
26993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26994
26995  # First separate the path from the arguments. This will split at the first
26996  # space.
26997  complete="$LIPO"
26998  path="${complete%% *}"
26999  tmp="$complete EOL"
27000  arguments="${tmp#* }"
27001
27002  # Input might be given as Windows format, start by converting to
27003  # unix format.
27004  new_path=`$CYGPATH -u "$path"`
27005
27006  # Now try to locate executable using which
27007  new_path=`$WHICH "$new_path" 2> /dev/null`
27008  # bat and cmd files are not always considered executable in cygwin causing which
27009  # to not find them
27010  if test "x$new_path" = x \
27011           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27012           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27013    new_path=`$CYGPATH -u "$path"`
27014  fi
27015  if test "x$new_path" = x; then
27016    # Oops. Which didn't find the executable.
27017    # The splitting of arguments from the executable at a space might have been incorrect,
27018    # since paths with space are more likely in Windows. Give it another try with the whole
27019    # argument.
27020    path="$complete"
27021    arguments="EOL"
27022    new_path=`$CYGPATH -u "$path"`
27023    new_path=`$WHICH "$new_path" 2> /dev/null`
27024    # bat and cmd files are not always considered executable in cygwin causing which
27025    # to not find them
27026    if test "x$new_path" = x \
27027             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27028             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27029      new_path=`$CYGPATH -u "$path"`
27030    fi
27031    if test "x$new_path" = x; then
27032      # It's still not found. Now this is an unrecoverable error.
27033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27034$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27035      has_space=`$ECHO "$complete" | $GREP " "`
27036      if test "x$has_space" != x; then
27037        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27038$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27039      fi
27040      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27041    fi
27042  fi
27043
27044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27047  # "foo.exe" is OK but "foo" is an error.
27048  #
27049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27050  # It is also a way to make sure we got the proper file name for the real test later on.
27051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27052  if test "x$test_shortpath" = x; then
27053    # Short path failed, file does not exist as specified.
27054    # Try adding .exe or .cmd
27055    if test -f "${new_path}.exe"; then
27056       input_to_shortpath="${new_path}.exe"
27057    elif test -f "${new_path}.cmd"; then
27058       input_to_shortpath="${new_path}.cmd"
27059    else
27060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27061$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27062      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27063$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27064      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27065    fi
27066  else
27067    input_to_shortpath="$new_path"
27068  fi
27069
27070  # Call helper function which possibly converts this using DOS-style short mode.
27071  # If so, the updated path is stored in $new_path.
27072  new_path="$input_to_shortpath"
27073
27074  input_path="$input_to_shortpath"
27075  # Check if we need to convert this using DOS-style short mode. If the path
27076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27077  # take no chances and rewrite it.
27078  # Note: m4 eats our [], so we need to use [ and ] instead.
27079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27080  if test "x$has_forbidden_chars" != x; then
27081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27085      # Going to short mode and back again did indeed matter. Since short mode is
27086      # case insensitive, let's make it lowercase to improve readability.
27087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27088      # Now convert it back to Unix-stile (cygpath)
27089      input_path=`$CYGPATH -u "$shortmode_path"`
27090      new_path="$input_path"
27091    fi
27092  fi
27093
27094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27095  if test "x$test_cygdrive_prefix" = x; then
27096    # As a simple fix, exclude /usr/bin since it's not a real path.
27097    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27099      # a path prefixed by /cygdrive for fixpath to work.
27100      new_path="$CYGWIN_ROOT_PATH$input_path"
27101    fi
27102  fi
27103
27104  # remove trailing .exe if any
27105  new_path="${new_path/%.exe/}"
27106
27107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27108
27109  # First separate the path from the arguments. This will split at the first
27110  # space.
27111  complete="$LIPO"
27112  path="${complete%% *}"
27113  tmp="$complete EOL"
27114  arguments="${tmp#* }"
27115
27116  # Input might be given as Windows format, start by converting to
27117  # unix format.
27118  new_path="$path"
27119
27120  windows_path="$new_path"
27121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27122    unix_path=`$CYGPATH -u "$windows_path"`
27123    new_path="$unix_path"
27124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27126    new_path="$unix_path"
27127  fi
27128
27129
27130  # Now try to locate executable using which
27131  new_path=`$WHICH "$new_path" 2> /dev/null`
27132
27133  if test "x$new_path" = x; then
27134    # Oops. Which didn't find the executable.
27135    # The splitting of arguments from the executable at a space might have been incorrect,
27136    # since paths with space are more likely in Windows. Give it another try with the whole
27137    # argument.
27138    path="$complete"
27139    arguments="EOL"
27140    new_path="$path"
27141
27142  windows_path="$new_path"
27143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27144    unix_path=`$CYGPATH -u "$windows_path"`
27145    new_path="$unix_path"
27146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27148    new_path="$unix_path"
27149  fi
27150
27151
27152    new_path=`$WHICH "$new_path" 2> /dev/null`
27153
27154    if test "x$new_path" = x; then
27155      # It's still not found. Now this is an unrecoverable error.
27156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27157$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27158      has_space=`$ECHO "$complete" | $GREP " "`
27159      if test "x$has_space" != x; then
27160        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27161$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27162      fi
27163      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27164    fi
27165  fi
27166
27167  # Now new_path has a complete unix path to the binary
27168  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27169    # Keep paths in /bin as-is, but remove trailing .exe if any
27170    new_path="${new_path/%.exe/}"
27171    # Do not save /bin paths to all_fixpath_prefixes!
27172  else
27173    # Not in mixed or Windows style, start by that.
27174    new_path=`cmd //c echo $new_path`
27175
27176  input_path="$new_path"
27177  # Check if we need to convert this using DOS-style short mode. If the path
27178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27179  # take no chances and rewrite it.
27180  # Note: m4 eats our [], so we need to use [ and ] instead.
27181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27182  if test "x$has_forbidden_chars" != x; then
27183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27185  fi
27186
27187    # Output is in $new_path
27188
27189  windows_path="$new_path"
27190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27191    unix_path=`$CYGPATH -u "$windows_path"`
27192    new_path="$unix_path"
27193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27195    new_path="$unix_path"
27196  fi
27197
27198    # remove trailing .exe if any
27199    new_path="${new_path/%.exe/}"
27200
27201    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27202    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27203  fi
27204
27205  else
27206    # We're on a posix platform. Hooray! :)
27207    # First separate the path from the arguments. This will split at the first
27208    # space.
27209    complete="$LIPO"
27210    path="${complete%% *}"
27211    tmp="$complete EOL"
27212    arguments="${tmp#* }"
27213
27214    # Cannot rely on the command "which" here since it doesn't always work.
27215    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27216    if test -z "$is_absolute_path"; then
27217      # Path to executable is not absolute. Find it.
27218      IFS_save="$IFS"
27219      IFS=:
27220      for p in $PATH; do
27221        if test -f "$p/$path" && test -x "$p/$path"; then
27222          new_path="$p/$path"
27223          break
27224        fi
27225      done
27226      IFS="$IFS_save"
27227    else
27228      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27229$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27230      new_path="$path"
27231    fi
27232
27233    if test "x$new_path" = x; then
27234        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27235$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27236        has_space=`$ECHO "$complete" | $GREP " "`
27237        if test "x$has_space" != x; then
27238          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27239$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27240        fi
27241        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27242      fi
27243  fi
27244
27245      # Now join together the path and the arguments once again
27246      if test "x$arguments" != xEOL; then
27247        new_complete="$new_path ${arguments% *}"
27248      else
27249        new_complete="$new_path"
27250      fi
27251
27252  if test "x$complete" != "x$new_complete"; then
27253      LIPO="$new_complete"
27254      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27255$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27256    fi
27257
27258fi
27259
27260# Restore old path without tools dir
27261PATH="$OLD_PATH"
27262
27263
27264# FIXME: Currently we must test this after paths but before flags. Fix!
27265
27266# And we can test some aspects on the target using configure macros.
27267
27268
27269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27270$as_echo_n "checking for ANSI C header files... " >&6; }
27271if test "${ac_cv_header_stdc+set}" = set; then :
27272  $as_echo_n "(cached) " >&6
27273else
27274  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27275/* end confdefs.h.  */
27276#include <stdlib.h>
27277#include <stdarg.h>
27278#include <string.h>
27279#include <float.h>
27280
27281int
27282main ()
27283{
27284
27285  ;
27286  return 0;
27287}
27288_ACEOF
27289if ac_fn_cxx_try_compile "$LINENO"; then :
27290  ac_cv_header_stdc=yes
27291else
27292  ac_cv_header_stdc=no
27293fi
27294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27295
27296if test $ac_cv_header_stdc = yes; then
27297  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27298  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27299/* end confdefs.h.  */
27300#include <string.h>
27301
27302_ACEOF
27303if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27304  $EGREP "memchr" >/dev/null 2>&1; then :
27305
27306else
27307  ac_cv_header_stdc=no
27308fi
27309rm -f conftest*
27310
27311fi
27312
27313if test $ac_cv_header_stdc = yes; then
27314  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27315  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27316/* end confdefs.h.  */
27317#include <stdlib.h>
27318
27319_ACEOF
27320if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27321  $EGREP "free" >/dev/null 2>&1; then :
27322
27323else
27324  ac_cv_header_stdc=no
27325fi
27326rm -f conftest*
27327
27328fi
27329
27330if test $ac_cv_header_stdc = yes; then
27331  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27332  if test "$cross_compiling" = yes; then :
27333  :
27334else
27335  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27336/* end confdefs.h.  */
27337#include <ctype.h>
27338#include <stdlib.h>
27339#if ((' ' & 0x0FF) == 0x020)
27340# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27341# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27342#else
27343# define ISLOWER(c) \
27344		   (('a' <= (c) && (c) <= 'i') \
27345		     || ('j' <= (c) && (c) <= 'r') \
27346		     || ('s' <= (c) && (c) <= 'z'))
27347# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27348#endif
27349
27350#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27351int
27352main ()
27353{
27354  int i;
27355  for (i = 0; i < 256; i++)
27356    if (XOR (islower (i), ISLOWER (i))
27357	|| toupper (i) != TOUPPER (i))
27358      return 2;
27359  return 0;
27360}
27361_ACEOF
27362if ac_fn_cxx_try_run "$LINENO"; then :
27363
27364else
27365  ac_cv_header_stdc=no
27366fi
27367rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27368  conftest.$ac_objext conftest.beam conftest.$ac_ext
27369fi
27370
27371fi
27372fi
27373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27374$as_echo "$ac_cv_header_stdc" >&6; }
27375if test $ac_cv_header_stdc = yes; then
27376
27377$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27378
27379fi
27380
27381# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27382for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27383		  inttypes.h stdint.h unistd.h
27384do :
27385  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27386ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27387"
27388if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27389  cat >>confdefs.h <<_ACEOF
27390#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27391_ACEOF
27392
27393fi
27394
27395done
27396
27397
27398
27399###############################################################################
27400#
27401# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27402# (The JVM can use 32 or 64 bit Java pointers but that decision
27403# is made at runtime.)
27404#
27405if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27406  # Always specify -m flags on Solaris
27407
27408  # keep track of c/cxx flags that we added outselves...
27409  #   to prevent emitting warning...
27410  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27411  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27412  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27413
27414  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27415  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27416  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27417
27418  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27419  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27420  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27421
27422elif test "x$COMPILE_TYPE" = xreduced; then
27423  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27424    # Specify -m if running reduced on other Posix platforms
27425
27426  # keep track of c/cxx flags that we added outselves...
27427  #   to prevent emitting warning...
27428  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27429  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27430  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27431
27432  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27433  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27434  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27435
27436  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27437  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27438  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27439
27440  fi
27441fi
27442
27443# Make compilation sanity check
27444for ac_header in stdio.h
27445do :
27446  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27447if test "x$ac_cv_header_stdio_h" = x""yes; then :
27448  cat >>confdefs.h <<_ACEOF
27449#define HAVE_STDIO_H 1
27450_ACEOF
27451
27452else
27453
27454  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27455$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27456  if test "x$COMPILE_TYPE" = xreduced; then
27457    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27458$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27459  elif test "x$COMPILE_TYPE" = xcross; then
27460    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27461$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27462  fi
27463  as_fn_error $? "Cannot continue." "$LINENO" 5
27464
27465fi
27466
27467done
27468
27469
27470# The cast to long int works around a bug in the HP C Compiler
27471# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27472# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27473# This bug is HP SR number 8606223364.
27474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27475$as_echo_n "checking size of int *... " >&6; }
27476if test "${ac_cv_sizeof_int_p+set}" = set; then :
27477  $as_echo_n "(cached) " >&6
27478else
27479  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27480
27481else
27482  if test "$ac_cv_type_int_p" = yes; then
27483     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27484$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27485as_fn_error 77 "cannot compute sizeof (int *)
27486See \`config.log' for more details" "$LINENO" 5 ; }
27487   else
27488     ac_cv_sizeof_int_p=0
27489   fi
27490fi
27491
27492fi
27493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27494$as_echo "$ac_cv_sizeof_int_p" >&6; }
27495
27496
27497
27498cat >>confdefs.h <<_ACEOF
27499#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27500_ACEOF
27501
27502
27503
27504if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27505  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27506  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27507fi
27508
27509if test "x$SIZEOF_INT_P" = x; then
27510    # The test failed, lets stick to the assumed value.
27511    { $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
27512$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27513else
27514    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27515
27516    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27517        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
27518    fi
27519fi
27520
27521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27522$as_echo_n "checking for target address size... " >&6; }
27523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27524$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27525
27526
27527###############################################################################
27528#
27529# Is the target little of big endian?
27530#
27531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27532$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27533if test "${ac_cv_c_bigendian+set}" = set; then :
27534  $as_echo_n "(cached) " >&6
27535else
27536  ac_cv_c_bigendian=unknown
27537    # See if we're dealing with a universal compiler.
27538    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27539/* end confdefs.h.  */
27540#ifndef __APPLE_CC__
27541	       not a universal capable compiler
27542	     #endif
27543	     typedef int dummy;
27544
27545_ACEOF
27546if ac_fn_cxx_try_compile "$LINENO"; then :
27547
27548	# Check for potential -arch flags.  It is not universal unless
27549	# there are at least two -arch flags with different values.
27550	ac_arch=
27551	ac_prev=
27552	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27553	 if test -n "$ac_prev"; then
27554	   case $ac_word in
27555	     i?86 | x86_64 | ppc | ppc64)
27556	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27557		 ac_arch=$ac_word
27558	       else
27559		 ac_cv_c_bigendian=universal
27560		 break
27561	       fi
27562	       ;;
27563	   esac
27564	   ac_prev=
27565	 elif test "x$ac_word" = "x-arch"; then
27566	   ac_prev=arch
27567	 fi
27568       done
27569fi
27570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27571    if test $ac_cv_c_bigendian = unknown; then
27572      # See if sys/param.h defines the BYTE_ORDER macro.
27573      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27574/* end confdefs.h.  */
27575#include <sys/types.h>
27576	     #include <sys/param.h>
27577
27578int
27579main ()
27580{
27581#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27582		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27583		     && LITTLE_ENDIAN)
27584	      bogus endian macros
27585	     #endif
27586
27587  ;
27588  return 0;
27589}
27590_ACEOF
27591if ac_fn_cxx_try_compile "$LINENO"; then :
27592  # It does; now see whether it defined to BIG_ENDIAN or not.
27593	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27594/* end confdefs.h.  */
27595#include <sys/types.h>
27596		#include <sys/param.h>
27597
27598int
27599main ()
27600{
27601#if BYTE_ORDER != BIG_ENDIAN
27602		 not big endian
27603		#endif
27604
27605  ;
27606  return 0;
27607}
27608_ACEOF
27609if ac_fn_cxx_try_compile "$LINENO"; then :
27610  ac_cv_c_bigendian=yes
27611else
27612  ac_cv_c_bigendian=no
27613fi
27614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27615fi
27616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27617    fi
27618    if test $ac_cv_c_bigendian = unknown; then
27619      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27620      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27621/* end confdefs.h.  */
27622#include <limits.h>
27623
27624int
27625main ()
27626{
27627#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27628	      bogus endian macros
27629	     #endif
27630
27631  ;
27632  return 0;
27633}
27634_ACEOF
27635if ac_fn_cxx_try_compile "$LINENO"; then :
27636  # It does; now see whether it defined to _BIG_ENDIAN or not.
27637	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27638/* end confdefs.h.  */
27639#include <limits.h>
27640
27641int
27642main ()
27643{
27644#ifndef _BIG_ENDIAN
27645		 not big endian
27646		#endif
27647
27648  ;
27649  return 0;
27650}
27651_ACEOF
27652if ac_fn_cxx_try_compile "$LINENO"; then :
27653  ac_cv_c_bigendian=yes
27654else
27655  ac_cv_c_bigendian=no
27656fi
27657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27658fi
27659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27660    fi
27661    if test $ac_cv_c_bigendian = unknown; then
27662      # Compile a test program.
27663      if test "$cross_compiling" = yes; then :
27664  # Try to guess by grepping values from an object file.
27665	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27666/* end confdefs.h.  */
27667short int ascii_mm[] =
27668		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27669		short int ascii_ii[] =
27670		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27671		int use_ascii (int i) {
27672		  return ascii_mm[i] + ascii_ii[i];
27673		}
27674		short int ebcdic_ii[] =
27675		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27676		short int ebcdic_mm[] =
27677		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27678		int use_ebcdic (int i) {
27679		  return ebcdic_mm[i] + ebcdic_ii[i];
27680		}
27681		extern int foo;
27682
27683int
27684main ()
27685{
27686return use_ascii (foo) == use_ebcdic (foo);
27687  ;
27688  return 0;
27689}
27690_ACEOF
27691if ac_fn_cxx_try_compile "$LINENO"; then :
27692  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27693	      ac_cv_c_bigendian=yes
27694	    fi
27695	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27696	      if test "$ac_cv_c_bigendian" = unknown; then
27697		ac_cv_c_bigendian=no
27698	      else
27699		# finding both strings is unlikely to happen, but who knows?
27700		ac_cv_c_bigendian=unknown
27701	      fi
27702	    fi
27703fi
27704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27705else
27706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27707/* end confdefs.h.  */
27708$ac_includes_default
27709int
27710main ()
27711{
27712
27713	     /* Are we little or big endian?  From Harbison&Steele.  */
27714	     union
27715	     {
27716	       long int l;
27717	       char c[sizeof (long int)];
27718	     } u;
27719	     u.l = 1;
27720	     return u.c[sizeof (long int) - 1] == 1;
27721
27722  ;
27723  return 0;
27724}
27725_ACEOF
27726if ac_fn_cxx_try_run "$LINENO"; then :
27727  ac_cv_c_bigendian=no
27728else
27729  ac_cv_c_bigendian=yes
27730fi
27731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27732  conftest.$ac_objext conftest.beam conftest.$ac_ext
27733fi
27734
27735    fi
27736fi
27737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27738$as_echo "$ac_cv_c_bigendian" >&6; }
27739 case $ac_cv_c_bigendian in #(
27740   yes)
27741     ENDIAN="big";; #(
27742   no)
27743     ENDIAN="little" ;; #(
27744   universal)
27745     ENDIAN="universal_endianness"
27746     ;; #(
27747   *)
27748     ENDIAN="unknown" ;;
27749 esac
27750
27751
27752if test "x$ENDIAN" = xuniversal_endianness; then
27753    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27754fi
27755if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27756    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
27757fi
27758
27759
27760# Configure flags for the tools
27761
27762
27763###############################################################################
27764#
27765# How to compile shared libraries.
27766#
27767
27768if test "x$GCC" = xyes; then
27769    COMPILER_NAME=gcc
27770    PICFLAG="-fPIC"
27771    LIBRARY_PREFIX=lib
27772    SHARED_LIBRARY='lib$1.so'
27773    STATIC_LIBRARY='lib$1.a'
27774    SHARED_LIBRARY_FLAGS="-shared"
27775    SHARED_LIBRARY_SUFFIX='.so'
27776    STATIC_LIBRARY_SUFFIX='.a'
27777    OBJ_SUFFIX='.o'
27778    EXE_SUFFIX=''
27779    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27780    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27781    C_FLAG_REORDER=''
27782    CXX_FLAG_REORDER=''
27783    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27784    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27785    LD="$CC"
27786    LDEXE="$CC"
27787    LDCXX="$CXX"
27788    LDEXECXX="$CXX"
27789    POST_STRIP_CMD="$STRIP -g"
27790
27791    # Linking is different on MacOSX
27792    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27793        # Might change in the future to clang.
27794        COMPILER_NAME=gcc
27795        SHARED_LIBRARY='lib$1.dylib'
27796        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27797        SHARED_LIBRARY_SUFFIX='.dylib'
27798        EXE_SUFFIX=''
27799        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27800        SET_SHARED_LIBRARY_MAPFILE=''
27801        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27802        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27803        POST_STRIP_CMD="$STRIP -S"
27804    fi
27805else
27806    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27807        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27808        COMPILER_NAME=ossc
27809        PICFLAG="-KPIC"
27810        LIBRARY_PREFIX=lib
27811        SHARED_LIBRARY='lib$1.so'
27812        STATIC_LIBRARY='lib$1.a'
27813        SHARED_LIBRARY_FLAGS="-G"
27814        SHARED_LIBRARY_SUFFIX='.so'
27815        STATIC_LIBRARY_SUFFIX='.a'
27816        OBJ_SUFFIX='.o'
27817        EXE_SUFFIX=''
27818        SET_SHARED_LIBRARY_NAME=''
27819        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27820	C_FLAG_REORDER='-xF'
27821	CXX_FLAG_REORDER='-xF'
27822        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27823        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27824        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27825        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27826        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27827        POST_STRIP_CMD="$STRIP -x"
27828        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27829    fi
27830    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27831        # If it is not gcc, then assume it is the MS Visual Studio compiler
27832        COMPILER_NAME=cl
27833        PICFLAG=""
27834        LIBRARY_PREFIX=
27835        SHARED_LIBRARY='$1.dll'
27836        STATIC_LIBRARY='$1.lib'
27837        SHARED_LIBRARY_FLAGS="-LD"
27838        SHARED_LIBRARY_SUFFIX='.dll'
27839        STATIC_LIBRARY_SUFFIX='.lib'
27840        OBJ_SUFFIX='.obj'
27841        EXE_SUFFIX='.exe'
27842        SET_SHARED_LIBRARY_NAME=''
27843        SET_SHARED_LIBRARY_MAPFILE=''
27844        SET_SHARED_LIBRARY_ORIGIN=''
27845        SET_EXECUTABLE_ORIGIN=''
27846    fi
27847fi
27848
27849
27850
27851
27852
27853
27854
27855
27856
27857
27858
27859
27860
27861
27862
27863
27864
27865
27866# The (cross) compiler is now configured, we can now test capabilities
27867# of the target platform.
27868
27869
27870
27871###############################################################################
27872#
27873# Setup the opt flags for different compilers
27874# and different operating systems.
27875#
27876
27877#
27878# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27879#
27880if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27881    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27882    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27883    CFLAGS="$CFLAGS -mstackrealign"
27884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27885$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27886    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27887/* end confdefs.h.  */
27888int main() { return 0; }
27889_ACEOF
27890if ac_fn_cxx_try_link "$LINENO"; then :
27891
27892		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27893$as_echo "yes" >&6; }
27894
27895else
27896
27897		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27898$as_echo "no" >&6; }
27899	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27900
27901fi
27902rm -f core conftest.err conftest.$ac_objext \
27903    conftest$ac_exeext conftest.$ac_ext
27904fi
27905
27906C_FLAG_DEPS="-MMD -MF"
27907CXX_FLAG_DEPS="-MMD -MF"
27908
27909case $COMPILER_TYPE in
27910  CC )
27911    D_FLAG="-g"
27912    case $COMPILER_NAME in
27913      gcc )
27914      	case $OPENJDK_TARGET_OS in
27915	  macosx )
27916	    # On MacOSX we optimize for size, something
27917	    # we should do for all platforms?
27918	    C_O_FLAG_HI="-Os"
27919	    C_O_FLAG_NORM="-Os"
27920	    C_O_FLAG_NONE=""
27921	    ;;
27922	  *)
27923	    C_O_FLAG_HI="-O3"
27924	    C_O_FLAG_NORM="-O2"
27925	    C_O_FLAG_NONE="-O0"
27926	    CFLAGS_DEBUG_SYMBOLS="-g"
27927	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27928	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27929	       CFLAGS_DEBUG_SYMBOLS="-g1"
27930	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27931	    fi
27932	    ;;
27933	esac
27934        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27935        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27936        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27937        ;;
27938      ossc )
27939        #
27940        # Forte has different names for this with their C++ compiler...
27941        #
27942        C_FLAG_DEPS="-xMMD -xMF"
27943        CXX_FLAG_DEPS="-xMMD -xMF"
27944
27945        # Extra options used with HIGHEST
27946        #
27947        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27948        #          done with care, there are some assumptions below that need to
27949        #          be understood about the use of pointers, and IEEE behavior.
27950        #
27951        # Use non-standard floating point mode (not IEEE 754)
27952        CC_HIGHEST="$CC_HIGHEST -fns"
27953        # Do some simplification of floating point arithmetic (not IEEE 754)
27954        CC_HIGHEST="$CC_HIGHEST -fsimple"
27955        # Use single precision floating point with 'float'
27956        CC_HIGHEST="$CC_HIGHEST -fsingle"
27957        # Assume memory references via basic pointer types do not alias
27958        #   (Source with excessing pointer casting and data access with mixed
27959        #    pointer types are not recommended)
27960        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
27961        # Use intrinsic or inline versions for math/std functions
27962        #   (If you expect perfect errno behavior, do not use this)
27963        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
27964        # Loop data dependency optimizations (need -xO3 or higher)
27965        CC_HIGHEST="$CC_HIGHEST -xdepend"
27966        # Pointer parameters to functions do not overlap
27967        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
27968        #    If you pass in multiple pointers to the same data, do not use this)
27969        CC_HIGHEST="$CC_HIGHEST -xrestrict"
27970        # Inline some library routines
27971        #   (If you expect perfect errno behavior, do not use this)
27972        CC_HIGHEST="$CC_HIGHEST -xlibmil"
27973        # Use optimized math routines
27974        #   (If you expect perfect errno behavior, do not use this)
27975        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
27976        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
27977
27978        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
27979          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
27980          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
27981        fi
27982
27983        case $OPENJDK_TARGET_CPU_ARCH in
27984          x86)
27985            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
27986            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
27987            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
27988            C_O_FLAG_NONE="-xregs=no%frameptr"
27989            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
27990            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
27991            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
27992            CXX_O_FLAG_NONE="-xregs=no%frameptr"
27993            if test "x$OPENJDK_TARGET_CPU" = xx86; then
27994               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
27995               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
27996            fi
27997            ;;
27998          sparc)
27999            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28000            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28001            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28002            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28003            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28004            C_O_FLAG_NONE=""
28005            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28006            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28007            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28008            CXX_O_FLAG_NONE=""
28009            ;;
28010        esac
28011
28012    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28013    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28014    esac
28015    ;;
28016  CL )
28017    D_FLAG=
28018    C_O_FLAG_HIGHEST="-O2"
28019    C_O_FLAG_HI="-O1"
28020    C_O_FLAG_NORM="-O1"
28021    C_O_FLAG_NONE="-Od"
28022    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28023    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28024    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28025    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28026    ;;
28027esac
28028
28029if test -z "$C_O_FLAG_HIGHEST"; then
28030   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28031fi
28032
28033if test -z "$CXX_O_FLAG_HIGHEST"; then
28034   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28035fi
28036
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048
28049
28050if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28051   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28052$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28053fi
28054
28055if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28056   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28057$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28058fi
28059
28060if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28061   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28062$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28063fi
28064
28065
28066# Check whether --with-extra-cflags was given.
28067if test "${with_extra_cflags+set}" = set; then :
28068  withval=$with_extra_cflags;
28069fi
28070
28071
28072
28073# Check whether --with-extra-cxxflags was given.
28074if test "${with_extra_cxxflags+set}" = set; then :
28075  withval=$with_extra_cxxflags;
28076fi
28077
28078
28079
28080# Check whether --with-extra-ldflags was given.
28081if test "${with_extra_ldflags+set}" = set; then :
28082  withval=$with_extra_ldflags;
28083fi
28084
28085
28086CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28087CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28088LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28089
28090# Hotspot needs these set in their legacy form
28091LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28092LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28093LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28094
28095
28096
28097
28098
28099###############################################################################
28100#
28101# Now setup the CFLAGS and LDFLAGS for the JDK build.
28102# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28103#
28104case $COMPILER_NAME in
28105      gcc )
28106      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28107                          -pipe \
28108                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28109	  case $OPENJDK_TARGET_CPU_ARCH in
28110	  arm )
28111            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28112	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28113	  ;;
28114	  ppc )
28115            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28116	  ;;
28117	  * )
28118	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28119	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28120          ;;
28121	  esac
28122          ;;
28123      ossc )
28124          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28125          case $OPENJDK_TARGET_CPU_ARCH in
28126          x86 )
28127            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28128       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28129          ;;
28130          esac
28131
28132      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28133      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28134
28135          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28136          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28137          ;;
28138      cl )
28139          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28140               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28141	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28142	       -DWIN32 -DIAL"
28143          case $OPENJDK_TARGET_CPU in
28144              x86 )
28145                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28146                  ;;
28147              x86_64 )
28148                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28149                  ;;
28150          esac
28151          ;;
28152esac
28153
28154###############################################################################
28155
28156CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28157
28158# The package path is used only on macosx?
28159PACKAGE_PATH=/opt/local
28160
28161
28162if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28163    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28164    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28165    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28166    #   Note: -Dmacro         is the same as    #define macro 1
28167    #         -Dmacro=	    is the same as    #define macro
28168    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28169        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28170    else
28171        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28172    fi
28173else
28174    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28175fi
28176if test "x$OPENJDK_TARGET_OS" = xlinux; then
28177    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28178fi
28179if test "x$OPENJDK_TARGET_OS" = xwindows; then
28180    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28181fi
28182if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28183    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28184fi
28185if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28186    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28187fi
28188if test "x$OPENJDK_TARGET_OS" = xbsd; then
28189    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28190fi
28191if test "x$DEBUG_LEVEL" = xrelease; then
28192    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28193    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28194        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28195    fi
28196else
28197    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28198fi
28199
28200CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28201CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28202
28203CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28204        -I${JDK_OUTPUTDIR}/include \
28205        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28206        -I${JDK_TOPDIR}/src/share/javavm/export \
28207        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28208        -I${JDK_TOPDIR}/src/share/native/common \
28209        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28210
28211# The shared libraries are compiled using the picflag.
28212CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28213CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28214
28215# Executable flags
28216CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28217CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28218
28219# Now this is odd. The JDK native libraries have to link against libjvm.so
28220# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28221# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28222# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28223# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28224# libraries will link to whatever is in memory. Yuck.
28225#
28226# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28227if test "x$COMPILER_NAME" = xcl; then
28228    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28229    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28230        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28231    fi
28232    # TODO: make -debug optional "--disable-full-debug-symbols"
28233    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28234    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28235    LDFLAGS_JDKLIB_SUFFIX=""
28236    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28237        LDFLAGS_STACK_SIZE=1048576
28238    else
28239        LDFLAGS_STACK_SIZE=327680
28240    fi
28241    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28242else
28243    if test "x$COMPILER_NAME" = xgcc; then
28244        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28245        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28246        if test -n "$HAS_GNU_HASH"; then
28247            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28248        fi
28249        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28250          # And since we now know that the linker is gnu, then add -z defs, to forbid
28251          # undefined symbols in object files.
28252          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28253          if test "x$DEBUG_LEVEL" = "xrelease"; then
28254              # When building release libraries, tell the linker optimize them.
28255              # Should this be supplied to the OSS linker as well?
28256              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28257          fi
28258        fi
28259    fi
28260    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28261                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28262
28263    # On some platforms (mac) the linker warns about non existing -L dirs.
28264    # Add server first if available. Linking aginst client does not always produce the same results.
28265    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28266    # Default to server for other variants.
28267    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28268        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28269    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28270        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28271    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28272        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28273    else
28274        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28275    fi
28276
28277    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28278    if test "x$COMPILER_NAME" = xossc; then
28279        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28280    fi
28281
28282    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28283    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28284        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28285    fi
28286fi
28287
28288# Adjust flags according to debug level.
28289case $DEBUG_LEVEL in
28290      fastdebug )
28291              CFLAGS="$CFLAGS $D_FLAG"
28292              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28293              ;;
28294      slowdebug )
28295              CFLAGS="$CFLAGS $D_FLAG"
28296	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28297	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28298	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28299	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28300              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28301              ;;
28302esac
28303
28304
28305
28306
28307
28308
28309
28310
28311
28312
28313
28314
28315
28316
28317
28318# Setup debug symbols (need objcopy from the toolchain for that)
28319
28320#
28321# ENABLE_DEBUG_SYMBOLS
28322# This must be done after the toolchain is setup, since we're looking at objcopy.
28323#
28324# Check whether --enable-debug-symbols was given.
28325if test "${enable_debug_symbols+set}" = set; then :
28326  enableval=$enable_debug_symbols;
28327fi
28328
28329
28330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28331$as_echo_n "checking if we should generate debug symbols... " >&6; }
28332
28333if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28334   # explicit enabling of enable-debug-symbols and can't find objcopy
28335   #   this is an error
28336   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28337fi
28338
28339if test "x$enable_debug_symbols" = "xyes"; then
28340  ENABLE_DEBUG_SYMBOLS=true
28341elif test "x$enable_debug_symbols" = "xno"; then
28342  ENABLE_DEBUG_SYMBOLS=false
28343else
28344  # default on macosx is false
28345  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28346    ENABLE_DEBUG_SYMBOLS=false
28347  # Default is on if objcopy is found, otherwise off
28348  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28349    ENABLE_DEBUG_SYMBOLS=true
28350  else
28351    ENABLE_DEBUG_SYMBOLS=false
28352  fi
28353fi
28354
28355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28356$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28357
28358#
28359# ZIP_DEBUGINFO_FILES
28360#
28361# Check whether --enable-zip-debug-info was given.
28362if test "${enable_zip_debug_info+set}" = set; then :
28363  enableval=$enable_zip_debug_info;
28364fi
28365
28366
28367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28368$as_echo_n "checking if we should zip debug-info files... " >&6; }
28369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28370$as_echo "${enable_zip_debug_info}" >&6; }
28371
28372if test "x${enable_zip_debug_info}" = "xno"; then
28373   ZIP_DEBUGINFO_FILES=false
28374else
28375   ZIP_DEBUGINFO_FILES=true
28376fi
28377
28378
28379
28380
28381
28382
28383
28384###############################################################################
28385#
28386# Check dependencies for external and internal libraries.
28387#
28388###############################################################################
28389
28390
28391
28392###############################################################################
28393#
28394# OS specific settings that we never will need to probe.
28395#
28396if test "x$OPENJDK_TARGET_OS" = xlinux; then
28397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28398$as_echo_n "checking what is not needed on Linux?... " >&6; }
28399    PULSE_NOT_NEEDED=yes
28400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28401$as_echo "pulse" >&6; }
28402fi
28403
28404if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28406$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28407    ALSA_NOT_NEEDED=yes
28408    PULSE_NOT_NEEDED=yes
28409    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28410$as_echo "alsa pulse" >&6; }
28411fi
28412
28413if test "x$OPENJDK_TARGET_OS" = xwindows; then
28414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28415$as_echo_n "checking what is not needed on Windows?... " >&6; }
28416    CUPS_NOT_NEEDED=yes
28417    ALSA_NOT_NEEDED=yes
28418    PULSE_NOT_NEEDED=yes
28419    X11_NOT_NEEDED=yes
28420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28421$as_echo "alsa cups pulse x11" >&6; }
28422fi
28423
28424if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28426$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28427    ALSA_NOT_NEEDED=yes
28428    PULSE_NOT_NEEDED=yes
28429    X11_NOT_NEEDED=yes
28430    FREETYPE2_NOT_NEEDED=yes
28431    # If the java runtime framework is disabled, then we need X11.
28432    # This will be adjusted below.
28433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28434$as_echo "alsa pulse x11" >&6; }
28435fi
28436
28437if test "x$OPENJDK_TARGET_OS" = xbsd; then
28438    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28439$as_echo_n "checking what is not needed on bsd?... " >&6; }
28440    ALSA_NOT_NEEDED=yes
28441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28442$as_echo "alsa" >&6; }
28443fi
28444
28445if test "x$OPENJDK" = "xfalse"; then
28446    FREETYPE2_NOT_NEEDED=yes
28447fi
28448
28449if test "x$SUPPORT_HEADFUL" = xno; then
28450    X11_NOT_NEEDED=yes
28451fi
28452
28453###############################################################################
28454#
28455# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28456# that uses this API.
28457#
28458# Check whether --enable-macosx-runtime-support was given.
28459if test "${enable_macosx_runtime_support+set}" = set; then :
28460  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28461else
28462  MACOSX_RUNTIME_SUPPORT="no"
28463fi
28464
28465
28466USE_MACOSX_RUNTIME_SUPPORT=no
28467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28468$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28469if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28470    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28471        MACOSX_RUNTIME_SUPPORT=yes
28472        USE_MACOSX_RUNTIME_SUPPORT=yes
28473        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28474$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28475    else
28476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28477$as_echo "yes, but explicitly disabled." >&6; }
28478    fi
28479else
28480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28481$as_echo "no" >&6; }
28482fi
28483
28484if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28485    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28486$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28487    X11_NOT_NEEDED=
28488    FREETYPE2_NOT_NEEDED=
28489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28490$as_echo "alsa pulse" >&6; }
28491fi
28492
28493
28494
28495
28496###############################################################################
28497#
28498# Check for X Windows
28499#
28500
28501# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28502# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28503# --x-libraries for the sysroot, if that seems to be correct.
28504if test "x$SYS_ROOT" != "x/"; then
28505  if test "x$x_includes" = xNONE; then
28506    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28507      x_includes="$SYS_ROOT/usr/X11R6/include"
28508    fi
28509  fi
28510  if test "x$x_libraries" = xNONE; then
28511    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28512      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28513    fi
28514  fi
28515fi
28516
28517# Now let autoconf do it's magic
28518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28519$as_echo_n "checking for X... " >&6; }
28520
28521
28522# Check whether --with-x was given.
28523if test "${with_x+set}" = set; then :
28524  withval=$with_x;
28525fi
28526
28527# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28528if test "x$with_x" = xno; then
28529  # The user explicitly disabled X.
28530  have_x=disabled
28531else
28532  case $x_includes,$x_libraries in #(
28533    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
28534    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
28535  $as_echo_n "(cached) " >&6
28536else
28537  # One or both of the vars are not set, and there is no cached value.
28538ac_x_includes=no ac_x_libraries=no
28539rm -f -r conftest.dir
28540if mkdir conftest.dir; then
28541  cd conftest.dir
28542  cat >Imakefile <<'_ACEOF'
28543incroot:
28544	@echo incroot='${INCROOT}'
28545usrlibdir:
28546	@echo usrlibdir='${USRLIBDIR}'
28547libdir:
28548	@echo libdir='${LIBDIR}'
28549_ACEOF
28550  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28551    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28552    for ac_var in incroot usrlibdir libdir; do
28553      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28554    done
28555    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28556    for ac_extension in a so sl dylib la dll; do
28557      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28558	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28559	ac_im_usrlibdir=$ac_im_libdir; break
28560      fi
28561    done
28562    # Screen out bogus values from the imake configuration.  They are
28563    # bogus both because they are the default anyway, and because
28564    # using them would break gcc on systems where it needs fixed includes.
28565    case $ac_im_incroot in
28566	/usr/include) ac_x_includes= ;;
28567	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28568    esac
28569    case $ac_im_usrlibdir in
28570	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28571	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28572    esac
28573  fi
28574  cd ..
28575  rm -f -r conftest.dir
28576fi
28577
28578# Standard set of common directories for X headers.
28579# Check X11 before X11Rn because it is often a symlink to the current release.
28580ac_x_header_dirs='
28581/usr/X11/include
28582/usr/X11R7/include
28583/usr/X11R6/include
28584/usr/X11R5/include
28585/usr/X11R4/include
28586
28587/usr/include/X11
28588/usr/include/X11R7
28589/usr/include/X11R6
28590/usr/include/X11R5
28591/usr/include/X11R4
28592
28593/usr/local/X11/include
28594/usr/local/X11R7/include
28595/usr/local/X11R6/include
28596/usr/local/X11R5/include
28597/usr/local/X11R4/include
28598
28599/usr/local/include/X11
28600/usr/local/include/X11R7
28601/usr/local/include/X11R6
28602/usr/local/include/X11R5
28603/usr/local/include/X11R4
28604
28605/usr/X386/include
28606/usr/x386/include
28607/usr/XFree86/include/X11
28608
28609/usr/include
28610/usr/local/include
28611/usr/unsupported/include
28612/usr/athena/include
28613/usr/local/x11r5/include
28614/usr/lpp/Xamples/include
28615
28616/usr/openwin/include
28617/usr/openwin/share/include'
28618
28619if test "$ac_x_includes" = no; then
28620  # Guess where to find include files, by looking for Xlib.h.
28621  # First, try using that file with no special directory specified.
28622  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28623/* end confdefs.h.  */
28624#include <X11/Xlib.h>
28625_ACEOF
28626if ac_fn_cxx_try_cpp "$LINENO"; then :
28627  # We can compile using X headers with no special include directory.
28628ac_x_includes=
28629else
28630  for ac_dir in $ac_x_header_dirs; do
28631  if test -r "$ac_dir/X11/Xlib.h"; then
28632    ac_x_includes=$ac_dir
28633    break
28634  fi
28635done
28636fi
28637rm -f conftest.err conftest.i conftest.$ac_ext
28638fi # $ac_x_includes = no
28639
28640if test "$ac_x_libraries" = no; then
28641  # Check for the libraries.
28642  # See if we find them without any special options.
28643  # Don't add to $LIBS permanently.
28644  ac_save_LIBS=$LIBS
28645  LIBS="-lX11 $LIBS"
28646  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28647/* end confdefs.h.  */
28648#include <X11/Xlib.h>
28649int
28650main ()
28651{
28652XrmInitialize ()
28653  ;
28654  return 0;
28655}
28656_ACEOF
28657if ac_fn_cxx_try_link "$LINENO"; then :
28658  LIBS=$ac_save_LIBS
28659# We can link X programs with no special library path.
28660ac_x_libraries=
28661else
28662  LIBS=$ac_save_LIBS
28663for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28664do
28665  # Don't even attempt the hair of trying to link an X program!
28666  for ac_extension in a so sl dylib la dll; do
28667    if test -r "$ac_dir/libX11.$ac_extension"; then
28668      ac_x_libraries=$ac_dir
28669      break 2
28670    fi
28671  done
28672done
28673fi
28674rm -f core conftest.err conftest.$ac_objext \
28675    conftest$ac_exeext conftest.$ac_ext
28676fi # $ac_x_libraries = no
28677
28678case $ac_x_includes,$ac_x_libraries in #(
28679  no,* | *,no | *\'*)
28680    # Didn't find X, or a directory has "'" in its name.
28681    ac_cv_have_x="have_x=no";; #(
28682  *)
28683    # Record where we found X for the cache.
28684    ac_cv_have_x="have_x=yes\
28685	ac_x_includes='$ac_x_includes'\
28686	ac_x_libraries='$ac_x_libraries'"
28687esac
28688fi
28689;; #(
28690    *) have_x=yes;;
28691  esac
28692  eval "$ac_cv_have_x"
28693fi # $with_x != no
28694
28695if test "$have_x" != yes; then
28696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28697$as_echo "$have_x" >&6; }
28698  no_x=yes
28699else
28700  # If each of the values was on the command line, it overrides each guess.
28701  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28702  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28703  # Update the cache value to reflect the command line values.
28704  ac_cv_have_x="have_x=yes\
28705	ac_x_includes='$x_includes'\
28706	ac_x_libraries='$x_libraries'"
28707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28708$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28709fi
28710
28711if test "$no_x" = yes; then
28712  # Not all programs may use this symbol, but it does not hurt to define it.
28713
28714$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28715
28716  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28717else
28718  if test -n "$x_includes"; then
28719    X_CFLAGS="$X_CFLAGS -I$x_includes"
28720  fi
28721
28722  # It would also be nice to do this for all -L options, not just this one.
28723  if test -n "$x_libraries"; then
28724    X_LIBS="$X_LIBS -L$x_libraries"
28725    # For Solaris; some versions of Sun CC require a space after -R and
28726    # others require no space.  Words are not sufficient . . . .
28727    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28728$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28729    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28730    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28731    ac_cxx_werror_flag=yes
28732    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28733/* end confdefs.h.  */
28734
28735int
28736main ()
28737{
28738
28739  ;
28740  return 0;
28741}
28742_ACEOF
28743if ac_fn_cxx_try_link "$LINENO"; then :
28744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28745$as_echo "no" >&6; }
28746       X_LIBS="$X_LIBS -R$x_libraries"
28747else
28748  LIBS="$ac_xsave_LIBS -R $x_libraries"
28749       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28750/* end confdefs.h.  */
28751
28752int
28753main ()
28754{
28755
28756  ;
28757  return 0;
28758}
28759_ACEOF
28760if ac_fn_cxx_try_link "$LINENO"; then :
28761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28762$as_echo "yes" >&6; }
28763	  X_LIBS="$X_LIBS -R $x_libraries"
28764else
28765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28766$as_echo "neither works" >&6; }
28767fi
28768rm -f core conftest.err conftest.$ac_objext \
28769    conftest$ac_exeext conftest.$ac_ext
28770fi
28771rm -f core conftest.err conftest.$ac_objext \
28772    conftest$ac_exeext conftest.$ac_ext
28773    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28774    LIBS=$ac_xsave_LIBS
28775  fi
28776
28777  # Check for system-dependent libraries X programs must link with.
28778  # Do this before checking for the system-independent R6 libraries
28779  # (-lICE), since we may need -lsocket or whatever for X linking.
28780
28781  if test "$ISC" = yes; then
28782    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28783  else
28784    # Martyn Johnson says this is needed for Ultrix, if the X
28785    # libraries were built with DECnet support.  And Karl Berry says
28786    # the Alpha needs dnet_stub (dnet does not exist).
28787    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28788    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28789/* end confdefs.h.  */
28790
28791/* Override any GCC internal prototype to avoid an error.
28792   Use char because int might match the return type of a GCC
28793   builtin and then its argument prototype would still apply.  */
28794#ifdef __cplusplus
28795extern "C"
28796#endif
28797char XOpenDisplay ();
28798int
28799main ()
28800{
28801return XOpenDisplay ();
28802  ;
28803  return 0;
28804}
28805_ACEOF
28806if ac_fn_cxx_try_link "$LINENO"; then :
28807
28808else
28809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28810$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28811if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28812  $as_echo_n "(cached) " >&6
28813else
28814  ac_check_lib_save_LIBS=$LIBS
28815LIBS="-ldnet  $LIBS"
28816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28817/* end confdefs.h.  */
28818
28819/* Override any GCC internal prototype to avoid an error.
28820   Use char because int might match the return type of a GCC
28821   builtin and then its argument prototype would still apply.  */
28822#ifdef __cplusplus
28823extern "C"
28824#endif
28825char dnet_ntoa ();
28826int
28827main ()
28828{
28829return dnet_ntoa ();
28830  ;
28831  return 0;
28832}
28833_ACEOF
28834if ac_fn_cxx_try_link "$LINENO"; then :
28835  ac_cv_lib_dnet_dnet_ntoa=yes
28836else
28837  ac_cv_lib_dnet_dnet_ntoa=no
28838fi
28839rm -f core conftest.err conftest.$ac_objext \
28840    conftest$ac_exeext conftest.$ac_ext
28841LIBS=$ac_check_lib_save_LIBS
28842fi
28843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28844$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28845if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28846  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28847fi
28848
28849    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28850      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28851$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28852if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28853  $as_echo_n "(cached) " >&6
28854else
28855  ac_check_lib_save_LIBS=$LIBS
28856LIBS="-ldnet_stub  $LIBS"
28857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28858/* end confdefs.h.  */
28859
28860/* Override any GCC internal prototype to avoid an error.
28861   Use char because int might match the return type of a GCC
28862   builtin and then its argument prototype would still apply.  */
28863#ifdef __cplusplus
28864extern "C"
28865#endif
28866char dnet_ntoa ();
28867int
28868main ()
28869{
28870return dnet_ntoa ();
28871  ;
28872  return 0;
28873}
28874_ACEOF
28875if ac_fn_cxx_try_link "$LINENO"; then :
28876  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28877else
28878  ac_cv_lib_dnet_stub_dnet_ntoa=no
28879fi
28880rm -f core conftest.err conftest.$ac_objext \
28881    conftest$ac_exeext conftest.$ac_ext
28882LIBS=$ac_check_lib_save_LIBS
28883fi
28884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28885$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28886if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28887  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28888fi
28889
28890    fi
28891fi
28892rm -f core conftest.err conftest.$ac_objext \
28893    conftest$ac_exeext conftest.$ac_ext
28894    LIBS="$ac_xsave_LIBS"
28895
28896    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28897    # to get the SysV transport functions.
28898    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28899    # needs -lnsl.
28900    # The nsl library prevents programs from opening the X display
28901    # on Irix 5.2, according to T.E. Dickey.
28902    # The functions gethostbyname, getservbyname, and inet_addr are
28903    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28904    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28905if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28906
28907fi
28908
28909    if test $ac_cv_func_gethostbyname = no; then
28910      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28911$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28912if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28913  $as_echo_n "(cached) " >&6
28914else
28915  ac_check_lib_save_LIBS=$LIBS
28916LIBS="-lnsl  $LIBS"
28917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28918/* end confdefs.h.  */
28919
28920/* Override any GCC internal prototype to avoid an error.
28921   Use char because int might match the return type of a GCC
28922   builtin and then its argument prototype would still apply.  */
28923#ifdef __cplusplus
28924extern "C"
28925#endif
28926char gethostbyname ();
28927int
28928main ()
28929{
28930return gethostbyname ();
28931  ;
28932  return 0;
28933}
28934_ACEOF
28935if ac_fn_cxx_try_link "$LINENO"; then :
28936  ac_cv_lib_nsl_gethostbyname=yes
28937else
28938  ac_cv_lib_nsl_gethostbyname=no
28939fi
28940rm -f core conftest.err conftest.$ac_objext \
28941    conftest$ac_exeext conftest.$ac_ext
28942LIBS=$ac_check_lib_save_LIBS
28943fi
28944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
28945$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
28946if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
28947  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
28948fi
28949
28950      if test $ac_cv_lib_nsl_gethostbyname = no; then
28951	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
28952$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
28953if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
28954  $as_echo_n "(cached) " >&6
28955else
28956  ac_check_lib_save_LIBS=$LIBS
28957LIBS="-lbsd  $LIBS"
28958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28959/* end confdefs.h.  */
28960
28961/* Override any GCC internal prototype to avoid an error.
28962   Use char because int might match the return type of a GCC
28963   builtin and then its argument prototype would still apply.  */
28964#ifdef __cplusplus
28965extern "C"
28966#endif
28967char gethostbyname ();
28968int
28969main ()
28970{
28971return gethostbyname ();
28972  ;
28973  return 0;
28974}
28975_ACEOF
28976if ac_fn_cxx_try_link "$LINENO"; then :
28977  ac_cv_lib_bsd_gethostbyname=yes
28978else
28979  ac_cv_lib_bsd_gethostbyname=no
28980fi
28981rm -f core conftest.err conftest.$ac_objext \
28982    conftest$ac_exeext conftest.$ac_ext
28983LIBS=$ac_check_lib_save_LIBS
28984fi
28985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
28986$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
28987if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
28988  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
28989fi
28990
28991      fi
28992    fi
28993
28994    # lieder@skyler.mavd.honeywell.com says without -lsocket,
28995    # socket/setsockopt and other routines are undefined under SCO ODT
28996    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
28997    # on later versions), says Simon Leinen: it contains gethostby*
28998    # variants that don't use the name server (or something).  -lsocket
28999    # must be given before -lnsl if both are needed.  We assume that
29000    # if connect needs -lnsl, so does gethostbyname.
29001    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29002if test "x$ac_cv_func_connect" = x""yes; then :
29003
29004fi
29005
29006    if test $ac_cv_func_connect = no; then
29007      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29008$as_echo_n "checking for connect in -lsocket... " >&6; }
29009if test "${ac_cv_lib_socket_connect+set}" = set; then :
29010  $as_echo_n "(cached) " >&6
29011else
29012  ac_check_lib_save_LIBS=$LIBS
29013LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29015/* end confdefs.h.  */
29016
29017/* Override any GCC internal prototype to avoid an error.
29018   Use char because int might match the return type of a GCC
29019   builtin and then its argument prototype would still apply.  */
29020#ifdef __cplusplus
29021extern "C"
29022#endif
29023char connect ();
29024int
29025main ()
29026{
29027return connect ();
29028  ;
29029  return 0;
29030}
29031_ACEOF
29032if ac_fn_cxx_try_link "$LINENO"; then :
29033  ac_cv_lib_socket_connect=yes
29034else
29035  ac_cv_lib_socket_connect=no
29036fi
29037rm -f core conftest.err conftest.$ac_objext \
29038    conftest$ac_exeext conftest.$ac_ext
29039LIBS=$ac_check_lib_save_LIBS
29040fi
29041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29042$as_echo "$ac_cv_lib_socket_connect" >&6; }
29043if test "x$ac_cv_lib_socket_connect" = x""yes; then :
29044  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29045fi
29046
29047    fi
29048
29049    # Guillermo Gomez says -lposix is necessary on A/UX.
29050    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29051if test "x$ac_cv_func_remove" = x""yes; then :
29052
29053fi
29054
29055    if test $ac_cv_func_remove = no; then
29056      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29057$as_echo_n "checking for remove in -lposix... " >&6; }
29058if test "${ac_cv_lib_posix_remove+set}" = set; then :
29059  $as_echo_n "(cached) " >&6
29060else
29061  ac_check_lib_save_LIBS=$LIBS
29062LIBS="-lposix  $LIBS"
29063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29064/* end confdefs.h.  */
29065
29066/* Override any GCC internal prototype to avoid an error.
29067   Use char because int might match the return type of a GCC
29068   builtin and then its argument prototype would still apply.  */
29069#ifdef __cplusplus
29070extern "C"
29071#endif
29072char remove ();
29073int
29074main ()
29075{
29076return remove ();
29077  ;
29078  return 0;
29079}
29080_ACEOF
29081if ac_fn_cxx_try_link "$LINENO"; then :
29082  ac_cv_lib_posix_remove=yes
29083else
29084  ac_cv_lib_posix_remove=no
29085fi
29086rm -f core conftest.err conftest.$ac_objext \
29087    conftest$ac_exeext conftest.$ac_ext
29088LIBS=$ac_check_lib_save_LIBS
29089fi
29090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29091$as_echo "$ac_cv_lib_posix_remove" >&6; }
29092if test "x$ac_cv_lib_posix_remove" = x""yes; then :
29093  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29094fi
29095
29096    fi
29097
29098    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29099    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29100if test "x$ac_cv_func_shmat" = x""yes; then :
29101
29102fi
29103
29104    if test $ac_cv_func_shmat = no; then
29105      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29106$as_echo_n "checking for shmat in -lipc... " >&6; }
29107if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
29108  $as_echo_n "(cached) " >&6
29109else
29110  ac_check_lib_save_LIBS=$LIBS
29111LIBS="-lipc  $LIBS"
29112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29113/* end confdefs.h.  */
29114
29115/* Override any GCC internal prototype to avoid an error.
29116   Use char because int might match the return type of a GCC
29117   builtin and then its argument prototype would still apply.  */
29118#ifdef __cplusplus
29119extern "C"
29120#endif
29121char shmat ();
29122int
29123main ()
29124{
29125return shmat ();
29126  ;
29127  return 0;
29128}
29129_ACEOF
29130if ac_fn_cxx_try_link "$LINENO"; then :
29131  ac_cv_lib_ipc_shmat=yes
29132else
29133  ac_cv_lib_ipc_shmat=no
29134fi
29135rm -f core conftest.err conftest.$ac_objext \
29136    conftest$ac_exeext conftest.$ac_ext
29137LIBS=$ac_check_lib_save_LIBS
29138fi
29139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29140$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29141if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29142  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29143fi
29144
29145    fi
29146  fi
29147
29148  # Check for libraries that X11R6 Xt/Xaw programs need.
29149  ac_save_LDFLAGS=$LDFLAGS
29150  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29151  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29152  # check for ICE first), but we must link in the order -lSM -lICE or
29153  # we get undefined symbols.  So assume we have SM if we have ICE.
29154  # These have to be linked with before -lX11, unlike the other
29155  # libraries we check for below, so use a different variable.
29156  # John Interrante, Karl Berry
29157  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29158$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29159if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29160  $as_echo_n "(cached) " >&6
29161else
29162  ac_check_lib_save_LIBS=$LIBS
29163LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29165/* end confdefs.h.  */
29166
29167/* Override any GCC internal prototype to avoid an error.
29168   Use char because int might match the return type of a GCC
29169   builtin and then its argument prototype would still apply.  */
29170#ifdef __cplusplus
29171extern "C"
29172#endif
29173char IceConnectionNumber ();
29174int
29175main ()
29176{
29177return IceConnectionNumber ();
29178  ;
29179  return 0;
29180}
29181_ACEOF
29182if ac_fn_cxx_try_link "$LINENO"; then :
29183  ac_cv_lib_ICE_IceConnectionNumber=yes
29184else
29185  ac_cv_lib_ICE_IceConnectionNumber=no
29186fi
29187rm -f core conftest.err conftest.$ac_objext \
29188    conftest$ac_exeext conftest.$ac_ext
29189LIBS=$ac_check_lib_save_LIBS
29190fi
29191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29192$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29193if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29194  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29195fi
29196
29197  LDFLAGS=$ac_save_LDFLAGS
29198
29199fi
29200
29201
29202if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29203
29204    # Print a helpful message on how to acquire the necessary build dependency.
29205    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29206    MISSING_DEPENDENCY=x11
29207    PKGHANDLER_COMMAND=
29208
29209    case $PKGHANDLER in
29210	apt-get)
29211                apt_help     $MISSING_DEPENDENCY ;;
29212    yum)
29213                yum_help     $MISSING_DEPENDENCY ;;
29214	port)
29215                port_help    $MISSING_DEPENDENCY ;;
29216	pkgutil)
29217                pkgutil_help $MISSING_DEPENDENCY ;;
29218	pkgadd)
29219                pkgadd_help  $MISSING_DEPENDENCY ;;
29220    * )
29221      break ;;
29222    esac
29223
29224    if test "x$PKGHANDLER_COMMAND" != x; then
29225        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29226    fi
29227
29228    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29229fi
29230
29231# Some of the old makefiles require a setting of OPENWIN_HOME
29232# Since the X11R6 directory has disappeared on later Linuxes,
29233# we need to probe for it.
29234if test "x$OPENJDK_TARGET_OS" = xlinux; then
29235    if test -d "$SYS_ROOT/usr/X11R6"; then
29236        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29237    fi
29238    if test -d "$SYS_ROOT/usr/include/X11"; then
29239        OPENWIN_HOME="$SYS_ROOT/usr"
29240    fi
29241fi
29242if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29243    OPENWIN_HOME="/usr/openwin"
29244fi
29245
29246
29247
29248#
29249# Weird Sol10 something check...TODO change to try compile
29250#
29251if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29252  if test "`uname -r`" = "5.10"; then
29253     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29254     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29255     fi
29256  fi
29257fi
29258
29259ac_ext=c
29260ac_cpp='$CPP $CPPFLAGS'
29261ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29262ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29263ac_compiler_gnu=$ac_cv_c_compiler_gnu
29264
29265OLD_CFLAGS="$CFLAGS"
29266CFLAGS="$CFLAGS $X_CFLAGS"
29267
29268# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29269for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29270do :
29271  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29272ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29273                   # include <X11/Xutil.h>
29274
29275"
29276if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29277  cat >>confdefs.h <<_ACEOF
29278#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29279_ACEOF
29280 X11_A_OK=yes
29281else
29282  X11_A_OK=no
29283fi
29284
29285done
29286
29287
29288CFLAGS="$OLD_CFLAGS"
29289ac_ext=cpp
29290ac_cpp='$CXXCPP $CPPFLAGS'
29291ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29292ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29293ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29294
29295
29296if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29297
29298    # Print a helpful message on how to acquire the necessary build dependency.
29299    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29300    MISSING_DEPENDENCY=x11
29301    PKGHANDLER_COMMAND=
29302
29303    case $PKGHANDLER in
29304	apt-get)
29305                apt_help     $MISSING_DEPENDENCY ;;
29306    yum)
29307                yum_help     $MISSING_DEPENDENCY ;;
29308	port)
29309                port_help    $MISSING_DEPENDENCY ;;
29310	pkgutil)
29311                pkgutil_help $MISSING_DEPENDENCY ;;
29312	pkgadd)
29313                pkgadd_help  $MISSING_DEPENDENCY ;;
29314    * )
29315      break ;;
29316    esac
29317
29318    if test "x$PKGHANDLER_COMMAND" != x; then
29319        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29320    fi
29321
29322    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29323fi
29324
29325
29326
29327
29328
29329
29330###############################################################################
29331#
29332# The common unix printing system cups is used to print from java.
29333#
29334
29335# Check whether --with-cups was given.
29336if test "${with_cups+set}" = set; then :
29337  withval=$with_cups;
29338fi
29339
29340
29341# Check whether --with-cups-include was given.
29342if test "${with_cups_include+set}" = set; then :
29343  withval=$with_cups_include;
29344fi
29345
29346
29347if test "x$CUPS_NOT_NEEDED" = xyes; then
29348	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29349		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29350$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29351	fi
29352	CUPS_CFLAGS=
29353else
29354	CUPS_FOUND=no
29355
29356	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29357	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29358	fi
29359
29360	if test "x${with_cups}" != x; then
29361	    CUPS_CFLAGS="-I${with_cups}/include"
29362	    CUPS_FOUND=yes
29363	fi
29364	if test "x${with_cups_include}" != x; then
29365	    CUPS_CFLAGS="-I${with_cups_include}"
29366	    CUPS_FOUND=yes
29367	fi
29368	if test "x$CUPS_FOUND" = xno; then
29369
29370
29371    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29372        # Source the builddeps file again, to make sure it uses the latest variables!
29373        . $builddepsfile
29374        # Look for a target and build machine specific resource!
29375        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29376        if test "x$resource" = x; then
29377            # Ok, lets instead look for a target specific resource
29378            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29379        fi
29380        if test "x$resource" = x; then
29381            # Ok, lets instead look for a build specific resource
29382            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29383        fi
29384        if test "x$resource" = x; then
29385            # Ok, lets instead look for a generic resource
29386            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29387            resource=${builddep_cups}
29388        fi
29389        if test "x$resource" != x; then
29390            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29391$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29392	    # If the resource in the builddeps.conf file is an existing directory,
29393	    # for example /java/linux/cups
29394	    if test -d ${resource}; then
29395	       depdir=${resource}
29396	    else
29397
29398# cups is for example mymodule
29399# $resource is for example libs/general/libmymod_1_2_3.zip
29400# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29401# $with_builddeps_dir is for example /localhome/builddeps
29402# depdir is the name of the variable into which we store the depdir, eg MYMOD
29403# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29404# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29405    filename=`basename $resource`
29406    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29407    filebase=${filename%%.*}
29408    extension=${filename#*.}
29409    installdir=$with_builddeps_dir/$filebase
29410    if test ! -f $installdir/$filename.unpacked; then
29411        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29412$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29413        if test ! -d $installdir; then
29414            mkdir -p $installdir
29415        fi
29416        if test ! -d $installdir; then
29417            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29418        fi
29419        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29420        touch $tmpfile
29421        if test ! -f $tmpfile; then
29422            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29423        fi
29424
29425    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29426    # $tmpfile is the local file name for the downloaded file.
29427    VALID_TOOL=no
29428    if test "x$BDEPS_FTP" = xwget; then
29429       VALID_TOOL=yes
29430       wget -O $tmpfile $with_builddeps_server/$resource
29431    fi
29432    if test "x$BDEPS_FTP" = xlftp; then
29433       VALID_TOOL=yes
29434       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29435    fi
29436    if test "x$BDEPS_FTP" = xftp; then
29437        VALID_TOOL=yes
29438        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29439        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29440        FTPUSERPWD=${FTPSERVER%%@*}
29441        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29442            FTPUSER=${userpwd%%:*}
29443            FTPPWD=${userpwd#*@}
29444            FTPSERVER=${FTPSERVER#*@}
29445        else
29446            FTPUSER=ftp
29447            FTPPWD=ftp
29448        fi
29449        # the "pass" command does not work on some
29450        # ftp clients (read ftp.exe) but if it works,
29451        # passive mode is better!
29452        (\
29453            echo "user $FTPUSER $FTPPWD"        ;\
29454            echo "pass"                         ;\
29455            echo "bin"                          ;\
29456            echo "get $FTPPATH $tmpfile"              ;\
29457        ) | ftp -in $FTPSERVER
29458    fi
29459    if test "x$VALID_TOOL" != xyes; then
29460       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29461    fi
29462
29463        mv $tmpfile $installdir/$filename
29464        if test ! -s $installdir/$filename; then
29465            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29466        fi
29467        case "$extension" in
29468            zip)  echo "Unzipping $installdir/$filename..."
29469               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29470            ;;
29471            tar.gz) echo "Untaring $installdir/$filename..."
29472               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29473            ;;
29474            tgz) echo "Untaring $installdir/$filename..."
29475               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29476            ;;
29477            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29478            ;;
29479        esac
29480    fi
29481    if test -f $installdir/$filename.unpacked; then
29482        depdir=$installdir
29483    fi
29484
29485	    fi
29486            # Source the builddeps file again, because in the previous command, the depdir
29487            # was updated to point at the current build dependency install directory.
29488            . $builddepsfile
29489            # Now extract variables from the builddeps.conf files.
29490            theroot=${builddep_cups_ROOT}
29491            thecflags=${builddep_cups_CFLAGS}
29492            thelibs=${builddep_cups_LIBS}
29493            if test "x$depdir" = x; then
29494                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29495            fi
29496            CUPS=$depdir
29497            if test "x$theroot" != x; then
29498               CUPS="$theroot"
29499            fi
29500            if test "x$thecflags" != x; then
29501               CUPS_CFLAGS="$thecflags"
29502            fi
29503            if test "x$thelibs" != x; then
29504               CUPS_LIBS="$thelibs"
29505            fi
29506            CUPS_FOUND=yes
29507
29508        fi
29509
29510    fi
29511
29512	fi
29513	if test "x$CUPS_FOUND" = xno; then
29514	    # Are the cups headers installed in the default /usr/include location?
29515	    for ac_header in cups/cups.h cups/ppd.h
29516do :
29517  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29518ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29519if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29520  cat >>confdefs.h <<_ACEOF
29521#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29522_ACEOF
29523 CUPS_FOUND=yes
29524	                      CUPS_CFLAGS=
29525	                      DEFAULT_CUPS=yes
29526fi
29527
29528done
29529
29530	fi
29531	if test "x$CUPS_FOUND" = xno; then
29532	    # Getting nervous now? Lets poke around for standard Solaris third-party
29533	    # package installation locations.
29534	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29535$as_echo_n "checking for cups headers... " >&6; }
29536	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29537	       # An SFW package seems to be installed!
29538	       CUPS_FOUND=yes
29539	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29540	    elif test -s /opt/csw/include/cups/cups.h; then
29541	       # A CSW package seems to be installed!
29542	       CUPS_FOUND=yes
29543	       CUPS_CFLAGS="-I/opt/csw/include"
29544	    fi
29545	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29546$as_echo "$CUPS_FOUND" >&6; }
29547	fi
29548	if test "x$CUPS_FOUND" = xno; then
29549
29550    # Print a helpful message on how to acquire the necessary build dependency.
29551    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29552    MISSING_DEPENDENCY=cups
29553    PKGHANDLER_COMMAND=
29554
29555    case $PKGHANDLER in
29556	apt-get)
29557                apt_help     $MISSING_DEPENDENCY ;;
29558    yum)
29559                yum_help     $MISSING_DEPENDENCY ;;
29560	port)
29561                port_help    $MISSING_DEPENDENCY ;;
29562	pkgutil)
29563                pkgutil_help $MISSING_DEPENDENCY ;;
29564	pkgadd)
29565                pkgadd_help  $MISSING_DEPENDENCY ;;
29566    * )
29567      break ;;
29568    esac
29569
29570    if test "x$PKGHANDLER_COMMAND" != x; then
29571        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29572    fi
29573
29574	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29575	fi
29576fi
29577
29578
29579
29580
29581
29582
29583###############################################################################
29584#
29585# The ubiquitous freetype2 library is used to render fonts.
29586#
29587
29588# Check whether --with-freetype was given.
29589if test "${with_freetype+set}" = set; then :
29590  withval=$with_freetype;
29591fi
29592
29593
29594# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29595USING_SYSTEM_FT_LIB=false
29596
29597if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29598	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29599		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29600$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29601	fi
29602	FREETYPE2_CFLAGS=
29603	FREETYPE2_LIBS=
29604        FREETYPE2_LIB_PATH=
29605else
29606	FREETYPE2_FOUND=no
29607
29608	if test "x$with_freetype" != x; then
29609
29610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29611
29612  # Input might be given as Windows format, start by converting to
29613  # unix format.
29614  path="$with_freetype"
29615  new_path=`$CYGPATH -u "$path"`
29616
29617  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29618  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29619  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29620  # "foo.exe" is OK but "foo" is an error.
29621  #
29622  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29623  # It is also a way to make sure we got the proper file name for the real test later on.
29624  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29625  if test "x$test_shortpath" = x; then
29626    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29627$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29628    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29629  fi
29630
29631  # Call helper function which possibly converts this using DOS-style short mode.
29632  # If so, the updated path is stored in $new_path.
29633
29634  input_path="$new_path"
29635  # Check if we need to convert this using DOS-style short mode. If the path
29636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29637  # take no chances and rewrite it.
29638  # Note: m4 eats our [], so we need to use [ and ] instead.
29639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29640  if test "x$has_forbidden_chars" != x; then
29641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29645      # Going to short mode and back again did indeed matter. Since short mode is
29646      # case insensitive, let's make it lowercase to improve readability.
29647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29648      # Now convert it back to Unix-stile (cygpath)
29649      input_path=`$CYGPATH -u "$shortmode_path"`
29650      new_path="$input_path"
29651    fi
29652  fi
29653
29654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29655  if test "x$test_cygdrive_prefix" = x; then
29656    # As a simple fix, exclude /usr/bin since it's not a real path.
29657    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29659      # a path prefixed by /cygdrive for fixpath to work.
29660      new_path="$CYGWIN_ROOT_PATH$input_path"
29661    fi
29662  fi
29663
29664
29665  if test "x$path" != "x$new_path"; then
29666    with_freetype="$new_path"
29667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29668$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29669  fi
29670
29671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29672
29673  path="$with_freetype"
29674  has_colon=`$ECHO $path | $GREP ^.:`
29675  new_path="$path"
29676  if test "x$has_colon" = x; then
29677    # Not in mixed or Windows style, start by that.
29678    new_path=`cmd //c echo $path`
29679  fi
29680
29681
29682  input_path="$new_path"
29683  # Check if we need to convert this using DOS-style short mode. If the path
29684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29685  # take no chances and rewrite it.
29686  # Note: m4 eats our [], so we need to use [ and ] instead.
29687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29688  if test "x$has_forbidden_chars" != x; then
29689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29690    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29691  fi
29692
29693
29694  windows_path="$new_path"
29695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29696    unix_path=`$CYGPATH -u "$windows_path"`
29697    new_path="$unix_path"
29698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29700    new_path="$unix_path"
29701  fi
29702
29703  if test "x$path" != "x$new_path"; then
29704    with_freetype="$new_path"
29705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29706$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29707  fi
29708
29709  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29710  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29711
29712  else
29713    # We're on a posix platform. Hooray! :)
29714    path="$with_freetype"
29715
29716    if test ! -f "$path" && test ! -d "$path"; then
29717      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29718    fi
29719
29720    has_space=`$ECHO "$path" | $GREP " "`
29721    if test "x$has_space" != x; then
29722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29723$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29724      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29725    fi
29726  fi
29727
29728	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29729            FREETYPE2_LIB_PATH="$with_freetype/lib"
29730            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29731                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29732                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29733            fi
29734            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29735                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29736            fi
29737	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29738            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29739                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29740            fi
29741 	    FREETYPE2_FOUND=yes
29742   	    if test "x$FREETYPE2_FOUND" = xyes; then
29743	        # Verify that the directories exist
29744                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29745		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29746		fi
29747	        # List the contents of the lib.
29748		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29749                if test "x$FREETYPELIB" = x; then
29750		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29751		fi
29752	        # Check one h-file
29753                if ! test -s "$with_freetype/include/ft2build.h"; then
29754		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29755		fi
29756            fi
29757        fi
29758	if test "x$FREETYPE2_FOUND" = xno; then
29759
29760
29761    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29762        # Source the builddeps file again, to make sure it uses the latest variables!
29763        . $builddepsfile
29764        # Look for a target and build machine specific resource!
29765        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29766        if test "x$resource" = x; then
29767            # Ok, lets instead look for a target specific resource
29768            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29769        fi
29770        if test "x$resource" = x; then
29771            # Ok, lets instead look for a build specific resource
29772            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29773        fi
29774        if test "x$resource" = x; then
29775            # Ok, lets instead look for a generic resource
29776            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29777            resource=${builddep_freetype2}
29778        fi
29779        if test "x$resource" != x; then
29780            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29781$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29782	    # If the resource in the builddeps.conf file is an existing directory,
29783	    # for example /java/linux/cups
29784	    if test -d ${resource}; then
29785	       depdir=${resource}
29786	    else
29787
29788# freetype2 is for example mymodule
29789# $resource is for example libs/general/libmymod_1_2_3.zip
29790# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29791# $with_builddeps_dir is for example /localhome/builddeps
29792# depdir is the name of the variable into which we store the depdir, eg MYMOD
29793# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29794# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29795    filename=`basename $resource`
29796    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29797    filebase=${filename%%.*}
29798    extension=${filename#*.}
29799    installdir=$with_builddeps_dir/$filebase
29800    if test ! -f $installdir/$filename.unpacked; then
29801        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29802$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29803        if test ! -d $installdir; then
29804            mkdir -p $installdir
29805        fi
29806        if test ! -d $installdir; then
29807            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29808        fi
29809        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29810        touch $tmpfile
29811        if test ! -f $tmpfile; then
29812            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29813        fi
29814
29815    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29816    # $tmpfile is the local file name for the downloaded file.
29817    VALID_TOOL=no
29818    if test "x$BDEPS_FTP" = xwget; then
29819       VALID_TOOL=yes
29820       wget -O $tmpfile $with_builddeps_server/$resource
29821    fi
29822    if test "x$BDEPS_FTP" = xlftp; then
29823       VALID_TOOL=yes
29824       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29825    fi
29826    if test "x$BDEPS_FTP" = xftp; then
29827        VALID_TOOL=yes
29828        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29829        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29830        FTPUSERPWD=${FTPSERVER%%@*}
29831        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29832            FTPUSER=${userpwd%%:*}
29833            FTPPWD=${userpwd#*@}
29834            FTPSERVER=${FTPSERVER#*@}
29835        else
29836            FTPUSER=ftp
29837            FTPPWD=ftp
29838        fi
29839        # the "pass" command does not work on some
29840        # ftp clients (read ftp.exe) but if it works,
29841        # passive mode is better!
29842        (\
29843            echo "user $FTPUSER $FTPPWD"        ;\
29844            echo "pass"                         ;\
29845            echo "bin"                          ;\
29846            echo "get $FTPPATH $tmpfile"              ;\
29847        ) | ftp -in $FTPSERVER
29848    fi
29849    if test "x$VALID_TOOL" != xyes; then
29850       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29851    fi
29852
29853        mv $tmpfile $installdir/$filename
29854        if test ! -s $installdir/$filename; then
29855            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29856        fi
29857        case "$extension" in
29858            zip)  echo "Unzipping $installdir/$filename..."
29859               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29860            ;;
29861            tar.gz) echo "Untaring $installdir/$filename..."
29862               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29863            ;;
29864            tgz) echo "Untaring $installdir/$filename..."
29865               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29866            ;;
29867            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29868            ;;
29869        esac
29870    fi
29871    if test -f $installdir/$filename.unpacked; then
29872        depdir=$installdir
29873    fi
29874
29875	    fi
29876            # Source the builddeps file again, because in the previous command, the depdir
29877            # was updated to point at the current build dependency install directory.
29878            . $builddepsfile
29879            # Now extract variables from the builddeps.conf files.
29880            theroot=${builddep_freetype2_ROOT}
29881            thecflags=${builddep_freetype2_CFLAGS}
29882            thelibs=${builddep_freetype2_LIBS}
29883            if test "x$depdir" = x; then
29884                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29885            fi
29886            FREETYPE2=$depdir
29887            if test "x$theroot" != x; then
29888               FREETYPE2="$theroot"
29889            fi
29890            if test "x$thecflags" != x; then
29891               FREETYPE2_CFLAGS="$thecflags"
29892            fi
29893            if test "x$thelibs" != x; then
29894               FREETYPE2_LIBS="$thelibs"
29895            fi
29896            FREETYPE2_FOUND=yes
29897            else FREETYPE2_FOUND=no
29898
29899        fi
29900        else FREETYPE2_FOUND=no
29901
29902    fi
29903
29904            USING_SYSTEM_FT_LIB=true
29905	fi
29906	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29907            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29908
29909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29910
29911  # Input might be given as Windows format, start by converting to
29912  # unix format.
29913  path="$FREETYPELOCATION"
29914  new_path=`$CYGPATH -u "$path"`
29915
29916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29919  # "foo.exe" is OK but "foo" is an error.
29920  #
29921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29922  # It is also a way to make sure we got the proper file name for the real test later on.
29923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29924  if test "x$test_shortpath" = x; then
29925    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29926$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29927    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29928  fi
29929
29930  # Call helper function which possibly converts this using DOS-style short mode.
29931  # If so, the updated path is stored in $new_path.
29932
29933  input_path="$new_path"
29934  # Check if we need to convert this using DOS-style short mode. If the path
29935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29936  # take no chances and rewrite it.
29937  # Note: m4 eats our [], so we need to use [ and ] instead.
29938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29939  if test "x$has_forbidden_chars" != x; then
29940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29944      # Going to short mode and back again did indeed matter. Since short mode is
29945      # case insensitive, let's make it lowercase to improve readability.
29946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29947      # Now convert it back to Unix-stile (cygpath)
29948      input_path=`$CYGPATH -u "$shortmode_path"`
29949      new_path="$input_path"
29950    fi
29951  fi
29952
29953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29954  if test "x$test_cygdrive_prefix" = x; then
29955    # As a simple fix, exclude /usr/bin since it's not a real path.
29956    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29958      # a path prefixed by /cygdrive for fixpath to work.
29959      new_path="$CYGWIN_ROOT_PATH$input_path"
29960    fi
29961  fi
29962
29963
29964  if test "x$path" != "x$new_path"; then
29965    FREETYPELOCATION="$new_path"
29966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29967$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29968  fi
29969
29970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29971
29972  path="$FREETYPELOCATION"
29973  has_colon=`$ECHO $path | $GREP ^.:`
29974  new_path="$path"
29975  if test "x$has_colon" = x; then
29976    # Not in mixed or Windows style, start by that.
29977    new_path=`cmd //c echo $path`
29978  fi
29979
29980
29981  input_path="$new_path"
29982  # Check if we need to convert this using DOS-style short mode. If the path
29983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29984  # take no chances and rewrite it.
29985  # Note: m4 eats our [], so we need to use [ and ] instead.
29986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29987  if test "x$has_forbidden_chars" != x; then
29988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29990  fi
29991
29992
29993  windows_path="$new_path"
29994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29995    unix_path=`$CYGPATH -u "$windows_path"`
29996    new_path="$unix_path"
29997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29999    new_path="$unix_path"
30000  fi
30001
30002  if test "x$path" != "x$new_path"; then
30003    FREETYPELOCATION="$new_path"
30004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30005$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30006  fi
30007
30008  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30009  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30010
30011  else
30012    # We're on a posix platform. Hooray! :)
30013    path="$FREETYPELOCATION"
30014
30015    if test ! -f "$path" && test ! -d "$path"; then
30016      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30017    fi
30018
30019    has_space=`$ECHO "$path" | $GREP " "`
30020    if test "x$has_space" != x; then
30021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30022$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30023      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30024    fi
30025  fi
30026
30027	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30028$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30029	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30030	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30031	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30032 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30033                if ! test -s "$FREETYPE2_LIBS"; then
30034		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30035		fi
30036                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30037		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30038		fi
30039                USING_SYSTEM_FT_LIB=true
30040                FREETYPE2_FOUND=yes
30041	    fi
30042	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30043$as_echo "$FREETYPE2_FOUND" >&6; }
30044        fi
30045	if test "x$FREETYPE2_FOUND" = xno; then
30046
30047pkg_failed=no
30048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30049$as_echo_n "checking for FREETYPE2... " >&6; }
30050
30051if test -n "$FREETYPE2_CFLAGS"; then
30052    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30053 elif test -n "$PKG_CONFIG"; then
30054    if test -n "$PKG_CONFIG" && \
30055    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30056  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30057  ac_status=$?
30058  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30059  test $ac_status = 0; }; then
30060  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30061else
30062  pkg_failed=yes
30063fi
30064 else
30065    pkg_failed=untried
30066fi
30067if test -n "$FREETYPE2_LIBS"; then
30068    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30069 elif test -n "$PKG_CONFIG"; then
30070    if test -n "$PKG_CONFIG" && \
30071    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30072  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30073  ac_status=$?
30074  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30075  test $ac_status = 0; }; then
30076  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30077else
30078  pkg_failed=yes
30079fi
30080 else
30081    pkg_failed=untried
30082fi
30083
30084
30085
30086if test $pkg_failed = yes; then
30087
30088if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30089        _pkg_short_errors_supported=yes
30090else
30091        _pkg_short_errors_supported=no
30092fi
30093        if test $_pkg_short_errors_supported = yes; then
30094	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30095        else
30096	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30097        fi
30098	# Put the nasty error message in config.log where it belongs
30099	echo "$FREETYPE2_PKG_ERRORS" >&5
30100
30101	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30102$as_echo "no" >&6; }
30103                FREETYPE2_FOUND=no
30104elif test $pkg_failed = untried; then
30105	FREETYPE2_FOUND=no
30106else
30107	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30108	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30110$as_echo "yes" >&6; }
30111	FREETYPE2_FOUND=yes
30112fi
30113            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30114            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30115            USING_SYSTEM_FT_LIB=true
30116            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30117            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30118              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30119            fi
30120	fi
30121	if test "x$FREETYPE2_FOUND" = xno; then
30122	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30123$as_echo_n "checking for freetype in some standard locations... " >&6; }
30124
30125	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30126	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30127	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30128	    fi
30129	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30130	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30131	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30132	    fi
30133
30134	    PREV_CXXCFLAGS="$CXXFLAGS"
30135	    PREV_LDFLAGS="$LDFLAGS"
30136	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30137	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30138	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30139/* end confdefs.h.  */
30140#include<ft2build.h>
30141	                    #include FT_FREETYPE_H
30142	                   int main() { return 0; }
30143
30144_ACEOF
30145if ac_fn_cxx_try_link "$LINENO"; then :
30146
30147	                      # Yes, the default cflags and libs did the trick.
30148	                      FREETYPE2_FOUND=yes
30149	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30150	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30151
30152else
30153
30154	                      FREETYPE2_FOUND=no
30155
30156fi
30157rm -f core conftest.err conftest.$ac_objext \
30158    conftest$ac_exeext conftest.$ac_ext
30159            CXXCFLAGS="$PREV_CXXFLAGS"
30160	    LDFLAGS="$PREV_LDFLAGS"
30161	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30162$as_echo "$FREETYPE2_FOUND" >&6; }
30163            USING_SYSTEM_FT_LIB=true
30164	fi
30165	if test "x$FREETYPE2_FOUND" = xno; then
30166
30167    # Print a helpful message on how to acquire the necessary build dependency.
30168    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30169    MISSING_DEPENDENCY=freetype2
30170    PKGHANDLER_COMMAND=
30171
30172    case $PKGHANDLER in
30173	apt-get)
30174                apt_help     $MISSING_DEPENDENCY ;;
30175    yum)
30176                yum_help     $MISSING_DEPENDENCY ;;
30177	port)
30178                port_help    $MISSING_DEPENDENCY ;;
30179	pkgutil)
30180                pkgutil_help $MISSING_DEPENDENCY ;;
30181	pkgadd)
30182                pkgadd_help  $MISSING_DEPENDENCY ;;
30183    * )
30184      break ;;
30185    esac
30186
30187    if test "x$PKGHANDLER_COMMAND" != x; then
30188        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30189    fi
30190
30191		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30192	fi
30193
30194        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30195            # AC_CHECK_LIB does not support use of cl.exe
30196            PREV_LDFLAGS="$LDFLAGS"
30197            LDFLAGS="$FREETYPE2_LIBS"
30198            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30199$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30200if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30201  $as_echo_n "(cached) " >&6
30202else
30203  ac_check_lib_save_LIBS=$LIBS
30204LIBS="-lfreetype  $LIBS"
30205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30206/* end confdefs.h.  */
30207
30208/* Override any GCC internal prototype to avoid an error.
30209   Use char because int might match the return type of a GCC
30210   builtin and then its argument prototype would still apply.  */
30211#ifdef __cplusplus
30212extern "C"
30213#endif
30214char FT_Init_FreeType ();
30215int
30216main ()
30217{
30218return FT_Init_FreeType ();
30219  ;
30220  return 0;
30221}
30222_ACEOF
30223if ac_fn_cxx_try_link "$LINENO"; then :
30224  ac_cv_lib_freetype_FT_Init_FreeType=yes
30225else
30226  ac_cv_lib_freetype_FT_Init_FreeType=no
30227fi
30228rm -f core conftest.err conftest.$ac_objext \
30229    conftest$ac_exeext conftest.$ac_ext
30230LIBS=$ac_check_lib_save_LIBS
30231fi
30232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30233$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30234if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30235  FREETYPE2_FOUND=true
30236else
30237  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30238fi
30239
30240            LDFLAGS="$PREV_LDFLAGS"
30241        fi
30242fi
30243
30244
30245
30246
30247
30248
30249
30250
30251
30252###############################################################################
30253#
30254# Check for alsa headers and libraries. Used on Linux/GNU systems.
30255#
30256
30257# Check whether --with-alsa was given.
30258if test "${with_alsa+set}" = set; then :
30259  withval=$with_alsa;
30260fi
30261
30262
30263# Check whether --with-alsa-include was given.
30264if test "${with_alsa_include+set}" = set; then :
30265  withval=$with_alsa_include;
30266fi
30267
30268
30269# Check whether --with-alsa-lib was given.
30270if test "${with_alsa_lib+set}" = set; then :
30271  withval=$with_alsa_lib;
30272fi
30273
30274
30275if test "x$ALSA_NOT_NEEDED" = xyes; then
30276	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30277		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30278$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30279	fi
30280	ALSA_CFLAGS=
30281	ALSA_LIBS=
30282else
30283	ALSA_FOUND=no
30284
30285	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30286	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30287	fi
30288
30289	if test "x${with_alsa}" != x; then
30290	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30291	    ALSA_CFLAGS="-I${with_alsa}/include"
30292	    ALSA_FOUND=yes
30293	fi
30294	if test "x${with_alsa_include}" != x; then
30295	    ALSA_CFLAGS="-I${with_alsa_include}"
30296	    ALSA_FOUND=yes
30297	fi
30298	if test "x${with_alsa_lib}" != x; then
30299	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30300	    ALSA_FOUND=yes
30301	fi
30302	if test "x$ALSA_FOUND" = xno; then
30303
30304
30305    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30306        # Source the builddeps file again, to make sure it uses the latest variables!
30307        . $builddepsfile
30308        # Look for a target and build machine specific resource!
30309        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30310        if test "x$resource" = x; then
30311            # Ok, lets instead look for a target specific resource
30312            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30313        fi
30314        if test "x$resource" = x; then
30315            # Ok, lets instead look for a build specific resource
30316            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30317        fi
30318        if test "x$resource" = x; then
30319            # Ok, lets instead look for a generic resource
30320            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30321            resource=${builddep_alsa}
30322        fi
30323        if test "x$resource" != x; then
30324            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30325$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30326	    # If the resource in the builddeps.conf file is an existing directory,
30327	    # for example /java/linux/cups
30328	    if test -d ${resource}; then
30329	       depdir=${resource}
30330	    else
30331
30332# alsa is for example mymodule
30333# $resource is for example libs/general/libmymod_1_2_3.zip
30334# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30335# $with_builddeps_dir is for example /localhome/builddeps
30336# depdir is the name of the variable into which we store the depdir, eg MYMOD
30337# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30338# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30339    filename=`basename $resource`
30340    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30341    filebase=${filename%%.*}
30342    extension=${filename#*.}
30343    installdir=$with_builddeps_dir/$filebase
30344    if test ! -f $installdir/$filename.unpacked; then
30345        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30346$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30347        if test ! -d $installdir; then
30348            mkdir -p $installdir
30349        fi
30350        if test ! -d $installdir; then
30351            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30352        fi
30353        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30354        touch $tmpfile
30355        if test ! -f $tmpfile; then
30356            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30357        fi
30358
30359    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30360    # $tmpfile is the local file name for the downloaded file.
30361    VALID_TOOL=no
30362    if test "x$BDEPS_FTP" = xwget; then
30363       VALID_TOOL=yes
30364       wget -O $tmpfile $with_builddeps_server/$resource
30365    fi
30366    if test "x$BDEPS_FTP" = xlftp; then
30367       VALID_TOOL=yes
30368       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30369    fi
30370    if test "x$BDEPS_FTP" = xftp; then
30371        VALID_TOOL=yes
30372        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30373        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30374        FTPUSERPWD=${FTPSERVER%%@*}
30375        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30376            FTPUSER=${userpwd%%:*}
30377            FTPPWD=${userpwd#*@}
30378            FTPSERVER=${FTPSERVER#*@}
30379        else
30380            FTPUSER=ftp
30381            FTPPWD=ftp
30382        fi
30383        # the "pass" command does not work on some
30384        # ftp clients (read ftp.exe) but if it works,
30385        # passive mode is better!
30386        (\
30387            echo "user $FTPUSER $FTPPWD"        ;\
30388            echo "pass"                         ;\
30389            echo "bin"                          ;\
30390            echo "get $FTPPATH $tmpfile"              ;\
30391        ) | ftp -in $FTPSERVER
30392    fi
30393    if test "x$VALID_TOOL" != xyes; then
30394       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30395    fi
30396
30397        mv $tmpfile $installdir/$filename
30398        if test ! -s $installdir/$filename; then
30399            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30400        fi
30401        case "$extension" in
30402            zip)  echo "Unzipping $installdir/$filename..."
30403               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30404            ;;
30405            tar.gz) echo "Untaring $installdir/$filename..."
30406               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30407            ;;
30408            tgz) echo "Untaring $installdir/$filename..."
30409               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30410            ;;
30411            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30412            ;;
30413        esac
30414    fi
30415    if test -f $installdir/$filename.unpacked; then
30416        depdir=$installdir
30417    fi
30418
30419	    fi
30420            # Source the builddeps file again, because in the previous command, the depdir
30421            # was updated to point at the current build dependency install directory.
30422            . $builddepsfile
30423            # Now extract variables from the builddeps.conf files.
30424            theroot=${builddep_alsa_ROOT}
30425            thecflags=${builddep_alsa_CFLAGS}
30426            thelibs=${builddep_alsa_LIBS}
30427            if test "x$depdir" = x; then
30428                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30429            fi
30430            ALSA=$depdir
30431            if test "x$theroot" != x; then
30432               ALSA="$theroot"
30433            fi
30434            if test "x$thecflags" != x; then
30435               ALSA_CFLAGS="$thecflags"
30436            fi
30437            if test "x$thelibs" != x; then
30438               ALSA_LIBS="$thelibs"
30439            fi
30440            ALSA_FOUND=yes
30441            else ALSA_FOUND=no
30442
30443        fi
30444        else ALSA_FOUND=no
30445
30446    fi
30447
30448	fi
30449	if test "x$ALSA_FOUND" = xno; then
30450
30451pkg_failed=no
30452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30453$as_echo_n "checking for ALSA... " >&6; }
30454
30455if test -n "$ALSA_CFLAGS"; then
30456    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30457 elif test -n "$PKG_CONFIG"; then
30458    if test -n "$PKG_CONFIG" && \
30459    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30460  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30461  ac_status=$?
30462  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30463  test $ac_status = 0; }; then
30464  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30465else
30466  pkg_failed=yes
30467fi
30468 else
30469    pkg_failed=untried
30470fi
30471if test -n "$ALSA_LIBS"; then
30472    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30473 elif test -n "$PKG_CONFIG"; then
30474    if test -n "$PKG_CONFIG" && \
30475    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30476  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30477  ac_status=$?
30478  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30479  test $ac_status = 0; }; then
30480  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30481else
30482  pkg_failed=yes
30483fi
30484 else
30485    pkg_failed=untried
30486fi
30487
30488
30489
30490if test $pkg_failed = yes; then
30491
30492if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30493        _pkg_short_errors_supported=yes
30494else
30495        _pkg_short_errors_supported=no
30496fi
30497        if test $_pkg_short_errors_supported = yes; then
30498	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30499        else
30500	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30501        fi
30502	# Put the nasty error message in config.log where it belongs
30503	echo "$ALSA_PKG_ERRORS" >&5
30504
30505	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30506$as_echo "no" >&6; }
30507                ALSA_FOUND=no
30508elif test $pkg_failed = untried; then
30509	ALSA_FOUND=no
30510else
30511	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30512	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30514$as_echo "yes" >&6; }
30515	ALSA_FOUND=yes
30516fi
30517	fi
30518	if test "x$ALSA_FOUND" = xno; then
30519	    for ac_header in alsa/asoundlib.h
30520do :
30521  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30522if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
30523  cat >>confdefs.h <<_ACEOF
30524#define HAVE_ALSA_ASOUNDLIB_H 1
30525_ACEOF
30526 ALSA_FOUND=yes
30527	                      ALSA_CFLAGS=-Iignoreme
30528	                      ALSA_LIBS=-lasound
30529	                      DEFAULT_ALSA=yes
30530else
30531  ALSA_FOUND=no
30532fi
30533
30534done
30535
30536	fi
30537	if test "x$ALSA_FOUND" = xno; then
30538
30539    # Print a helpful message on how to acquire the necessary build dependency.
30540    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30541    MISSING_DEPENDENCY=alsa
30542    PKGHANDLER_COMMAND=
30543
30544    case $PKGHANDLER in
30545	apt-get)
30546                apt_help     $MISSING_DEPENDENCY ;;
30547    yum)
30548                yum_help     $MISSING_DEPENDENCY ;;
30549	port)
30550                port_help    $MISSING_DEPENDENCY ;;
30551	pkgutil)
30552                pkgutil_help $MISSING_DEPENDENCY ;;
30553	pkgadd)
30554                pkgadd_help  $MISSING_DEPENDENCY ;;
30555    * )
30556      break ;;
30557    esac
30558
30559    if test "x$PKGHANDLER_COMMAND" != x; then
30560        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30561    fi
30562
30563	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30564	fi
30565fi
30566
30567
30568
30569
30570
30571
30572
30573###############################################################################
30574#
30575# Check for the jpeg library
30576#
30577
30578USE_EXTERNAL_LIBJPEG=true
30579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30580$as_echo_n "checking for main in -ljpeg... " >&6; }
30581if test "${ac_cv_lib_jpeg_main+set}" = set; then :
30582  $as_echo_n "(cached) " >&6
30583else
30584  ac_check_lib_save_LIBS=$LIBS
30585LIBS="-ljpeg  $LIBS"
30586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30587/* end confdefs.h.  */
30588
30589
30590int
30591main ()
30592{
30593return main ();
30594  ;
30595  return 0;
30596}
30597_ACEOF
30598if ac_fn_cxx_try_link "$LINENO"; then :
30599  ac_cv_lib_jpeg_main=yes
30600else
30601  ac_cv_lib_jpeg_main=no
30602fi
30603rm -f core conftest.err conftest.$ac_objext \
30604    conftest$ac_exeext conftest.$ac_ext
30605LIBS=$ac_check_lib_save_LIBS
30606fi
30607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30608$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30609if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
30610  cat >>confdefs.h <<_ACEOF
30611#define HAVE_LIBJPEG 1
30612_ACEOF
30613
30614  LIBS="-ljpeg $LIBS"
30615
30616else
30617   USE_EXTERNAL_LIBJPEG=false
30618               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30619$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30620
30621fi
30622
30623
30624
30625###############################################################################
30626#
30627# Check for the gif library
30628#
30629
30630USE_EXTERNAL_LIBJPEG=true
30631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30632$as_echo_n "checking for main in -lgif... " >&6; }
30633if test "${ac_cv_lib_gif_main+set}" = set; then :
30634  $as_echo_n "(cached) " >&6
30635else
30636  ac_check_lib_save_LIBS=$LIBS
30637LIBS="-lgif  $LIBS"
30638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30639/* end confdefs.h.  */
30640
30641
30642int
30643main ()
30644{
30645return main ();
30646  ;
30647  return 0;
30648}
30649_ACEOF
30650if ac_fn_cxx_try_link "$LINENO"; then :
30651  ac_cv_lib_gif_main=yes
30652else
30653  ac_cv_lib_gif_main=no
30654fi
30655rm -f core conftest.err conftest.$ac_objext \
30656    conftest$ac_exeext conftest.$ac_ext
30657LIBS=$ac_check_lib_save_LIBS
30658fi
30659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30660$as_echo "$ac_cv_lib_gif_main" >&6; }
30661if test "x$ac_cv_lib_gif_main" = x""yes; then :
30662  cat >>confdefs.h <<_ACEOF
30663#define HAVE_LIBGIF 1
30664_ACEOF
30665
30666  LIBS="-lgif $LIBS"
30667
30668else
30669   USE_EXTERNAL_LIBGIF=false
30670               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30671$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30672
30673fi
30674
30675
30676
30677###############################################################################
30678#
30679# Check for the zlib library
30680#
30681
30682
30683# Check whether --with-zlib was given.
30684if test "${with_zlib+set}" = set; then :
30685  withval=$with_zlib;
30686fi
30687
30688
30689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30690$as_echo_n "checking for compress in -lz... " >&6; }
30691if test "${ac_cv_lib_z_compress+set}" = set; then :
30692  $as_echo_n "(cached) " >&6
30693else
30694  ac_check_lib_save_LIBS=$LIBS
30695LIBS="-lz  $LIBS"
30696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30697/* end confdefs.h.  */
30698
30699/* Override any GCC internal prototype to avoid an error.
30700   Use char because int might match the return type of a GCC
30701   builtin and then its argument prototype would still apply.  */
30702#ifdef __cplusplus
30703extern "C"
30704#endif
30705char compress ();
30706int
30707main ()
30708{
30709return compress ();
30710  ;
30711  return 0;
30712}
30713_ACEOF
30714if ac_fn_cxx_try_link "$LINENO"; then :
30715  ac_cv_lib_z_compress=yes
30716else
30717  ac_cv_lib_z_compress=no
30718fi
30719rm -f core conftest.err conftest.$ac_objext \
30720    conftest$ac_exeext conftest.$ac_ext
30721LIBS=$ac_check_lib_save_LIBS
30722fi
30723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30724$as_echo "$ac_cv_lib_z_compress" >&6; }
30725if test "x$ac_cv_lib_z_compress" = x""yes; then :
30726   ZLIB_FOUND=yes
30727else
30728   ZLIB_FOUND=no
30729fi
30730
30731
30732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30733$as_echo_n "checking for which zlib to use... " >&6; }
30734
30735DEFAULT_ZLIB=bundled
30736if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30737#
30738# On macosx default is system...on others default is
30739#
30740    DEFAULT_ZLIB=system
30741fi
30742
30743if test "x${ZLIB_FOUND}" != "xyes"; then
30744#
30745# If we don't find any system...set default to bundled
30746#
30747    DEFAULT_ZLIB=bundled
30748fi
30749
30750#
30751# If user didn't specify, use DEFAULT_ZLIB
30752#
30753if test "x${with_zlib}" = "x"; then
30754    with_zlib=${DEFAULT_ZLIB}
30755fi
30756
30757if test "x${with_zlib}" = "xbundled"; then
30758    USE_EXTERNAL_LIBZ=false
30759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30760$as_echo "bundled" >&6; }
30761elif test "x${with_zlib}" = "xsystem"; then
30762    if test "x${ZLIB_FOUND}" = "xyes"; then
30763        USE_EXTERNAL_LIBZ=true
30764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30765$as_echo "system" >&6; }
30766    else
30767        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30768$as_echo "system not found" >&6; }
30769        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30770    fi
30771else
30772    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30773fi
30774
30775
30776
30777###############################################################################
30778LIBZIP_CAN_USE_MMAP=true
30779
30780
30781
30782###############################################################################
30783#
30784# Check if altzone exists in time.h
30785#
30786
30787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30788/* end confdefs.h.  */
30789#include <time.h>
30790int
30791main ()
30792{
30793return (int)altzone;
30794  ;
30795  return 0;
30796}
30797_ACEOF
30798if ac_fn_cxx_try_link "$LINENO"; then :
30799  has_altzone=yes
30800else
30801  has_altzone=no
30802fi
30803rm -f core conftest.err conftest.$ac_objext \
30804    conftest$ac_exeext conftest.$ac_ext
30805if test "x$has_altzone" = xyes; then
30806
30807$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30808
30809fi
30810
30811###############################################################################
30812#
30813# Check the maths library
30814#
30815
30816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30817$as_echo_n "checking for cos in -lm... " >&6; }
30818if test "${ac_cv_lib_m_cos+set}" = set; then :
30819  $as_echo_n "(cached) " >&6
30820else
30821  ac_check_lib_save_LIBS=$LIBS
30822LIBS="-lm  $LIBS"
30823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30824/* end confdefs.h.  */
30825
30826/* Override any GCC internal prototype to avoid an error.
30827   Use char because int might match the return type of a GCC
30828   builtin and then its argument prototype would still apply.  */
30829#ifdef __cplusplus
30830extern "C"
30831#endif
30832char cos ();
30833int
30834main ()
30835{
30836return cos ();
30837  ;
30838  return 0;
30839}
30840_ACEOF
30841if ac_fn_cxx_try_link "$LINENO"; then :
30842  ac_cv_lib_m_cos=yes
30843else
30844  ac_cv_lib_m_cos=no
30845fi
30846rm -f core conftest.err conftest.$ac_objext \
30847    conftest$ac_exeext conftest.$ac_ext
30848LIBS=$ac_check_lib_save_LIBS
30849fi
30850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30851$as_echo "$ac_cv_lib_m_cos" >&6; }
30852if test "x$ac_cv_lib_m_cos" = x""yes; then :
30853  cat >>confdefs.h <<_ACEOF
30854#define HAVE_LIBM 1
30855_ACEOF
30856
30857  LIBS="-lm $LIBS"
30858
30859else
30860
30861                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30862$as_echo "$as_me: Maths library was not found" >&6;}
30863
30864fi
30865
30866
30867
30868###############################################################################
30869#
30870# Check for libdl.so
30871
30872save_LIBS="$LIBS"
30873LIBS=""
30874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30875$as_echo_n "checking for dlopen in -ldl... " >&6; }
30876if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30877  $as_echo_n "(cached) " >&6
30878else
30879  ac_check_lib_save_LIBS=$LIBS
30880LIBS="-ldl  $LIBS"
30881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30882/* end confdefs.h.  */
30883
30884/* Override any GCC internal prototype to avoid an error.
30885   Use char because int might match the return type of a GCC
30886   builtin and then its argument prototype would still apply.  */
30887#ifdef __cplusplus
30888extern "C"
30889#endif
30890char dlopen ();
30891int
30892main ()
30893{
30894return dlopen ();
30895  ;
30896  return 0;
30897}
30898_ACEOF
30899if ac_fn_cxx_try_link "$LINENO"; then :
30900  ac_cv_lib_dl_dlopen=yes
30901else
30902  ac_cv_lib_dl_dlopen=no
30903fi
30904rm -f core conftest.err conftest.$ac_objext \
30905    conftest$ac_exeext conftest.$ac_ext
30906LIBS=$ac_check_lib_save_LIBS
30907fi
30908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30909$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30910if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30911  cat >>confdefs.h <<_ACEOF
30912#define HAVE_LIBDL 1
30913_ACEOF
30914
30915  LIBS="-ldl $LIBS"
30916
30917fi
30918
30919LIBDL="$LIBS"
30920
30921LIBS="$save_LIBS"
30922
30923
30924
30925###############################################################################
30926#
30927# statically link libstdc++ before C++ ABI is stablized on Linux unless
30928# dynamic build is configured on command line.
30929#
30930
30931# Check whether --with-stdc++lib was given.
30932if test "${with_stdc__lib+set}" = set; then :
30933  withval=$with_stdc__lib;
30934    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30935        && test "x$with_stdc__lib" != xdefault; then
30936      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
30937    fi
30938
30939else
30940  with_stdc__lib=default
30941
30942fi
30943
30944
30945if test "x$OPENJDK_TARGET_OS" = xlinux; then
30946    # Test if -lstdc++ works.
30947    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
30948$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
30949    ac_ext=cpp
30950ac_cpp='$CXXCPP $CPPFLAGS'
30951ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30952ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30953ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30954
30955    OLD_CXXFLAGS="$CXXFLAGS"
30956    CXXFLAGS="$CXXFLAGS -lstdc++"
30957    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30958/* end confdefs.h.  */
30959
30960int
30961main ()
30962{
30963return 0;
30964  ;
30965  return 0;
30966}
30967_ACEOF
30968if ac_fn_cxx_try_link "$LINENO"; then :
30969  has_dynamic_libstdcxx=yes
30970else
30971  has_dynamic_libstdcxx=no
30972fi
30973rm -f core conftest.err conftest.$ac_objext \
30974    conftest$ac_exeext conftest.$ac_ext
30975    CXXFLAGS="$OLD_CXXFLAGS"
30976    ac_ext=cpp
30977ac_cpp='$CXXCPP $CPPFLAGS'
30978ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30979ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30980ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30981
30982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
30983$as_echo "$has_dynamic_libstdcxx" >&6; }
30984
30985    # Test if stdc++ can be linked statically.
30986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
30987$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
30988    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
30989    ac_ext=cpp
30990ac_cpp='$CXXCPP $CPPFLAGS'
30991ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30992ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30993ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30994
30995    OLD_LIBS="$LIBS"
30996    OLD_CXX="$CXX"
30997    LIBS="$STATIC_STDCXX_FLAGS"
30998    CXX="$CC"
30999    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31000/* end confdefs.h.  */
31001
31002int
31003main ()
31004{
31005return 0;
31006  ;
31007  return 0;
31008}
31009_ACEOF
31010if ac_fn_cxx_try_link "$LINENO"; then :
31011  has_static_libstdcxx=yes
31012else
31013  has_static_libstdcxx=no
31014fi
31015rm -f core conftest.err conftest.$ac_objext \
31016    conftest$ac_exeext conftest.$ac_ext
31017    LIBS="$OLD_LIBS"
31018    CXX="$OLD_CXX"
31019    ac_ext=cpp
31020ac_cpp='$CXXCPP $CPPFLAGS'
31021ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31022ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31023ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31024
31025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31026$as_echo "$has_static_libstdcxx" >&6; }
31027
31028    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31029        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31030    fi
31031
31032    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31033        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31034    fi
31035
31036    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31037        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31038    fi
31039
31040    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31041$as_echo_n "checking how to link with libstdc++... " >&6; }
31042    # If dynamic was requested, it's available since it would fail above otherwise.
31043    # If dynamic wasn't requested, go with static unless it isn't available.
31044    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31045        LIBCXX="$LIBCXX -lstdc++"
31046        LDCXX="$CXX"
31047        STATIC_CXX_SETTING="STATIC_CXX=false"
31048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31049$as_echo "dynamic" >&6; }
31050    else
31051        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31052        LDCXX="$CC"
31053        STATIC_CXX_SETTING="STATIC_CXX=true"
31054        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31055$as_echo "static" >&6; }
31056    fi
31057fi
31058
31059
31060# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31061if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31062    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31063fi
31064
31065# TODO better (platform agnostic) test
31066if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31067    LIBCXX="-lstdc++"
31068fi
31069
31070
31071
31072
31073
31074# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31075
31076# When using cygwin or msys, we need a wrapper binary that renames
31077# /cygdrive/c/ arguments into c:/ arguments and peeks into
31078# @files and rewrites these too! This wrapper binary is
31079# called fixpath.
31080FIXPATH=
31081if test "x$OPENJDK_BUILD_OS" = xwindows; then
31082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31083$as_echo_n "checking if fixpath can be created... " >&6; }
31084    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31085    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31086    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31087      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31088      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31089      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31090      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31091    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31092      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31093      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31094
31095      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31096      # @ was chosen as separator to minimize risk of other tools messing around with it
31097      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31098      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31099
31100      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31101    fi
31102    rm -f $OUTPUT_ROOT/fixpath*
31103    cd $OUTPUT_ROOT
31104    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31105    cd $CURDIR
31106
31107    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31109$as_echo "no" >&6; }
31110        cat $OUTPUT_ROOT/fixpath1.log
31111        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31112    fi
31113    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31114$as_echo "yes" >&6; }
31115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31116$as_echo_n "checking if fixpath.exe works... " >&6; }
31117    cd $OUTPUT_ROOT
31118    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31119    cd $CURDIR
31120    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31122$as_echo "no" >&6; }
31123        cat $OUTPUT_ROOT/fixpath2.log
31124        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31125    fi
31126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31127$as_echo "yes" >&6; }
31128    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31129fi
31130
31131
31132
31133
31134###############################################################################
31135#
31136# We need to do some final tweaking, when everything else is done.
31137#
31138###############################################################################
31139
31140
31141HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31142
31143
31144# The name of the Service Agent jar.
31145SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31146if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31147    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31148fi
31149
31150
31151
31152
31153###############################################################################
31154#
31155# Configure parts of the build that only affect the build performance,
31156# not the result.
31157#
31158###############################################################################
31159
31160
31161# How many cores do we have on this build system?
31162
31163# Check whether --with-num-cores was given.
31164if test "${with_num_cores+set}" = set; then :
31165  withval=$with_num_cores;
31166fi
31167
31168if test "x$with_num_cores" = x; then
31169    # The number of cores were not specified, try to probe them.
31170
31171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31172$as_echo_n "checking for number of cores... " >&6; }
31173    NUM_CORES=1
31174    FOUND_CORES=no
31175
31176    if test -f /proc/cpuinfo; then
31177        # Looks like a Linux (or cygwin) system
31178        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31179        FOUND_CORES=yes
31180    elif test -x /usr/sbin/psrinfo; then
31181        # Looks like a Solaris system
31182        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31183        FOUND_CORES=yes
31184    elif test -x /usr/sbin/system_profiler; then
31185        # Looks like a MacOSX system
31186        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31187        FOUND_CORES=yes
31188    elif test -n "$NUMBER_OF_PROCESSORS"; then
31189        # On windows, look in the env
31190        NUM_CORES=$NUMBER_OF_PROCESSORS
31191        FOUND_CORES=yes
31192    fi
31193
31194    # For c/c++ code we run twice as many concurrent build
31195    # jobs than we have cores, otherwise we will stall on io.
31196    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31197
31198    if test "x$FOUND_CORES" = xyes; then
31199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31200$as_echo "$NUM_CORES" >&6; }
31201    else
31202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31203$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31204        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31205$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31206    fi
31207
31208
31209else
31210    NUM_CORES=$with_num_cores
31211    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31212fi
31213
31214
31215
31216
31217# How much memory do we have on this build system?
31218
31219# Check whether --with-memory-size was given.
31220if test "${with_memory_size+set}" = set; then :
31221  withval=$with_memory_size;
31222fi
31223
31224if test "x$with_memory_size" = x; then
31225    # The memory size was not specified, try to probe it.
31226
31227    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31228$as_echo_n "checking for memory size... " >&6; }
31229    # Default to 1024 MB
31230    MEMORY_SIZE=1024
31231    FOUND_MEM=no
31232
31233    if test -f /proc/meminfo; then
31234        # Looks like a Linux (or cygwin) system
31235        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31236        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31237        FOUND_MEM=yes
31238    elif test -x /usr/sbin/prtconf; then
31239        # Looks like a Solaris system
31240        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31241        FOUND_MEM=yes
31242    elif test -x /usr/sbin/system_profiler; then
31243        # Looks like a MacOSX system
31244        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31245        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31246        FOUND_MEM=yes
31247    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31248        # Windows, but without cygwin
31249        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31250        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31251        FOUND_MEM=yes
31252    fi
31253
31254    if test "x$FOUND_MEM" = xyes; then
31255        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31256$as_echo "$MEMORY_SIZE MB" >&6; }
31257    else
31258        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31259$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31260        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31261$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31262    fi
31263
31264else
31265    MEMORY_SIZE=$with_memory_size
31266fi
31267
31268
31269
31270# Setup smart javac (after cores and memory have been setup)
31271
31272
31273# Check whether --with-sjavac-server-java was given.
31274if test "${with_sjavac_server_java+set}" = set; then :
31275  withval=$with_sjavac_server_java;
31276fi
31277
31278
31279if test "x$with_sjavac_server_java" != x; then
31280    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31281    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31282    if test "x$FOUND_VERSION" = x; then
31283        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31284    fi
31285else
31286    SJAVAC_SERVER_JAVA=""
31287    # Hotspot specific options.
31288
31289    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31290    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31291    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31292    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31293    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31294        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31295    fi
31296
31297    # JRockit specific options.
31298
31299    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31300    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31301    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31302    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31303    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31304        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31305    fi
31306
31307    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31308fi
31309
31310
31311
31312# Check whether --with-sjavac-server-cores was given.
31313if test "${with_sjavac_server_cores+set}" = set; then :
31314  withval=$with_sjavac_server_cores;
31315fi
31316
31317if test "x$with_sjavac_server_cores" != x; then
31318    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31319else
31320    if test "$NUM_CORES" -gt 16; then
31321        # We set this arbitrary limit because we want to limit the heap
31322        # size of the javac server.
31323        # In the future we will make the javac compilers in the server
31324        # share more and more state, thus enabling us to use more and
31325        # more concurrent threads in the server.
31326        SJAVAC_SERVER_CORES="16"
31327    else
31328        SJAVAC_SERVER_CORES="$NUM_CORES"
31329    fi
31330
31331    if test "$MEMORY_SIZE" -gt "17000"; then
31332        MAX_HEAP_MEM=10000
31333
31334    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31335    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31336    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31337    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31338    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31339        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31340    fi
31341
31342
31343    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31344    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31345    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31346    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31347    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31348        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31349    fi
31350
31351    elif test "$MEMORY_SIZE" -gt "10000"; then
31352        MAX_HEAP_MEM=6000
31353
31354    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31355    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31356    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31357    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31358    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31359        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31360    fi
31361
31362
31363    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31364    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31365    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31366    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31367    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31368        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31369    fi
31370
31371    elif test "$MEMORY_SIZE" -gt "5000"; then
31372        MAX_HEAP_MEM=3000
31373
31374    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31375    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31376    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31377    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31378    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31379        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31380    fi
31381
31382
31383    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31384    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31385    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31386    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31387    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31388        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31389    fi
31390
31391    elif test "$MEMORY_SIZE" -gt "3800"; then
31392        MAX_HEAP_MEM=2500
31393
31394    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31395    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31396    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31397    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31398    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31399        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31400    fi
31401
31402    elif test "$MEMORY_SIZE" -gt "1900"; then
31403        MAX_HEAP_MEM=1200
31404
31405    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31406    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31407    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31408    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31409    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31410        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31411    fi
31412
31413    elif test "$MEMORY_SIZE" -gt "1000"; then
31414        MAX_HEAP_MEM=900
31415
31416    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31417    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31418    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31419    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31420    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31421        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31422    fi
31423
31424    else
31425        MAX_HEAP_MEM=512
31426
31427    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31428    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31429    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31430    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31431    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31432        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31433    fi
31434
31435    fi
31436
31437
31438    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31439    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31440    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31441    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31442    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31443        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31444    fi
31445
31446
31447    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31448    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31449    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31450    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31451    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31452        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31453    fi
31454
31455
31456    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31457    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31458    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31459    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31460    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31461        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31462    fi
31463
31464
31465    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31466    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31467        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31468$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31469        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31471$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31472    fi
31473fi
31474
31475
31476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31477$as_echo_n "checking whether to use sjavac... " >&6; }
31478# Check whether --enable-sjavac was given.
31479if test "${enable_sjavac+set}" = set; then :
31480  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31481else
31482  ENABLE_SJAVAC='no'
31483fi
31484
31485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31486$as_echo "$ENABLE_SJAVAC" >&6; }
31487
31488
31489if test "x$ENABLE_SJAVAC" = xyes; then
31490    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31491else
31492    SJAVAC_SERVER_DIR=
31493fi
31494
31495
31496
31497
31498# Can the C/C++ compiler use precompiled headers?
31499
31500
31501###############################################################################
31502#
31503# Can the C/C++ compiler use precompiled headers?
31504#
31505# Check whether --enable-precompiled-headers was given.
31506if test "${enable_precompiled_headers+set}" = set; then :
31507  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31508else
31509  ENABLE_PRECOMPH=yes
31510fi
31511
31512
31513USE_PRECOMPILED_HEADER=1
31514if test "x$ENABLE_PRECOMPH" = xno; then
31515    USE_PRECOMPILED_HEADER=0
31516fi
31517
31518if test "x$ENABLE_PRECOMPH" = xyes; then
31519    # Check that the compiler actually supports precomp headers.
31520    if test "x$GCC" = xyes; then
31521         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31522$as_echo_n "checking that precompiled headers work... " >&6; }
31523         echo "int alfa();" > conftest.h
31524         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31525         if test ! -f conftest.hpp.gch; then
31526             USE_PRECOMPILED_HEADER=0
31527             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31528$as_echo "no" >&6; }
31529         else
31530             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31531$as_echo "yes" >&6; }
31532         fi
31533         rm -f conftest.h conftest.hpp.gch
31534    fi
31535fi
31536
31537
31538
31539
31540# Setup use of ccache, if available
31541
31542    # Check whether --enable-ccache was given.
31543if test "${enable_ccache+set}" = set; then :
31544  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31545else
31546  ENABLE_CCACHE=yes
31547fi
31548
31549    if test "x$ENABLE_CCACHE" = xyes; then
31550        # Extract the first word of "ccache", so it can be a program name with args.
31551set dummy ccache; ac_word=$2
31552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31553$as_echo_n "checking for $ac_word... " >&6; }
31554if test "${ac_cv_path_CCACHE+set}" = set; then :
31555  $as_echo_n "(cached) " >&6
31556else
31557  case $CCACHE in
31558  [\\/]* | ?:[\\/]*)
31559  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31560  ;;
31561  *)
31562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31563for as_dir in $PATH
31564do
31565  IFS=$as_save_IFS
31566  test -z "$as_dir" && as_dir=.
31567    for ac_exec_ext in '' $ac_executable_extensions; do
31568  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31569    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31571    break 2
31572  fi
31573done
31574  done
31575IFS=$as_save_IFS
31576
31577  ;;
31578esac
31579fi
31580CCACHE=$ac_cv_path_CCACHE
31581if test -n "$CCACHE"; then
31582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31583$as_echo "$CCACHE" >&6; }
31584else
31585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31586$as_echo "no" >&6; }
31587fi
31588
31589
31590    else
31591        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31592$as_echo_n "checking for ccache... " >&6; }
31593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31594$as_echo "explicitly disabled" >&6; }
31595        CCACHE=
31596    fi
31597
31598
31599
31600# Check whether --with-ccache-dir was given.
31601if test "${with_ccache_dir+set}" = set; then :
31602  withval=$with_ccache_dir;
31603fi
31604
31605
31606    if test "x$with_ccache_dir" != x; then
31607        # When using a non home ccache directory, assume the use is to share ccache files
31608        # with other users. Thus change the umask.
31609        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31610    fi
31611    CCACHE_FOUND=""
31612    if test "x$CCACHE" != x; then
31613
31614    if test "x$CCACHE" != x; then
31615        CCACHE_FOUND="true"
31616        # Only use ccache if it is 3.1.4 or later, which supports
31617        # precompiled headers.
31618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31619$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31620        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31621        if test "x$HAS_GOOD_CCACHE" = x; then
31622            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31623$as_echo "no, disabling ccache" >&6; }
31624            CCACHE=
31625        else
31626            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31627$as_echo "yes" >&6; }
31628            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31629$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31630            PUSHED_FLAGS="$CXXFLAGS"
31631            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31632            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31633/* end confdefs.h.  */
31634
31635int
31636main ()
31637{
31638
31639  ;
31640  return 0;
31641}
31642_ACEOF
31643if ac_fn_cxx_try_compile "$LINENO"; then :
31644  CC_KNOWS_CCACHE_TRICK=yes
31645else
31646  CC_KNOWS_CCACHE_TRICK=no
31647fi
31648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31649            CXXFLAGS="$PUSHED_FLAGS"
31650            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31651                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31652$as_echo "yes" >&6; }
31653            else
31654                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31655$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31656                CCACHE=
31657            fi
31658        fi
31659    fi
31660
31661    if test "x$CCACHE" != x; then
31662        CCACHE_SLOPPINESS=time_macros
31663        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31664        CCACHE_FLAGS=-fpch-preprocess
31665
31666        if test "x$SET_CCACHE_DIR" != x; then
31667            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31668	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31669        fi
31670    fi
31671
31672    fi
31673
31674
31675###############################################################################
31676#
31677# And now the finish...
31678#
31679###############################################################################
31680
31681# Check for some common pitfalls
31682
31683  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31684    file_to_test="$SRC_ROOT/LICENSE"
31685    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31686      as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5
31687    fi
31688  fi
31689
31690
31691
31692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31693$as_echo_n "checking if build directory is on local disk... " >&6; }
31694
31695	# df -l lists only local disks; if the given directory is not found then
31696	# a non-zero exit code is given
31697  if test "x$DF" = x; then
31698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31699      # msys does not have df; use Windows "net use" instead.
31700      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31701      if test "x$IS_NETWORK_DISK" = x; then
31702        OUTPUT_DIR_IS_LOCAL="yes"
31703      else
31704        OUTPUT_DIR_IS_LOCAL="no"
31705      fi
31706    else
31707      # No df here, say it's local
31708      OUTPUT_DIR_IS_LOCAL="yes"
31709    fi
31710  else
31711    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31712      OUTPUT_DIR_IS_LOCAL="yes"
31713    else
31714      OUTPUT_DIR_IS_LOCAL="no"
31715    fi
31716  fi
31717
31718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31719$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31720
31721
31722
31723# Check if the user has any old-style ALT_ variables set.
31724FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31725
31726# Before generating output files, test if they exist. If they do, this is a reconfigure.
31727# Since we can't properly handle the dependencies for this, warn the user about the situation
31728if test -e $OUTPUT_ROOT/spec.gmk; then
31729  IS_RECONFIGURE=yes
31730else
31731  IS_RECONFIGURE=no
31732fi
31733
31734if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31735  HIDE_PERFORMANCE_HINTS=yes
31736else
31737  HIDE_PERFORMANCE_HINTS=no
31738  # Hide it the next time around...
31739  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31740fi
31741
31742
31743
31744# At the end, call the custom hook. (Dummy macro if no custom sources available)
31745
31746
31747# We're messing a bit with internal autoconf variables to put the config.status
31748# in the output directory instead of the current directory.
31749CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31750# Create the actual output files. Now the main work of configure is done.
31751cat >confcache <<\_ACEOF
31752# This file is a shell script that caches the results of configure
31753# tests run on this system so they can be shared between configure
31754# scripts and configure runs, see configure's option --config-cache.
31755# It is not useful on other systems.  If it contains results you don't
31756# want to keep, you may remove or edit it.
31757#
31758# config.status only pays attention to the cache file if you give it
31759# the --recheck option to rerun configure.
31760#
31761# `ac_cv_env_foo' variables (set or unset) will be overridden when
31762# loading this file, other *unset* `ac_cv_foo' will be assigned the
31763# following values.
31764
31765_ACEOF
31766
31767# The following way of writing the cache mishandles newlines in values,
31768# but we know of no workaround that is simple, portable, and efficient.
31769# So, we kill variables containing newlines.
31770# Ultrix sh set writes to stderr and can't be redirected directly,
31771# and sets the high bit in the cache file unless we assign to the vars.
31772(
31773  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31774    eval ac_val=\$$ac_var
31775    case $ac_val in #(
31776    *${as_nl}*)
31777      case $ac_var in #(
31778      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31779$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31780      esac
31781      case $ac_var in #(
31782      _ | IFS | as_nl) ;; #(
31783      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31784      *) { eval $ac_var=; unset $ac_var;} ;;
31785      esac ;;
31786    esac
31787  done
31788
31789  (set) 2>&1 |
31790    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31791    *${as_nl}ac_space=\ *)
31792      # `set' does not quote correctly, so add quotes: double-quote
31793      # substitution turns \\\\ into \\, and sed turns \\ into \.
31794      sed -n \
31795	"s/'/'\\\\''/g;
31796	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31797      ;; #(
31798    *)
31799      # `set' quotes correctly as required by POSIX, so do not add quotes.
31800      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31801      ;;
31802    esac |
31803    sort
31804) |
31805  sed '
31806     /^ac_cv_env_/b end
31807     t clear
31808     :clear
31809     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31810     t end
31811     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31812     :end' >>confcache
31813if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31814  if test -w "$cache_file"; then
31815    test "x$cache_file" != "x/dev/null" &&
31816      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31817$as_echo "$as_me: updating cache $cache_file" >&6;}
31818    cat confcache >$cache_file
31819  else
31820    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31821$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31822  fi
31823fi
31824rm -f confcache
31825
31826test "x$prefix" = xNONE && prefix=$ac_default_prefix
31827# Let make expand exec_prefix.
31828test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31829
31830DEFS=-DHAVE_CONFIG_H
31831
31832ac_libobjs=
31833ac_ltlibobjs=
31834U=
31835for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31836  # 1. Remove the extension, and $U if already installed.
31837  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31838  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31839  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31840  #    will be set to the directory where LIBOBJS objects are built.
31841  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31842  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31843done
31844LIBOBJS=$ac_libobjs
31845
31846LTLIBOBJS=$ac_ltlibobjs
31847
31848
31849
31850: ${CONFIG_STATUS=./config.status}
31851ac_write_fail=0
31852ac_clean_files_save=$ac_clean_files
31853ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31854{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31855$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31856as_write_fail=0
31857cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31858#! $SHELL
31859# Generated by $as_me.
31860# Run this file to recreate the current configuration.
31861# Compiler output produced by configure, useful for debugging
31862# configure, is in config.log if it exists.
31863
31864debug=false
31865ac_cs_recheck=false
31866ac_cs_silent=false
31867
31868SHELL=\${CONFIG_SHELL-$SHELL}
31869export SHELL
31870_ASEOF
31871cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31872## -------------------- ##
31873## M4sh Initialization. ##
31874## -------------------- ##
31875
31876# Be more Bourne compatible
31877DUALCASE=1; export DUALCASE # for MKS sh
31878if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31879  emulate sh
31880  NULLCMD=:
31881  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31882  # is contrary to our usage.  Disable this feature.
31883  alias -g '${1+"$@"}'='"$@"'
31884  setopt NO_GLOB_SUBST
31885else
31886  case `(set -o) 2>/dev/null` in #(
31887  *posix*) :
31888    set -o posix ;; #(
31889  *) :
31890     ;;
31891esac
31892fi
31893
31894
31895as_nl='
31896'
31897export as_nl
31898# Printing a long string crashes Solaris 7 /usr/bin/printf.
31899as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31900as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31901as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31902# Prefer a ksh shell builtin over an external printf program on Solaris,
31903# but without wasting forks for bash or zsh.
31904if test -z "$BASH_VERSION$ZSH_VERSION" \
31905    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31906  as_echo='print -r --'
31907  as_echo_n='print -rn --'
31908elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31909  as_echo='printf %s\n'
31910  as_echo_n='printf %s'
31911else
31912  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31913    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31914    as_echo_n='/usr/ucb/echo -n'
31915  else
31916    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31917    as_echo_n_body='eval
31918      arg=$1;
31919      case $arg in #(
31920      *"$as_nl"*)
31921	expr "X$arg" : "X\\(.*\\)$as_nl";
31922	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31923      esac;
31924      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31925    '
31926    export as_echo_n_body
31927    as_echo_n='sh -c $as_echo_n_body as_echo'
31928  fi
31929  export as_echo_body
31930  as_echo='sh -c $as_echo_body as_echo'
31931fi
31932
31933# The user is always right.
31934if test "${PATH_SEPARATOR+set}" != set; then
31935  PATH_SEPARATOR=:
31936  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31937    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31938      PATH_SEPARATOR=';'
31939  }
31940fi
31941
31942
31943# IFS
31944# We need space, tab and new line, in precisely that order.  Quoting is
31945# there to prevent editors from complaining about space-tab.
31946# (If _AS_PATH_WALK were called with IFS unset, it would disable word
31947# splitting by setting IFS to empty value.)
31948IFS=" ""	$as_nl"
31949
31950# Find who we are.  Look in the path if we contain no directory separator.
31951case $0 in #((
31952  *[\\/]* ) as_myself=$0 ;;
31953  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31954for as_dir in $PATH
31955do
31956  IFS=$as_save_IFS
31957  test -z "$as_dir" && as_dir=.
31958    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
31959  done
31960IFS=$as_save_IFS
31961
31962     ;;
31963esac
31964# We did not find ourselves, most probably we were run as `sh COMMAND'
31965# in which case we are not to be found in the path.
31966if test "x$as_myself" = x; then
31967  as_myself=$0
31968fi
31969if test ! -f "$as_myself"; then
31970  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
31971  exit 1
31972fi
31973
31974# Unset variables that we do not need and which cause bugs (e.g. in
31975# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
31976# suppresses any "Segmentation fault" message there.  '((' could
31977# trigger a bug in pdksh 5.2.14.
31978for as_var in BASH_ENV ENV MAIL MAILPATH
31979do eval test x\${$as_var+set} = xset \
31980  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
31981done
31982PS1='$ '
31983PS2='> '
31984PS4='+ '
31985
31986# NLS nuisances.
31987LC_ALL=C
31988export LC_ALL
31989LANGUAGE=C
31990export LANGUAGE
31991
31992# CDPATH.
31993(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31994
31995
31996# as_fn_error STATUS ERROR [LINENO LOG_FD]
31997# ----------------------------------------
31998# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
31999# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32000# script with STATUS, using 1 if that was 0.
32001as_fn_error ()
32002{
32003  as_status=$1; test $as_status -eq 0 && as_status=1
32004  if test "$4"; then
32005    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32006    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32007  fi
32008  $as_echo "$as_me: error: $2" >&2
32009  as_fn_exit $as_status
32010} # as_fn_error
32011
32012
32013# as_fn_set_status STATUS
32014# -----------------------
32015# Set $? to STATUS, without forking.
32016as_fn_set_status ()
32017{
32018  return $1
32019} # as_fn_set_status
32020
32021# as_fn_exit STATUS
32022# -----------------
32023# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32024as_fn_exit ()
32025{
32026  set +e
32027  as_fn_set_status $1
32028  exit $1
32029} # as_fn_exit
32030
32031# as_fn_unset VAR
32032# ---------------
32033# Portably unset VAR.
32034as_fn_unset ()
32035{
32036  { eval $1=; unset $1;}
32037}
32038as_unset=as_fn_unset
32039# as_fn_append VAR VALUE
32040# ----------------------
32041# Append the text in VALUE to the end of the definition contained in VAR. Take
32042# advantage of any shell optimizations that allow amortized linear growth over
32043# repeated appends, instead of the typical quadratic growth present in naive
32044# implementations.
32045if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32046  eval 'as_fn_append ()
32047  {
32048    eval $1+=\$2
32049  }'
32050else
32051  as_fn_append ()
32052  {
32053    eval $1=\$$1\$2
32054  }
32055fi # as_fn_append
32056
32057# as_fn_arith ARG...
32058# ------------------
32059# Perform arithmetic evaluation on the ARGs, and store the result in the
32060# global $as_val. Take advantage of shells that can avoid forks. The arguments
32061# must be portable across $(()) and expr.
32062if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32063  eval 'as_fn_arith ()
32064  {
32065    as_val=$(( $* ))
32066  }'
32067else
32068  as_fn_arith ()
32069  {
32070    as_val=`expr "$@" || test $? -eq 1`
32071  }
32072fi # as_fn_arith
32073
32074
32075if expr a : '\(a\)' >/dev/null 2>&1 &&
32076   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32077  as_expr=expr
32078else
32079  as_expr=false
32080fi
32081
32082if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32083  as_basename=basename
32084else
32085  as_basename=false
32086fi
32087
32088if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32089  as_dirname=dirname
32090else
32091  as_dirname=false
32092fi
32093
32094as_me=`$as_basename -- "$0" ||
32095$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32096	 X"$0" : 'X\(//\)$' \| \
32097	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32098$as_echo X/"$0" |
32099    sed '/^.*\/\([^/][^/]*\)\/*$/{
32100	    s//\1/
32101	    q
32102	  }
32103	  /^X\/\(\/\/\)$/{
32104	    s//\1/
32105	    q
32106	  }
32107	  /^X\/\(\/\).*/{
32108	    s//\1/
32109	    q
32110	  }
32111	  s/.*/./; q'`
32112
32113# Avoid depending upon Character Ranges.
32114as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32115as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32116as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32117as_cr_digits='0123456789'
32118as_cr_alnum=$as_cr_Letters$as_cr_digits
32119
32120ECHO_C= ECHO_N= ECHO_T=
32121case `echo -n x` in #(((((
32122-n*)
32123  case `echo 'xy\c'` in
32124  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32125  xy)  ECHO_C='\c';;
32126  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32127       ECHO_T='	';;
32128  esac;;
32129*)
32130  ECHO_N='-n';;
32131esac
32132
32133rm -f conf$$ conf$$.exe conf$$.file
32134if test -d conf$$.dir; then
32135  rm -f conf$$.dir/conf$$.file
32136else
32137  rm -f conf$$.dir
32138  mkdir conf$$.dir 2>/dev/null
32139fi
32140if (echo >conf$$.file) 2>/dev/null; then
32141  if ln -s conf$$.file conf$$ 2>/dev/null; then
32142    as_ln_s='ln -s'
32143    # ... but there are two gotchas:
32144    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32145    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32146    # In both cases, we have to default to `cp -p'.
32147    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32148      as_ln_s='cp -p'
32149  elif ln conf$$.file conf$$ 2>/dev/null; then
32150    as_ln_s=ln
32151  else
32152    as_ln_s='cp -p'
32153  fi
32154else
32155  as_ln_s='cp -p'
32156fi
32157rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32158rmdir conf$$.dir 2>/dev/null
32159
32160
32161# as_fn_mkdir_p
32162# -------------
32163# Create "$as_dir" as a directory, including parents if necessary.
32164as_fn_mkdir_p ()
32165{
32166
32167  case $as_dir in #(
32168  -*) as_dir=./$as_dir;;
32169  esac
32170  test -d "$as_dir" || eval $as_mkdir_p || {
32171    as_dirs=
32172    while :; do
32173      case $as_dir in #(
32174      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32175      *) as_qdir=$as_dir;;
32176      esac
32177      as_dirs="'$as_qdir' $as_dirs"
32178      as_dir=`$as_dirname -- "$as_dir" ||
32179$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32180	 X"$as_dir" : 'X\(//\)[^/]' \| \
32181	 X"$as_dir" : 'X\(//\)$' \| \
32182	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32183$as_echo X"$as_dir" |
32184    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32185	    s//\1/
32186	    q
32187	  }
32188	  /^X\(\/\/\)[^/].*/{
32189	    s//\1/
32190	    q
32191	  }
32192	  /^X\(\/\/\)$/{
32193	    s//\1/
32194	    q
32195	  }
32196	  /^X\(\/\).*/{
32197	    s//\1/
32198	    q
32199	  }
32200	  s/.*/./; q'`
32201      test -d "$as_dir" && break
32202    done
32203    test -z "$as_dirs" || eval "mkdir $as_dirs"
32204  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32205
32206
32207} # as_fn_mkdir_p
32208if mkdir -p . 2>/dev/null; then
32209  as_mkdir_p='mkdir -p "$as_dir"'
32210else
32211  test -d ./-p && rmdir ./-p
32212  as_mkdir_p=false
32213fi
32214
32215if test -x / >/dev/null 2>&1; then
32216  as_test_x='test -x'
32217else
32218  if ls -dL / >/dev/null 2>&1; then
32219    as_ls_L_option=L
32220  else
32221    as_ls_L_option=
32222  fi
32223  as_test_x='
32224    eval sh -c '\''
32225      if test -d "$1"; then
32226	test -d "$1/.";
32227      else
32228	case $1 in #(
32229	-*)set "./$1";;
32230	esac;
32231	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32232	???[sx]*):;;*)false;;esac;fi
32233    '\'' sh
32234  '
32235fi
32236as_executable_p=$as_test_x
32237
32238# Sed expression to map a string onto a valid CPP name.
32239as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32240
32241# Sed expression to map a string onto a valid variable name.
32242as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32243
32244
32245exec 6>&1
32246## ----------------------------------- ##
32247## Main body of $CONFIG_STATUS script. ##
32248## ----------------------------------- ##
32249_ASEOF
32250test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32251
32252cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32253# Save the log message, to keep $0 and so on meaningful, and to
32254# report actual input values of CONFIG_FILES etc. instead of their
32255# values after options handling.
32256ac_log="
32257This file was extended by OpenJDK $as_me jdk8, which was
32258generated by GNU Autoconf 2.67.  Invocation command line was
32259
32260  CONFIG_FILES    = $CONFIG_FILES
32261  CONFIG_HEADERS  = $CONFIG_HEADERS
32262  CONFIG_LINKS    = $CONFIG_LINKS
32263  CONFIG_COMMANDS = $CONFIG_COMMANDS
32264  $ $0 $@
32265
32266on `(hostname || uname -n) 2>/dev/null | sed 1q`
32267"
32268
32269_ACEOF
32270
32271case $ac_config_files in *"
32272"*) set x $ac_config_files; shift; ac_config_files=$*;;
32273esac
32274
32275case $ac_config_headers in *"
32276"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32277esac
32278
32279
32280cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32281# Files that config.status was made for.
32282config_files="$ac_config_files"
32283config_headers="$ac_config_headers"
32284
32285_ACEOF
32286
32287cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32288ac_cs_usage="\
32289\`$as_me' instantiates files and other configuration actions
32290from templates according to the current configuration.  Unless the files
32291and actions are specified as TAGs, all are instantiated by default.
32292
32293Usage: $0 [OPTION]... [TAG]...
32294
32295  -h, --help       print this help, then exit
32296  -V, --version    print version number and configuration settings, then exit
32297      --config     print configuration, then exit
32298  -q, --quiet, --silent
32299                   do not print progress messages
32300  -d, --debug      don't remove temporary files
32301      --recheck    update $as_me by reconfiguring in the same conditions
32302      --file=FILE[:TEMPLATE]
32303                   instantiate the configuration file FILE
32304      --header=FILE[:TEMPLATE]
32305                   instantiate the configuration header FILE
32306
32307Configuration files:
32308$config_files
32309
32310Configuration headers:
32311$config_headers
32312
32313Report bugs to <build-dev@openjdk.java.net>.
32314OpenJDK home page: <http://openjdk.java.net>."
32315
32316_ACEOF
32317cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32318ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32319ac_cs_version="\\
32320OpenJDK config.status jdk8
32321configured by $0, generated by GNU Autoconf 2.67,
32322  with options \\"\$ac_cs_config\\"
32323
32324Copyright (C) 2010 Free Software Foundation, Inc.
32325This config.status script is free software; the Free Software Foundation
32326gives unlimited permission to copy, distribute and modify it."
32327
32328ac_pwd='$ac_pwd'
32329srcdir='$srcdir'
32330AWK='$AWK'
32331test -n "\$AWK" || AWK=awk
32332_ACEOF
32333
32334cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32335# The default lists apply if the user does not specify any file.
32336ac_need_defaults=:
32337while test $# != 0
32338do
32339  case $1 in
32340  --*=?*)
32341    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32342    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32343    ac_shift=:
32344    ;;
32345  --*=)
32346    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32347    ac_optarg=
32348    ac_shift=:
32349    ;;
32350  *)
32351    ac_option=$1
32352    ac_optarg=$2
32353    ac_shift=shift
32354    ;;
32355  esac
32356
32357  case $ac_option in
32358  # Handling of the options.
32359  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32360    ac_cs_recheck=: ;;
32361  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32362    $as_echo "$ac_cs_version"; exit ;;
32363  --config | --confi | --conf | --con | --co | --c )
32364    $as_echo "$ac_cs_config"; exit ;;
32365  --debug | --debu | --deb | --de | --d | -d )
32366    debug=: ;;
32367  --file | --fil | --fi | --f )
32368    $ac_shift
32369    case $ac_optarg in
32370    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32371    '') as_fn_error $? "missing file argument" ;;
32372    esac
32373    as_fn_append CONFIG_FILES " '$ac_optarg'"
32374    ac_need_defaults=false;;
32375  --header | --heade | --head | --hea )
32376    $ac_shift
32377    case $ac_optarg in
32378    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32379    esac
32380    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32381    ac_need_defaults=false;;
32382  --he | --h)
32383    # Conflict between --help and --header
32384    as_fn_error $? "ambiguous option: \`$1'
32385Try \`$0 --help' for more information.";;
32386  --help | --hel | -h )
32387    $as_echo "$ac_cs_usage"; exit ;;
32388  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32389  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32390    ac_cs_silent=: ;;
32391
32392  # This is an error.
32393  -*) as_fn_error $? "unrecognized option: \`$1'
32394Try \`$0 --help' for more information." ;;
32395
32396  *) as_fn_append ac_config_targets " $1"
32397     ac_need_defaults=false ;;
32398
32399  esac
32400  shift
32401done
32402
32403ac_configure_extra_args=
32404
32405if $ac_cs_silent; then
32406  exec 6>/dev/null
32407  ac_configure_extra_args="$ac_configure_extra_args --silent"
32408fi
32409
32410_ACEOF
32411cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32412if \$ac_cs_recheck; then
32413  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32414  shift
32415  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32416  CONFIG_SHELL='$SHELL'
32417  export CONFIG_SHELL
32418  exec "\$@"
32419fi
32420
32421_ACEOF
32422cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32423exec 5>>config.log
32424{
32425  echo
32426  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32427## Running $as_me. ##
32428_ASBOX
32429  $as_echo "$ac_log"
32430} >&5
32431
32432_ACEOF
32433cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32434_ACEOF
32435
32436cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32437
32438# Handling of arguments.
32439for ac_config_target in $ac_config_targets
32440do
32441  case $ac_config_target in
32442    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32443    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32444    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32445    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32446    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32447    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32448    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32449
32450  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
32451  esac
32452done
32453
32454
32455# If the user did not use the arguments to specify the items to instantiate,
32456# then the envvar interface is used.  Set only those that are not.
32457# We use the long form for the default assignment because of an extremely
32458# bizarre bug on SunOS 4.1.3.
32459if $ac_need_defaults; then
32460  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32461  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32462fi
32463
32464# Have a temporary directory for convenience.  Make it in the build tree
32465# simply because there is no reason against having it here, and in addition,
32466# creating and moving files from /tmp can sometimes cause problems.
32467# Hook for its removal unless debugging.
32468# Note that there is a small window in which the directory will not be cleaned:
32469# after its creation but before its name has been assigned to `$tmp'.
32470$debug ||
32471{
32472  tmp=
32473  trap 'exit_status=$?
32474  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
32475' 0
32476  trap 'as_fn_exit 1' 1 2 13 15
32477}
32478# Create a (secure) tmp directory for tmp files.
32479
32480{
32481  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32482  test -n "$tmp" && test -d "$tmp"
32483}  ||
32484{
32485  tmp=./conf$$-$RANDOM
32486  (umask 077 && mkdir "$tmp")
32487} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32488
32489# Set up the scripts for CONFIG_FILES section.
32490# No need to generate them if there are no CONFIG_FILES.
32491# This happens for instance with `./config.status config.h'.
32492if test -n "$CONFIG_FILES"; then
32493
32494
32495ac_cr=`echo X | tr X '\015'`
32496# On cygwin, bash can eat \r inside `` if the user requested igncr.
32497# But we know of no other shell where ac_cr would be empty at this
32498# point, so we can use a bashism as a fallback.
32499if test "x$ac_cr" = x; then
32500  eval ac_cr=\$\'\\r\'
32501fi
32502ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32503if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32504  ac_cs_awk_cr='\\r'
32505else
32506  ac_cs_awk_cr=$ac_cr
32507fi
32508
32509echo 'BEGIN {' >"$tmp/subs1.awk" &&
32510_ACEOF
32511
32512
32513{
32514  echo "cat >conf$$subs.awk <<_ACEOF" &&
32515  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32516  echo "_ACEOF"
32517} >conf$$subs.sh ||
32518  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32519ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32520ac_delim='%!_!# '
32521for ac_last_try in false false false false false :; do
32522  . ./conf$$subs.sh ||
32523    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32524
32525  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32526  if test $ac_delim_n = $ac_delim_num; then
32527    break
32528  elif $ac_last_try; then
32529    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32530  else
32531    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32532  fi
32533done
32534rm -f conf$$subs.sh
32535
32536cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32537cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
32538_ACEOF
32539sed -n '
32540h
32541s/^/S["/; s/!.*/"]=/
32542p
32543g
32544s/^[^!]*!//
32545:repl
32546t repl
32547s/'"$ac_delim"'$//
32548t delim
32549:nl
32550h
32551s/\(.\{148\}\)..*/\1/
32552t more1
32553s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32554p
32555n
32556b repl
32557:more1
32558s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32559p
32560g
32561s/.\{148\}//
32562t nl
32563:delim
32564h
32565s/\(.\{148\}\)..*/\1/
32566t more2
32567s/["\\]/\\&/g; s/^/"/; s/$/"/
32568p
32569b
32570:more2
32571s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32572p
32573g
32574s/.\{148\}//
32575t delim
32576' <conf$$subs.awk | sed '
32577/^[^""]/{
32578  N
32579  s/\n//
32580}
32581' >>$CONFIG_STATUS || ac_write_fail=1
32582rm -f conf$$subs.awk
32583cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32584_ACAWK
32585cat >>"\$tmp/subs1.awk" <<_ACAWK &&
32586  for (key in S) S_is_set[key] = 1
32587  FS = ""
32588
32589}
32590{
32591  line = $ 0
32592  nfields = split(line, field, "@")
32593  substed = 0
32594  len = length(field[1])
32595  for (i = 2; i < nfields; i++) {
32596    key = field[i]
32597    keylen = length(key)
32598    if (S_is_set[key]) {
32599      value = S[key]
32600      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32601      len += length(value) + length(field[++i])
32602      substed = 1
32603    } else
32604      len += 1 + keylen
32605  }
32606
32607  print line
32608}
32609
32610_ACAWK
32611_ACEOF
32612cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32613if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32614  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32615else
32616  cat
32617fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
32618  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32619_ACEOF
32620
32621# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32622# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32623# trailing colons and then remove the whole line if VPATH becomes empty
32624# (actually we leave an empty line to preserve line numbers).
32625if test "x$srcdir" = x.; then
32626  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32627h
32628s///
32629s/^/:/
32630s/[	 ]*$/:/
32631s/:\$(srcdir):/:/g
32632s/:\${srcdir}:/:/g
32633s/:@srcdir@:/:/g
32634s/^:*//
32635s/:*$//
32636x
32637s/\(=[	 ]*\).*/\1/
32638G
32639s/\n//
32640s/^[^=]*=[	 ]*$//
32641}'
32642fi
32643
32644cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32645fi # test -n "$CONFIG_FILES"
32646
32647# Set up the scripts for CONFIG_HEADERS section.
32648# No need to generate them if there are no CONFIG_HEADERS.
32649# This happens for instance with `./config.status Makefile'.
32650if test -n "$CONFIG_HEADERS"; then
32651cat >"$tmp/defines.awk" <<\_ACAWK ||
32652BEGIN {
32653_ACEOF
32654
32655# Transform confdefs.h into an awk script `defines.awk', embedded as
32656# here-document in config.status, that substitutes the proper values into
32657# config.h.in to produce config.h.
32658
32659# Create a delimiter string that does not exist in confdefs.h, to ease
32660# handling of long lines.
32661ac_delim='%!_!# '
32662for ac_last_try in false false :; do
32663  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32664  if test -z "$ac_t"; then
32665    break
32666  elif $ac_last_try; then
32667    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32668  else
32669    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32670  fi
32671done
32672
32673# For the awk script, D is an array of macro values keyed by name,
32674# likewise P contains macro parameters if any.  Preserve backslash
32675# newline sequences.
32676
32677ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32678sed -n '
32679s/.\{148\}/&'"$ac_delim"'/g
32680t rset
32681:rset
32682s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32683t def
32684d
32685:def
32686s/\\$//
32687t bsnl
32688s/["\\]/\\&/g
32689s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32690D["\1"]=" \3"/p
32691s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32692d
32693:bsnl
32694s/["\\]/\\&/g
32695s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32696D["\1"]=" \3\\\\\\n"\\/p
32697t cont
32698s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32699t cont
32700d
32701:cont
32702n
32703s/.\{148\}/&'"$ac_delim"'/g
32704t clear
32705:clear
32706s/\\$//
32707t bsnlc
32708s/["\\]/\\&/g; s/^/"/; s/$/"/p
32709d
32710:bsnlc
32711s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32712b cont
32713' <confdefs.h | sed '
32714s/'"$ac_delim"'/"\\\
32715"/g' >>$CONFIG_STATUS || ac_write_fail=1
32716
32717cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32718  for (key in D) D_is_set[key] = 1
32719  FS = ""
32720}
32721/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32722  line = \$ 0
32723  split(line, arg, " ")
32724  if (arg[1] == "#") {
32725    defundef = arg[2]
32726    mac1 = arg[3]
32727  } else {
32728    defundef = substr(arg[1], 2)
32729    mac1 = arg[2]
32730  }
32731  split(mac1, mac2, "(") #)
32732  macro = mac2[1]
32733  prefix = substr(line, 1, index(line, defundef) - 1)
32734  if (D_is_set[macro]) {
32735    # Preserve the white space surrounding the "#".
32736    print prefix "define", macro P[macro] D[macro]
32737    next
32738  } else {
32739    # Replace #undef with comments.  This is necessary, for example,
32740    # in the case of _POSIX_SOURCE, which is predefined and required
32741    # on some systems where configure will not decide to define it.
32742    if (defundef == "undef") {
32743      print "/*", prefix defundef, macro, "*/"
32744      next
32745    }
32746  }
32747}
32748{ print }
32749_ACAWK
32750_ACEOF
32751cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32752  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32753fi # test -n "$CONFIG_HEADERS"
32754
32755
32756eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32757shift
32758for ac_tag
32759do
32760  case $ac_tag in
32761  :[FHLC]) ac_mode=$ac_tag; continue;;
32762  esac
32763  case $ac_mode$ac_tag in
32764  :[FHL]*:*);;
32765  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32766  :[FH]-) ac_tag=-:-;;
32767  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32768  esac
32769  ac_save_IFS=$IFS
32770  IFS=:
32771  set x $ac_tag
32772  IFS=$ac_save_IFS
32773  shift
32774  ac_file=$1
32775  shift
32776
32777  case $ac_mode in
32778  :L) ac_source=$1;;
32779  :[FH])
32780    ac_file_inputs=
32781    for ac_f
32782    do
32783      case $ac_f in
32784      -) ac_f="$tmp/stdin";;
32785      *) # Look for the file first in the build tree, then in the source tree
32786	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32787	 # because $ac_f cannot contain `:'.
32788	 test -f "$ac_f" ||
32789	   case $ac_f in
32790	   [\\/$]*) false;;
32791	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32792	   esac ||
32793	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32794      esac
32795      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32796      as_fn_append ac_file_inputs " '$ac_f'"
32797    done
32798
32799    # Let's still pretend it is `configure' which instantiates (i.e., don't
32800    # use $as_me), people would be surprised to read:
32801    #    /* config.h.  Generated by config.status.  */
32802    configure_input='Generated from '`
32803	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32804	`' by configure.'
32805    if test x"$ac_file" != x-; then
32806      configure_input="$ac_file.  $configure_input"
32807      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32808$as_echo "$as_me: creating $ac_file" >&6;}
32809    fi
32810    # Neutralize special characters interpreted by sed in replacement strings.
32811    case $configure_input in #(
32812    *\&* | *\|* | *\\* )
32813       ac_sed_conf_input=`$as_echo "$configure_input" |
32814       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32815    *) ac_sed_conf_input=$configure_input;;
32816    esac
32817
32818    case $ac_tag in
32819    *:-:* | *:-) cat >"$tmp/stdin" \
32820      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32821    esac
32822    ;;
32823  esac
32824
32825  ac_dir=`$as_dirname -- "$ac_file" ||
32826$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32827	 X"$ac_file" : 'X\(//\)[^/]' \| \
32828	 X"$ac_file" : 'X\(//\)$' \| \
32829	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32830$as_echo X"$ac_file" |
32831    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32832	    s//\1/
32833	    q
32834	  }
32835	  /^X\(\/\/\)[^/].*/{
32836	    s//\1/
32837	    q
32838	  }
32839	  /^X\(\/\/\)$/{
32840	    s//\1/
32841	    q
32842	  }
32843	  /^X\(\/\).*/{
32844	    s//\1/
32845	    q
32846	  }
32847	  s/.*/./; q'`
32848  as_dir="$ac_dir"; as_fn_mkdir_p
32849  ac_builddir=.
32850
32851case "$ac_dir" in
32852.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32853*)
32854  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32855  # A ".." for each directory in $ac_dir_suffix.
32856  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32857  case $ac_top_builddir_sub in
32858  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32859  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32860  esac ;;
32861esac
32862ac_abs_top_builddir=$ac_pwd
32863ac_abs_builddir=$ac_pwd$ac_dir_suffix
32864# for backward compatibility:
32865ac_top_builddir=$ac_top_build_prefix
32866
32867case $srcdir in
32868  .)  # We are building in place.
32869    ac_srcdir=.
32870    ac_top_srcdir=$ac_top_builddir_sub
32871    ac_abs_top_srcdir=$ac_pwd ;;
32872  [\\/]* | ?:[\\/]* )  # Absolute name.
32873    ac_srcdir=$srcdir$ac_dir_suffix;
32874    ac_top_srcdir=$srcdir
32875    ac_abs_top_srcdir=$srcdir ;;
32876  *) # Relative name.
32877    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32878    ac_top_srcdir=$ac_top_build_prefix$srcdir
32879    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32880esac
32881ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32882
32883
32884  case $ac_mode in
32885  :F)
32886  #
32887  # CONFIG_FILE
32888  #
32889
32890_ACEOF
32891
32892cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32893# If the template does not know about datarootdir, expand it.
32894# FIXME: This hack should be removed a few years after 2.60.
32895ac_datarootdir_hack=; ac_datarootdir_seen=
32896ac_sed_dataroot='
32897/datarootdir/ {
32898  p
32899  q
32900}
32901/@datadir@/p
32902/@docdir@/p
32903/@infodir@/p
32904/@localedir@/p
32905/@mandir@/p'
32906case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32907*datarootdir*) ac_datarootdir_seen=yes;;
32908*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32909  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32910$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32911_ACEOF
32912cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32913  ac_datarootdir_hack='
32914  s&@datadir@&$datadir&g
32915  s&@docdir@&$docdir&g
32916  s&@infodir@&$infodir&g
32917  s&@localedir@&$localedir&g
32918  s&@mandir@&$mandir&g
32919  s&\\\${datarootdir}&$datarootdir&g' ;;
32920esac
32921_ACEOF
32922
32923# Neutralize VPATH when `$srcdir' = `.'.
32924# Shell code in configure.ac might set extrasub.
32925# FIXME: do we really want to maintain this feature?
32926cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32927ac_sed_extra="$ac_vpsub
32928$extrasub
32929_ACEOF
32930cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32931:t
32932/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32933s|@configure_input@|$ac_sed_conf_input|;t t
32934s&@top_builddir@&$ac_top_builddir_sub&;t t
32935s&@top_build_prefix@&$ac_top_build_prefix&;t t
32936s&@srcdir@&$ac_srcdir&;t t
32937s&@abs_srcdir@&$ac_abs_srcdir&;t t
32938s&@top_srcdir@&$ac_top_srcdir&;t t
32939s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32940s&@builddir@&$ac_builddir&;t t
32941s&@abs_builddir@&$ac_abs_builddir&;t t
32942s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32943$ac_datarootdir_hack
32944"
32945eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
32946  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32947
32948test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32949  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
32950  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
32951  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32952which seems to be undefined.  Please make sure it is defined" >&5
32953$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32954which seems to be undefined.  Please make sure it is defined" >&2;}
32955
32956  rm -f "$tmp/stdin"
32957  case $ac_file in
32958  -) cat "$tmp/out" && rm -f "$tmp/out";;
32959  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
32960  esac \
32961  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32962 ;;
32963  :H)
32964  #
32965  # CONFIG_HEADER
32966  #
32967  if test x"$ac_file" != x-; then
32968    {
32969      $as_echo "/* $configure_input  */" \
32970      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
32971    } >"$tmp/config.h" \
32972      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32973    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
32974      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32975$as_echo "$as_me: $ac_file is unchanged" >&6;}
32976    else
32977      rm -f "$ac_file"
32978      mv "$tmp/config.h" "$ac_file" \
32979	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
32980    fi
32981  else
32982    $as_echo "/* $configure_input  */" \
32983      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
32984      || as_fn_error $? "could not create -" "$LINENO" 5
32985  fi
32986 ;;
32987
32988
32989  esac
32990
32991done # for ac_tag
32992
32993
32994as_fn_exit 0
32995_ACEOF
32996ac_clean_files=$ac_clean_files_save
32997
32998test $ac_write_fail = 0 ||
32999  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33000
33001
33002# configure is writing to config.log, and then calls config.status.
33003# config.status does its own redirection, appending to config.log.
33004# Unfortunately, on DOS this fails, as config.log is still kept open
33005# by configure, so config.status won't be able to write to it; its
33006# output is simply discarded.  So we exec the FD to /dev/null,
33007# effectively closing config.log, so it can be properly (re)opened and
33008# appended to by config.status.  When coming back to configure, we
33009# need to make the FD available again.
33010if test "$no_create" != yes; then
33011  ac_cs_success=:
33012  ac_config_status_args=
33013  test "$silent" = yes &&
33014    ac_config_status_args="$ac_config_status_args --quiet"
33015  exec 5>/dev/null
33016  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33017  exec 5>>config.log
33018  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33019  # would make configure fail if this is the last instruction.
33020  $ac_cs_success || as_fn_exit 1
33021fi
33022if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33023  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33024$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33025fi
33026
33027
33028# Make the compare script executable
33029$CHMOD +x $OUTPUT_ROOT/compare.sh
33030
33031# Finally output some useful information to the user
33032
33033# Finally output some useful information to the user
33034
33035if test "x$CCACHE_FOUND" != x; then
33036	if  test "x$HAS_GOOD_CCACHE" = x; then
33037		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33038		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33039	else
33040		CCACHE_STATUS="installed and in use"
33041	fi
33042else
33043	if test "x$GCC" = xyes; then
33044		CCACHE_STATUS="not installed (consider installing)"
33045		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33046	else
33047		CCACHE_STATUS="not available for your system"
33048	fi
33049fi
33050
33051printf "\n"
33052printf "====================================================\n"
33053printf "A new configuration has been successfully created in\n"
33054printf "$OUTPUT_ROOT\n"
33055if test "x$CONFIGURE_COMMAND_LINE" != x; then
33056	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33057else
33058	printf "using default settings.\n"
33059fi
33060
33061printf "\n"
33062printf "Configuration summary:\n"
33063printf "* Debug level:    $DEBUG_LEVEL\n"
33064printf "* JDK variant:    $JDK_VARIANT\n"
33065printf "* JVM variants:   $with_jvm_variants\n"
33066printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33067
33068printf "\n"
33069printf "Tools summary:\n"
33070if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33071  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33072fi
33073printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33074printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33075printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33076
33077printf "\n"
33078printf "Build performance summary:\n"
33079printf "* Cores to use:   $NUM_CORES\n"
33080printf "* Memory limit:   $MEMORY_SIZE MB\n"
33081printf "* ccache status:  $CCACHE_STATUS\n"
33082printf "\n"
33083
33084if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33085	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33086	printf "$CCACHE_HELP_MSG\n"
33087
33088    # Print a helpful message on how to acquire the necessary build dependency.
33089    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33090    MISSING_DEPENDENCY=ccache
33091    PKGHANDLER_COMMAND=
33092
33093    case $PKGHANDLER in
33094	apt-get)
33095                apt_help     $MISSING_DEPENDENCY ;;
33096    yum)
33097                yum_help     $MISSING_DEPENDENCY ;;
33098	port)
33099                port_help    $MISSING_DEPENDENCY ;;
33100	pkgutil)
33101                pkgutil_help $MISSING_DEPENDENCY ;;
33102	pkgadd)
33103                pkgadd_help  $MISSING_DEPENDENCY ;;
33104    * )
33105      break ;;
33106    esac
33107
33108    if test "x$PKGHANDLER_COMMAND" != x; then
33109        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33110    fi
33111
33112	printf "$HELP_MSG\n"
33113	printf "\n"
33114fi
33115
33116if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33117	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33118	printf "will result in longer build times.\n"
33119	printf "\n"
33120fi
33121
33122if test "x$FOUND_ALT_VARIABLES" != "x"; then
33123	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33124	printf "These are not respected, and will be ignored. It is recommended\n"
33125	printf "that you clean your environment. The following variables are set:\n"
33126	printf "$FOUND_ALT_VARIABLES\n"
33127	printf "\n"
33128fi
33129
33130if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33131	printf "WARNING: Your build output directory is not on a local disk.\n"
33132	printf "This will severely degrade build performance!\n"
33133	printf "It is recommended that you create an output directory on a local disk,\n"
33134	printf "and run the configure script again from that directory.\n"
33135	printf "\n"
33136fi
33137
33138if test "x$IS_RECONFIGURE" = "xyes"; then
33139	printf "WARNING: The result of this configuration has overridden an older\n"
33140	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33141	printf "proper build. Failure to do so might result in strange build problems.\n"
33142	printf "\n"
33143fi
33144
33145